1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug#34891 sp_notembedded.test fails sporadically

The problem is that since MyISAM's concurrent_insert is on by
default some concurrent SELECT statements might not see changes
made by INSERT statements in other connections, even if the
INSERT statement has returned.

The solution is to disable concurrent_insert so that INSERT
statements returns after the data is actually visible to other
statements.


mysql-test/r/flush_read_lock_kill.result:
  Restore old value of @@global.concurrent_insert
mysql-test/r/kill.result:
  Restore old value of @@global.concurrent_insert
mysql-test/r/sp_notembedded.result:
  Update test case result
mysql-test/t/flush_read_lock_kill.test:
  Restore old value of @@global.concurrent_insert so it
  doesn't affect other tests.
mysql-test/t/kill.test:
  Restore old value of @@global.concurrent_insert so it
  doesn't affect other tests.
mysql-test/t/sp_notembedded.test:
  Disable and restore concurrent_insert value at the end of the
  test case. The test case for Bug 29936 requires that the inserted
  rows need to be visible before a SELECT statement is queued in
  another connection.
  
  Remove sleep at the start of the test, it's not necessary to log
  the result of the processlist command, showing the warnings has
  the same end result.
This commit is contained in:
unknown
2008-03-13 14:54:29 -03:00
parent 054341a6d0
commit 416ab8532e
6 changed files with 122 additions and 71 deletions

View File

@ -1,3 +1,5 @@
set @old_concurrent_insert= @@global.concurrent_insert;
set @@global.concurrent_insert= 0;
drop table if exists t1,t3;
drop procedure if exists bug4902|
create procedure bug4902()
@ -17,11 +19,11 @@ begin
show processlist;
end|
call bug4902_2()|
Id User Host db Command Time State Info
# root localhost test Query # NULL show processlist
show warnings|
Level Code Message
call bug4902_2()|
Id User Host db Command Time State Info
# root localhost test Query # NULL show processlist
show warnings|
Level Code Message
drop procedure bug4902_2|
drop table if exists t1|
create table t1 (
@ -68,7 +70,7 @@ c
2
show status like 'Qcache_hits'|
Variable_name Value
Qcache_hits 2
Qcache_hits 0
set global query_cache_size = @x|
flush status|
flush query cache|
@ -208,3 +210,27 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
drop user mysqltest_1@localhost;
drop procedure 15298_1;
drop procedure 15298_2;
drop table if exists t1;
drop procedure if exists p1;
create table t1 (value varchar(15));
create procedure p1() update t1 set value='updated' where value='old';
call p1();
insert into t1 (value) values ("old");
select get_lock('b26162',120);
get_lock('b26162',120)
1
select 'rl_acquirer', value from t1 where get_lock('b26162',120);;
set session low_priority_updates=on;
call p1();;
select 'rl_contender', value from t1;
rl_contender value
rl_contender old
select release_lock('b26162');
release_lock('b26162')
1
rl_acquirer value
rl_acquirer old
drop procedure p1;
drop table t1;
set session low_priority_updates=default;
set @@global.concurrent_insert= @old_concurrent_insert;