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
1c346084
Commit
1c346084
authored
Nov 15, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14404 Don't use LEX::check_exists in ALTER SEQUENCE
parent
7663773e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
sql/sql_alter.h
sql/sql_alter.h
+4
-2
sql/sql_sequence.cc
sql/sql_sequence.cc
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
sql/sql_yacc_ora.yy
sql/sql_yacc_ora.yy
+2
-2
No files found.
sql/sql_alter.h
View file @
1c346084
...
...
@@ -387,13 +387,15 @@ class Sql_cmd_alter_table : public Sql_cmd_common_alter_table
/**
Sql_cmd_alter_sequence represents the ALTER SEQUENCE statement.
*/
class
Sql_cmd_alter_sequence
:
public
Sql_cmd
class
Sql_cmd_alter_sequence
:
public
Sql_cmd
,
public
DDL_options
{
public:
/**
Constructor, used to represent a ALTER TABLE statement.
*/
Sql_cmd_alter_sequence
()
Sql_cmd_alter_sequence
(
const
DDL_options
&
options
)
:
DDL_options
(
options
)
{}
~
Sql_cmd_alter_sequence
()
...
...
sql/sql_sequence.cc
View file @
1c346084
...
...
@@ -851,10 +851,10 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
if
(
check_grant
(
thd
,
ALTER_ACL
,
first_table
,
FALSE
,
UINT_MAX
,
FALSE
))
DBUG_RETURN
(
TRUE
);
/* purecov: inspected */
if
(
lex
->
check_exists
)
if
(
if_exists
()
)
thd
->
push_internal_handler
(
&
no_such_table_handler
);
error
=
open_and_lock_tables
(
thd
,
first_table
,
FALSE
,
0
);
if
(
lex
->
check_exists
)
if
(
if_exists
()
)
{
trapped_errors
=
no_such_table_handler
.
safely_trapped_errors
();
thd
->
pop_internal_handler
();
...
...
sql/sql_yacc.yy
View file @
1c346084
...
...
@@ -7314,7 +7314,7 @@ alter:
Lex->create_info.set($2);
Lex->sql_command= SQLCOM_ALTER_USER;
}
| ALTER SEQUENCE_SYM opt_if_exists
_table_element
| ALTER SEQUENCE_SYM opt_if_exists
{
LEX *lex= Lex;
lex->name= null_clex_str;
...
...
@@ -7337,7 +7337,7 @@ alter:
sequence_defs
{
/* Create a generic ALTER SEQUENCE statment. */
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence();
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence(
$3
);
if (Lex->m_sql_cmd == NULL)
MYSQL_YYABORT;
}
...
...
sql/sql_yacc_ora.yy
View file @
1c346084
...
...
@@ -7301,7 +7301,7 @@ alter:
Lex->create_info.set($2);
Lex->sql_command= SQLCOM_ALTER_USER;
}
| ALTER SEQUENCE_SYM opt_if_exists
_table_element
| ALTER SEQUENCE_SYM opt_if_exists
{
LEX *lex= Lex;
lex->name= null_clex_str;
...
...
@@ -7324,7 +7324,7 @@ alter:
sequence_defs
{
/* Create a generic ALTER SEQUENCE statment. */
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence();
Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence(
$3
);
if (Lex->m_sql_cmd == NULL)
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