aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@Pirx.gnu.org.ua>2010-03-22 14:54:13 +0200
committerSergey Poznyakoff <gray@Pirx.gnu.org.ua>2010-03-22 14:54:13 +0200
commit9338032d60a9a480f56d7efc105e721f5e6faf12 (patch)
tree41f44dba7407de7222bd6fcfbbb49c7844b30139 /src
parentae7f9b02e9ad941a0c3e68787268fe651a043c33 (diff)
downloadgamma-9338032d60a9a480f56d7efc105e721f5e6faf12.tar.gz
gamma-9338032d60a9a480f56d7efc105e721f5e6faf12.tar.bz2
Bugfix.
* src/mysql.c (s_mysql_query): Represent NULL columns as #f * src/pgsql.c (result_to_list): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/mysql.c7
-rw-r--r--src/pgsql.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/mysql.c b/src/mysql.c
index 08b4ab8..81364b4 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -165,8 +165,11 @@ s_mysql_query(struct sql_connect *conn, const char *query)
if (!row)
break;
for (j = 0; j < nfields; j++) {
- SCM new_elt = scm_cons(scm_from_locale_string(row[j]),
- SCM_EOL);
+ SCM new_elt =
+ scm_cons(row[j] ?
+ scm_from_locale_string(row[j]) :
+ SCM_BOOL_F,
+ SCM_EOL);
if (head == SCM_EOL)
head = new_elt;
else
diff --git a/src/pgsql.c b/src/pgsql.c
index 7fceacd..c5cf51e 100644
--- a/src/pgsql.c
+++ b/src/pgsql.c
@@ -104,7 +104,9 @@ result_to_list(PGresult *res)
for (j = 0; j < nfields; j++) {
char *val = PQgetvalue(res, i, j);
- SCM new_elt = scm_cons(scm_from_locale_string(val), SCM_EOL);
+ SCM new_elt = scm_cons(val ?
+ scm_from_locale_string(val) :
+ SCM_BOOL_F, SCM_EOL);
if (head == SCM_EOL)
head = new_elt;
else

Return to:

Send suggestions and report system problems to the System administrator.