# HG changeset patch # User Adam Chlipala # Date 1247849917 14400 # Node ID 9c1b7e46eed25adeea3116557d36e6bb960cef5c # Parent 45a63416adb455314d734442f64b17c1fb74f484 MySQL CGI working diff -r 45a63416adb4 -r 9c1b7e46eed2 src/cjr_print.sml --- a/src/cjr_print.sml Fri Jul 17 12:34:00 2009 -0400 +++ b/src/cjr_print.sml Fri Jul 17 12:58:37 2009 -0400 @@ -2844,7 +2844,7 @@ end) env ds in - box pps + box (string (#sqlPrefix (Settings.currentDbms ())) :: pps) end end diff -r 45a63416adb4 -r 9c1b7e46eed2 src/mysql.sml --- a/src/mysql.sml Fri Jul 17 12:34:00 2009 -0400 +++ b/src/mysql.sml Fri Jul 17 12:58:37 2009 -0400 @@ -487,7 +487,9 @@ string "}"] else - string "static void uw_db_prepare(uw_context ctx) { }", + box [string "static void uw_db_prepare(uw_context ctx) { }", + newline, + string "static void uw_db_validate(uw_context ctx) { }"], newline, newline, @@ -1445,6 +1447,7 @@ createSequence = fn s => "CREATE TABLE " ^ s ^ " (id INTEGER PRIMARY KEY AUTO_INCREMENT)", textKeysNeedLengths = true, supportsNextval = false, - supportsNestedPrepared = false} + supportsNestedPrepared = false, + sqlPrefix = "SET storage_engine=InnoDB;\n"} end diff -r 45a63416adb4 -r 9c1b7e46eed2 src/postgres.sml --- a/src/postgres.sml Fri Jul 17 12:34:00 2009 -0400 +++ b/src/postgres.sml Fri Jul 17 12:58:37 2009 -0400 @@ -893,7 +893,8 @@ createSequence = fn s => "CREATE SEQUENCE " ^ s, textKeysNeedLengths = false, supportsNextval = true, - supportsNestedPrepared = true} + supportsNestedPrepared = true, + sqlPrefix = ""} val () = setDbms "postgres" diff -r 45a63416adb4 -r 9c1b7e46eed2 src/settings.sig --- a/src/settings.sig Fri Jul 17 12:34:00 2009 -0400 +++ b/src/settings.sig Fri Jul 17 12:58:37 2009 -0400 @@ -153,7 +153,8 @@ createSequence : string -> string, textKeysNeedLengths : bool, supportsNextval : bool, - supportsNestedPrepared : bool + supportsNestedPrepared : bool, + sqlPrefix : string } val addDbms : dbms -> unit diff -r 45a63416adb4 -r 9c1b7e46eed2 src/settings.sml --- a/src/settings.sml Fri Jul 17 12:34:00 2009 -0400 +++ b/src/settings.sml Fri Jul 17 12:58:37 2009 -0400 @@ -343,7 +343,8 @@ createSequence : string -> string, textKeysNeedLengths : bool, supportsNextval : bool, - supportsNestedPrepared : bool + supportsNestedPrepared : bool, + sqlPrefix : string } val dbmses = ref ([] : dbms list) @@ -365,7 +366,8 @@ createSequence = fn _ => "", textKeysNeedLengths = false, supportsNextval = false, - supportsNestedPrepared = false} : dbms) + supportsNestedPrepared = false, + sqlPrefix = ""} : dbms) fun addDbms v = dbmses := v :: !dbmses fun setDbms s =