Merge lp:~stewart/drizzle/remove-ddl-implicit-commit into lp:drizzle/7.0
- remove-ddl-implicit-commit
- Merge into 7.0
Proposed by
Stewart Smith
Status: | Superseded |
---|---|
Proposed branch: | lp:~stewart/drizzle/remove-ddl-implicit-commit |
Merge into: | lp:drizzle/7.0 |
Diff against target: |
1288 lines (+275/-70) 80 files modified
docs/transactional.rst (+8/-2) drizzled/error.cc (+2/-0) drizzled/error_t.h (+2/-2) drizzled/statement/alter_schema.cc (+1/-3) drizzled/statement/alter_table.cc (+4/-2) drizzled/statement/create_index.cc (+2/-1) drizzled/statement/create_schema.cc (+2/-1) drizzled/statement/create_table.cc (+2/-3) drizzled/statement/drop_index.cc (+2/-1) drizzled/statement/drop_schema.cc (+4/-9) drizzled/statement/drop_table.cc (+2/-1) drizzled/statement/rename_table.cc (+8/-1) drizzled/statement/truncate.cc (+3/-11) drizzled/sys_var.cc (+15/-6) plugin/haildb/tests/r/trx_isolation_read_uncommitted.result (+1/-0) plugin/haildb/tests/r/trx_isolation_repeatable_read.result (+1/-0) plugin/haildb/tests/r/trx_isolation_serializable.result (+1/-0) plugin/haildb/tests/t/trx_isolation_read_uncommitted.test (+1/-0) plugin/haildb/tests/t/trx_isolation_repeatable_read.test (+1/-0) plugin/haildb/tests/t/trx_isolation_serializable.test (+1/-0) plugin/innobase/tests/r/innodb-semi-consistent.result (+1/-0) plugin/innobase/tests/r/innodb.result (+6/-1) plugin/innobase/tests/r/innodb_bug51920.result (+1/-0) plugin/innobase/tests/r/innodb_bug53674.result (+1/-0) plugin/innobase/tests/r/innodb_mysql.result (+1/-0) plugin/innobase/tests/r/unsafe_binlog_innodb.result (+1/-0) plugin/innobase/tests/t/innodb-semi-consistent.test (+1/-0) plugin/innobase/tests/t/innodb.test (+6/-1) plugin/innobase/tests/t/innodb_bug51920.test (+1/-0) plugin/innobase/tests/t/innodb_bug53674.test (+1/-0) plugin/myisam/tests/r/mix2_myisam.result (+1/-0) plugin/storage_engine_api_tester/tests/r/transaction.result (+1/-0) plugin/storage_engine_api_tester/tests/t/transaction.test (+1/-0) plugin/transaction_log/tests/r/auto_commit.result (+1/-0) plugin/transaction_log/tests/r/transaction_log_transaction.result (+1/-0) plugin/transaction_log/tests/t/auto_commit.inc (+1/-0) plugin/transaction_log/tests/t/transaction_log_transaction.test (+1/-1) plugin/utility_functions/tests/r/execute_wait.result (+23/-7) plugin/utility_functions/tests/t/execute_wait.test (+10/-3) tests/include.am (+1/-1) tests/include/mix1.inc (+1/-0) tests/include/mix2.inc (+1/-0) tests/include/unsafe_binlog.inc (+1/-0) tests/r/flush_block_commit.result (+1/-0) tests/r/insert.result (+1/-0) tests/r/randgen_queries.result (+1/-0) tests/r/savepoints.result (+3/-0) tests/r/select_in_null.result (+0/-2) tests/r/statement_boundaries.result (+3/-1) tests/r/transaction.result (+1/-0) tests/r/trx_isolation_read_committed.result (+1/-0) tests/suite/ddl_transactions/r/alter_schema.result (+6/-0) tests/suite/ddl_transactions/r/alter_table.result (+8/-0) tests/suite/ddl_transactions/r/create_index.result (+6/-0) tests/suite/ddl_transactions/r/create_schema.result (+6/-0) tests/suite/ddl_transactions/r/create_table.result (+4/-0) tests/suite/ddl_transactions/r/drop_index.result (+6/-0) tests/suite/ddl_transactions/r/drop_schema.result (+6/-0) tests/suite/ddl_transactions/r/drop_table.result (+6/-0) tests/suite/ddl_transactions/r/rename_table.result (+8/-0) tests/suite/ddl_transactions/r/truncate_table.result (+7/-0) tests/suite/ddl_transactions/t/alter_schema.test (+6/-0) tests/suite/ddl_transactions/t/alter_table.test (+8/-0) tests/suite/ddl_transactions/t/create_index.test (+6/-0) tests/suite/ddl_transactions/t/create_schema.test (+6/-0) tests/suite/ddl_transactions/t/create_table.test (+4/-0) tests/suite/ddl_transactions/t/drop_index.test (+6/-0) tests/suite/ddl_transactions/t/drop_schema.test (+6/-0) tests/suite/ddl_transactions/t/drop_table.test (+6/-0) tests/suite/ddl_transactions/t/rename_table.test (+6/-0) tests/suite/ddl_transactions/t/truncate_table.test (+7/-0) tests/t/flush_block_commit.test (+1/-1) tests/t/insert.test (+1/-1) tests/t/randgen_queries.test (+1/-1) tests/t/savepoints.test (+3/-1) tests/t/select_in_null.test (+0/-2) tests/t/statement_boundaries.test (+4/-3) tests/t/transaction.test (+1/-0) tests/t/trx_isolation_read_committed.test (+1/-0) tests/test-run.pl (+1/-1) |
To merge this branch: | bzr merge lp:~stewart/drizzle/remove-ddl-implicit-commit |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Needs Fixing | ||
Review via email:
|
This proposal has been superseded by a proposal from 2011-01-07.
Commit message
Description of the change
makes DDL operations error out if attempted to be performed within a ongoing transaction
http://
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Stewart Smith (stewart) wrote : | # |
I can only change this back so that DDL is impossible to do with EXECUTE (it will fail *SILENTLY*). Important to note when documenting EXECUTE.
- 1940. By Stewart Smith
-
merge trunk
- 1941. By Stewart Smith
-
revert patch that changed EXECUTE to use AUTOCOMMIT=0 instead of START TRANSACTION. Of course, this means that you cannot do DDL inside EXECUTE, so change the test and result for execute_wait test which did that.
- 1942. By Stewart Smith
-
add test for EXECUTE WAIT doing DDL that will actually do the DDL - run a COMMIT first.
- 1943. By Stewart Smith
-
merge trunk
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'docs/transactional.rst' | |||
2 | --- docs/transactional.rst 2010-12-19 22:50:00 +0000 | |||
3 | +++ docs/transactional.rst 2011-01-06 13:49:38 +0000 | |||
4 | @@ -6,19 +6,25 @@ | |||
5 | 6 | 6 | ||
6 | 7 | start_transaction | 7 | start_transaction |
7 | 8 | commit | 8 | commit |
9 | 9 | rollback | 9 | rollback |
10 | 10 | savepoints | 10 | savepoints |
11 | 11 | 11 | ||
12 | 12 | The essence of a transaction is that it groups multiple steps into a single, all-or-nothing operation. Drizzle is a transactional database by default and by design, meaning that changes and queries to the database appear to be Atomic, Consistent, Isolated, and Durable (ACID). This means that Drizzle implements `serializable <http://en.wikipedia.org/wiki/Serializability>`_, ACID transactions, even if the transaction is interrupted. | 12 | The essence of a transaction is that it groups multiple steps into a single, all-or-nothing operation. Drizzle is a transactional database by default and by design, meaning that changes and queries to the database appear to be Atomic, Consistent, Isolated, and Durable (ACID). This means that Drizzle implements `serializable <http://en.wikipedia.org/wiki/Serializability>`_, ACID transactions, even if the transaction is interrupted. |
13 | 13 | 13 | ||
14 | 14 | NOTE: Drizzle still supports non-transactional storage engines, and if these are used then you will not get transactional behaviour with them. The default engine is transactional. | ||
15 | 15 | |||
16 | 14 | It collects operations that form tasks and stores them as a single operation, or if that operation is not possible it removes all changes attempted. Transactions are controlled via START TRANSACTION, ROLLBACK, and COMMIT. Savepoints are implemented to allow for a low leverl of granulairty. | 16 | It collects operations that form tasks and stores them as a single operation, or if that operation is not possible it removes all changes attempted. Transactions are controlled via START TRANSACTION, ROLLBACK, and COMMIT. Savepoints are implemented to allow for a low leverl of granulairty. |
17 | 15 | 17 | ||
18 | 16 | A COMMIT statement ends a transaction within Drizzle and makes all changes visible to other users. The order of events is typically to issue a START TRANSACTION statement, execute one or more SQL statements, and then issue a COMMIT statement. Alternatively, a ROLLBACK statement can be issued, which undoes all the work performed since START TRANSACTION was issued. A COMMIT statement will also release any existing savepoints that may be in use. | 18 | A COMMIT statement ends a transaction within Drizzle and makes all changes visible to other users. The order of events is typically to issue a START TRANSACTION statement, execute one or more SQL statements, and then issue a COMMIT statement. Alternatively, a ROLLBACK statement can be issued, which undoes all the work performed since START TRANSACTION was issued. A COMMIT statement will also release any existing savepoints that may be in use. |
19 | 17 | 19 | ||
21 | 18 | Drizzle can operate in an autocommit mode, where each statement is committed, via: :: | 20 | Drizzle can operate in an autocommit mode, where each statement is committed at the end of statement, via: :: |
22 | 19 | 21 | ||
23 | 20 | SET AUTOCOMMIT= 1 | 22 | SET AUTOCOMMIT= 1 |
24 | 21 | 23 | ||
25 | 24 | If you set AUTOCOMMIT=1 during a transaction, that transaction will be committed as part of the SET AUTOCOMMIT=1 statement. | ||
26 | 25 | |||
27 | 26 | Transactional DDL is currently not supported, although it may be in the future. This means that although currently you will get a ER_TRANSACTION_DDL_NOT_SUPPORTED error message if you try and execute DDL statements within a transaction, in future versions of Drizzle they may succeed. | ||
28 | 27 | |||
29 | 22 | Currently DDL operations are performed as a single transaction, this limitation will be lifted in the future. | 28 | Currently DDL operations are performed as a single transaction, this limitation will be lifted in the future. |
30 | 23 | 29 | ||
31 | 24 | 30 | ||
32 | 25 | 31 | ||
33 | === modified file 'drizzled/error.cc' | |||
34 | --- drizzled/error.cc 2011-01-04 23:23:25 +0000 | |||
35 | +++ drizzled/error.cc 2011-01-06 13:49:38 +0000 | |||
36 | @@ -529,6 +529,8 @@ | |||
37 | 529 | ADD_ERROR_MESSAGE(ER_INVALID_BOOLEAN_VALUE, N_("Received an invalid BOOLEAN value '%s'.")); | 529 | ADD_ERROR_MESSAGE(ER_INVALID_BOOLEAN_VALUE, N_("Received an invalid BOOLEAN value '%s'.")); |
38 | 530 | ADD_ERROR_MESSAGE(ER_INVALID_CAST_TO_BOOLEAN, N_("Invalid cast to BOOLEAN: '%s'.")); | 530 | ADD_ERROR_MESSAGE(ER_INVALID_CAST_TO_BOOLEAN, N_("Invalid cast to BOOLEAN: '%s'.")); |
39 | 531 | 531 | ||
40 | 532 | // Transactional DDL | ||
41 | 533 | ADD_ERROR_MESSAGE(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, N_("Transactional DDL not supported")); | ||
42 | 532 | // ASSERT Message | 534 | // ASSERT Message |
43 | 533 | ADD_ERROR_MESSAGE(ER_ASSERT, N_("Assertion '%s' failed.")); | 535 | ADD_ERROR_MESSAGE(ER_ASSERT, N_("Assertion '%s' failed.")); |
44 | 534 | ADD_ERROR_MESSAGE(ER_ASSERT_NULL, N_("Assertion '%s' failed, the result was NULL.")); | 536 | ADD_ERROR_MESSAGE(ER_ASSERT_NULL, N_("Assertion '%s' failed, the result was NULL.")); |
45 | 535 | 537 | ||
46 | === modified file 'drizzled/error_t.h' | |||
47 | --- drizzled/error_t.h 2011-01-04 23:23:25 +0000 | |||
48 | +++ drizzled/error_t.h 2011-01-06 13:49:38 +0000 | |||
49 | @@ -784,10 +784,10 @@ | |||
50 | 784 | ER_ASSERT_NULL, | 784 | ER_ASSERT_NULL, |
51 | 785 | ER_TABLE_DROP, | 785 | ER_TABLE_DROP, |
52 | 786 | ER_INVALID_CAST_TO_BOOLEAN, | 786 | ER_INVALID_CAST_TO_BOOLEAN, |
54 | 787 | 787 | ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, | |
55 | 788 | // Leave ER_INVALID_BOOLEAN_VALUE as LAST, and force people to use tags | 788 | // Leave ER_INVALID_BOOLEAN_VALUE as LAST, and force people to use tags |
56 | 789 | // instead of numbers in error messages in test. | 789 | // instead of numbers in error messages in test. |
58 | 790 | ER_ERROR_LAST= ER_INVALID_CAST_TO_BOOLEAN | 790 | ER_ERROR_LAST= ER_TRANSACTIONAL_DDL_NOT_SUPPORTED |
59 | 791 | }; | 791 | }; |
60 | 792 | 792 | ||
61 | 793 | 793 | ||
62 | 794 | 794 | ||
63 | === modified file 'drizzled/statement/alter_schema.cc' | |||
64 | --- drizzled/statement/alter_schema.cc 2011-01-04 18:14:33 +0000 | |||
65 | +++ drizzled/statement/alter_schema.cc 2011-01-06 13:49:38 +0000 | |||
66 | @@ -59,9 +59,7 @@ | |||
67 | 59 | 59 | ||
68 | 60 | if (session->inTransaction()) | 60 | if (session->inTransaction()) |
69 | 61 | { | 61 | { |
73 | 62 | my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, | 62 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); |
71 | 63 | ER(ER_LOCK_OR_ACTIVE_TRANSACTION), | ||
72 | 64 | MYF(0)); | ||
74 | 65 | return true; | 63 | return true; |
75 | 66 | } | 64 | } |
76 | 67 | /* | 65 | /* |
77 | 68 | 66 | ||
78 | === modified file 'drizzled/statement/alter_table.cc' | |||
79 | --- drizzled/statement/alter_table.cc 2010-12-24 07:15:43 +0000 | |||
80 | +++ drizzled/statement/alter_table.cc 2011-01-06 13:49:38 +0000 | |||
81 | @@ -136,9 +136,11 @@ | |||
82 | 136 | if (not validateCreateTableOption()) | 136 | if (not validateCreateTableOption()) |
83 | 137 | return true; | 137 | return true; |
84 | 138 | 138 | ||
87 | 139 | /* ALTER TABLE ends previous transaction */ | 139 | if (session->inTransaction()) |
88 | 140 | if (not session->endActiveTransaction()) | 140 | { |
89 | 141 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
90 | 141 | return true; | 142 | return true; |
91 | 143 | } | ||
92 | 142 | 144 | ||
93 | 143 | if (not (need_start_waiting= not session->wait_if_global_read_lock(0, 1))) | 145 | if (not (need_start_waiting= not session->wait_if_global_read_lock(0, 1))) |
94 | 144 | return true; | 146 | return true; |
95 | 145 | 147 | ||
96 | === modified file 'drizzled/statement/create_index.cc' | |||
97 | --- drizzled/statement/create_index.cc 2010-12-18 04:43:40 +0000 | |||
98 | +++ drizzled/statement/create_index.cc 2011-01-06 13:49:38 +0000 | |||
99 | @@ -56,8 +56,9 @@ | |||
100 | 56 | */ | 56 | */ |
101 | 57 | 57 | ||
102 | 58 | assert(first_table == all_tables && first_table != 0); | 58 | assert(first_table == all_tables && first_table != 0); |
104 | 59 | if (! session->endActiveTransaction()) | 59 | if (session->inTransaction()) |
105 | 60 | { | 60 | { |
106 | 61 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
107 | 61 | return true; | 62 | return true; |
108 | 62 | } | 63 | } |
109 | 63 | 64 | ||
110 | 64 | 65 | ||
111 | === modified file 'drizzled/statement/create_schema.cc' | |||
112 | --- drizzled/statement/create_schema.cc 2010-12-24 07:15:43 +0000 | |||
113 | +++ drizzled/statement/create_schema.cc 2011-01-06 13:49:38 +0000 | |||
114 | @@ -38,8 +38,9 @@ | |||
115 | 38 | if (not validateSchemaOptions()) | 38 | if (not validateSchemaOptions()) |
116 | 39 | return true; | 39 | return true; |
117 | 40 | 40 | ||
119 | 41 | if (not session->endActiveTransaction()) | 41 | if (session->inTransaction()) |
120 | 42 | { | 42 | { |
121 | 43 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
122 | 43 | return true; | 44 | return true; |
123 | 44 | } | 45 | } |
124 | 45 | 46 | ||
125 | 46 | 47 | ||
126 | === modified file 'drizzled/statement/create_table.cc' | |||
127 | --- drizzled/statement/create_table.cc 2010-12-24 07:15:43 +0000 | |||
128 | +++ drizzled/statement/create_table.cc 2011-01-06 13:49:38 +0000 | |||
129 | @@ -67,12 +67,11 @@ | |||
130 | 67 | return true; | 67 | return true; |
131 | 68 | } | 68 | } |
132 | 69 | 69 | ||
133 | 70 | |||
134 | 71 | /* If CREATE TABLE of non-temporary table, do implicit commit */ | ||
135 | 72 | if (not lex_identified_temp_table) | 70 | if (not lex_identified_temp_table) |
136 | 73 | { | 71 | { |
138 | 74 | if (not session->endActiveTransaction()) | 72 | if (session->inTransaction()) |
139 | 75 | { | 73 | { |
140 | 74 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
141 | 76 | return true; | 75 | return true; |
142 | 77 | } | 76 | } |
143 | 78 | } | 77 | } |
144 | 79 | 78 | ||
145 | === modified file 'drizzled/statement/drop_index.cc' | |||
146 | --- drizzled/statement/drop_index.cc 2010-12-18 04:43:40 +0000 | |||
147 | +++ drizzled/statement/drop_index.cc 2011-01-06 13:49:38 +0000 | |||
148 | @@ -58,8 +58,9 @@ | |||
149 | 58 | HA_CREATE_INFO create_info; | 58 | HA_CREATE_INFO create_info; |
150 | 59 | 59 | ||
151 | 60 | assert(first_table == all_tables && first_table != 0); | 60 | assert(first_table == all_tables && first_table != 0); |
153 | 61 | if (! session->endActiveTransaction()) | 61 | if (session->inTransaction()) |
154 | 62 | { | 62 | { |
155 | 63 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
156 | 63 | return true; | 64 | return true; |
157 | 64 | } | 65 | } |
158 | 65 | 66 | ||
159 | 66 | 67 | ||
160 | === modified file 'drizzled/statement/drop_schema.cc' | |||
161 | --- drizzled/statement/drop_schema.cc 2011-01-04 18:14:33 +0000 | |||
162 | +++ drizzled/statement/drop_schema.cc 2011-01-06 13:49:38 +0000 | |||
163 | @@ -34,10 +34,12 @@ | |||
164 | 34 | 34 | ||
165 | 35 | bool statement::DropSchema::execute() | 35 | bool statement::DropSchema::execute() |
166 | 36 | { | 36 | { |
168 | 37 | if (! session->endActiveTransaction()) | 37 | if (session->inTransaction()) |
169 | 38 | { | 38 | { |
170 | 39 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
171 | 39 | return true; | 40 | return true; |
172 | 40 | } | 41 | } |
173 | 42 | |||
174 | 41 | SchemaIdentifier schema_identifier(string(session->lex->name.str, session->lex->name.length)); | 43 | SchemaIdentifier schema_identifier(string(session->lex->name.str, session->lex->name.length)); |
175 | 42 | if (not check_db_name(session, schema_identifier)) | 44 | if (not check_db_name(session, schema_identifier)) |
176 | 43 | { | 45 | { |
177 | @@ -45,14 +47,7 @@ | |||
178 | 45 | 47 | ||
179 | 46 | return false; | 48 | return false; |
180 | 47 | } | 49 | } |
189 | 48 | if (session->inTransaction()) | 50 | |
182 | 49 | { | ||
183 | 50 | my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, | ||
184 | 51 | ER(ER_LOCK_OR_ACTIVE_TRANSACTION), | ||
185 | 52 | MYF(0)); | ||
186 | 53 | return true; | ||
187 | 54 | } | ||
188 | 55 | |||
190 | 56 | bool res = true; | 51 | bool res = true; |
191 | 57 | std::string path; | 52 | std::string path; |
192 | 58 | schema_identifier.getSQLPath(path); | 53 | schema_identifier.getSQLPath(path); |
193 | 59 | 54 | ||
194 | === modified file 'drizzled/statement/drop_table.cc' | |||
195 | --- drizzled/statement/drop_table.cc 2010-12-31 02:23:39 +0000 | |||
196 | +++ drizzled/statement/drop_table.cc 2011-01-06 13:49:38 +0000 | |||
197 | @@ -93,8 +93,9 @@ | |||
198 | 93 | 93 | ||
199 | 94 | if (not drop_temporary) | 94 | if (not drop_temporary) |
200 | 95 | { | 95 | { |
202 | 96 | if (not session->endActiveTransaction()) | 96 | if (session->inTransaction()) |
203 | 97 | { | 97 | { |
204 | 98 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
205 | 98 | return true; | 99 | return true; |
206 | 99 | } | 100 | } |
207 | 100 | } | 101 | } |
208 | 101 | 102 | ||
209 | === modified file 'drizzled/statement/rename_table.cc' | |||
210 | --- drizzled/statement/rename_table.cc 2010-12-24 07:15:43 +0000 | |||
211 | +++ drizzled/statement/rename_table.cc 2011-01-06 13:49:38 +0000 | |||
212 | @@ -35,6 +35,13 @@ | |||
213 | 35 | TableList *all_tables= session->lex->query_tables; | 35 | TableList *all_tables= session->lex->query_tables; |
214 | 36 | assert(first_table == all_tables && first_table != 0); | 36 | assert(first_table == all_tables && first_table != 0); |
215 | 37 | TableList *table; | 37 | TableList *table; |
216 | 38 | |||
217 | 39 | if (session->inTransaction()) | ||
218 | 40 | { | ||
219 | 41 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); | ||
220 | 42 | return true; | ||
221 | 43 | } | ||
222 | 44 | |||
223 | 38 | for (table= first_table; table; table= table->next_local->next_local) | 45 | for (table= first_table; table; table= table->next_local->next_local) |
224 | 39 | { | 46 | { |
225 | 40 | TableList old_list, new_list; | 47 | TableList old_list, new_list; |
226 | @@ -46,7 +53,7 @@ | |||
227 | 46 | new_list= table->next_local[0]; | 53 | new_list= table->next_local[0]; |
228 | 47 | } | 54 | } |
229 | 48 | 55 | ||
231 | 49 | if (! session->endActiveTransaction() || renameTables(first_table)) | 56 | if (renameTables(first_table)) |
232 | 50 | { | 57 | { |
233 | 51 | return true; | 58 | return true; |
234 | 52 | } | 59 | } |
235 | 53 | 60 | ||
236 | === modified file 'drizzled/statement/truncate.cc' | |||
237 | --- drizzled/statement/truncate.cc 2010-12-24 07:15:43 +0000 | |||
238 | +++ drizzled/statement/truncate.cc 2011-01-06 13:49:38 +0000 | |||
239 | @@ -29,22 +29,14 @@ | |||
240 | 29 | bool statement::Truncate::execute() | 29 | bool statement::Truncate::execute() |
241 | 30 | { | 30 | { |
242 | 31 | TableList *first_table= (TableList *) session->lex->select_lex.table_list.first; | 31 | TableList *first_table= (TableList *) session->lex->select_lex.table_list.first; |
251 | 32 | if (! session->endActiveTransaction()) | 32 | |
244 | 33 | { | ||
245 | 34 | return true; | ||
246 | 35 | } | ||
247 | 36 | /* | ||
248 | 37 | * Don't allow this within a transaction because we want to use | ||
249 | 38 | * re-generate table | ||
250 | 39 | */ | ||
252 | 40 | if (session->inTransaction()) | 33 | if (session->inTransaction()) |
253 | 41 | { | 34 | { |
257 | 42 | my_message(ER_LOCK_OR_ACTIVE_TRANSACTION, | 35 | my_error(ER_TRANSACTIONAL_DDL_NOT_SUPPORTED, MYF(0)); |
255 | 43 | ER(ER_LOCK_OR_ACTIVE_TRANSACTION), | ||
256 | 44 | MYF(0)); | ||
258 | 45 | return true; | 36 | return true; |
259 | 46 | } | 37 | } |
260 | 47 | 38 | ||
261 | 39 | |||
262 | 48 | return truncate(*session, first_table); | 40 | return truncate(*session, first_table); |
263 | 49 | } | 41 | } |
264 | 50 | 42 | ||
265 | 51 | 43 | ||
266 | === modified file 'drizzled/sys_var.cc' | |||
267 | --- drizzled/sys_var.cc 2011-01-02 18:08:34 +0000 | |||
268 | +++ drizzled/sys_var.cc 2011-01-06 13:49:38 +0000 | |||
269 | @@ -1395,31 +1395,40 @@ | |||
270 | 1395 | 1395 | ||
271 | 1396 | static bool set_option_autocommit(Session *session, set_var *var) | 1396 | static bool set_option_autocommit(Session *session, set_var *var) |
272 | 1397 | { | 1397 | { |
273 | 1398 | bool success= true; | ||
274 | 1398 | /* The test is negative as the flag we use is NOT autocommit */ | 1399 | /* The test is negative as the flag we use is NOT autocommit */ |
275 | 1399 | 1400 | ||
276 | 1400 | uint64_t org_options= session->options; | 1401 | uint64_t org_options= session->options; |
277 | 1402 | uint64_t new_options= session->options; | ||
278 | 1401 | 1403 | ||
279 | 1402 | if (var->save_result.uint32_t_value != 0) | 1404 | if (var->save_result.uint32_t_value != 0) |
281 | 1403 | session->options&= ~((sys_var_session_bit*) var->var)->bit_flag; | 1405 | new_options&= ~((sys_var_session_bit*) var->var)->bit_flag; |
282 | 1404 | else | 1406 | else |
284 | 1405 | session->options|= ((sys_var_session_bit*) var->var)->bit_flag; | 1407 | new_options|= ((sys_var_session_bit*) var->var)->bit_flag; |
285 | 1406 | 1408 | ||
287 | 1407 | if ((org_options ^ session->options) & OPTION_NOT_AUTOCOMMIT) | 1409 | if ((org_options ^ new_options) & OPTION_NOT_AUTOCOMMIT) |
288 | 1408 | { | 1410 | { |
289 | 1409 | if ((org_options & OPTION_NOT_AUTOCOMMIT)) | 1411 | if ((org_options & OPTION_NOT_AUTOCOMMIT)) |
290 | 1410 | { | 1412 | { |
291 | 1413 | success= session->endActiveTransaction(); | ||
292 | 1411 | /* We changed to auto_commit mode */ | 1414 | /* We changed to auto_commit mode */ |
293 | 1412 | session->options&= ~(uint64_t) (OPTION_BEGIN); | 1415 | session->options&= ~(uint64_t) (OPTION_BEGIN); |
294 | 1413 | session->server_status|= SERVER_STATUS_AUTOCOMMIT; | 1416 | session->server_status|= SERVER_STATUS_AUTOCOMMIT; |
295 | 1414 | TransactionServices &transaction_services= TransactionServices::singleton(); | ||
296 | 1415 | if (transaction_services.commitTransaction(session, true)) | ||
297 | 1416 | return 1; | ||
298 | 1417 | } | 1417 | } |
299 | 1418 | else | 1418 | else |
300 | 1419 | { | 1419 | { |
301 | 1420 | session->server_status&= ~SERVER_STATUS_AUTOCOMMIT; | 1420 | session->server_status&= ~SERVER_STATUS_AUTOCOMMIT; |
302 | 1421 | } | 1421 | } |
303 | 1422 | } | 1422 | } |
304 | 1423 | |||
305 | 1424 | if (var->save_result.uint32_t_value != 0) | ||
306 | 1425 | session->options&= ~((sys_var_session_bit*) var->var)->bit_flag; | ||
307 | 1426 | else | ||
308 | 1427 | session->options|= ((sys_var_session_bit*) var->var)->bit_flag; | ||
309 | 1428 | |||
310 | 1429 | if (not success) | ||
311 | 1430 | return true; | ||
312 | 1431 | |||
313 | 1423 | return 0; | 1432 | return 0; |
314 | 1424 | } | 1433 | } |
315 | 1425 | 1434 | ||
316 | 1426 | 1435 | ||
317 | === modified file 'plugin/haildb/tests/r/trx_isolation_read_uncommitted.result' | |||
318 | --- plugin/haildb/tests/r/trx_isolation_read_uncommitted.result 2010-05-31 06:30:16 +0000 | |||
319 | +++ plugin/haildb/tests/r/trx_isolation_read_uncommitted.result 2011-01-06 13:49:38 +0000 | |||
320 | @@ -29,4 +29,5 @@ | |||
321 | 29 | a | 29 | a |
322 | 30 | 1 | 30 | 1 |
323 | 31 | 2 | 31 | 2 |
324 | 32 | COMMIT; | ||
325 | 32 | DROP TABLE t1; | 33 | DROP TABLE t1; |
326 | 33 | 34 | ||
327 | === modified file 'plugin/haildb/tests/r/trx_isolation_repeatable_read.result' | |||
328 | --- plugin/haildb/tests/r/trx_isolation_repeatable_read.result 2010-05-31 06:30:16 +0000 | |||
329 | +++ plugin/haildb/tests/r/trx_isolation_repeatable_read.result 2011-01-06 13:49:38 +0000 | |||
330 | @@ -22,4 +22,5 @@ | |||
331 | 22 | a | 22 | a |
332 | 23 | 1 | 23 | 1 |
333 | 24 | 2 | 24 | 2 |
334 | 25 | COMMIT; | ||
335 | 25 | DROP TABLE t1; | 26 | DROP TABLE t1; |
336 | 26 | 27 | ||
337 | === modified file 'plugin/haildb/tests/r/trx_isolation_serializable.result' | |||
338 | --- plugin/haildb/tests/r/trx_isolation_serializable.result 2010-05-31 09:08:00 +0000 | |||
339 | +++ plugin/haildb/tests/r/trx_isolation_serializable.result 2011-01-06 13:49:38 +0000 | |||
340 | @@ -22,4 +22,5 @@ | |||
341 | 22 | a | 22 | a |
342 | 23 | 1 | 23 | 1 |
343 | 24 | 2 | 24 | 2 |
344 | 25 | COMMIT; | ||
345 | 25 | DROP TABLE t1; | 26 | DROP TABLE t1; |
346 | 26 | 27 | ||
347 | === modified file 'plugin/haildb/tests/t/trx_isolation_read_uncommitted.test' | |||
348 | --- plugin/haildb/tests/t/trx_isolation_read_uncommitted.test 2010-05-31 06:30:16 +0000 | |||
349 | +++ plugin/haildb/tests/t/trx_isolation_read_uncommitted.test 2011-01-06 13:49:38 +0000 | |||
350 | @@ -30,6 +30,7 @@ | |||
351 | 30 | BEGIN; | 30 | BEGIN; |
352 | 31 | SELECT * from t1 order by a; | 31 | SELECT * from t1 order by a; |
353 | 32 | 32 | ||
354 | 33 | COMMIT; | ||
355 | 33 | DROP TABLE t1; | 34 | DROP TABLE t1; |
356 | 34 | 35 | ||
357 | 35 | disconnect a; | 36 | disconnect a; |
358 | 36 | 37 | ||
359 | === modified file 'plugin/haildb/tests/t/trx_isolation_repeatable_read.test' | |||
360 | --- plugin/haildb/tests/t/trx_isolation_repeatable_read.test 2010-05-31 06:30:16 +0000 | |||
361 | +++ plugin/haildb/tests/t/trx_isolation_repeatable_read.test 2011-01-06 13:49:38 +0000 | |||
362 | @@ -30,6 +30,7 @@ | |||
363 | 30 | BEGIN; | 30 | BEGIN; |
364 | 31 | SELECT * from t1 order by a; | 31 | SELECT * from t1 order by a; |
365 | 32 | 32 | ||
366 | 33 | COMMIT; | ||
367 | 33 | DROP TABLE t1; | 34 | DROP TABLE t1; |
368 | 34 | 35 | ||
369 | 35 | disconnect a; | 36 | disconnect a; |
370 | 36 | 37 | ||
371 | === modified file 'plugin/haildb/tests/t/trx_isolation_serializable.test' | |||
372 | --- plugin/haildb/tests/t/trx_isolation_serializable.test 2010-05-31 09:08:00 +0000 | |||
373 | +++ plugin/haildb/tests/t/trx_isolation_serializable.test 2011-01-06 13:49:38 +0000 | |||
374 | @@ -30,6 +30,7 @@ | |||
375 | 30 | BEGIN; | 30 | BEGIN; |
376 | 31 | SELECT * from t1 order by a; | 31 | SELECT * from t1 order by a; |
377 | 32 | 32 | ||
378 | 33 | COMMIT; | ||
379 | 33 | DROP TABLE t1; | 34 | DROP TABLE t1; |
380 | 34 | 35 | ||
381 | 35 | disconnect a; | 36 | disconnect a; |
382 | 36 | 37 | ||
383 | === modified file 'plugin/innobase/tests/r/innodb-semi-consistent.result' | |||
384 | --- plugin/innobase/tests/r/innodb-semi-consistent.result 2010-09-12 14:34:27 +0000 | |||
385 | +++ plugin/innobase/tests/r/innodb-semi-consistent.result 2011-01-06 13:49:38 +0000 | |||
386 | @@ -34,5 +34,6 @@ | |||
387 | 34 | 10 | 34 | 10 |
388 | 35 | 11 | 35 | 11 |
389 | 36 | 7 | 36 | 7 |
390 | 37 | commit; | ||
391 | 37 | drop table t1; | 38 | drop table t1; |
392 | 38 | SET GLOBAL innodb_lock_wait_timeout=@orig_lock_wait_timeout ; | 39 | SET GLOBAL innodb_lock_wait_timeout=@orig_lock_wait_timeout ; |
393 | 39 | 40 | ||
394 | === modified file 'plugin/innobase/tests/r/innodb.result' | |||
395 | --- plugin/innobase/tests/r/innodb.result 2010-12-08 21:50:36 +0000 | |||
396 | +++ plugin/innobase/tests/r/innodb.result 2011-01-06 13:49:38 +0000 | |||
397 | @@ -331,11 +331,12 @@ | |||
398 | 331 | commit; | 331 | commit; |
399 | 332 | select * from t1; | 332 | select * from t1; |
400 | 333 | id val | 333 | id val |
401 | 334 | commit; | ||
402 | 334 | drop table t1; | 335 | drop table t1; |
403 | 335 | create table t1 (a integer) engine=innodb; | 336 | create table t1 (a integer) engine=innodb; |
404 | 336 | start transaction; | ||
405 | 337 | rename table t1 to t2; | 337 | rename table t1 to t2; |
406 | 338 | create table t1 (b integer) engine=innodb; | 338 | create table t1 (b integer) engine=innodb; |
407 | 339 | start transaction; | ||
408 | 339 | insert into t1 values (1); | 340 | insert into t1 values (1); |
409 | 340 | rollback; | 341 | rollback; |
410 | 341 | drop table t1; | 342 | drop table t1; |
411 | @@ -358,6 +359,7 @@ | |||
412 | 358 | SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk'; | 359 | SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk'; |
413 | 359 | _userid | 360 | _userid |
414 | 360 | marc@anyware.co.uk | 361 | marc@anyware.co.uk |
415 | 362 | COMMIT; | ||
416 | 361 | drop table t1; | 363 | drop table t1; |
417 | 362 | set autocommit=1; | 364 | set autocommit=1; |
418 | 363 | CREATE TABLE t1 ( | 365 | CREATE TABLE t1 ( |
419 | @@ -829,6 +831,7 @@ | |||
420 | 829 | set autocommit=0; | 831 | set autocommit=0; |
421 | 830 | create table t1 (a int not null) engine= innodb; | 832 | create table t1 (a int not null) engine= innodb; |
422 | 831 | insert into t1 values(1),(2); | 833 | insert into t1 values(1),(2); |
423 | 834 | commit; | ||
424 | 832 | truncate table t1; | 835 | truncate table t1; |
425 | 833 | commit; | 836 | commit; |
426 | 834 | truncate table t1; | 837 | truncate table t1; |
427 | @@ -2536,6 +2539,7 @@ | |||
428 | 2536 | SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; | 2539 | SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
429 | 2537 | insert into t1 select * from t2; | 2540 | insert into t1 select * from t2; |
430 | 2538 | update t1 set b = (select e from t2 where a = d); | 2541 | update t1 set b = (select e from t2 where a = d); |
431 | 2542 | commit; | ||
432 | 2539 | create table t3(d int not null, e int, primary key(d)) engine=innodb | 2543 | create table t3(d int not null, e int, primary key(d)) engine=innodb |
433 | 2540 | select * from t2; | 2544 | select * from t2; |
434 | 2541 | commit; | 2545 | commit; |
435 | @@ -2640,6 +2644,7 @@ | |||
436 | 2640 | CREATE TABLE t1 ( a int ) ENGINE=innodb; | 2644 | CREATE TABLE t1 ( a int ) ENGINE=innodb; |
437 | 2641 | BEGIN; | 2645 | BEGIN; |
438 | 2642 | INSERT INTO t1 VALUES (1); | 2646 | INSERT INTO t1 VALUES (1); |
439 | 2647 | COMMIT; | ||
440 | 2643 | ALTER TABLE t1 ENGINE=innodb; | 2648 | ALTER TABLE t1 ENGINE=innodb; |
441 | 2644 | DROP TABLE t1; | 2649 | DROP TABLE t1; |
442 | 2645 | CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB; | 2650 | CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB; |
443 | 2646 | 2651 | ||
444 | === modified file 'plugin/innobase/tests/r/innodb_bug51920.result' | |||
445 | --- plugin/innobase/tests/r/innodb_bug51920.result 2010-10-15 06:47:31 +0000 | |||
446 | +++ plugin/innobase/tests/r/innodb_bug51920.result 2011-01-06 13:49:38 +0000 | |||
447 | @@ -8,4 +8,5 @@ | |||
448 | 8 | SET @thread_id= ID; | 8 | SET @thread_id= ID; |
449 | 9 | KILL @thread_id; | 9 | KILL @thread_id; |
450 | 10 | Got one of the listed errors | 10 | Got one of the listed errors |
451 | 11 | COMMIT; | ||
452 | 11 | DROP TABLE bug51920; | 12 | DROP TABLE bug51920; |
453 | 12 | 13 | ||
454 | === modified file 'plugin/innobase/tests/r/innodb_bug53674.result' | |||
455 | --- plugin/innobase/tests/r/innodb_bug53674.result 2010-11-10 00:53:46 +0000 | |||
456 | +++ plugin/innobase/tests/r/innodb_bug53674.result 2011-01-06 13:49:38 +0000 | |||
457 | @@ -8,4 +8,5 @@ | |||
458 | 8 | select * from bug53674 where a=(select a from bug53674 where a > 1); | 8 | select * from bug53674 where a=(select a from bug53674 where a > 1); |
459 | 9 | a | 9 | a |
460 | 10 | 2 | 10 | 2 |
461 | 11 | commit; | ||
462 | 11 | drop table bug53674; | 12 | drop table bug53674; |
463 | 12 | 13 | ||
464 | === modified file 'plugin/innobase/tests/r/innodb_mysql.result' | |||
465 | --- plugin/innobase/tests/r/innodb_mysql.result 2010-12-08 22:35:56 +0000 | |||
466 | +++ plugin/innobase/tests/r/innodb_mysql.result 2011-01-06 13:49:38 +0000 | |||
467 | @@ -590,6 +590,7 @@ | |||
468 | 590 | CREATE TABLE t2 (a int, b int, primary key (a)); | 590 | CREATE TABLE t2 (a int, b int, primary key (a)); |
469 | 591 | BEGIN; | 591 | BEGIN; |
470 | 592 | INSERT INTO t2 values(100,100); | 592 | INSERT INTO t2 values(100,100); |
471 | 593 | COMMIT; | ||
472 | 593 | CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1; | 594 | CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1; |
473 | 594 | ERROR 23000: Duplicate entry '1' for key 'PRIMARY' | 595 | ERROR 23000: Duplicate entry '1' for key 'PRIMARY' |
474 | 595 | SELECT * from t2; | 596 | SELECT * from t2; |
475 | 596 | 597 | ||
476 | === modified file 'plugin/innobase/tests/r/unsafe_binlog_innodb.result' | |||
477 | --- plugin/innobase/tests/r/unsafe_binlog_innodb.result 2010-09-12 14:34:27 +0000 | |||
478 | +++ plugin/innobase/tests/r/unsafe_binlog_innodb.result 2011-01-06 13:49:38 +0000 | |||
479 | @@ -58,6 +58,7 @@ | |||
480 | 58 | set autocommit = 0; | 58 | set autocommit = 0; |
481 | 59 | insert into t1 select * from t2; | 59 | insert into t1 select * from t2; |
482 | 60 | update t1 set b = (select e from t2 where a = d); | 60 | update t1 set b = (select e from t2 where a = d); |
483 | 61 | COMMIT; | ||
484 | 61 | create table t3(d int not null, e int, primary key(d)) engine = InnoDB | 62 | create table t3(d int not null, e int, primary key(d)) engine = InnoDB |
485 | 62 | select * from t2; | 63 | select * from t2; |
486 | 63 | commit; | 64 | commit; |
487 | 64 | 65 | ||
488 | === modified file 'plugin/innobase/tests/t/innodb-semi-consistent.test' | |||
489 | --- plugin/innobase/tests/t/innodb-semi-consistent.test 2010-09-12 14:34:27 +0000 | |||
490 | +++ plugin/innobase/tests/t/innodb-semi-consistent.test 2011-01-06 13:49:38 +0000 | |||
491 | @@ -42,6 +42,7 @@ | |||
492 | 42 | commit; | 42 | commit; |
493 | 43 | connection a; | 43 | connection a; |
494 | 44 | select * from t1; | 44 | select * from t1; |
495 | 45 | commit; | ||
496 | 45 | drop table t1; | 46 | drop table t1; |
497 | 46 | connection default; | 47 | connection default; |
498 | 47 | disconnect a; | 48 | disconnect a; |
499 | 48 | 49 | ||
500 | === modified file 'plugin/innobase/tests/t/innodb.test' | |||
501 | --- plugin/innobase/tests/t/innodb.test 2010-12-07 09:12:12 +0000 | |||
502 | +++ plugin/innobase/tests/t/innodb.test 2011-01-06 13:49:38 +0000 | |||
503 | @@ -228,6 +228,7 @@ | |||
504 | 228 | delete from t1; | 228 | delete from t1; |
505 | 229 | commit; | 229 | commit; |
506 | 230 | select * from t1; | 230 | select * from t1; |
507 | 231 | commit; | ||
508 | 231 | drop table t1; | 232 | drop table t1; |
509 | 232 | 233 | ||
510 | 233 | # | 234 | # |
511 | @@ -235,9 +236,9 @@ | |||
512 | 235 | # | 236 | # |
513 | 236 | 237 | ||
514 | 237 | create table t1 (a integer) engine=innodb; | 238 | create table t1 (a integer) engine=innodb; |
515 | 238 | start transaction; | ||
516 | 239 | rename table t1 to t2; | 239 | rename table t1 to t2; |
517 | 240 | create table t1 (b integer) engine=innodb; | 240 | create table t1 (b integer) engine=innodb; |
518 | 241 | start transaction; | ||
519 | 241 | insert into t1 values (1); | 242 | insert into t1 values (1); |
520 | 242 | rollback; | 243 | rollback; |
521 | 243 | drop table t1; | 244 | drop table t1; |
522 | @@ -260,6 +261,7 @@ | |||
523 | 260 | COMMIT; | 261 | COMMIT; |
524 | 261 | SELECT * FROM t1; | 262 | SELECT * FROM t1; |
525 | 262 | SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk'; | 263 | SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk'; |
526 | 264 | COMMIT; | ||
527 | 263 | drop table t1; | 265 | drop table t1; |
528 | 264 | set autocommit=1; | 266 | set autocommit=1; |
529 | 265 | 267 | ||
530 | @@ -549,6 +551,7 @@ | |||
531 | 549 | set autocommit=0; | 551 | set autocommit=0; |
532 | 550 | create table t1 (a int not null) engine= innodb; | 552 | create table t1 (a int not null) engine= innodb; |
533 | 551 | insert into t1 values(1),(2); | 553 | insert into t1 values(1),(2); |
534 | 554 | commit; | ||
535 | 552 | truncate table t1; | 555 | truncate table t1; |
536 | 553 | commit; | 556 | commit; |
537 | 554 | truncate table t1; | 557 | truncate table t1; |
538 | @@ -1616,6 +1619,7 @@ | |||
539 | 1616 | SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; | 1619 | SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
540 | 1617 | insert into t1 select * from t2; | 1620 | insert into t1 select * from t2; |
541 | 1618 | update t1 set b = (select e from t2 where a = d); | 1621 | update t1 set b = (select e from t2 where a = d); |
542 | 1622 | commit; | ||
543 | 1619 | create table t3(d int not null, e int, primary key(d)) engine=innodb | 1623 | create table t3(d int not null, e int, primary key(d)) engine=innodb |
544 | 1620 | select * from t2; | 1624 | select * from t2; |
545 | 1621 | commit; | 1625 | commit; |
546 | @@ -1810,6 +1814,7 @@ | |||
547 | 1810 | CREATE TABLE t1 ( a int ) ENGINE=innodb; | 1814 | CREATE TABLE t1 ( a int ) ENGINE=innodb; |
548 | 1811 | BEGIN; | 1815 | BEGIN; |
549 | 1812 | INSERT INTO t1 VALUES (1); | 1816 | INSERT INTO t1 VALUES (1); |
550 | 1817 | COMMIT; | ||
551 | 1813 | ALTER TABLE t1 ENGINE=innodb; | 1818 | ALTER TABLE t1 ENGINE=innodb; |
552 | 1814 | DROP TABLE t1; | 1819 | DROP TABLE t1; |
553 | 1815 | 1820 | ||
554 | 1816 | 1821 | ||
555 | === modified file 'plugin/innobase/tests/t/innodb_bug51920.test' | |||
556 | --- plugin/innobase/tests/t/innodb_bug51920.test 2010-10-15 12:10:08 +0000 | |||
557 | +++ plugin/innobase/tests/t/innodb_bug51920.test 2011-01-06 13:49:38 +0000 | |||
558 | @@ -38,5 +38,6 @@ | |||
559 | 38 | -- error ER_QUERY_INTERRUPTED,20,2 | 38 | -- error ER_QUERY_INTERRUPTED,20,2 |
560 | 39 | reap; | 39 | reap; |
561 | 40 | connection default; | 40 | connection default; |
562 | 41 | COMMIT; | ||
563 | 41 | DROP TABLE bug51920; | 42 | DROP TABLE bug51920; |
564 | 42 | -- disconnect con1 | 43 | -- disconnect con1 |
565 | 43 | 44 | ||
566 | === modified file 'plugin/innobase/tests/t/innodb_bug53674.test' | |||
567 | --- plugin/innobase/tests/t/innodb_bug53674.test 2010-11-10 00:53:46 +0000 | |||
568 | +++ plugin/innobase/tests/t/innodb_bug53674.test 2011-01-06 13:49:38 +0000 | |||
569 | @@ -3,4 +3,5 @@ | |||
570 | 3 | start transaction; | 3 | start transaction; |
571 | 4 | select * from bug53674 for update; | 4 | select * from bug53674 for update; |
572 | 5 | select * from bug53674 where a=(select a from bug53674 where a > 1); | 5 | select * from bug53674 where a=(select a from bug53674 where a > 1); |
573 | 6 | commit; | ||
574 | 6 | drop table bug53674; | 7 | drop table bug53674; |
575 | 7 | 8 | ||
576 | === modified file 'plugin/myisam/tests/r/mix2_myisam.result' | |||
577 | --- plugin/myisam/tests/r/mix2_myisam.result 2010-12-07 09:12:12 +0000 | |||
578 | +++ plugin/myisam/tests/r/mix2_myisam.result 2011-01-06 13:49:38 +0000 | |||
579 | @@ -1658,5 +1658,6 @@ | |||
580 | 1658 | create TEMPORARY table t1 ( a int ) ENGINE=MyISAM; | 1658 | create TEMPORARY table t1 ( a int ) ENGINE=MyISAM; |
581 | 1659 | BEGIN; | 1659 | BEGIN; |
582 | 1660 | INSERT INTO t1 VALUES (1); | 1660 | INSERT INTO t1 VALUES (1); |
583 | 1661 | COMMIT; | ||
584 | 1661 | ALTER TABLE t1 ENGINE=MyISAM; | 1662 | ALTER TABLE t1 ENGINE=MyISAM; |
585 | 1662 | DROP TABLE t1; | 1663 | DROP TABLE t1; |
586 | 1663 | 1664 | ||
587 | === modified file 'plugin/storage_engine_api_tester/tests/r/transaction.result' | |||
588 | --- plugin/storage_engine_api_tester/tests/r/transaction.result 2010-11-29 07:03:38 +0000 | |||
589 | +++ plugin/storage_engine_api_tester/tests/r/transaction.result 2011-01-06 13:49:38 +0000 | |||
590 | @@ -39,5 +39,6 @@ | |||
591 | 39 | FROM t1_trx | 39 | FROM t1_trx |
592 | 40 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; | 40 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; |
593 | 41 | k v | 41 | k v |
594 | 42 | COMMIT; | ||
595 | 42 | DROP TABLE t1_trx; | 43 | DROP TABLE t1_trx; |
596 | 43 | DROP TABLE t1_non_trx; | 44 | DROP TABLE t1_non_trx; |
597 | 44 | 45 | ||
598 | === modified file 'plugin/storage_engine_api_tester/tests/t/transaction.test' | |||
599 | --- plugin/storage_engine_api_tester/tests/t/transaction.test 2010-11-29 07:03:38 +0000 | |||
600 | +++ plugin/storage_engine_api_tester/tests/t/transaction.test 2011-01-06 13:49:38 +0000 | |||
601 | @@ -52,5 +52,6 @@ | |||
602 | 52 | FROM t1_trx | 52 | FROM t1_trx |
603 | 53 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; | 53 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; |
604 | 54 | 54 | ||
605 | 55 | COMMIT; | ||
606 | 55 | DROP TABLE t1_trx; | 56 | DROP TABLE t1_trx; |
607 | 56 | DROP TABLE t1_non_trx; | 57 | DROP TABLE t1_non_trx; |
608 | 57 | 58 | ||
609 | === modified file 'plugin/transaction_log/tests/r/auto_commit.result' | |||
610 | --- plugin/transaction_log/tests/r/auto_commit.result 2010-12-21 20:47:29 +0000 | |||
611 | +++ plugin/transaction_log/tests/r/auto_commit.result 2011-01-06 13:49:38 +0000 | |||
612 | @@ -6,6 +6,7 @@ | |||
613 | 6 | ); | 6 | ); |
614 | 7 | INSERT INTO t1 VALUES (1, "I love testing."); | 7 | INSERT INTO t1 VALUES (1, "I love testing."); |
615 | 8 | INSERT INTO t1 VALUES (2, "I hate testing."); | 8 | INSERT INTO t1 VALUES (2, "I hate testing."); |
616 | 9 | COMMIT; | ||
617 | 9 | DROP TABLE t1; | 10 | DROP TABLE t1; |
618 | 10 | SET AUTOCOMMIT= 1; | 11 | SET AUTOCOMMIT= 1; |
619 | 11 | CREATE TABLE t1 ( | 12 | CREATE TABLE t1 ( |
620 | 12 | 13 | ||
621 | === modified file 'plugin/transaction_log/tests/r/transaction_log_transaction.result' | |||
622 | --- plugin/transaction_log/tests/r/transaction_log_transaction.result 2010-12-21 20:47:29 +0000 | |||
623 | +++ plugin/transaction_log/tests/r/transaction_log_transaction.result 2011-01-06 13:49:38 +0000 | |||
624 | @@ -572,6 +572,7 @@ | |||
625 | 572 | INSERT INTO t1 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); | 572 | INSERT INTO t1 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); |
626 | 573 | INSERT INTO t2 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); | 573 | INSERT INTO t2 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); |
627 | 574 | UPDATE t1 SET b = b*10 WHERE b%2=0; | 574 | UPDATE t1 SET b = b*10 WHERE b%2=0; |
628 | 575 | COMMIT; | ||
629 | 575 | CREATE TABLE t3 LIKE t1; | 576 | CREATE TABLE t3 LIKE t1; |
630 | 576 | Check transaction_log_entries | 577 | Check transaction_log_entries |
631 | 577 | SELECT COUNT(*) FROM DATA_DICTIONARY.TRANSACTION_LOG_ENTRIES; | 578 | SELECT COUNT(*) FROM DATA_DICTIONARY.TRANSACTION_LOG_ENTRIES; |
632 | 578 | 579 | ||
633 | === modified file 'plugin/transaction_log/tests/t/auto_commit.inc' | |||
634 | --- plugin/transaction_log/tests/t/auto_commit.inc 2009-12-11 21:28:10 +0000 | |||
635 | +++ plugin/transaction_log/tests/t/auto_commit.inc 2011-01-06 13:49:38 +0000 | |||
636 | @@ -16,6 +16,7 @@ | |||
637 | 16 | INSERT INTO t1 VALUES (1, "I love testing."); | 16 | INSERT INTO t1 VALUES (1, "I love testing."); |
638 | 17 | INSERT INTO t1 VALUES (2, "I hate testing."); | 17 | INSERT INTO t1 VALUES (2, "I hate testing."); |
639 | 18 | 18 | ||
640 | 19 | COMMIT; | ||
641 | 19 | DROP TABLE t1; | 20 | DROP TABLE t1; |
642 | 20 | 21 | ||
643 | 21 | # Try the same thing with auto_commit turned on | 22 | # Try the same thing with auto_commit turned on |
644 | 22 | 23 | ||
645 | === modified file 'plugin/transaction_log/tests/t/transaction_log_transaction.test' | |||
646 | --- plugin/transaction_log/tests/t/transaction_log_transaction.test 2010-10-28 21:31:13 +0000 | |||
647 | +++ plugin/transaction_log/tests/t/transaction_log_transaction.test 2011-01-06 13:49:38 +0000 | |||
648 | @@ -77,7 +77,7 @@ | |||
649 | 77 | INSERT INTO t1 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); | 77 | INSERT INTO t1 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); |
650 | 78 | INSERT INTO t2 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); | 78 | INSERT INTO t2 (b) VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(100),(101); |
651 | 79 | UPDATE t1 SET b = b*10 WHERE b%2=0; | 79 | UPDATE t1 SET b = b*10 WHERE b%2=0; |
653 | 80 | # this will cause implicit COMMIT | 80 | COMMIT; |
654 | 81 | CREATE TABLE t3 LIKE t1; | 81 | CREATE TABLE t3 LIKE t1; |
655 | 82 | 82 | ||
656 | 83 | --source ../plugin/transaction_log/tests/t/check_transaction_log.inc | 83 | --source ../plugin/transaction_log/tests/t/check_transaction_log.inc |
657 | 84 | 84 | ||
658 | === modified file 'plugin/utility_functions/tests/r/execute_wait.result' | |||
659 | --- plugin/utility_functions/tests/r/execute_wait.result 2010-12-09 06:44:30 +0000 | |||
660 | +++ plugin/utility_functions/tests/r/execute_wait.result 2011-01-06 13:49:38 +0000 | |||
661 | @@ -13,14 +13,30 @@ | |||
662 | 13 | 1 1 | 13 | 1 1 |
663 | 14 | SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA() ORDER BY TABLE_NAME; | 14 | SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA() ORDER BY TABLE_NAME; |
664 | 15 | TABLE_NAME | 15 | TABLE_NAME |
665 | 16 | A | ||
666 | 17 | B | ||
667 | 18 | C | ||
668 | 19 | t1 | 16 | t1 |
669 | 20 | SELECT IF((COUNT(TABLE_NAME) = 3), "YES", "NO") FROM DATA_DICTIONARY.TABLES WHERE TABLE_NAME IN ("A", "B", "C") AND TABLE_SCHEMA=SCHEMA(); | 17 | SELECT IF((COUNT(TABLE_NAME) = 3), "YES", "NO") FROM DATA_DICTIONARY.TABLES WHERE TABLE_NAME IN ("A", "B", "C") AND TABLE_SCHEMA=SCHEMA(); |
670 | 21 | IF((COUNT(TABLE_NAME) = 3), "YES", "NO") | 18 | IF((COUNT(TABLE_NAME) = 3), "YES", "NO") |
671 | 19 | NO | ||
672 | 20 | DROP TABLE t1; | ||
673 | 21 | CREATE TABLE t1 (A VARCHAR(150)); | ||
674 | 22 | SET @execute= "SELECT WAIT('barrier')"; | ||
675 | 23 | INSERT INTO t1 VALUES ("COMMIT; CREATE TABLE A (A INT)"), ("COMMIT; CREATE TABLE B (A INT)"), ("CREATE TABLE C (A INT)"); | ||
676 | 24 | SELECT A FROM t1 ORDER BY A; | ||
677 | 25 | A | ||
678 | 26 | COMMIT; CREATE TABLE A (A INT) | ||
679 | 27 | COMMIT; CREATE TABLE B (A INT) | ||
680 | 28 | CREATE TABLE C (A INT) | ||
681 | 29 | SELECT EXECUTE(A) WAIT, 1 FROM t1; | ||
682 | 30 | EXECUTE(A) WAIT 1 | ||
683 | 31 | 1 1 | ||
684 | 32 | 1 1 | ||
685 | 33 | 1 1 | ||
686 | 34 | SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA() ORDER BY TABLE_NAME; | ||
687 | 35 | TABLE_NAME | ||
688 | 36 | A | ||
689 | 37 | B | ||
690 | 38 | t1 | ||
691 | 39 | SELECT IF((COUNT(TABLE_NAME) = 2), "YES", "NO") FROM DATA_DICTIONARY.TABLES WHERE TABLE_NAME IN ("A", "B", "C") AND TABLE_SCHEMA=SCHEMA(); | ||
692 | 40 | IF((COUNT(TABLE_NAME) = 2), "YES", "NO") | ||
693 | 22 | YES | 41 | YES |
698 | 23 | DROP TABLE A; | 42 | DROP TABLE A, B, t1; |
695 | 24 | DROP TABLE B; | ||
696 | 25 | DROP TABLE C; | ||
697 | 26 | DROP TABLE t1; | ||
699 | 27 | 43 | ||
700 | === modified file 'plugin/utility_functions/tests/t/execute_wait.test' | |||
701 | --- plugin/utility_functions/tests/t/execute_wait.test 2010-12-09 06:44:30 +0000 | |||
702 | +++ plugin/utility_functions/tests/t/execute_wait.test 2011-01-06 13:49:38 +0000 | |||
703 | @@ -6,7 +6,14 @@ | |||
704 | 6 | SELECT EXECUTE(A) WAIT, 1 FROM t1; | 6 | SELECT EXECUTE(A) WAIT, 1 FROM t1; |
705 | 7 | SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA() ORDER BY TABLE_NAME; | 7 | SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA() ORDER BY TABLE_NAME; |
706 | 8 | SELECT IF((COUNT(TABLE_NAME) = 3), "YES", "NO") FROM DATA_DICTIONARY.TABLES WHERE TABLE_NAME IN ("A", "B", "C") AND TABLE_SCHEMA=SCHEMA(); | 8 | SELECT IF((COUNT(TABLE_NAME) = 3), "YES", "NO") FROM DATA_DICTIONARY.TABLES WHERE TABLE_NAME IN ("A", "B", "C") AND TABLE_SCHEMA=SCHEMA(); |
707 | 9 | DROP TABLE A; | ||
708 | 10 | DROP TABLE B; | ||
709 | 11 | DROP TABLE C; | ||
710 | 12 | DROP TABLE t1; | 9 | DROP TABLE t1; |
711 | 10 | |||
712 | 11 | CREATE TABLE t1 (A VARCHAR(150)); | ||
713 | 12 | SET @execute= "SELECT WAIT('barrier')"; | ||
714 | 13 | INSERT INTO t1 VALUES ("COMMIT; CREATE TABLE A (A INT)"), ("COMMIT; CREATE TABLE B (A INT)"), ("CREATE TABLE C (A INT)"); | ||
715 | 14 | SELECT A FROM t1 ORDER BY A; | ||
716 | 15 | SELECT EXECUTE(A) WAIT, 1 FROM t1; | ||
717 | 16 | SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA() ORDER BY TABLE_NAME; | ||
718 | 17 | SELECT IF((COUNT(TABLE_NAME) = 2), "YES", "NO") FROM DATA_DICTIONARY.TABLES WHERE TABLE_NAME IN ("A", "B", "C") AND TABLE_SCHEMA=SCHEMA(); | ||
719 | 18 | DROP TABLE A, B, t1; | ||
720 | 19 | |||
721 | 13 | 20 | ||
722 | === modified file 'tests/include.am' | |||
723 | --- tests/include.am 2011-01-05 04:45:57 +0000 | |||
724 | +++ tests/include.am 2011-01-06 13:49:38 +0000 | |||
725 | @@ -23,7 +23,7 @@ | |||
726 | 23 | GENSCRIPTS = tests/dtr tests/mtr tests/test-run | 23 | GENSCRIPTS = tests/dtr tests/mtr tests/test-run |
727 | 24 | PRESCRIPTS = tests/test-run.pl tests/stress-test.pl | 24 | PRESCRIPTS = tests/test-run.pl tests/stress-test.pl |
728 | 25 | PLUGIN_TESTS = $(pandora_plugin_test_list) | 25 | PLUGIN_TESTS = $(pandora_plugin_test_list) |
730 | 26 | NORMAL_TESTS = main,bool_type,cast,flush_tables,identifiers,jp,mysql_compatibility,regression,tamil,time_type,unsigned_integer_type,uuid_type,$(PLUGIN_TESTS) | 26 | NORMAL_TESTS = main,bool_type,cast,ddl_transactions,flush_tables,identifiers,jp,mysql_compatibility,regression,tamil,time_type,unsigned_integer_type,uuid_type,$(PLUGIN_TESTS) |
731 | 27 | ALL_TESTS = main,big,jp,tamil,regression,$(PLUGIN_TESTS) | 27 | ALL_TESTS = main,big,jp,tamil,regression,$(PLUGIN_TESTS) |
732 | 28 | noinst_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) | 28 | noinst_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) |
733 | 29 | CLEANFILES += $(GENSCRIPTS) tests/mtr | 29 | CLEANFILES += $(GENSCRIPTS) tests/mtr |
734 | 30 | 30 | ||
735 | === modified file 'tests/include/mix1.inc' | |||
736 | --- tests/include/mix1.inc 2010-12-07 18:12:07 +0000 | |||
737 | +++ tests/include/mix1.inc 2011-01-06 13:49:38 +0000 | |||
738 | @@ -653,6 +653,7 @@ | |||
739 | 653 | CREATE TABLE t2 (a int, b int, primary key (a)); | 653 | CREATE TABLE t2 (a int, b int, primary key (a)); |
740 | 654 | BEGIN; | 654 | BEGIN; |
741 | 655 | INSERT INTO t2 values(100,100); | 655 | INSERT INTO t2 values(100,100); |
742 | 656 | COMMIT; | ||
743 | 656 | --error ER_DUP_ENTRY | 657 | --error ER_DUP_ENTRY |
744 | 657 | CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1; | 658 | CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1; |
745 | 658 | SELECT * from t2; | 659 | SELECT * from t2; |
746 | 659 | 660 | ||
747 | === modified file 'tests/include/mix2.inc' | |||
748 | --- tests/include/mix2.inc 2010-12-07 09:12:12 +0000 | |||
749 | +++ tests/include/mix2.inc 2011-01-06 13:49:38 +0000 | |||
750 | @@ -2162,6 +2162,7 @@ | |||
751 | 2162 | eval create $temp table t1 ( a int ) ENGINE=$engine_type; | 2162 | eval create $temp table t1 ( a int ) ENGINE=$engine_type; |
752 | 2163 | BEGIN; | 2163 | BEGIN; |
753 | 2164 | INSERT INTO t1 VALUES (1); | 2164 | INSERT INTO t1 VALUES (1); |
754 | 2165 | COMMIT; | ||
755 | 2165 | eval ALTER TABLE t1 ENGINE=$engine_type; | 2166 | eval ALTER TABLE t1 ENGINE=$engine_type; |
756 | 2166 | DROP TABLE t1; | 2167 | DROP TABLE t1; |
757 | 2167 | 2168 | ||
758 | 2168 | 2169 | ||
759 | === modified file 'tests/include/unsafe_binlog.inc' | |||
760 | --- tests/include/unsafe_binlog.inc 2009-08-03 23:01:21 +0000 | |||
761 | +++ tests/include/unsafe_binlog.inc 2011-01-06 13:49:38 +0000 | |||
762 | @@ -116,6 +116,7 @@ | |||
763 | 116 | set autocommit = 0; | 116 | set autocommit = 0; |
764 | 117 | insert into t1 select * from t2; | 117 | insert into t1 select * from t2; |
765 | 118 | update t1 set b = (select e from t2 where a = d); | 118 | update t1 set b = (select e from t2 where a = d); |
766 | 119 | COMMIT; | ||
767 | 119 | eval create table t3(d int not null, e int, primary key(d)) engine = $engine_type | 120 | eval create table t3(d int not null, e int, primary key(d)) engine = $engine_type |
768 | 120 | select * from t2; | 121 | select * from t2; |
769 | 121 | commit; | 122 | commit; |
770 | 122 | 123 | ||
771 | === modified file 'tests/r/flush_block_commit.result' | |||
772 | --- tests/r/flush_block_commit.result 2010-08-15 17:21:42 +0000 | |||
773 | +++ tests/r/flush_block_commit.result 2011-01-06 13:49:38 +0000 | |||
774 | @@ -36,4 +36,5 @@ | |||
775 | 36 | show create database test; | 36 | show create database test; |
776 | 37 | Database Create Database | 37 | Database Create Database |
777 | 38 | test CREATE DATABASE `test` COLLATE = utf8_general_ci | 38 | test CREATE DATABASE `test` COLLATE = utf8_general_ci |
778 | 39 | COMMIT; | ||
779 | 39 | drop table t1; | 40 | drop table t1; |
780 | 40 | 41 | ||
781 | === modified file 'tests/r/insert.result' | |||
782 | --- tests/r/insert.result 2010-04-20 18:23:07 +0000 | |||
783 | +++ tests/r/insert.result 2011-01-06 13:49:38 +0000 | |||
784 | @@ -82,6 +82,7 @@ | |||
785 | 82 | select count(*) from t2; | 82 | select count(*) from t2; |
786 | 83 | count(*) | 83 | count(*) |
787 | 84 | 25500 | 84 | 25500 |
788 | 85 | COMMIT; | ||
789 | 85 | drop table t1,t2,t3; | 86 | drop table t1,t2,t3; |
790 | 86 | create table t1 (a int, b int); | 87 | create table t1 (a int, b int); |
791 | 87 | insert into t1 (a,b) values (a,b); | 88 | insert into t1 (a,b) values (a,b); |
792 | 88 | 89 | ||
793 | === modified file 'tests/r/randgen_queries.result' | |||
794 | --- tests/r/randgen_queries.result 2010-12-20 07:54:13 +0000 | |||
795 | +++ tests/r/randgen_queries.result 2011-01-06 13:49:38 +0000 | |||
796 | @@ -160,4 +160,5 @@ | |||
797 | 160 | select COUNT(*) from data_dictionary.tables; | 160 | select COUNT(*) from data_dictionary.tables; |
798 | 161 | COUNT(*) | 161 | COUNT(*) |
799 | 162 | ####.##.#### | 162 | ####.##.#### |
800 | 163 | COMMIT; | ||
801 | 163 | DROP TABLE t1; | 164 | DROP TABLE t1; |
802 | 164 | 165 | ||
803 | === modified file 'tests/r/savepoints.result' | |||
804 | --- tests/r/savepoints.result 2010-12-21 02:58:40 +0000 | |||
805 | +++ tests/r/savepoints.result 2011-01-06 13:49:38 +0000 | |||
806 | @@ -5,6 +5,7 @@ | |||
807 | 5 | UPDATE t1 SET id = 2 WHERE id != 2 LIMIT 0; | 5 | UPDATE t1 SET id = 2 WHERE id != 2 LIMIT 0; |
808 | 6 | SAVEPOINT A; | 6 | SAVEPOINT A; |
809 | 7 | End Test of Bug 534806 | 7 | End Test of Bug 534806 |
810 | 8 | COMMIT; | ||
811 | 8 | DROP TABLE t1; | 9 | DROP TABLE t1; |
812 | 9 | CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY); | 10 | CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY); |
813 | 10 | START TRANSACTION; | 11 | START TRANSACTION; |
814 | @@ -45,6 +46,7 @@ | |||
815 | 45 | 2 | 46 | 2 |
816 | 46 | 3 | 47 | 3 |
817 | 47 | 4 | 48 | 4 |
818 | 49 | COMMIT; | ||
819 | 48 | DROP TABLE t1; | 50 | DROP TABLE t1; |
820 | 49 | Start Test of Bug 542299 | 51 | Start Test of Bug 542299 |
821 | 50 | CREATE TABLE t1 (a int,id integer auto_increment,b int,/*Indices*/key (a ),primary key (id)) ENGINE=innodb; | 52 | CREATE TABLE t1 (a int,id integer auto_increment,b int,/*Indices*/key (a ),primary key (id)) ENGINE=innodb; |
822 | @@ -57,4 +59,5 @@ | |||
823 | 57 | INSERT INTO t1 ( a, b ) VALUES ( 1 , 9 ); | 59 | INSERT INTO t1 ( a, b ) VALUES ( 1 , 9 ); |
824 | 58 | ROLLBACK TO SAVEPOINT A; | 60 | ROLLBACK TO SAVEPOINT A; |
825 | 59 | End Test of Bug 542299 | 61 | End Test of Bug 542299 |
826 | 62 | COMMIT; | ||
827 | 60 | DROP TABLE t1; | 63 | DROP TABLE t1; |
828 | 61 | 64 | ||
829 | === modified file 'tests/r/select_in_null.result' | |||
830 | --- tests/r/select_in_null.result 2009-10-19 03:26:17 +0000 | |||
831 | +++ tests/r/select_in_null.result 2011-01-06 13:49:38 +0000 | |||
832 | @@ -6,7 +6,6 @@ | |||
833 | 6 | b int, | 6 | b int, |
834 | 7 | primary key( a ) | 7 | primary key( a ) |
835 | 8 | ) engine=myisam; | 8 | ) engine=myisam; |
836 | 9 | begin; | ||
837 | 10 | insert into foo( b ) values (1),(1),(1),(1),(1); | 9 | insert into foo( b ) values (1),(1),(1),(1),(1); |
838 | 11 | create table t2 as select * from foo; | 10 | create table t2 as select * from foo; |
839 | 12 | insert into foo( b ) select b from t2; | 11 | insert into foo( b ) select b from t2; |
840 | @@ -23,7 +22,6 @@ | |||
841 | 23 | create table t2 as select * from foo; | 22 | create table t2 as select * from foo; |
842 | 24 | insert into foo( b ) select b from t2; | 23 | insert into foo( b ) select b from t2; |
843 | 25 | drop table t2; | 24 | drop table t2; |
844 | 26 | commit; | ||
845 | 27 | explain select * from foo where a in (160000, 160001, 160002); | 25 | explain select * from foo where a in (160000, 160001, 160002); |
846 | 28 | id select_type table type possible_keys key key_len ref rows Extra | 26 | id select_type table type possible_keys key key_len ref rows Extra |
847 | 29 | 1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 3 Using where | 27 | 1 SIMPLE foo range PRIMARY PRIMARY 4 NULL 3 Using where |
848 | 30 | 28 | ||
849 | === modified file 'tests/r/statement_boundaries.result' | |||
850 | --- tests/r/statement_boundaries.result 2010-10-14 18:58:48 +0000 | |||
851 | +++ tests/r/statement_boundaries.result 2011-01-06 13:49:38 +0000 | |||
852 | @@ -6,6 +6,7 @@ | |||
853 | 6 | SHOW STATUS LIKE 'Handler_commit%'; | 6 | SHOW STATUS LIKE 'Handler_commit%'; |
854 | 7 | Variable_name Value | 7 | Variable_name Value |
855 | 8 | Handler_commit 0 | 8 | Handler_commit 0 |
856 | 9 | COMMIT; | ||
857 | 9 | DROP SCHEMA IF EXISTS boundaries; | 10 | DROP SCHEMA IF EXISTS boundaries; |
858 | 10 | Warnings: | 11 | Warnings: |
859 | 11 | Note 1008 Can't drop schema 'boundaries'; schema doesn't exist | 12 | Note 1008 Can't drop schema 'boundaries'; schema doesn't exist |
860 | @@ -20,10 +21,10 @@ | |||
861 | 20 | SHOW STATUS LIKE 'Handler_commit%'; | 21 | SHOW STATUS LIKE 'Handler_commit%'; |
862 | 21 | Variable_name Value | 22 | Variable_name Value |
863 | 22 | Handler_commit 1 | 23 | Handler_commit 1 |
864 | 23 | BEGIN; | ||
865 | 24 | DROP SCHEMA IF EXISTS boundaries; | 24 | DROP SCHEMA IF EXISTS boundaries; |
866 | 25 | Warnings: | 25 | Warnings: |
867 | 26 | Note 1008 Can't drop schema 'boundaries'; schema doesn't exist | 26 | Note 1008 Can't drop schema 'boundaries'; schema doesn't exist |
868 | 27 | BEGIN; | ||
869 | 27 | COMMIT; | 28 | COMMIT; |
870 | 28 | SHOW STATUS LIKE 'Handler_commit%'; | 29 | SHOW STATUS LIKE 'Handler_commit%'; |
871 | 29 | Variable_name Value | 30 | Variable_name Value |
872 | @@ -77,6 +78,7 @@ | |||
873 | 77 | SHOW STATUS LIKE 'Handler_commit%'; | 78 | SHOW STATUS LIKE 'Handler_commit%'; |
874 | 78 | Variable_name Value | 79 | Variable_name Value |
875 | 79 | Handler_commit 4 | 80 | Handler_commit 4 |
876 | 81 | COMMIT; | ||
877 | 80 | drop table commit_test; | 82 | drop table commit_test; |
878 | 81 | SHOW STATUS LIKE 'Handler_commit%'; | 83 | SHOW STATUS LIKE 'Handler_commit%'; |
879 | 82 | Variable_name Value | 84 | Variable_name Value |
880 | 83 | 85 | ||
881 | === modified file 'tests/r/transaction.result' | |||
882 | --- tests/r/transaction.result 2010-02-25 04:27:11 +0000 | |||
883 | +++ tests/r/transaction.result 2011-01-06 13:49:38 +0000 | |||
884 | @@ -39,5 +39,6 @@ | |||
885 | 39 | FROM t1_trx | 39 | FROM t1_trx |
886 | 40 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; | 40 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; |
887 | 41 | k v | 41 | k v |
888 | 42 | COMMIT; | ||
889 | 42 | DROP TABLE t1_trx; | 43 | DROP TABLE t1_trx; |
890 | 43 | DROP TABLE t1_non_trx; | 44 | DROP TABLE t1_non_trx; |
891 | 44 | 45 | ||
892 | === modified file 'tests/r/trx_isolation_read_committed.result' | |||
893 | --- tests/r/trx_isolation_read_committed.result 2010-10-25 04:18:50 +0000 | |||
894 | +++ tests/r/trx_isolation_read_committed.result 2011-01-06 13:49:38 +0000 | |||
895 | @@ -30,4 +30,5 @@ | |||
896 | 30 | a | 30 | a |
897 | 31 | 1 | 31 | 1 |
898 | 32 | 2 | 32 | 2 |
899 | 33 | COMMIT; | ||
900 | 33 | DROP TABLE t1; | 34 | DROP TABLE t1; |
901 | 34 | 35 | ||
902 | === added directory 'tests/suite/ddl_transactions' | |||
903 | === removed directory 'tests/suite/ddl_transactions' | |||
904 | === added directory 'tests/suite/ddl_transactions/r' | |||
905 | === added file 'tests/suite/ddl_transactions/r/alter_schema.result' | |||
906 | --- tests/suite/ddl_transactions/r/alter_schema.result 1970-01-01 00:00:00 +0000 | |||
907 | +++ tests/suite/ddl_transactions/r/alter_schema.result 2011-01-06 13:49:38 +0000 | |||
908 | @@ -0,0 +1,6 @@ | |||
909 | 1 | CREATE SCHEMA foo; | ||
910 | 2 | begin; | ||
911 | 3 | alter schema foo collate = utf8_bin; | ||
912 | 4 | ERROR HY000: Transactional DDL not supported | ||
913 | 5 | commit; | ||
914 | 6 | DROP SCHEMA foo; | ||
915 | 0 | 7 | ||
916 | === added file 'tests/suite/ddl_transactions/r/alter_table.result' | |||
917 | --- tests/suite/ddl_transactions/r/alter_table.result 1970-01-01 00:00:00 +0000 | |||
918 | +++ tests/suite/ddl_transactions/r/alter_table.result 2011-01-06 13:49:38 +0000 | |||
919 | @@ -0,0 +1,8 @@ | |||
920 | 1 | CREATE TABLE t1 (a int); | ||
921 | 2 | BEGIN; | ||
922 | 3 | ALTER TABLE t1 ADD COLUMN b int; | ||
923 | 4 | ERROR HY000: Transactional DDL not supported | ||
924 | 5 | ALTER TABLE t1 DISCARD TABLESPACE; | ||
925 | 6 | ERROR HY000: Transactional DDL not supported | ||
926 | 7 | COMMIT; | ||
927 | 8 | DROP TABLE t1; | ||
928 | 0 | 9 | ||
929 | === added file 'tests/suite/ddl_transactions/r/create_index.result' | |||
930 | --- tests/suite/ddl_transactions/r/create_index.result 1970-01-01 00:00:00 +0000 | |||
931 | +++ tests/suite/ddl_transactions/r/create_index.result 2011-01-06 13:49:38 +0000 | |||
932 | @@ -0,0 +1,6 @@ | |||
933 | 1 | CREATE TABLE t1 (a int); | ||
934 | 2 | BEGIN; | ||
935 | 3 | CREATE INDEX foo on t1 (a); | ||
936 | 4 | ERROR HY000: Transactional DDL not supported | ||
937 | 5 | COMMIT; | ||
938 | 6 | DROP TABLE t1; | ||
939 | 0 | 7 | ||
940 | === added file 'tests/suite/ddl_transactions/r/create_schema.result' | |||
941 | --- tests/suite/ddl_transactions/r/create_schema.result 1970-01-01 00:00:00 +0000 | |||
942 | +++ tests/suite/ddl_transactions/r/create_schema.result 2011-01-06 13:49:38 +0000 | |||
943 | @@ -0,0 +1,6 @@ | |||
944 | 1 | CREATE SCHEMA foo; | ||
945 | 2 | DROP SCHEMA foo; | ||
946 | 3 | BEGIN; | ||
947 | 4 | CREATE SCHEMA foo; | ||
948 | 5 | ERROR HY000: Transactional DDL not supported | ||
949 | 6 | COMMIT; | ||
950 | 0 | 7 | ||
951 | === added file 'tests/suite/ddl_transactions/r/create_table.result' | |||
952 | --- tests/suite/ddl_transactions/r/create_table.result 1970-01-01 00:00:00 +0000 | |||
953 | +++ tests/suite/ddl_transactions/r/create_table.result 2011-01-06 13:49:38 +0000 | |||
954 | @@ -0,0 +1,4 @@ | |||
955 | 1 | BEGIN; | ||
956 | 2 | CREATE TABLE t1 (a int); | ||
957 | 3 | ERROR HY000: Transactional DDL not supported | ||
958 | 4 | COMMIT; | ||
959 | 0 | 5 | ||
960 | === added file 'tests/suite/ddl_transactions/r/drop_index.result' | |||
961 | --- tests/suite/ddl_transactions/r/drop_index.result 1970-01-01 00:00:00 +0000 | |||
962 | +++ tests/suite/ddl_transactions/r/drop_index.result 2011-01-06 13:49:38 +0000 | |||
963 | @@ -0,0 +1,6 @@ | |||
964 | 1 | CREATE TABLE t1 (a int, index a_idx (a)); | ||
965 | 2 | BEGIN; | ||
966 | 3 | DROP INDEX a_idx on t1; | ||
967 | 4 | ERROR HY000: Transactional DDL not supported | ||
968 | 5 | commit; | ||
969 | 6 | drop table t1; | ||
970 | 0 | 7 | ||
971 | === added file 'tests/suite/ddl_transactions/r/drop_schema.result' | |||
972 | --- tests/suite/ddl_transactions/r/drop_schema.result 1970-01-01 00:00:00 +0000 | |||
973 | +++ tests/suite/ddl_transactions/r/drop_schema.result 2011-01-06 13:49:38 +0000 | |||
974 | @@ -0,0 +1,6 @@ | |||
975 | 1 | CREATE SCHEMA foo; | ||
976 | 2 | BEGIN; | ||
977 | 3 | DROP SCHEMA foo; | ||
978 | 4 | ERROR HY000: Transactional DDL not supported | ||
979 | 5 | commit; | ||
980 | 6 | DROP SCHEMA foo; | ||
981 | 0 | 7 | ||
982 | === added file 'tests/suite/ddl_transactions/r/drop_table.result' | |||
983 | --- tests/suite/ddl_transactions/r/drop_table.result 1970-01-01 00:00:00 +0000 | |||
984 | +++ tests/suite/ddl_transactions/r/drop_table.result 2011-01-06 13:49:38 +0000 | |||
985 | @@ -0,0 +1,6 @@ | |||
986 | 1 | CREATE TABLE t1 (a int); | ||
987 | 2 | BEGIN; | ||
988 | 3 | DROP TABLE t1; | ||
989 | 4 | ERROR HY000: Transactional DDL not supported | ||
990 | 5 | COMMIT; | ||
991 | 6 | DROP TABLE t1; | ||
992 | 0 | 7 | ||
993 | === added file 'tests/suite/ddl_transactions/r/rename_table.result' | |||
994 | --- tests/suite/ddl_transactions/r/rename_table.result 1970-01-01 00:00:00 +0000 | |||
995 | +++ tests/suite/ddl_transactions/r/rename_table.result 2011-01-06 13:49:38 +0000 | |||
996 | @@ -0,0 +1,8 @@ | |||
997 | 1 | CREATE TABLE t1 (a int); | ||
998 | 2 | begin; | ||
999 | 3 | RENAME TABLE t1 to t2; | ||
1000 | 4 | ERROR HY000: Transactional DDL not supported | ||
1001 | 5 | commit; | ||
1002 | 6 | DROP TABLE IF EXISTS t1,t2; | ||
1003 | 7 | Warnings: | ||
1004 | 8 | Note 1051 Unknown table 't2' | ||
1005 | 0 | 9 | ||
1006 | === added file 'tests/suite/ddl_transactions/r/truncate_table.result' | |||
1007 | --- tests/suite/ddl_transactions/r/truncate_table.result 1970-01-01 00:00:00 +0000 | |||
1008 | +++ tests/suite/ddl_transactions/r/truncate_table.result 2011-01-06 13:49:38 +0000 | |||
1009 | @@ -0,0 +1,7 @@ | |||
1010 | 1 | CREATE TABLE t1 (a int); | ||
1011 | 2 | insert into t1 values (1),(2),(42); | ||
1012 | 3 | BEGIN; | ||
1013 | 4 | TRUNCATE TABLE t1; | ||
1014 | 5 | ERROR HY000: Transactional DDL not supported | ||
1015 | 6 | COMMIT; | ||
1016 | 7 | DROP TABLE t1; | ||
1017 | 0 | 8 | ||
1018 | === added directory 'tests/suite/ddl_transactions/t' | |||
1019 | === added file 'tests/suite/ddl_transactions/t/alter_schema.test' | |||
1020 | --- tests/suite/ddl_transactions/t/alter_schema.test 1970-01-01 00:00:00 +0000 | |||
1021 | +++ tests/suite/ddl_transactions/t/alter_schema.test 2011-01-06 13:49:38 +0000 | |||
1022 | @@ -0,0 +1,6 @@ | |||
1023 | 1 | CREATE SCHEMA foo; | ||
1024 | 2 | begin; | ||
1025 | 3 | --error 1727 | ||
1026 | 4 | alter schema foo collate = utf8_bin; | ||
1027 | 5 | commit; | ||
1028 | 6 | DROP SCHEMA foo; | ||
1029 | 0 | 7 | ||
1030 | === added file 'tests/suite/ddl_transactions/t/alter_table.test' | |||
1031 | --- tests/suite/ddl_transactions/t/alter_table.test 1970-01-01 00:00:00 +0000 | |||
1032 | +++ tests/suite/ddl_transactions/t/alter_table.test 2011-01-06 13:49:38 +0000 | |||
1033 | @@ -0,0 +1,8 @@ | |||
1034 | 1 | CREATE TABLE t1 (a int); | ||
1035 | 2 | BEGIN; | ||
1036 | 3 | --error 1727 | ||
1037 | 4 | ALTER TABLE t1 ADD COLUMN b int; | ||
1038 | 5 | --error 1727 | ||
1039 | 6 | ALTER TABLE t1 DISCARD TABLESPACE; | ||
1040 | 7 | COMMIT; | ||
1041 | 8 | DROP TABLE t1; | ||
1042 | 0 | 9 | ||
1043 | === added file 'tests/suite/ddl_transactions/t/create_index.test' | |||
1044 | --- tests/suite/ddl_transactions/t/create_index.test 1970-01-01 00:00:00 +0000 | |||
1045 | +++ tests/suite/ddl_transactions/t/create_index.test 2011-01-06 13:49:38 +0000 | |||
1046 | @@ -0,0 +1,6 @@ | |||
1047 | 1 | CREATE TABLE t1 (a int); | ||
1048 | 2 | BEGIN; | ||
1049 | 3 | --error 1727 | ||
1050 | 4 | CREATE INDEX foo on t1 (a); | ||
1051 | 5 | COMMIT; | ||
1052 | 6 | DROP TABLE t1; | ||
1053 | 0 | 7 | ||
1054 | === added file 'tests/suite/ddl_transactions/t/create_schema.test' | |||
1055 | --- tests/suite/ddl_transactions/t/create_schema.test 1970-01-01 00:00:00 +0000 | |||
1056 | +++ tests/suite/ddl_transactions/t/create_schema.test 2011-01-06 13:49:38 +0000 | |||
1057 | @@ -0,0 +1,6 @@ | |||
1058 | 1 | CREATE SCHEMA foo; | ||
1059 | 2 | DROP SCHEMA foo; | ||
1060 | 3 | BEGIN; | ||
1061 | 4 | --error 1727 | ||
1062 | 5 | CREATE SCHEMA foo; | ||
1063 | 6 | COMMIT; | ||
1064 | 0 | 7 | ||
1065 | === added file 'tests/suite/ddl_transactions/t/create_table.test' | |||
1066 | --- tests/suite/ddl_transactions/t/create_table.test 1970-01-01 00:00:00 +0000 | |||
1067 | +++ tests/suite/ddl_transactions/t/create_table.test 2011-01-06 13:49:38 +0000 | |||
1068 | @@ -0,0 +1,4 @@ | |||
1069 | 1 | BEGIN; | ||
1070 | 2 | --error 1727 | ||
1071 | 3 | CREATE TABLE t1 (a int); | ||
1072 | 4 | COMMIT; | ||
1073 | 0 | 5 | ||
1074 | === added file 'tests/suite/ddl_transactions/t/drop_index.test' | |||
1075 | --- tests/suite/ddl_transactions/t/drop_index.test 1970-01-01 00:00:00 +0000 | |||
1076 | +++ tests/suite/ddl_transactions/t/drop_index.test 2011-01-06 13:49:38 +0000 | |||
1077 | @@ -0,0 +1,6 @@ | |||
1078 | 1 | CREATE TABLE t1 (a int, index a_idx (a)); | ||
1079 | 2 | BEGIN; | ||
1080 | 3 | --error 1727 | ||
1081 | 4 | DROP INDEX a_idx on t1; | ||
1082 | 5 | commit; | ||
1083 | 6 | drop table t1; | ||
1084 | 0 | 7 | ||
1085 | === added file 'tests/suite/ddl_transactions/t/drop_schema.test' | |||
1086 | --- tests/suite/ddl_transactions/t/drop_schema.test 1970-01-01 00:00:00 +0000 | |||
1087 | +++ tests/suite/ddl_transactions/t/drop_schema.test 2011-01-06 13:49:38 +0000 | |||
1088 | @@ -0,0 +1,6 @@ | |||
1089 | 1 | CREATE SCHEMA foo; | ||
1090 | 2 | BEGIN; | ||
1091 | 3 | --error 1727 | ||
1092 | 4 | DROP SCHEMA foo; | ||
1093 | 5 | commit; | ||
1094 | 6 | DROP SCHEMA foo; | ||
1095 | 0 | 7 | ||
1096 | === added file 'tests/suite/ddl_transactions/t/drop_table.test' | |||
1097 | --- tests/suite/ddl_transactions/t/drop_table.test 1970-01-01 00:00:00 +0000 | |||
1098 | +++ tests/suite/ddl_transactions/t/drop_table.test 2011-01-06 13:49:38 +0000 | |||
1099 | @@ -0,0 +1,6 @@ | |||
1100 | 1 | CREATE TABLE t1 (a int); | ||
1101 | 2 | BEGIN; | ||
1102 | 3 | --error 1727 | ||
1103 | 4 | DROP TABLE t1; | ||
1104 | 5 | COMMIT; | ||
1105 | 6 | DROP TABLE t1; | ||
1106 | 0 | 7 | ||
1107 | === added file 'tests/suite/ddl_transactions/t/rename_table.test' | |||
1108 | --- tests/suite/ddl_transactions/t/rename_table.test 1970-01-01 00:00:00 +0000 | |||
1109 | +++ tests/suite/ddl_transactions/t/rename_table.test 2011-01-06 13:49:38 +0000 | |||
1110 | @@ -0,0 +1,6 @@ | |||
1111 | 1 | CREATE TABLE t1 (a int); | ||
1112 | 2 | begin; | ||
1113 | 3 | --error 1727 | ||
1114 | 4 | RENAME TABLE t1 to t2; | ||
1115 | 5 | commit; | ||
1116 | 6 | DROP TABLE IF EXISTS t1,t2; | ||
1117 | 0 | 7 | ||
1118 | === added file 'tests/suite/ddl_transactions/t/truncate_table.test' | |||
1119 | --- tests/suite/ddl_transactions/t/truncate_table.test 1970-01-01 00:00:00 +0000 | |||
1120 | +++ tests/suite/ddl_transactions/t/truncate_table.test 2011-01-06 13:49:38 +0000 | |||
1121 | @@ -0,0 +1,7 @@ | |||
1122 | 1 | CREATE TABLE t1 (a int); | ||
1123 | 2 | insert into t1 values (1),(2),(42); | ||
1124 | 3 | BEGIN; | ||
1125 | 4 | --error 1727 | ||
1126 | 5 | TRUNCATE TABLE t1; | ||
1127 | 6 | COMMIT; | ||
1128 | 7 | DROP TABLE t1; | ||
1129 | 0 | 8 | ||
1130 | === modified file 'tests/t/flush_block_commit.test' | |||
1131 | --- tests/t/flush_block_commit.test 2010-11-11 12:52:12 +0000 | |||
1132 | +++ tests/t/flush_block_commit.test 2011-01-06 13:49:38 +0000 | |||
1133 | @@ -71,7 +71,7 @@ | |||
1134 | 71 | begin; | 71 | begin; |
1135 | 72 | select * from t1; | 72 | select * from t1; |
1136 | 73 | show create database test; | 73 | show create database test; |
1138 | 74 | 74 | COMMIT; | |
1139 | 75 | drop table t1; | 75 | drop table t1; |
1140 | 76 | 76 | ||
1141 | 77 | # End of 4.1 tests | 77 | # End of 4.1 tests |
1142 | 78 | 78 | ||
1143 | === modified file 'tests/t/insert.test' | |||
1144 | --- tests/t/insert.test 2010-08-26 21:56:15 +0000 | |||
1145 | +++ tests/t/insert.test 2011-01-06 13:49:38 +0000 | |||
1146 | @@ -94,7 +94,6 @@ | |||
1147 | 94 | create table t2(id2 int not null, t char(12)); | 94 | create table t2(id2 int not null, t char(12)); |
1148 | 95 | create table t3(id3 int not null, t char(12), index(id3)); | 95 | create table t3(id3 int not null, t char(12), index(id3)); |
1149 | 96 | disable_query_log; | 96 | disable_query_log; |
1150 | 97 | set autocommit=0; | ||
1151 | 98 | begin; | 97 | begin; |
1152 | 99 | let $1 = 100; | 98 | let $1 = 100; |
1153 | 100 | while ($1) | 99 | while ($1) |
1154 | @@ -120,6 +119,7 @@ | |||
1155 | 120 | insert into t2 select t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3; | 119 | insert into t2 select t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3; |
1156 | 121 | insert into t2 select SQL_BIG_RESULT t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3; | 120 | insert into t2 select SQL_BIG_RESULT t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3; |
1157 | 122 | select count(*) from t2; | 121 | select count(*) from t2; |
1158 | 122 | COMMIT; | ||
1159 | 123 | drop table t1,t2,t3; | 123 | drop table t1,t2,t3; |
1160 | 124 | 124 | ||
1161 | 125 | # | 125 | # |
1162 | 126 | 126 | ||
1163 | === modified file 'tests/t/randgen_queries.test' | |||
1164 | --- tests/t/randgen_queries.test 2010-07-21 19:15:45 +0000 | |||
1165 | +++ tests/t/randgen_queries.test 2011-01-06 13:49:38 +0000 | |||
1166 | @@ -96,5 +96,5 @@ | |||
1167 | 96 | --replace_column 1 ####.##.#### | 96 | --replace_column 1 ####.##.#### |
1168 | 97 | --sorted_result | 97 | --sorted_result |
1169 | 98 | select COUNT(*) from data_dictionary.tables; | 98 | select COUNT(*) from data_dictionary.tables; |
1171 | 99 | 99 | COMMIT; | |
1172 | 100 | DROP TABLE t1; | 100 | DROP TABLE t1; |
1173 | 101 | 101 | ||
1174 | === modified file 'tests/t/savepoints.test' | |||
1175 | --- tests/t/savepoints.test 2010-12-21 02:58:40 +0000 | |||
1176 | +++ tests/t/savepoints.test 2011-01-06 13:49:38 +0000 | |||
1177 | @@ -12,7 +12,7 @@ | |||
1178 | 12 | SAVEPOINT A; | 12 | SAVEPOINT A; |
1179 | 13 | 13 | ||
1180 | 14 | --echo End Test of Bug 534806 | 14 | --echo End Test of Bug 534806 |
1182 | 15 | 15 | COMMIT; | |
1183 | 16 | DROP TABLE t1; | 16 | DROP TABLE t1; |
1184 | 17 | 17 | ||
1185 | 18 | # Let's test the non-edge case for SAVEPOINTS: | 18 | # Let's test the non-edge case for SAVEPOINTS: |
1186 | @@ -62,6 +62,7 @@ | |||
1187 | 62 | 62 | ||
1188 | 63 | # t1 should have 1,2,3,4 in it. | 63 | # t1 should have 1,2,3,4 in it. |
1189 | 64 | SELECT * FROM t1; | 64 | SELECT * FROM t1; |
1190 | 65 | COMMIT; | ||
1191 | 65 | DROP TABLE t1; | 66 | DROP TABLE t1; |
1192 | 66 | 67 | ||
1193 | 67 | # | 68 | # |
1194 | @@ -81,4 +82,5 @@ | |||
1195 | 81 | ROLLBACK TO SAVEPOINT A; | 82 | ROLLBACK TO SAVEPOINT A; |
1196 | 82 | 83 | ||
1197 | 83 | --echo End Test of Bug 542299 | 84 | --echo End Test of Bug 542299 |
1198 | 85 | COMMIT; | ||
1199 | 84 | DROP TABLE t1; | 86 | DROP TABLE t1; |
1200 | 85 | 87 | ||
1201 | === modified file 'tests/t/select_in_null.test' | |||
1202 | --- tests/t/select_in_null.test 2009-10-19 03:26:17 +0000 | |||
1203 | +++ tests/t/select_in_null.test 2011-01-06 13:49:38 +0000 | |||
1204 | @@ -12,7 +12,6 @@ | |||
1205 | 12 | primary key( a ) | 12 | primary key( a ) |
1206 | 13 | ) engine=myisam; | 13 | ) engine=myisam; |
1207 | 14 | 14 | ||
1208 | 15 | begin; | ||
1209 | 16 | insert into foo( b ) values (1),(1),(1),(1),(1); | 15 | insert into foo( b ) values (1),(1),(1),(1),(1); |
1210 | 17 | create table t2 as select * from foo; | 16 | create table t2 as select * from foo; |
1211 | 18 | insert into foo( b ) select b from t2; | 17 | insert into foo( b ) select b from t2; |
1212 | @@ -29,7 +28,6 @@ | |||
1213 | 29 | create table t2 as select * from foo; | 28 | create table t2 as select * from foo; |
1214 | 30 | insert into foo( b ) select b from t2; | 29 | insert into foo( b ) select b from t2; |
1215 | 31 | drop table t2; | 30 | drop table t2; |
1216 | 32 | commit; | ||
1217 | 33 | 31 | ||
1218 | 34 | explain select * from foo where a in (160000, 160001, 160002); | 32 | explain select * from foo where a in (160000, 160001, 160002); |
1219 | 35 | explain select * from foo where a in (null, 160000, 160001, 160002); | 33 | explain select * from foo where a in (null, 160000, 160001, 160002); |
1220 | 36 | 34 | ||
1221 | === modified file 'tests/t/statement_boundaries.test' | |||
1222 | --- tests/t/statement_boundaries.test 2010-03-14 20:36:41 +0000 | |||
1223 | +++ tests/t/statement_boundaries.test 2011-01-06 13:49:38 +0000 | |||
1224 | @@ -16,10 +16,10 @@ | |||
1225 | 16 | 16 | ||
1226 | 17 | SHOW STATUS LIKE 'Handler_commit%'; | 17 | SHOW STATUS LIKE 'Handler_commit%'; |
1227 | 18 | 18 | ||
1228 | 19 | COMMIT; | ||
1229 | 19 | DROP SCHEMA IF EXISTS boundaries; | 20 | DROP SCHEMA IF EXISTS boundaries; |
1230 | 20 | 21 | ||
1233 | 21 | # Expect 1 commit count since above DROP SCHEMA | 22 | # Expect 1 commit count since above COMMIT before DROP SCHEMA |
1232 | 22 | # will implicitly call COMMIT. | ||
1234 | 23 | # | 23 | # |
1235 | 24 | # When we get transactional DDL, should be 0. | 24 | # When we get transactional DDL, should be 0. |
1236 | 25 | SHOW STATUS LIKE 'Handler_commit%'; | 25 | SHOW STATUS LIKE 'Handler_commit%'; |
1237 | @@ -38,8 +38,8 @@ | |||
1238 | 38 | SET AUTOCOMMIT= 1; | 38 | SET AUTOCOMMIT= 1; |
1239 | 39 | 39 | ||
1240 | 40 | SHOW STATUS LIKE 'Handler_commit%'; | 40 | SHOW STATUS LIKE 'Handler_commit%'; |
1241 | 41 | DROP SCHEMA IF EXISTS boundaries; | ||
1242 | 41 | BEGIN; | 42 | BEGIN; |
1243 | 42 | DROP SCHEMA IF EXISTS boundaries; | ||
1244 | 43 | COMMIT; | 43 | COMMIT; |
1245 | 44 | 44 | ||
1246 | 45 | SHOW STATUS LIKE 'Handler_commit%'; | 45 | SHOW STATUS LIKE 'Handler_commit%'; |
1247 | @@ -83,5 +83,6 @@ | |||
1248 | 83 | 83 | ||
1249 | 84 | 84 | ||
1250 | 85 | SHOW STATUS LIKE 'Handler_commit%'; | 85 | SHOW STATUS LIKE 'Handler_commit%'; |
1251 | 86 | COMMIT; | ||
1252 | 86 | drop table commit_test; | 87 | drop table commit_test; |
1253 | 87 | SHOW STATUS LIKE 'Handler_commit%'; | 88 | SHOW STATUS LIKE 'Handler_commit%'; |
1254 | 88 | 89 | ||
1255 | === modified file 'tests/t/transaction.test' | |||
1256 | --- tests/t/transaction.test 2010-02-25 04:27:11 +0000 | |||
1257 | +++ tests/t/transaction.test 2011-01-06 13:49:38 +0000 | |||
1258 | @@ -52,5 +52,6 @@ | |||
1259 | 52 | FROM t1_trx | 52 | FROM t1_trx |
1260 | 53 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; | 53 | INNER JOIN t1_non_trx ON t1_trx.k = t1_non_trx.k; |
1261 | 54 | 54 | ||
1262 | 55 | COMMIT; | ||
1263 | 55 | DROP TABLE t1_trx; | 56 | DROP TABLE t1_trx; |
1264 | 56 | DROP TABLE t1_non_trx; | 57 | DROP TABLE t1_non_trx; |
1265 | 57 | 58 | ||
1266 | === modified file 'tests/t/trx_isolation_read_committed.test' | |||
1267 | --- tests/t/trx_isolation_read_committed.test 2010-10-25 04:18:50 +0000 | |||
1268 | +++ tests/t/trx_isolation_read_committed.test 2011-01-06 13:49:38 +0000 | |||
1269 | @@ -36,6 +36,7 @@ | |||
1270 | 36 | BEGIN; | 36 | BEGIN; |
1271 | 37 | SELECT * from t1 order by a; | 37 | SELECT * from t1 order by a; |
1272 | 38 | 38 | ||
1273 | 39 | COMMIT; | ||
1274 | 39 | DROP TABLE t1; | 40 | DROP TABLE t1; |
1275 | 40 | 41 | ||
1276 | 41 | disconnect a; | 42 | disconnect a; |
1277 | 42 | 43 | ||
1278 | === modified file 'tests/test-run.pl' | |||
1279 | --- tests/test-run.pl 2011-01-05 04:45:57 +0000 | |||
1280 | +++ tests/test-run.pl 2011-01-06 13:49:38 +0000 | |||
1281 | @@ -148,7 +148,7 @@ | |||
1282 | 148 | 148 | ||
1283 | 149 | our $opt_usage; | 149 | our $opt_usage; |
1284 | 150 | our $opt_suites; | 150 | our $opt_suites; |
1286 | 151 | our $opt_suites_default= "main,bool_type,cast,flush_tables,identifiers,jp,mysql_compatibility,regression,tamil,time_type,unsigned_integer_type,uuid_type"; # Default suites to run | 151 | our $opt_suites_default= "main,bool_type,cast,ddl_transactions,flush_tables,identifiers,jp,mysql_compatibility,regression,tamil,time_type,unsigned_integer_type,uuid_type"; # Default suites to run |
1287 | 152 | our $opt_script_debug= 0; # Script debugging, enable with --script-debug | 152 | our $opt_script_debug= 0; # Script debugging, enable with --script-debug |
1288 | 153 | our $opt_verbose= 0; # Verbose output, enable with --verbose | 153 | our $opt_verbose= 0; # Verbose output, enable with --verbose |
1289 | 154 | 154 |
Hi!
===== sizeof( "START TRANSACTION")); // +1 for the COM_QUERY, provided by null count from sizeof() sizeof( "SET AUTOCOMMIT=0")); // +1 for the COM_QUERY, provided by null count from sizeof()
- byte.resize(
71 + byte.resize(
=====
You need to fix this so that the transaction works.
Cheers,
-Brian