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
a04a2834
Commit
a04a2834
authored
Dec 21, 2017
by
Eugene Kosov
Committed by
GitHub
Dec 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14692 Server crash in MDL_ticket::has_stronger_or_equal_type
SQL: disable system-versioning stuff on TEMPORARY tables
parent
acdfacee
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
6 deletions
+27
-6
mysql-test/suite/versioning/r/alter.result
mysql-test/suite/versioning/r/alter.result
+6
-0
mysql-test/suite/versioning/r/create.result
mysql-test/suite/versioning/r/create.result
+1
-1
mysql-test/suite/versioning/t/alter.test
mysql-test/suite/versioning/t/alter.test
+8
-0
mysql-test/suite/versioning/t/create.test
mysql-test/suite/versioning/t/create.test
+1
-1
sql/handler.cc
sql/handler.cc
+7
-2
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+3
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-2
No files found.
mysql-test/suite/versioning/r/alter.result
View file @
a04a2834
...
...
@@ -426,5 +426,11 @@ create or replace table t1 (pk int auto_increment unique) with system versioning
insert into t1 values (1);
delete from t1;
alter table t1 engine=myisam;
# MDEV-14692 crash in MDL_context::upgrade_shared_lock()
create or replace temporary table t (a int);
alter table t change column if exists b c bigint unsigned generated always as row start;
ERROR HY000: GENERATED AS ROW START prohibited for TEMPORARY tables
alter table t change column if exists b c bigint unsigned generated always as row end;
ERROR HY000: GENERATED AS ROW END prohibited for TEMPORARY tables
drop database test;
create database test;
mysql-test/suite/versioning/r/create.result
View file @
a04a2834
...
...
@@ -344,7 +344,7 @@ create or replace table t (sys_trx_end int);
alter table t with system versioning;
ERROR 42S21: Duplicate column name 'sys_trx_end'
create or replace temporary table t (x28 int) with system versioning;
ERROR HY000:
Incorrect usage of TEMPORARY and WITH SYSTEM VERSIONING
ERROR HY000:
WITH SYSTEM VERSIONING prohibited for TEMPORARY tables
create or replace table t1 (
x29 int unsigned,
Sys_start0 timestamp(6) as row start invisible,
...
...
mysql-test/suite/versioning/t/alter.test
View file @
a04a2834
...
...
@@ -362,5 +362,13 @@ insert into t1 values (1);
delete
from
t1
;
alter
table
t1
engine
=
myisam
;
--
echo
# MDEV-14692 crash in MDL_context::upgrade_shared_lock()
create
or
replace
temporary
table
t
(
a
int
);
--
error
ER_VERS_TEMPORARY
alter
table
t
change
column
if
exists
b
c
bigint
unsigned
generated
always
as
row
start
;
--
error
ER_VERS_TEMPORARY
alter
table
t
change
column
if
exists
b
c
bigint
unsigned
generated
always
as
row
end
;
drop
database
test
;
create
database
test
;
mysql-test/suite/versioning/t/create.test
View file @
a04a2834
...
...
@@ -313,7 +313,7 @@ create or replace table t (sys_trx_end int);
--
error
ER_DUP_FIELDNAME
alter
table
t
with
system
versioning
;
--
error
ER_
WRONG_USAGE
--
error
ER_
VERS_TEMPORARY
create
or
replace
temporary
table
t
(
x28
int
)
with
system
versioning
;
--
error
ER_VERS_DUPLICATE_ROW_START_END
...
...
sql/handler.cc
View file @
a04a2834
...
...
@@ -7188,9 +7188,14 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
List_iterator_fast
<
Create_field
>
it
(
alter_info
->
create_list
);
while
(
Create_field
*
f
=
it
++
)
{
if
(
f
->
change
.
length
&&
f
->
flags
&
(
VERS_SYS_START_FLAG
|
VERS_SYS_END_FLAG
))
if
(
f
->
change
.
length
&&
f
->
flags
&
VERS_SYSTEM_FIELD
)
{
if
(
share
->
table_category
==
TABLE_CATEGORY_TEMPORARY
)
{
my_error
(
ER_VERS_TEMPORARY
,
MYF
(
0
),
f
->
flags
&
VERS_SYS_START_FLAG
?
"GENERATED AS ROW START"
:
"GENERATED AS ROW END"
);
return
true
;
}
if
(
thd
->
mdl_context
.
upgrade_shared_lock
(
table
->
mdl_ticket
,
MDL_EXCLUSIVE
,
thd
->
variables
.
lock_wait_timeout
))
...
...
sql/share/errmsg-utf8.txt
View file @
a04a2834
...
...
@@ -7932,3 +7932,6 @@ WARN_VERS_TRT_EXPERIMENTAL
ER_VERS_TRUNCATE_VIEW
eng "DELETE HISTORY from VIEW is prohibited"
ER_VERS_TEMPORARY
eng "%s prohibited for TEMPORARY tables"
sql/sql_yacc.yy
View file @
a04a2834
...
...
@@ -6235,8 +6235,7 @@ versioning_option:
{
if (!thd->variables.vers_force)
{
my_error(ER_WRONG_USAGE, MYF(0),
"TEMPORARY", "WITH SYSTEM VERSIONING");
my_error(ER_VERS_TEMPORARY, MYF(0), "WITH SYSTEM VERSIONING");
MYSQL_YYABORT;
}
}
...
...
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