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
d017ef51
Commit
d017ef51
authored
Nov 15, 2005
by
kent@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
parents
f189de51
43bbd352
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
3 deletions
+41
-3
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+13
-0
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+16
-0
sql/sql_db.cc
sql/sql_db.cc
+11
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/sp-error.result
View file @
d017ef51
...
...
@@ -916,3 +916,16 @@ ERROR 42S22: Unknown column 'bug13037_foo' in 'field list'
DROP PROCEDURE bug13037_p1;
DROP PROCEDURE bug13037_p2;
DROP PROCEDURE bug13037_p3;
create database mysqltest1;
create database mysqltest2;
use mysqltest1;
drop database mysqltest1;
create procedure mysqltest2.p1() select version();
create procedure p2() select version();
ERROR 3D000: No database selected
use mysqltest2;
show procedure status;
Db Name Type Definer Modified Created Security_type Comment
mysqltest2 p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
drop database mysqltest2;
use test;
mysql-test/t/sp-error.test
View file @
d017ef51
...
...
@@ -1337,6 +1337,22 @@ DROP PROCEDURE bug13037_p1;
DROP
PROCEDURE
bug13037_p2
;
DROP
PROCEDURE
bug13037_p3
;
#
# Bug#14569 "editing a stored procedure kills mysqld-nt"
#
create
database
mysqltest1
;
create
database
mysqltest2
;
use
mysqltest1
;
drop
database
mysqltest1
;
create
procedure
mysqltest2
.
p1
()
select
version
();
--
error
ER_NO_DB_ERROR
create
procedure
p2
()
select
version
();
use
mysqltest2
;
--
replace_column
5
'0000-00-00 00:00:00'
6
'0000-00-00 00:00:00'
show
procedure
status
;
drop
database
mysqltest2
;
use
test
;
# BUG#NNNN: New bug synopsis
#
...
...
sql/sql_db.cc
View file @
d017ef51
...
...
@@ -1163,8 +1163,17 @@ bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
}
end:
x_free
(
thd
->
db
);
thd
->
db
=
dbname
;
// THD::~THD will free this
thd
->
db_length
=
db_length
;
if
(
dbname
&&
dbname
[
0
]
==
0
)
{
x_free
(
dbname
);
thd
->
db
=
NULL
;
thd
->
db_length
=
0
;
}
else
{
thd
->
db
=
dbname
;
// THD::~THD will free this
thd
->
db_length
=
db_length
;
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
!
no_access_check
)
sctx
->
db_access
=
db_access
;
...
...
sql/sql_parse.cc
View file @
d017ef51
...
...
@@ -4099,7 +4099,7 @@ mysql_execute_command(THD *thd)
if
(
!
lex
->
sphead
->
m_db
.
str
||
!
lex
->
sphead
->
m_db
.
str
[
0
])
{
if
(
!
thd
->
db
)
if
(
!
thd
->
db
)
{
my_message
(
ER_NO_DB_ERROR
,
ER
(
ER_NO_DB_ERROR
),
MYF
(
0
));
delete
lex
->
sphead
;
...
...
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