mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
3594adb165
innobase/include/lock0lock.h: Add lock_table_unlock() and lock_release_tables_off_kernel() Add LOCK_TABLE_EXP innobase/include/row0mysql.h: Add row_unlock_table_for_mysql() and row_lock_table_for_mysql() innobase/include/trx0trx.h: Add n_tables_locked innobase/lock/lock0lock.c: Add LOCK_TABLE_EXP for explicit LOCK TABLE commands Add lock_table_unlock() Add lock_release_tables_off_kernel() innobase/row/row0mysql.c: Add row_unlock_table_for_mysql() and row_lock_table_for_mysql() innobase/trx/trx0trx.c: Add n_tables_locked mysql-test/r/innodb.result: Updated handling of auto_inc columns sql/ha_innodb.cc: Call row_lock_table_for_mysql() and row_unlock_table_for_mysql()
22 lines
389 B
Text
22 lines
389 B
Text
drop table if exists t1;
|
|
create table t1 (id integer, x integer) engine=INNODB;
|
|
insert into t1 values(0, 0);
|
|
set autocommit=0;
|
|
SELECT * from t1 where id = 0 FOR UPDATE;
|
|
id x
|
|
0 0
|
|
set autocommit=0;
|
|
lock table t1 write;
|
|
update t1 set x=1 where id = 0;
|
|
select * from t1;
|
|
id x
|
|
0 1
|
|
commit;
|
|
update t1 set x=2 where id = 0;
|
|
commit;
|
|
unlock tables;
|
|
select * from t1;
|
|
id x
|
|
0 2
|
|
commit;
|
|
drop table t1;
|