Commit 1852fb97 authored by anozdrin/alik@quad.'s avatar anozdrin/alik@quad.
Browse files

Merge quad.:/mnt/raid/alik/MySQL/devel/5.1

into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
parents dbcd4d9e dcb00121
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1623,4 +1623,19 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
show events where Db= 'information_schema';
Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
use test;
#
# Bug#34166: Server crash in SHOW OPEN TABLES and prelocking
#
drop table if exists t1;
drop function if exists f1;
create table t1 (a int);
create function f1() returns int
begin
insert into t1 (a) values (1);
return 0;
end|
show open tables where f1()=0;
show open tables where f1()=0;
drop table t1;
drop function f1;
End of 5.1 tests.
+10 −0
Original line number Diff line number Diff line
@@ -143,4 +143,14 @@ connection: default
flush tables;
unlock tables;
drop table t1;
drop table if exists t1,t2;
create table t1 (a int);
flush status;
lock tables t1 read;
insert into t1 values(1);;
unlock tables;
drop table t1;
select @tlwa < @tlwb;
@tlwa < @tlwb
1
End of 5.1 tests
+22 −0
Original line number Diff line number Diff line
@@ -1248,4 +1248,26 @@ show events from information_schema;
show events where Db= 'information_schema';
use test;

--echo #
--echo # Bug#34166: Server crash in SHOW OPEN TABLES and prelocking
--echo #
--disable_warnings
drop table if exists t1;
drop function if exists f1;
--enable_warnings
create table t1 (a int);
delimiter |;
create function f1() returns int
begin
  insert into t1 (a) values (1);
  return 0;
end|
delimiter ;|
--disable_result_log
show open tables where f1()=0;
show open tables where f1()=0;
--enable_result_log
drop table t1;
drop function f1;

--echo End of 5.1 tests.
+31 −0
Original line number Diff line number Diff line
@@ -439,4 +439,35 @@ connection default;
disconnect flush;
drop table t1;

#
# Bug#30331: Table_locks_waited shows inaccurate values
#

--disable_warnings
drop table if exists t1,t2;
--enable_warnings

create table t1 (a int);
flush status;
lock tables t1 read;
let $tlwa= `show status like 'Table_locks_waited'`;
connect (waiter,localhost,root,,);
connection waiter;
--send insert into t1 values(1);
connection default;
let $wait_condition=
  select count(*) = 1 from information_schema.processlist
  where state = "Locked" and info = "insert into t1 values(1)";
--source include/wait_condition.inc
let $tlwb= `show status like 'Table_locks_waited'`;
unlock tables;
drop table t1;
disconnect waiter;
connection default;
--disable_query_log
eval SET @tlwa= SUBSTRING_INDEX('$tlwa', '	', -1);
eval SET @tlwb= SUBSTRING_INDEX('$tlwb', '	', -1);
--enable_query_log
select @tlwa < @tlwb;

--echo End of 5.1 tests
+3 −3
Original line number Diff line number Diff line
@@ -141,10 +141,10 @@ set GLOBAL myisam_max_sort_file_size=2000000;
show global variables like 'myisam_max_sort_file_size';
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
set GLOBAL myisam_max_sort_file_size=default;
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
--replace_result 2147483647 FILE_SIZE 9223372036853727232 FILE_SIZE
show global variables like 'myisam_max_sort_file_size';
--replace_result 9223372036853727232 FILE_SIZE 2146435072 FILE_SIZE
select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
--replace_result 2147483647 FILE_SIZE 9223372036853727232 FILE_SIZE
select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';

set global net_retry_count=10, session net_retry_count=10;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
Loading