|
From: | Xypron |
Subject: | Re: [Bug-glpk] Assertion failed: str2num(buf, &num) == 0 Error detected in file ..\src\glpsql.c at line 900 |
Date: | Mon, 15 Feb 2010 21:01:42 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0 |
Hello Andrew, please, find a patched glpsql.c appended. The diff can be seen at http://glpk.dyndns.org/viewvc/svn/glpk/branches/glpk-4.42-sql_null_data/src/glpsql.c?view=diff&r1=85&r2=83&diff_format=h Best regards Xypron Andrew Makhorin wrote:
Andrew, do you have any suggestion how to patch this bug properly?Consider the following example: table data IN "...": s<- [FROM,TO], d~DISTANCE, c~COST; For fields FROM and TO a null value is not allowed and should cause an error. However, for fields DISTANCE and/or COST it could be allowed, that would mean missing data.I think that if the table driver routine encounters a null value, it would be sufficient just *not* to call mpl_tab_set_num/str, in which case dca->type[k] being initialized to '?' will not be changed and cause an error.
glpsql.tar.gz
Description: GNU Zip compressed data
[Prev in Thread] | Current Thread | [Next in Thread] |