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
462430ba
Commit
462430ba
authored
Apr 04, 2003
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post merge fixes.
parent
2c15b365
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
38 deletions
+56
-38
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+1
-1
mysql-test/r/sp.result
mysql-test/r/sp.result
+10
-2
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-1
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+17
-17
mysql-test/t/sp.test
mysql-test/t/sp.test
+13
-9
sql/sp.cc
sql/sp.cc
+11
-2
sql/sp_pcontext.cc
sql/sp_pcontext.cc
+3
-6
No files found.
mysql-test/r/sp-error.result
View file @
462430ba
...
...
@@ -27,7 +27,7 @@ call foo();
PROCEDURE foo does not exist
drop procedure if exists foo;
Warnings:
Warning 125
6
PROCEDURE foo does not exist
Warning 125
7
PROCEDURE foo does not exist
create procedure foo()
foo: loop
leave bar;
...
...
mysql-test/r/sp.result
View file @
462430ba
...
...
@@ -327,9 +327,17 @@ drop procedure into_dumpfile;
create procedure create_select(x char(16), y int)
begin
insert into test.t1 values (x, y);
create table test.t
2
select * from test.t1;
insert into test.t
2
values (concat(x, "2"), y+2);
create table test.t
3
select * from test.t1;
insert into test.t
3
values (concat(x, "2"), y+2);
end;
drop table if exists t3;
call create_select("cs", 90);
select * from t1, t3;
id data id data
cs 90 cs 90
cs 90 cs2 92
drop table if exists t3;
delete from t1;
drop procedure create_select;
create function e() returns double
return 2.7182818284590452354;
...
...
mysql-test/r/variables.result
View file @
462430ba
...
...
@@ -298,7 +298,7 @@ set sql_log_bin=1;
set sql_log_off=1;
set sql_log_update=1;
Warnings:
Note 126
6
The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
Note 126
7
The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
set sql_low_priority_updates=1;
set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size;
...
...
mysql-test/t/sp-error.test
View file @
462430ba
...
...
@@ -22,48 +22,48 @@ create function func1() returns int
return
42
|
# Can't create recursively
--
error
125
4
--
error
125
5
create
procedure
foo
()
create
procedure
bar
()
set
@
x
=
3
|
--
error
125
4
--
error
125
5
create
procedure
foo
()
create
function
bar
()
returns
double
return
2.3
|
# Already exists
--
error
125
5
--
error
125
6
create
procedure
proc1
()
set
@
x
=
42
|
--
error
125
5
--
error
125
6
create
function
func1
()
returns
int
return
42
|
# Does not exist
--
error
125
6
--
error
125
7
alter
procedure
foo
|
--
error
125
6
--
error
125
7
alter
function
foo
|
--
error
125
6
--
error
125
7
drop
procedure
foo
|
--
error
125
6
--
error
125
7
drop
function
foo
|
--
error
125
6
--
error
125
7
call
foo
()
|
drop
procedure
if
exists
foo
|
# LEAVE/ITERATE with no match
--
error
12
59
--
error
12
60
create
procedure
foo
()
foo
:
loop
leave
bar
;
end
loop
|
--
error
12
59
--
error
12
60
create
procedure
foo
()
foo
:
loop
iterate
bar
;
end
loop
|
# Redefining label
--
error
126
0
--
error
126
1
create
procedure
foo
()
foo
:
loop
foo
:
loop
...
...
@@ -72,14 +72,14 @@ foo: loop
end
loop
foo
|
# End label mismatch
--
error
126
1
--
error
126
2
create
procedure
foo
()
foo
:
loop
set
@
x
=
2
;
end
loop
bar
|
# Referring to undef variable
--
error
126
2
--
error
126
3
create
procedure
foo
(
out
x
int
)
begin
declare
y
int
;
...
...
@@ -87,17 +87,17 @@ begin
end
|
# We require INTO in SELECTs (for now; this might change in the future)
--
error
126
3
--
error
126
4
create
procedure
foo
(
x
int
)
select
*
from
test
.
t1
|
# RETURN in FUNCTION only
--
error
126
4
--
error
126
5
create
procedure
foo
()
return
42
|
# Doesn't allow queries in FUNCTIONs (for now :-( )
--
error
126
5
--
error
126
6
create
function
foo
()
returns
int
begin
declare
x
int
;
...
...
mysql-test/t/sp.test
View file @
462430ba
...
...
@@ -390,18 +390,22 @@ drop procedure into_dumpfile|
create
procedure
create_select
(
x
char
(
16
),
y
int
)
begin
insert
into
test
.
t1
values
(
x
,
y
);
create
table
test
.
t
2
select
*
from
test
.
t1
;
insert
into
test
.
t
2
values
(
concat
(
x
,
"2"
),
y
+
2
);
create
table
test
.
t
3
select
*
from
test
.
t1
;
insert
into
test
.
t
3
values
(
concat
(
x
,
"2"
),
y
+
2
);
end
|
# This doesn't work right now. It suffers from the same problem as the ones
# above, but the fix caused create.test to hang. :-(
#call create_select("cs", 90)|
#select * from t1, t2|
#delete from t1|
#drop table t2|
--
disable_warnings
drop
table
if
exists
t3
|
--
enable_warnings
call
create_select
(
"cs"
,
90
)
|
select
*
from
t1
,
t3
|
--
disable_warnings
drop
table
if
exists
t3
|
--
enable_warnings
delete
from
t1
|
drop
procedure
create_select
|
# A minimal, constant FUNCTION.
create
function
e
()
returns
double
return
2.7182818284590452354
|
...
...
@@ -574,7 +578,7 @@ begin
end
|
# This isn't the fastest way in the world to compute prime numbers, so
# don't be too ambitio
n
. ;-)
# don't be too ambitio
us
. ;-)
call
ip
(
200
)
|
# We don't want to select the entire table here, just pick a few
# examples.
...
...
sql/sp.cc
View file @
462430ba
...
...
@@ -306,7 +306,11 @@ sp_add_fun_to_lex(LEX *lex, LEX_STRING fun)
while
((
fn
=
li
++
))
{
if
(
my_strncasecmp
(
system_charset_info
,
fn
,
fun
.
str
,
fun
.
length
)
==
0
)
uint
len
=
strlen
(
fn
);
if
(
my_strnncoll
(
system_charset_info
,
(
const
uchar
*
)
fn
,
len
,
(
const
uchar
*
)
fun
.
str
,
fun
.
length
)
==
0
)
break
;
}
if
(
!
fn
)
...
...
@@ -389,7 +393,12 @@ sp_find_cached_function(THD *thd, char *name, uint namelen)
while
((
sp
=
li
++
))
{
if
(
my_strncasecmp
(
system_charset_info
,
name
,
sp
->
name
(),
namelen
)
==
0
)
uint
len
;
const
uchar
*
n
=
(
const
uchar
*
)
sp
->
name
(
&
len
);
if
(
my_strnncoll
(
system_charset_info
,
(
const
uchar
*
)
name
,
namelen
,
n
,
len
)
==
0
)
break
;
}
return
sp
;
...
...
sql/sp_pcontext.cc
View file @
462430ba
...
...
@@ -56,13 +56,10 @@ sp_pcontext::find_pvar(LEX_STRING *name)
while
(
i
--
>
0
)
{
sp_pvar_t
*
p
=
find_pvar
(
i
);
uint
len
=
(
p
->
name
.
length
>
name
->
length
?
p
->
name
.
length
:
name
->
length
);
if
(
my_strncasecmp
(
system_charset_info
,
name
->
str
,
p
->
name
.
str
,
len
)
==
0
)
if
(
my_strnncoll
(
system_charset_info
,
(
const
uchar
*
)
name
->
str
,
name
->
length
,
(
const
uchar
*
)
p
->
name
.
str
,
p
->
name
.
length
)
==
0
)
{
return
p
;
}
...
...
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