diff options
author | Ingela Anderton Andin <[email protected]> | 2011-05-30 10:32:35 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-06-13 11:11:33 +0200 |
commit | a70ee114820dd3922f3049e93981bc326af1863a (patch) | |
tree | dd90ed35ffdd4f748d6c882e66db021d48940d43 /lib/odbc/test/odbc_test_lib.erl | |
parent | 751ec4f918bed2f5455538e6296c6b925bcca002 (diff) | |
download | otp-a70ee114820dd3922f3049e93981bc326af1863a.tar.gz otp-a70ee114820dd3922f3049e93981bc326af1863a.tar.bz2 otp-a70ee114820dd3922f3049e93981bc326af1863a.zip |
Test odbc with MySQL
Updated test framework to also be able to test the erlang odbc application
with MySQL as database.
Made minor changes to error-handling to improve interoperability
with MySQL-drivers.
Diffstat (limited to 'lib/odbc/test/odbc_test_lib.erl')
-rw-r--r-- | lib/odbc/test/odbc_test_lib.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/odbc/test/odbc_test_lib.erl b/lib/odbc/test/odbc_test_lib.erl index 012eb96e43..9956d74d24 100644 --- a/lib/odbc/test/odbc_test_lib.erl +++ b/lib/odbc/test/odbc_test_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2010. All Rights Reserved. +%% Copyright Ericsson AB 2002-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -75,3 +75,8 @@ check_row_count(Expected, Count) -> to_upper(List) -> lists:map(fun(Str) -> string:to_upper(Str) end, List). + +strict(Ref, mysql) -> + odbc:sql_query(Ref, "SET sql_mode='STRICT_ALL_TABLES,STRICT_TRANS_TABLES';"); +strict(_,_) -> + ok. |