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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d1e4c5d1
Commit
d1e4c5d1
authored
Dec 27, 2017
by
Aleksey Midenkov
Committed by
Eugene Kosov
Dec 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14748 Assertion in ha_myisammrg::attach_children() [fixes #434]
parent
9daf583a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
13 deletions
+38
-13
mysql-test/suite/versioning/r/partition.result
mysql-test/suite/versioning/r/partition.result
+16
-5
mysql-test/suite/versioning/t/partition.test
mysql-test/suite/versioning/t/partition.test
+18
-8
sql/partition_info.cc
sql/partition_info.cc
+4
-0
No files found.
mysql-test/suite/versioning/r/partition.result
View file @
d1e4c5d1
...
...
@@ -345,7 +345,7 @@ partition by system_time interval 1 day (
partition p1 history,
partition pc current);
create or replace table t2 (f int);
create trigger tr before insert on t2
create
or replace
trigger tr before insert on t2
for each row select table_rows from information_schema.tables
where table_name = 't1' into @a;
insert into t2 values (1);
...
...
@@ -355,7 +355,7 @@ partition by system_time interval 1 week (
partition p1 history,
partition pn current);
create or replace table t2 (f int);
create trigger tr before insert on t2
create
or replace
trigger tr before insert on t2
for each row select count(*) from t1 into @a;
insert into t2 values (1);
# MDEV-14741 Assertion `(trx)->start_file == 0' failed in row_truncate_table_for_mysql()
...
...
@@ -366,11 +366,22 @@ partition pn current);
set autocommit= off;
truncate table t1;
set autocommit= on;
MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
#
MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
create or replace table t1 (x int) with system versioning;
lock table t1 write;
alter table t1 partition by system_time interval 1 week (
partition p1 history,
partition pn current);
drop table t1;
drop table t2;
unlock tables;
# MDEV-14748 Assertion in ha_myisammrg::attach_children()
create or replace table t1 (x int) engine=myisam with system versioning
partition by system_time interval 1 month (partition p1 history, partition pn current);
create or replace table t2 (x int) engine=myisam;
create or replace table t3 (x int) engine=merge union=(t2);
create or replace table t4 (x int) engine=myisam;
create or replace trigger tr after insert on t4 for each row insert into t2
( select x from t3 ) union ( select x from t1 );
insert into t4 values (1);
# Test cleanup
drop database test;
create database test;
mysql-test/suite/versioning/t/partition.test
View file @
d1e4c5d1
...
...
@@ -290,7 +290,7 @@ partition by system_time interval 1 day (
partition
p1
history
,
partition
pc
current
);
create
or
replace
table
t2
(
f
int
);
create
trigger
tr
before
insert
on
t2
create
or
replace
trigger
tr
before
insert
on
t2
for
each
row
select
table_rows
from
information_schema
.
tables
where
table_name
=
't1'
into
@
a
;
insert
into
t2
values
(
1
);
...
...
@@ -301,7 +301,7 @@ partition by system_time interval 1 week (
partition
p1
history
,
partition
pn
current
);
create
or
replace
table
t2
(
f
int
);
create
trigger
tr
before
insert
on
t2
create
or
replace
trigger
tr
before
insert
on
t2
for
each
row
select
count
(
*
)
from
t1
into
@
a
;
insert
into
t2
values
(
1
);
...
...
@@ -314,14 +314,24 @@ set autocommit= off;
truncate
table
t1
;
set
autocommit
=
on
;
--
echo
MDEV
-
14747
ALTER
PARTITION
BY
SYSTEM_TIME
after
LOCK
TABLES
--
echo
#
MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
lock
table
t1
write
;
alter
table
t1
partition
by
system_time
interval
1
week
(
partition
p1
history
,
partition
pn
current
);
drop
table
t1
;
drop
table
t2
;
--
source
suite
/
versioning
/
common_finish
.
inc
unlock
tables
;
--
echo
# MDEV-14748 Assertion in ha_myisammrg::attach_children()
create
or
replace
table
t1
(
x
int
)
engine
=
myisam
with
system
versioning
partition
by
system_time
interval
1
month
(
partition
p1
history
,
partition
pn
current
);
create
or
replace
table
t2
(
x
int
)
engine
=
myisam
;
create
or
replace
table
t3
(
x
int
)
engine
=
merge
union
=
(
t2
);
create
or
replace
table
t4
(
x
int
)
engine
=
myisam
;
create
or
replace
trigger
tr
after
insert
on
t4
for
each
row
insert
into
t2
(
select
x
from
t3
)
union
(
select
x
from
t1
);
insert
into
t4
values
(
1
);
--
echo
# Test cleanup
drop
database
test
;
create
database
test
;
sql/partition_info.cc
View file @
d1e4c5d1
...
...
@@ -1038,6 +1038,7 @@ class Table_locker
thr_lock_type
saved_type
;
MYSQL_LOCK
*
saved_lock
;
enum_locked_tables_mode
saved_mode
;
TABLE_LIST
**
saved_query_tables_own_last
;
TABLE_LIST
table_list
;
bool
locked
;
...
...
@@ -1048,6 +1049,7 @@ class Table_locker
saved_type
(
table
.
reginfo
.
lock_type
),
saved_lock
(
_thd
->
lock
),
saved_mode
(
_thd
->
locked_tables_mode
),
saved_query_tables_own_last
(
_thd
->
lex
->
query_tables_own_last
),
table_list
(
_table
,
lock_type
),
locked
(
false
)
{
...
...
@@ -1064,6 +1066,7 @@ class Table_locker
}
thd
->
lock
=
NULL
;
thd
->
locked_tables_mode
=
LTM_NONE
;
thd
->
lex
->
query_tables_own_last
=
NULL
;
bool
res
=
lock_tables
(
thd
,
&
table_list
,
1
,
0
);
locked
=
!
res
;
return
res
;
...
...
@@ -1075,6 +1078,7 @@ class Table_locker
table
.
reginfo
.
lock_type
=
saved_type
;
thd
->
lock
=
saved_lock
;
thd
->
locked_tables_mode
=
saved_mode
;
thd
->
lex
->
query_tables_own_last
=
saved_query_tables_own_last
;
if
(
locked
&&
!
thd
->
in_sub_stmt
)
{
ha_commit_trans
(
thd
,
false
);
...
...
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