summaryrefslogtreecommitdiff
path: root/mysql-test/r/commit_1innodb.result
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-03 18:47:20 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-03 18:47:20 +0300
commit3543d2556d57194f8f88f9981f67fbdf5f0b97ba (patch)
tree0a908874cbd21ddddf13eddf58cc552c0ef53b24 /mysql-test/r/commit_1innodb.result
parentec14bfc746998935c8a1b143095a0ed4d44b967c (diff)
downloadmariadb-git-3543d2556d57194f8f88f9981f67fbdf5f0b97ba.tar.gz
Backport of:
------------------------------------------------------------ revno: 2630.13.16 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: WL#4284 timestamp: Sat 2008-07-26 13:38:20 -0300 message: WL#4284: Transactional DDL locking SQL statements' effect on transactions. Currently the MySQL server and its storage engines are not capable of rolling back operations that define or modify data structures (also known as DDL statements) or operations that alter any of the system tables (the mysql database). Allowing these group of statements to participate in transactions is unfeasible at this time (since rollback has no effect whatsoever on them) and goes against the design of our metadata locking subsystem. The solution is to issue implicit commits before and after those statements execution. This effectively confines each of those statements to its own special transaction and ensures that metadata locks taken during this special transaction are not leaked into posterior statements/transactions. mysql-test/include/commit.inc: Alter table rename was not committing the normal transaction at the end of its execution, and as a consequence, the commit was being issued in the next DDL command (rename table) that happened to end the active transaction. Other changes are to take into account the implicit commits issued before and after the DDL command execution. mysql-test/include/implicit_commit_helper.inc: Add auxiliary test that shows if a statement issued a implicit commit. mysql-test/r/commit_1innodb.result: Update test case result. mysql-test/r/implicit_commit.result: Test implicit commit behavior of some SQL commands. mysql-test/t/implicit_commit.test: Test implicit commit behavior of some SQL commands. sql/events.cc: Transaction is now ended before the command execution. sql/mysql_priv.h: Add flags array for server commands and remove historical left over. sql/sql_class.h: Add flags to control when to issue implicit commits before and after a command execution. sql/sql_delete.cc: A implicit commit is issued at the end of truncate statements. sql/sql_parse.cc: Mark commands that need implicit commits before and after their executions. The implicit commits of the statement and the normal transaction are now issued regardless of the user access privileges. sql/sql_table.cc: A implicit commit is now issued before admin commands. tests/mysql_client_test.c: Test that COM_REFRESH issues a implicit commit.
Diffstat (limited to 'mysql-test/r/commit_1innodb.result')
-rw-r--r--mysql-test/r/commit_1innodb.result8
1 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result
index 51c4ac3002c..bbff677ab3f 100644
--- a/mysql-test/r/commit_1innodb.result
+++ b/mysql-test/r/commit_1innodb.result
@@ -841,11 +841,11 @@ call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
alter table t3 rename t4;
-call p_verify_status_increment(2, 2, 2, 2);
+call p_verify_status_increment(4, 4, 4, 4);
SUCCESS
rename table t4 to t3;
-call p_verify_status_increment(2, 2, 2, 2);
+call p_verify_status_increment(0, 0, 0, 0);
SUCCESS
truncate table t3;
@@ -853,13 +853,13 @@ call p_verify_status_increment(4, 4, 4, 4);
SUCCESS
create view v1 as select * from t2;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
-call p_verify_status_increment(3, 0, 3, 0);
+call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
# Sic: after this bug is fixed, CHECK leaves no pending transaction