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
f9f8fee9
Commit
f9f8fee9
authored
Feb 12, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merged bug 33813 to 5.1-bugteam
parents
893ca47b
4f0c5573
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
30 deletions
+52
-30
mysql-test/r/windows.result
mysql-test/r/windows.result
+18
-0
mysql-test/t/windows.test
mysql-test/t/windows.test
+31
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-30
No files found.
mysql-test/r/windows.result
View file @
f9f8fee9
...
...
@@ -19,6 +19,24 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
DROP TABLE t1;
CREATE DATABASE `TESTDB`;
USE `TESTDB`;
CREATE FUNCTION test_fn() RETURNS INTEGER
BEGIN
DECLARE rId bigint;
RETURN rId;
END
//
CREATE FUNCTION test_fn2() RETURNS INTEGER
BEGIN
DECLARE rId bigint;
RETURN rId;
END
//
DROP FUNCTION `TESTDB`.`test_fn`;
DROP FUNCTION `testdb`.`test_fn2`;
USE test;
DROP DATABASE `TESTDB`;
End of 5.0 tests.
drop procedure if exists proc_1;
create procedure proc_1() install plugin my_plug soname '\\root\\some_plugin.dll';
...
...
mysql-test/t/windows.test
View file @
f9f8fee9
...
...
@@ -35,6 +35,37 @@ CREATE TABLE t1 (a int, b int); INSERT INTO t1 VALUES (1,1);
EXPLAIN
SELECT
*
FROM
t1
WHERE
b
=
(
SELECT
max
(
2
));
DROP
TABLE
t1
;
#
# Bug #33813: Schema names are case-sensitive in DROP FUNCTION
#
CREATE
DATABASE
`TESTDB`
;
USE
`TESTDB`
;
DELIMITER
//;
CREATE
FUNCTION
test_fn
()
RETURNS
INTEGER
BEGIN
DECLARE
rId
bigint
;
RETURN
rId
;
END
//
CREATE
FUNCTION
test_fn2
()
RETURNS
INTEGER
BEGIN
DECLARE
rId
bigint
;
RETURN
rId
;
END
//
DELIMITER
;
//
DROP
FUNCTION
`
TESTDB
`.`
test_fn
`;
DROP FUNCTION `
testdb
`.`
test_fn2
`;
USE test;
DROP DATABASE `
TESTDB
`
;
--
echo
End
of
5.0
tests
.
--
disable_warnings
...
...
sql/sql_yacc.yy
View file @
f9f8fee9
...
...
@@ -9256,44 +9256,17 @@ drop:
lex->drop_if_exists=$3;
lex->name= $4;
}
| DROP FUNCTION_SYM if_exists
ident '.' ident
| DROP FUNCTION_SYM if_exists
sp_name
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
sp_name *spname;
if (lex->sphead)
{
my_error(ER_SP_NO_DROP_SP, MYF(0), "FUNCTION");
MYSQL_YYABORT;
}
lex->sql_command = SQLCOM_DROP_FUNCTION;
lex->drop_if_exists= $3;
spname= new sp_name($4, $6, true);
if (spname == NULL)
MYSQL_YYABORT;
spname->init_qname(thd);
lex->spname= spname;
}
| DROP FUNCTION_SYM if_exists ident
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
LEX_STRING db= {0, 0};
sp_name *spname;
LEX *lex=Lex;
if (lex->sphead)
{
my_error(ER_SP_NO_DROP_SP, MYF(0), "FUNCTION");
MYSQL_YYABORT;
}
if (thd->db && lex->copy_db_to(&db.str, &db.length))
MYSQL_YYABORT;
lex->sql_command = SQLCOM_DROP_FUNCTION;
lex->drop_if_exists= $3;
spname= new sp_name(db, $4, false);
if (spname == NULL)
MYSQL_YYABORT;
spname->init_qname(thd);
lex->spname= spname;
lex->spname= $4;
}
| DROP PROCEDURE if_exists sp_name
{
...
...
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