# HG changeset patch # User Adam Chlipala # Date 1252870391 14400 # Node ID 6a284a3519bad1176b7e7d9a2d03e5fc86cf6acd # Parent 0a156bbd205f5f7cba1487a30e2165952593efbd Fix some MySQL bugs diff -r 0a156bbd205f -r 6a284a3519ba src/mysql.sml --- a/src/mysql.sml Sun Sep 13 13:25:09 2009 -0400 +++ b/src/mysql.sml Sun Sep 13 15:33:11 2009 -0400 @@ -1054,7 +1054,7 @@ 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 @@ string "].buffer = &in_buffer", string (Int.toString i), string ";", + newline, + string "});", newline] end | Channel => box [string "in_buffer", @@ -1178,7 +1180,7 @@ 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 @@ 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 @@ string "].buffer = &in_buffer", string (Int.toString i), string ";", + newline, + string "});", newline] end | Channel => box [string "in_buffer",