mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
9cf998e6a9
mysql-test/r/csv.result: Update after add of missing semicolon mysql-test/r/drop.result: Update result file, no space before commands that has been "sent" mysql-test/r/flush.result: Update result file, no space before commands that has been "sent" mysql-test/r/flush_block_commit.result: Update result file, no space before commands that has been "sent" mysql-test/r/flush_read_lock_kill.result: Update result file, no space before commands that has been "sent" mysql-test/r/grant2.result: Update result file, no space before commands that has been "sent" mysql-test/r/handler.result: Update result file, no space before commands that has been "sent" mysql-test/r/innodb_notembedded.result: Update result file, no space before commands that has been "sent" mysql-test/r/kill.result: Update result file, no space before commands that has been "sent" mysql-test/r/lock_multi.result: Update result file, no space before commands that has been "sent" mysql-test/r/multi_update.result: Update result file, no space before commands that has been "sent" mysql-test/r/mysqltest.result: Update result mysql-test/r/query_cache.result: Update after add of missing semicolon mysql-test/r/query_cache_notembedded.result: Update result file, no space before commands that has been "sent" mysql-test/r/sp-threads.result: Update result file, no space before commands that has been "sent" mysql-test/r/sp_notembedded.result: Update after add of missing semicolon mysql-test/r/type_blob.result: Remove extra drop table mysql-test/t/csv.test: Add missing semicolon mysql-test/t/query_cache.test: Add missing semicolon mysql-test/t/sp-error.test: Remove "tab" from end of error declaration mysql-test/t/sp.test: Wrong delimiter, used ; instead of | mysql-test/t/sp_notembedded.test: Wrong delimiter, used ; instead of | mysql-test/t/view_grant.test: An incomplete error name specification was used.
20 lines
421 B
Text
20 lines
421 B
Text
drop table if exists t1;
|
|
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
|
|
insert t1 values (1,100);
|
|
create function f1 () returns integer begin
|
|
declare var1 int;
|
|
select col2 into var1 from t1 where col1=1 for update;
|
|
return var1;
|
|
end|
|
|
start transaction;
|
|
select f1();
|
|
f1()
|
|
100
|
|
update t1 set col2=0 where col1=1;
|
|
select * from t1;
|
|
col1 col2
|
|
1 100
|
|
rollback;
|
|
rollback;
|
|
drop table t1;
|
|
drop function f1;
|