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
1fbd9bb2
Commit
1fbd9bb2
authored
Dec 05, 2019
by
Robert Bindar
Committed by
GitHub
Dec 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #1261 from robertbindar/mdev-17978
MDEV-17978 Server crash in SHOW CREATE SEQUENCE on a broken view
parent
d759f764
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
mysql-test/suite/sql_sequence/view.result
mysql-test/suite/sql_sequence/view.result
+10
-0
mysql-test/suite/sql_sequence/view.test
mysql-test/suite/sql_sequence/view.test
+11
-0
sql/sql_show.cc
sql/sql_show.cc
+2
-1
No files found.
mysql-test/suite/sql_sequence/view.result
View file @
1fbd9bb2
...
@@ -24,3 +24,13 @@ ERROR 42S02: 'test.v1' is not a SEQUENCE
...
@@ -24,3 +24,13 @@ ERROR 42S02: 'test.v1' is not a SEQUENCE
SELECT PREVIOUS VALUE FOR v1;
SELECT PREVIOUS VALUE FOR v1;
ERROR 42S02: 'test.v1' is not a SEQUENCE
ERROR 42S02: 'test.v1' is not a SEQUENCE
drop view v1;
drop view v1;
#
# MDEV 17978 Server crashes in mysqld_show_create_get_fields
# upon SHOW CREATE SEQUENCE on a broken view
#
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1;
DROP TABLE t1;
SHOW CREATE SEQUENCE v1;
ERROR 42S02: 'test.v1' is not a SEQUENCE
DROP VIEW v1;
mysql-test/suite/sql_sequence/view.test
View file @
1fbd9bb2
...
@@ -27,3 +27,14 @@ SELECT NEXT VALUE FOR v1;
...
@@ -27,3 +27,14 @@ SELECT NEXT VALUE FOR v1;
--
error
ER_NOT_SEQUENCE
--
error
ER_NOT_SEQUENCE
SELECT
PREVIOUS
VALUE
FOR
v1
;
SELECT
PREVIOUS
VALUE
FOR
v1
;
drop
view
v1
;
drop
view
v1
;
--
echo
#
--
echo
# MDEV 17978 Server crashes in mysqld_show_create_get_fields
--
echo
# upon SHOW CREATE SEQUENCE on a broken view
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
error
ER_NOT_SEQUENCE
SHOW
CREATE
SEQUENCE
v1
;
DROP
VIEW
v1
;
sql/sql_show.cc
View file @
1fbd9bb2
...
@@ -1316,7 +1316,8 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
...
@@ -1316,7 +1316,8 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
goto
exit
;
goto
exit
;
}
}
else
if
(
lex
->
table_type
==
TABLE_TYPE_SEQUENCE
&&
else
if
(
lex
->
table_type
==
TABLE_TYPE_SEQUENCE
&&
table_list
->
table
->
s
->
table_type
!=
TABLE_TYPE_SEQUENCE
)
(
!
table_list
->
table
||
table_list
->
table
->
s
->
table_type
!=
TABLE_TYPE_SEQUENCE
))
{
{
my_error
(
ER_NOT_SEQUENCE
,
MYF
(
0
),
my_error
(
ER_NOT_SEQUENCE
,
MYF
(
0
),
table_list
->
db
.
str
,
table_list
->
table_name
.
str
);
table_list
->
db
.
str
,
table_list
->
table_name
.
str
);
...
...
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