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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0a07be0b
Commit
0a07be0b
authored
Jun 16, 2011
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge 5.1-security->5.5-security
parents
5cfac860
f3b5aa7a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
0 deletions
+86
-0
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+16
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+15
-0
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+22
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+18
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+15
-0
No files found.
mysql-test/r/sp-error.result
View file @
0a07be0b
...
@@ -1717,6 +1717,22 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
...
@@ -1717,6 +1717,22 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
DROP PROCEDURE p1;
DROP PROCEDURE p1;
DROP VIEW v1;
DROP VIEW v1;
DROP TABLE t1;
DROP TABLE t1;
#
# Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
# WITH OBSCURE QUERY
#
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
End of 5.1 tests
End of 5.1 tests
#
#
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
...
...
mysql-test/r/sp.result
View file @
0a07be0b
...
@@ -7161,6 +7161,21 @@ init_connect
...
@@ -7161,6 +7161,21 @@ init_connect
SET @@GLOBAL.init_connect= @old_init_connect;
SET @@GLOBAL.init_connect= @old_init_connect;
DROP PROCEDURE p2;
DROP PROCEDURE p2;
DROP PROCEDURE p5;
DROP PROCEDURE p5;
#
# Bug#11840395 (formerly known as bug#60347):
# The string "versiondata" seems to be 'leaking' into the schema name space
# to be 'leaking' into the schema name space
#
DROP DATABASE IF EXISTS mixedCaseDbName;
CREATE DATABASE mixedCaseDbName;
CREATE PROCEDURE mixedCaseDbName.tryMyProc() begin end|
CREATE FUNCTION mixedCaseDbName.tryMyFunc() returns text begin return 'IT WORKS'; end
|
call mixedCaseDbName.tryMyProc();
select mixedCaseDbName.tryMyFunc();
mixedCaseDbName.tryMyFunc()
IT WORKS
DROP DATABASE mixedCaseDbName;
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# -- End of 5.1 tests
# -- End of 5.1 tests
# ------------------------------------------------------------------
# ------------------------------------------------------------------
...
...
mysql-test/t/sp-error.test
View file @
0a07be0b
...
@@ -2541,6 +2541,28 @@ DROP PROCEDURE p1;
...
@@ -2541,6 +2541,28 @@ DROP PROCEDURE p1;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
--
echo
# WITH OBSCURE QUERY
--
echo
#
--
error
ER_TOO_LONG_IDENT
SELECT
very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999
();
--
error
ER_TOO_LONG_IDENT
CALL
very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999
();
--
error
ER_WRONG_DB_NAME
SELECT
very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999
.
simple_func
();
--
error
ER_WRONG_DB_NAME
CALL
very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999
.
simple_proc
();
--
error
ER_TOO_LONG_IDENT
SELECT
db_name
.
very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999
();
--
error
ER_TOO_LONG_IDENT
CALL
db_name
.
very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999
();
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
--
echo
#
--
echo
#
...
...
mysql-test/t/sp.test
View file @
0a07be0b
...
@@ -8376,6 +8376,24 @@ SET @@GLOBAL.init_connect= @old_init_connect;
...
@@ -8376,6 +8376,24 @@ SET @@GLOBAL.init_connect= @old_init_connect;
DROP PROCEDURE p2;
DROP PROCEDURE p2;
DROP PROCEDURE p5;
DROP PROCEDURE p5;
--echo #
--echo # Bug#11840395 (formerly known as bug#60347):
--echo # The string "versiondata" seems to be '
leaking
' into the schema name space
--echo # to be '
leaking
' into the schema name space
--echo #
--disable_warnings
DROP DATABASE IF EXISTS mixedCaseDbName;
--enable_warnings
CREATE DATABASE mixedCaseDbName;
DELIMITER |;
CREATE PROCEDURE mixedCaseDbName.tryMyProc() begin end|
CREATE FUNCTION mixedCaseDbName.tryMyFunc() returns text begin return '
IT
WORKS
'; end
|
DELIMITER ;|
call mixedCaseDbName.tryMyProc();
select mixedCaseDbName.tryMyFunc();
DROP DATABASE mixedCaseDbName;
--echo # ------------------------------------------------------------------
--echo # ------------------------------------------------------------------
--echo # -- End of 5.1 tests
--echo # -- End of 5.1 tests
--echo # ------------------------------------------------------------------
--echo # ------------------------------------------------------------------
...
...
sql/sql_yacc.yy
View file @
0a07be0b
...
@@ -8639,6 +8639,11 @@ function_call_generic:
...
@@ -8639,6 +8639,11 @@ function_call_generic:
Create_func *builder;
Create_func *builder;
Item *item= NULL;
Item *item= NULL;
if (check_routine_name(&$1))
{
MYSQL_YYABORT;
}
/*
/*
Implementation note:
Implementation note:
names are resolved with the following order:
names are resolved with the following order:
...
@@ -8702,6 +8707,16 @@ function_call_generic:
...
@@ -8702,6 +8707,16 @@ function_call_generic:
version() (a vendor can specify any schema).
version() (a vendor can specify any schema).
*/
*/
if (!$1.str || check_db_name(&$1))
{
my_error(ER_WRONG_DB_NAME, MYF(0), $1.str);
MYSQL_YYABORT;
}
if (check_routine_name(&$3))
{
MYSQL_YYABORT;
}
builder= find_qualified_function_builder(thd);
builder= find_qualified_function_builder(thd);
DBUG_ASSERT(builder);
DBUG_ASSERT(builder);
item= builder->create(thd, $1, $3, true, $5);
item= builder->create(thd, $1, $3, true, $5);
...
...
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