From 6eac27a9cd197d450a6f51e80b23a7c584eef5c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 Mar 2005 16:29:43 -0800 Subject: Fix 64-bit issue with mysql_client_test. (Bug #8047) tests/mysql_client_test.c: Fix data type of variable used in bind --- tests/mysql_client_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 626b90faf73..d3f19391ee5 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -10976,7 +10976,7 @@ static void test_view_insert() MYSQL_STMT *insert_stmt, *select_stmt; int rc, i; MYSQL_BIND bind[1]; - long my_val = 0L; + int my_val = 0; ulong my_length = 0L; long my_null = 0L; const char *query= -- cgit v1.2.1 From 2ad50a50ced58747a5c13c093cb8612140896876 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 10:27:23 -0800 Subject: Fix HP/UX debug compile error. (Bug #8679) libmysql/libmysql.c: Break up variable definitions to appease HP/UX compiler. --- libmysql/libmysql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 20a000f1e4d..9746cb222fa 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4144,7 +4144,8 @@ static my_bool is_binary_compatible(enum enum_field_types type1, range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB, MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB, MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY, - MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL }, + MYSQL_TYPE_DECIMAL, MYSQL_TYPE_NULL }; + static const enum enum_field_types *range_list[]= { range1, range2, range3, range4 }, **range_list_end= range_list + sizeof(range_list)/sizeof(*range_list); const enum enum_field_types **range, *type; -- cgit v1.2.1 From cc9e66f5654ee6610c7c1a1e51ec3bfaaf419dd2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 22:15:23 +0100 Subject: sp.test, sp.result: transactional test removed sp_trans.test, sp_trans.result: new file mysql-test/r/sp.result: transactional test removed mysql-test/t/sp.test: transactional test removed --- mysql-test/r/sp.result | 22 ---------------------- mysql-test/r/sp_trans.result | 22 ++++++++++++++++++++++ mysql-test/t/sp.test | 25 ------------------------- mysql-test/t/sp_trans.test | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 47 deletions(-) create mode 100644 mysql-test/r/sp_trans.result create mode 100644 mysql-test/t/sp_trans.test diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 2984bd3975f..5366ecb2be3 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -2778,25 +2778,3 @@ a drop procedure bug8937| delete from t1| drop table t1,t2; -drop procedure if exists sp1; -create table t1 (a int) engine=innodb| -create procedure sp1 () -begin -truncate table t1; insert t1 values (1); rollback; -end -| -set autocommit=0; -insert t1 values (2); -call sp1(); -ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction -commit; -set autocommit=1; -select * from t1; -a -2 -call sp1(); -select * from t1; -a -1 -drop table t1; -drop procedure sp1; diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result new file mode 100644 index 00000000000..0a28fae3c0d --- /dev/null +++ b/mysql-test/r/sp_trans.result @@ -0,0 +1,22 @@ +drop procedure if exists sp1; +create table t1 (a int) engine=innodb| +create procedure sp1 () +begin +truncate table t1; insert t1 values (1); rollback; +end| +set autocommit=0; +insert t1 values (2); +call sp1(); +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +commit; +select * from t1; +a +2 +call sp1(); +ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction +set autocommit=1; +select * from t1; +a +2 +drop table t1; +drop procedure sp1; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 31c6a16580f..cf7415a3048 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -3390,28 +3390,3 @@ delete from t1| delimiter ;| drop table t1,t2; -# -# BUG#8850 -# ---disable_warnings -drop procedure if exists sp1; ---enable_warnings -delimiter |; -create table t1 (a int) engine=innodb| -create procedure sp1 () -begin - truncate table t1; insert t1 values (1); rollback; -end -| -delimiter ;| -set autocommit=0; -insert t1 values (2); ---error 1192 -call sp1(); -commit; -set autocommit=1; -select * from t1; -call sp1(); -select * from t1; -drop table t1; -drop procedure sp1; diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test new file mode 100644 index 00000000000..30622027a94 --- /dev/null +++ b/mysql-test/t/sp_trans.test @@ -0,0 +1,35 @@ +# +# tests that require InnoDB... +# + +-- source include/have_innodb.inc + +# +# BUG#8850 +# +--disable_warnings +drop procedure if exists sp1; +--enable_warnings +delimiter |; +create table t1 (a int) engine=innodb| +create procedure sp1 () +begin + truncate table t1; insert t1 values (1); rollback; +end| +delimiter ;| +set autocommit=0; +insert t1 values (2); +--error 1192 +call sp1(); +commit; +select * from t1; +# +# when CALL will be fixed to not start a transaction, the error should +# go away +--error 1192 +call sp1(); +set autocommit=1; +select * from t1; +drop table t1; +drop procedure sp1; + -- cgit v1.2.1