#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-maria/
2664 Michael Widenius 2008-08-25 [merge]
Automatic merge
modified:
mysql-test/r/maria.result
mysql-test/t/maria.test
storage/maria/ha_maria.cc
=== modified file 'mysql-test/r/maria.result'
--- a/mysql-test/r/maria.result 2008-08-16 09:49:28 +0000
+++ b/mysql-test/r/maria.result 2008-08-25 08:35:25 +0000
@@ -2222,3 +2222,9 @@ b
12345
12345
drop table t1;
+create table t1 (a int) engine=maria transactional=1;
+insert into t1 values (1);
+lock table t1 write concurrent;
+delete from t1;
+ERROR 42000: The storage engine for the table doesn't support DELETE in WRITE CONCURRENT
+drop table t1;
=== modified file 'mysql-test/t/maria.test'
--- a/mysql-test/t/maria.test 2008-08-16 09:49:28 +0000
+++ b/mysql-test/t/maria.test 2008-08-25 08:35:25 +0000
@@ -1498,6 +1498,17 @@ insert t1 (a) values (repeat('1', 200)),
select b from t1 where a >= repeat('f', 200) and a < 'k';
drop table t1;
+#
+# BUG#38606 test suite
+#
+create table t1 (a int) engine=maria transactional=1;
+insert into t1 values (1);
+lock table t1 write concurrent;
+# should be fixed with fully implemented versioning
+--error ER_CHECK_NOT_IMPLEMENTED
+delete from t1;
+drop table t1;
+
--disable_result_log
--disable_query_log
eval set global storage_engine=$default_engine, maria_page_checksum=$default_checksum;
=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc 2008-08-25 11:49:47 +0000
+++ b/storage/maria/ha_maria.cc 2008-08-25 12:13:31 +0000
@@ -1959,10 +1959,18 @@ bool ha_maria::is_crashed() const
(my_disable_locking && file->s->state.open_count));
}
+#define CHECK_UNTIL_WE_FULLY_IMPLEMENTED_VERSIONING(msg) \
+ do { \
+ if (file->lock.type == TL_WRITE_CONCURRENT_INSERT) \
+ { \
+ my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), msg); \
+ return 1; \
+ } \
+ } while(0)
int ha_maria::update_row(const uchar * old_data, uchar * new_data)
{
- DBUG_ASSERT(file->lock.type != TL_WRITE_CONCURRENT_INSERT);
+ CHECK_UNTIL_WE_FULLY_IMPLEMENTED_VERSIONING("UPDATE in WRITE CONCURRENT");
ha_statistic_increment(&SSV::ha_update_count);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
table->timestamp_field->set_time();
@@ -1972,7 +1980,7 @@ int ha_maria::update_row(const uchar * o
int ha_maria::delete_row(const uchar * buf)
{
- DBUG_ASSERT(file->lock.type != TL_WRITE_CONCURRENT_INSERT);
+ CHECK_UNTIL_WE_FULLY_IMPLEMENTED_VERSIONING("DELETE in WRITE CONCURRENT");
ha_statistic_increment(&SSV::ha_delete_count);
return maria_delete(file, buf);
}
| Thread |
|---|
| • bzr commit into MySQL/Maria:mysql-maria branch (monty:2664) | Michael Widenius | 25 Aug |