Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4bdb308b
Commit
4bdb308b
authored
Aug 25, 2008
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#38606: delete in lock write concurrent
(sanja's patch)
parent
d145362e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
mysql-test/r/maria.result
mysql-test/r/maria.result
+6
-0
mysql-test/t/maria.test
mysql-test/t/maria.test
+11
-0
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+10
-2
No files found.
mysql-test/r/maria.result
View file @
4bdb308b
...
...
@@ -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;
mysql-test/t/maria.test
View file @
4bdb308b
...
...
@@ -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
;
...
...
storage/maria/ha_maria.cc
View file @
4bdb308b
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment