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
b8b5d8d8
Commit
b8b5d8d8
authored
Jan 02, 2018
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14828 Server crashes in JOIN::prepare / setup_fields on 2nd execution of PS [fixes #437]
parent
8efca72f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
+23
-4
mysql-test/suite/versioning/r/create.result
mysql-test/suite/versioning/r/create.result
+12
-0
mysql-test/suite/versioning/t/create.test
mysql-test/suite/versioning/t/create.test
+6
-0
sql/handler.cc
sql/handler.cc
+3
-3
sql/sql_insert.cc
sql/sql_insert.cc
+2
-1
No files found.
mysql-test/suite/versioning/r/create.result
View file @
b8b5d8d8
...
...
@@ -399,5 +399,17 @@ t3 CREATE TABLE `t3` (
`en` SYS_DATATYPE GENERATED ALWAYS AS ROW END INVISIBLE,
PERIOD FOR SYSTEM_TIME (`st`, `en`)
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
# MDEV-14828 Server crashes in JOIN::prepare / setup_fields on 2nd execution of PS [#437]
create or replace table t1 (x int) with system versioning;
prepare bad from 'create or replace table t2 with system versioning as select * from t1';
execute bad;
execute bad;
execute bad;
execute bad;
execute bad;
execute bad;
execute bad;
execute bad;
# bad is good.
drop database test;
create database test;
mysql-test/suite/versioning/t/create.test
View file @
b8b5d8d8
...
...
@@ -361,5 +361,11 @@ as select x30, y, sys_trx_start, sys_trx_end, st, en from t1, t2;
--
replace_result
$default_engine
DEFAULT_ENGINE
$sys_datatype
SYS_DATATYPE
$sys_datatype_null
SYS_DATATYPE
$sys_datatype_not_null
SYS_DATATYPE
$sys_datatype_default_null
SYS_DATATYPE
show
create
table
t3
;
--
echo
# MDEV-14828 Server crashes in JOIN::prepare / setup_fields on 2nd execution of PS [#437]
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
prepare
bad
from
'create or replace table t2 with system versioning as select * from t1'
;
execute
bad
;
execute
bad
;
execute
bad
;
execute
bad
;
execute
bad
;
execute
bad
;
execute
bad
;
execute
bad
;
--
echo
# bad is good.
drop
database
test
;
create
database
test
;
sql/handler.cc
View file @
b8b5d8d8
...
...
@@ -7093,9 +7093,9 @@ bool Table_scope_and_contents_source_st::vers_fix_system_fields(
DBUG_ASSERT
(
items
);
while
(
added
--
)
{
items
->
push_back
(
new
(
thd
->
mem_root
)
Item_default_value
(
thd
,
thd
->
lex
->
current_context
()),
thd
->
mem_root
);
Item_default_value
*
item
=
new
(
thd
->
mem_root
)
Item_default_value
(
thd
,
thd
->
lex
->
current_context
());
items
->
push_back
(
item
,
thd
->
mem_root
);
}
}
...
...
sql/sql_insert.cc
View file @
b8b5d8d8
...
...
@@ -4318,8 +4318,9 @@ TABLE *select_create::create_table_from_items(THD *thd,
int
select_create
::
prepare
(
List
<
Item
>
&
values
,
SELECT_LEX_UNIT
*
u
)
select_create
::
prepare
(
List
<
Item
>
&
_
values
,
SELECT_LEX_UNIT
*
u
)
{
List
<
Item
>
values
(
_values
,
thd
->
mem_root
);
MYSQL_LOCK
*
extra_lock
=
NULL
;
DBUG_ENTER
(
"select_create::prepare"
);
...
...
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