Commit 4bdb308b authored by Sergei Golubchik's avatar Sergei Golubchik

BUG#38606: delete in lock write concurrent

(sanja's patch)
parent d145362e
......@@ -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;
......@@ -1498,6 +1498,17 @@ insert t1 (a) values (repeat('1', 200)), (repeat('2', 200)), (repeat('3', 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;
......
......@@ -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 * old_data, uchar * new_data)
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment