mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
BUG#38606: delete in lock write concurrent
(sanja's patch)
This commit is contained in:
parent
d145362edf
commit
4bdb308b9a
3 changed files with 27 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue