diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-13 15:33:11 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-13 15:33:11 -0400 |
commit | d3918cb2ad570f993c1dbd86ccff53495e6fc298 (patch) | |
tree | be89f348c01d092ad1a0f7cbbb80b574a3f20a6c | |
parent | 65de00b65997c004c41985dec36a49a208116961 (diff) |
Fix some MySQL bugs
-rw-r--r-- | src/mysql.sml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mysql.sml b/src/mysql.sml index 32df47d4..25efc641 100644 --- a/src/mysql.sml +++ b/src/mysql.sml @@ -1054,7 +1054,7 @@ fun queryPrepared {loc, id, query, inputs, cols, doCols, nested} = newline, string "if (localtime_r(&arg", string (Int.toString (i + 1)), - string ", &tm) == NULL) uw_error(\"", + string ", &tms) == NULL) uw_error(ctx, FATAL, \"", string (ErrorMsg.spanToString loc), string ": error converting to MySQL time\");", newline, @@ -1073,6 +1073,8 @@ fun queryPrepared {loc, id, query, inputs, cols, doCols, nested} = string "].buffer = &in_buffer", string (Int.toString i), string ";", + newline, + string "});", newline] end | Channel => box [string "in_buffer", @@ -1178,7 +1180,7 @@ fun dml loc = newline, string "MYSQL_stmt *stmt = mysql_stmt_init(conn->conn);", newline, - string "if (stmt == NULL) uw_error(ctx, \"", + string "if (stmt == NULL) uw_error(ctx, FATAL, \"", string (ErrorMsg.spanToString loc), string ": can't allocate temporary prepared statement\");", newline, @@ -1333,7 +1335,7 @@ fun dmlPrepared {loc, id, dml, inputs} = newline, string "if (localtime_r(&arg", string (Int.toString (i + 1)), - string ", &tm) == NULL) uw_error(\"", + string ", &tms) == NULL) uw_error(ctx, FATAL, \"", string (ErrorMsg.spanToString loc), string ": error converting to MySQL time\");", newline, @@ -1349,6 +1351,8 @@ fun dmlPrepared {loc, id, dml, inputs} = string "].buffer = &in_buffer", string (Int.toString i), string ";", + newline, + string "});", newline] end | Channel => box [string "in_buffer", |