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
185d140f
Commit
185d140f
authored
Dec 19, 2016
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7635: Renamed standards_compliant_cte to standard_compliant_cte
parent
25f6d1da
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
33 additions
and
33 deletions
+33
-33
mysql-test/r/cte_recursive.result
mysql-test/r/cte_recursive.result
+5
-5
mysql-test/r/mysqld--help.result
mysql-test/r/mysqld--help.result
+4
-4
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+2
-2
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
...l-test/suite/sys_vars/r/sysvars_server_notembedded.result
+2
-2
mysql-test/t/cte_recursive.test
mysql-test/t/cte_recursive.test
+9
-9
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+1
-1
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sql_cte.cc
sql/sql_cte.cc
+3
-3
sql/sql_lex.h
sql/sql_lex.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
sql/sys_vars.cc
sql/sys_vars.cc
+4
-4
No files found.
mysql-test/r/cte_recursive.result
View file @
185d140f
...
@@ -955,7 +955,7 @@ where folks.id = ma.id and (mother not in (select id from ancestor_ids))
...
@@ -955,7 +955,7 @@ where folks.id = ma.id and (mother not in (select id from ancestor_ids))
select generation, name from ancestor_ids a, folks
select generation, name from ancestor_ids a, folks
where a.id = folks.id;
where a.id = folks.id;
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
set standard
s
_compliant_cte=0;
set standard_compliant_cte=0;
with recursive
with recursive
ancestor_ids (id, generation)
ancestor_ids (id, generation)
as
as
...
@@ -999,7 +999,7 @@ generation name
...
@@ -999,7 +999,7 @@ generation name
2 Grandma Sally
2 Grandma Sally
2 Grandpa Ben
2 Grandpa Ben
3 Grandgrandma Martha
3 Grandgrandma Martha
set standard
s
_compliant_cte=1;
set standard_compliant_cte=1;
with recursive
with recursive
coupled_ancestor_ids (id)
coupled_ancestor_ids (id)
as
as
...
@@ -1023,7 +1023,7 @@ n.father is not null and n.mother is not null
...
@@ -1023,7 +1023,7 @@ n.father is not null and n.mother is not null
select p.* from coupled_ancestor_ids a, folks p
select p.* from coupled_ancestor_ids a, folks p
where a.id = p.id;
where a.id = p.id;
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'coupled_ancestor_ids'
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'coupled_ancestor_ids'
set statement standard
s
_compliant_cte=0 for
set statement standard_compliant_cte=0 for
with recursive
with recursive
coupled_ancestor_ids (id)
coupled_ancestor_ids (id)
as
as
...
@@ -1073,7 +1073,7 @@ where p.id = a.id
...
@@ -1073,7 +1073,7 @@ where p.id = a.id
)
)
select * from ancestors;
select * from ancestors;
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
set statement standard
s
_compliant_cte=0 for
set statement standard_compliant_cte=0 for
with recursive
with recursive
ancestor_ids (id)
ancestor_ids (id)
as
as
...
@@ -1156,7 +1156,7 @@ where p.id = a.id
...
@@ -1156,7 +1156,7 @@ where p.id = a.id
)
)
select * from ancestors;
select * from ancestors;
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
set statement standard
s
_compliant_cte=0 for
set statement standard_compliant_cte=0 for
with recursive
with recursive
ancestor_ids (id, generation)
ancestor_ids (id, generation)
as
as
...
...
mysql-test/r/mysqld--help.result
View file @
185d140f
...
@@ -1068,9 +1068,9 @@ The following options may be given as the first argument:
...
@@ -1068,9 +1068,9 @@ The following options may be given as the first argument:
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
--stack-trace Print a symbolic stack trace on failure
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
(Defaults to on; use --skip-stack-trace to disable.)
--standard
s
-compliant-cte
--standard-compliant-cte
Allow only
standards compiant CTE
Allow only
CTEs compliant to SQL standard
(Defaults to on; use --skip-standard
s
-compliant-cte to disable.)
(Defaults to on; use --skip-standard-compliant-cte to disable.)
--stored-program-cache=#
--stored-program-cache=#
The soft upper limit for number of cached stored routines
The soft upper limit for number of cached stored routines
for one connection.
for one connection.
...
@@ -1470,7 +1470,7 @@ slow-query-log FALSE
...
@@ -1470,7 +1470,7 @@ slow-query-log FALSE
sort-buffer-size 2097152
sort-buffer-size 2097152
sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
stack-trace TRUE
stack-trace TRUE
standard
s
-compliant-cte TRUE
standard-compliant-cte TRUE
stored-program-cache 256
stored-program-cache 256
strict-password-validation TRUE
strict-password-validation TRUE
symbolic-links FALSE
symbolic-links FALSE
...
...
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
View file @
185d140f
...
@@ -3803,14 +3803,14 @@ NUMERIC_BLOCK_SIZE NULL
...
@@ -3803,14 +3803,14 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME STANDARD
S
_COMPLIANT_CTE
VARIABLE_NAME STANDARD_COMPLIANT_CTE
SESSION_VALUE ON
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Allow only
standards compiant CTE
VARIABLE_COMMENT Allow only
CTEs compliant to SQL standard
NUMERIC_MIN_VALUE NULL
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
NUMERIC_BLOCK_SIZE NULL
...
...
mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
View file @
185d140f
...
@@ -4559,14 +4559,14 @@ NUMERIC_BLOCK_SIZE NULL
...
@@ -4559,14 +4559,14 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME STANDARD
S
_COMPLIANT_CTE
VARIABLE_NAME STANDARD_COMPLIANT_CTE
SESSION_VALUE ON
SESSION_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
DEFAULT_VALUE ON
VARIABLE_SCOPE SESSION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Allow only
standards compiant CTE
VARIABLE_COMMENT Allow only
CTEs compliant to SQL standard
NUMERIC_MIN_VALUE NULL
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
NUMERIC_BLOCK_SIZE NULL
...
...
mysql-test/t/cte_recursive.test
View file @
185d140f
...
@@ -787,7 +787,7 @@ as
...
@@ -787,7 +787,7 @@ as
select
*
from
ancestors
;
select
*
from
ancestors
;
--
ERROR
ER_NOT_STANDARD
S
_COMPLIANT_RECURSIVE
--
ERROR
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
with
recursive
with
recursive
ancestor_ids
(
id
,
generation
)
ancestor_ids
(
id
,
generation
)
as
as
...
@@ -805,7 +805,7 @@ as
...
@@ -805,7 +805,7 @@ as
select
generation
,
name
from
ancestor_ids
a
,
folks
select
generation
,
name
from
ancestor_ids
a
,
folks
where
a
.
id
=
folks
.
id
;
where
a
.
id
=
folks
.
id
;
set
standard
s
_compliant_cte
=
0
;
set
standard_compliant_cte
=
0
;
--
ERROR
ER_WITH_COL_WRONG_LIST
--
ERROR
ER_WITH_COL_WRONG_LIST
with
recursive
with
recursive
...
@@ -844,9 +844,9 @@ as
...
@@ -844,9 +844,9 @@ as
select
generation
,
name
from
ancestor_ids
a
,
folks
select
generation
,
name
from
ancestor_ids
a
,
folks
where
a
.
id
=
folks
.
id
;
where
a
.
id
=
folks
.
id
;
set
standard
s
_compliant_cte
=
1
;
set
standard_compliant_cte
=
1
;
--
ERROR
ER_NOT_STANDARD
S
_COMPLIANT_RECURSIVE
--
ERROR
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
with
recursive
with
recursive
coupled_ancestor_ids
(
id
)
coupled_ancestor_ids
(
id
)
as
as
...
@@ -870,7 +870,7 @@ as
...
@@ -870,7 +870,7 @@ as
select
p
.*
from
coupled_ancestor_ids
a
,
folks
p
select
p
.*
from
coupled_ancestor_ids
a
,
folks
p
where
a
.
id
=
p
.
id
;
where
a
.
id
=
p
.
id
;
set
statement
standard
s
_compliant_cte
=
0
for
set
statement
standard_compliant_cte
=
0
for
with
recursive
with
recursive
coupled_ancestor_ids
(
id
)
coupled_ancestor_ids
(
id
)
as
as
...
@@ -894,7 +894,7 @@ as
...
@@ -894,7 +894,7 @@ as
select
p
.*
from
coupled_ancestor_ids
a
,
folks
p
select
p
.*
from
coupled_ancestor_ids
a
,
folks
p
where
a
.
id
=
p
.
id
;
where
a
.
id
=
p
.
id
;
--
ERROR
ER_NOT_STANDARD
S
_COMPLIANT_RECURSIVE
--
ERROR
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
with
recursive
with
recursive
ancestor_ids
(
id
)
ancestor_ids
(
id
)
as
as
...
@@ -915,7 +915,7 @@ as
...
@@ -915,7 +915,7 @@ as
)
)
select
*
from
ancestors
;
select
*
from
ancestors
;
set
statement
standard
s
_compliant_cte
=
0
for
set
statement
standard_compliant_cte
=
0
for
with
recursive
with
recursive
ancestor_ids
(
id
)
ancestor_ids
(
id
)
as
as
...
@@ -958,7 +958,7 @@ as
...
@@ -958,7 +958,7 @@ as
)
)
select
*
from
ancestors
;
select
*
from
ancestors
;
--
ERROR
ER_NOT_STANDARD
S
_COMPLIANT_RECURSIVE
--
ERROR
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
with
recursive
with
recursive
ancestor_ids
(
id
,
generation
)
ancestor_ids
(
id
,
generation
)
as
as
...
@@ -983,7 +983,7 @@ as
...
@@ -983,7 +983,7 @@ as
)
)
select
*
from
ancestors
;
select
*
from
ancestors
;
set
statement
standard
s
_compliant_cte
=
0
for
set
statement
standard_compliant_cte
=
0
for
with
recursive
with
recursive
ancestor_ids
(
id
,
generation
)
ancestor_ids
(
id
,
generation
)
as
as
...
...
sql/share/errmsg-utf8.txt
View file @
185d140f
...
@@ -7355,7 +7355,7 @@ ER_UNACCEPTABLE_MUTUAL_RECURSION
...
@@ -7355,7 +7355,7 @@ ER_UNACCEPTABLE_MUTUAL_RECURSION
eng "Unacceptable mutual recursion with anchored table '%s'"
eng "Unacceptable mutual recursion with anchored table '%s'"
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
eng "Reference to recursive WITH table '%s' in materialized derived"
eng "Reference to recursive WITH table '%s' in materialized derived"
ER_NOT_STANDARD
S
_COMPLIANT_RECURSIVE
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
eng "Restrictions imposed on recursive definitions are violated for table '%s'"R_WRONG_WINDOW_SPEC_NAME
eng "Restrictions imposed on recursive definitions are violated for table '%s'"R_WRONG_WINDOW_SPEC_NAME
ER_WRONG_WINDOW_SPEC_NAME
ER_WRONG_WINDOW_SPEC_NAME
eng "Window specification with name '%s' is not defined"
eng "Window specification with name '%s' is not defined"
...
...
sql/sql_class.h
View file @
185d140f
...
@@ -635,7 +635,7 @@ typedef struct system_variables
...
@@ -635,7 +635,7 @@ typedef struct system_variables
my_bool
old_alter_table
;
my_bool
old_alter_table
;
my_bool
old_passwords
;
my_bool
old_passwords
;
my_bool
big_tables
;
my_bool
big_tables
;
my_bool
only_standard
s
_compliant_cte
;
my_bool
only_standard_compliant_cte
;
my_bool
query_cache_strip_comments
;
my_bool
query_cache_strip_comments
;
my_bool
sql_log_slow
;
my_bool
sql_log_slow
;
my_bool
sql_log_bin
;
my_bool
sql_log_bin
;
...
...
sql/sql_cte.cc
View file @
185d140f
...
@@ -1048,7 +1048,7 @@ bool TABLE_LIST::is_with_table_recursive_reference()
...
@@ -1048,7 +1048,7 @@ bool TABLE_LIST::is_with_table_recursive_reference()
false otherwise
false otherwise
*/
*/
bool
st_select_lex
::
check_unrestricted_recursive
(
bool
only_standard
s
_compliant
)
bool
st_select_lex
::
check_unrestricted_recursive
(
bool
only_standard_compliant
)
{
{
With_element
*
with_elem
=
get_with_element
();
With_element
*
with_elem
=
get_with_element
();
if
(
!
with_elem
||!
with_elem
->
is_recursive
)
if
(
!
with_elem
||!
with_elem
->
is_recursive
)
...
@@ -1077,9 +1077,9 @@ bool st_select_lex::check_unrestricted_recursive(bool only_standards_compliant)
...
@@ -1077,9 +1077,9 @@ bool st_select_lex::check_unrestricted_recursive(bool only_standards_compliant)
with_elem
->
get_mutually_recursive
());
with_elem
->
get_mutually_recursive
());
/* Report an error on unrestricted specification if this is required */
/* Report an error on unrestricted specification if this is required */
if
(
only_standard
s
_compliant
&&
with_elem
->
is_unrestricted
())
if
(
only_standard_compliant
&&
with_elem
->
is_unrestricted
())
{
{
my_error
(
ER_NOT_STANDARD
S
_COMPLIANT_RECURSIVE
,
my_error
(
ER_NOT_STANDARD_COMPLIANT_RECURSIVE
,
MYF
(
0
),
with_elem
->
query_name
->
str
);
MYF
(
0
),
with_elem
->
query_name
->
str
);
return
true
;
return
true
;
}
}
...
...
sql/sql_lex.h
View file @
185d140f
...
@@ -1129,7 +1129,7 @@ class st_select_lex: public st_select_lex_node
...
@@ -1129,7 +1129,7 @@ class st_select_lex: public st_select_lex_node
return
master_unit
()
->
with_element
;
return
master_unit
()
->
with_element
;
}
}
With_element
*
find_table_def_in_with_clauses
(
TABLE_LIST
*
table
);
With_element
*
find_table_def_in_with_clauses
(
TABLE_LIST
*
table
);
bool
check_unrestricted_recursive
(
bool
only_standard
s_compliant
);
bool
check_unrestricted_recursive
(
bool
only_standard
_compliant
);
bool
check_subqueries_with_recursive_references
();
bool
check_subqueries_with_recursive_references
();
void
collect_grouping_fields
(
THD
*
thd
);
void
collect_grouping_fields
(
THD
*
thd
);
void
check_cond_extraction_for_grouping_fields
(
Item
*
cond
,
void
check_cond_extraction_for_grouping_fields
(
Item
*
cond
,
...
...
sql/sql_select.cc
View file @
185d140f
...
@@ -858,7 +858,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
...
@@ -858,7 +858,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
With_element
*
with_elem
=
select_lex
->
get_with_element
();
With_element
*
with_elem
=
select_lex
->
get_with_element
();
if
(
with_elem
&&
if
(
with_elem
&&
select_lex
->
check_unrestricted_recursive
(
select_lex
->
check_unrestricted_recursive
(
thd
->
variables
.
only_standard
s
_compliant_cte
))
thd
->
variables
.
only_standard_compliant_cte
))
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
select_lex
->
check_subqueries_with_recursive_references
();
select_lex
->
check_subqueries_with_recursive_references
();
...
...
sql/sys_vars.cc
View file @
185d140f
...
@@ -3186,10 +3186,10 @@ static Sys_var_charptr Sys_ssl_crlpath(
...
@@ -3186,10 +3186,10 @@ static Sys_var_charptr Sys_ssl_crlpath(
READ_ONLY
GLOBAL_VAR
(
opt_ssl_crlpath
),
SSL_OPT
(
OPT_SSL_CRLPATH
),
READ_ONLY
GLOBAL_VAR
(
opt_ssl_crlpath
),
SSL_OPT
(
OPT_SSL_CRLPATH
),
IN_FS_CHARSET
,
DEFAULT
(
0
));
IN_FS_CHARSET
,
DEFAULT
(
0
));
static
Sys_var_mybool
Sys_standard
s
_compliant_cte
(
static
Sys_var_mybool
Sys_standard_compliant_cte
(
"standard
s
_compliant_cte"
,
"standard_compliant_cte"
,
"Allow only
standards compiant CTE
"
,
"Allow only
CTEs compliant to SQL standard
"
,
SESSION_VAR
(
only_standard
s
_compliant_cte
),
CMD_LINE
(
OPT_ARG
),
SESSION_VAR
(
only_standard_compliant_cte
),
CMD_LINE
(
OPT_ARG
),
DEFAULT
(
TRUE
));
DEFAULT
(
TRUE
));
...
...
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