mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean
This commit is contained in:
commit
5f578edb10
6 changed files with 60 additions and 49 deletions
|
@ -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,
|
range4[]= { MYSQL_TYPE_ENUM, MYSQL_TYPE_SET, MYSQL_TYPE_TINY_BLOB,
|
||||||
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
|
MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
|
||||||
MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_STRING, MYSQL_TYPE_GEOMETRY,
|
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[]= { range1, range2, range3, range4 },
|
||||||
**range_list_end= range_list + sizeof(range_list)/sizeof(*range_list);
|
**range_list_end= range_list + sizeof(range_list)/sizeof(*range_list);
|
||||||
const enum enum_field_types **range, *type;
|
const enum enum_field_types **range, *type;
|
||||||
|
|
|
@ -2778,25 +2778,3 @@ a
|
||||||
drop procedure bug8937|
|
drop procedure bug8937|
|
||||||
delete from t1|
|
delete from t1|
|
||||||
drop table t1,t2;
|
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;
|
|
||||||
|
|
22
mysql-test/r/sp_trans.result
Normal file
22
mysql-test/r/sp_trans.result
Normal file
|
@ -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;
|
|
@ -3392,28 +3392,3 @@ delete from t1|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
drop table t1,t2;
|
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;
|
|
||||||
|
|
35
mysql-test/t/sp_trans.test
Normal file
35
mysql-test/t/sp_trans.test
Normal file
|
@ -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;
|
||||||
|
|
|
@ -10976,7 +10976,7 @@ static void test_view_insert()
|
||||||
MYSQL_STMT *insert_stmt, *select_stmt;
|
MYSQL_STMT *insert_stmt, *select_stmt;
|
||||||
int rc, i;
|
int rc, i;
|
||||||
MYSQL_BIND bind[1];
|
MYSQL_BIND bind[1];
|
||||||
long my_val = 0L;
|
int my_val = 0;
|
||||||
ulong my_length = 0L;
|
ulong my_length = 0L;
|
||||||
long my_null = 0L;
|
long my_null = 0L;
|
||||||
const char *query=
|
const char *query=
|
||||||
|
|
Loading…
Reference in a new issue