mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Backport of:
---------------------------------------------------------- revno: 2630.4.35 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Wed 2008-06-25 16:44:00 +0400 message: Fix a MyISAM-specific bug in the new implementation of LOCK TABLES (WL#3726). If more than one instance of a MyISAM table are open in the same connection, all of them must share the same status_param. Otherwise, unlock of a table may lead to lost records. See also comments in thr_lock.c.
This commit is contained in:
@@ -291,6 +291,24 @@ select * from t1;
|
||||
unlock tables;
|
||||
drop table t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # Ensure that mi_copy_status is called for two instances
|
||||
--echo # of the same table when it is reopened after a flush.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
drop view if exists v1;
|
||||
--enable_warnings
|
||||
create table t1 (c1 int);
|
||||
create view v1 as select * from t1;
|
||||
lock tables t1 write, v1 write;
|
||||
flush table t1;
|
||||
insert into t1 values (33);
|
||||
flush table t1;
|
||||
select * from t1;
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 6.0 tests.
|
||||
|
||||
Reference in New Issue
Block a user