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
da7ca9ba
Commit
da7ca9ba
authored
Dec 01, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes.
parent
38f853d2
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
57 deletions
+57
-57
include/mysqld_error.h
include/mysqld_error.h
+1
-1
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+2
-2
mysql-test/r/sp.result
mysql-test/r/sp.result
+3
-3
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-1
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+41
-41
mysql-test/t/sp.test
mysql-test/t/sp.test
+3
-3
sql/protocol_cursor.cc
sql/protocol_cursor.cc
+3
-3
sql/sql_union.cc
sql/sql_union.cc
+2
-2
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
include/mysqld_error.h
View file @
da7ca9ba
...
@@ -302,7 +302,7 @@
...
@@ -302,7 +302,7 @@
#define ER_UNKNOWN_KEY_CACHE 1283
#define ER_UNKNOWN_KEY_CACHE 1283
#define ER_WARN_HOSTNAME_WONT_WORK 1284
#define ER_WARN_HOSTNAME_WONT_WORK 1284
#define ER_SP_NO_RECURSIVE_CREATE 1285
#define ER_SP_NO_RECURSIVE_CREATE 1285
#define ER_SP_ALREADY_EXISTS 128
5
#define ER_SP_ALREADY_EXISTS 128
6
#define ER_SP_DOES_NOT_EXIST 1287
#define ER_SP_DOES_NOT_EXIST 1287
#define ER_SP_DROP_FAILED 1288
#define ER_SP_DROP_FAILED 1288
#define ER_SP_STORE_FAILED 1289
#define ER_SP_STORE_FAILED 1289
...
...
mysql-test/r/sp-error.result
View file @
da7ca9ba
...
@@ -35,7 +35,7 @@ call foo();
...
@@ -35,7 +35,7 @@ call foo();
ERROR 42000: PROCEDURE foo does not exist
ERROR 42000: PROCEDURE foo does not exist
drop procedure if exists foo;
drop procedure if exists foo;
Warnings:
Warnings:
Warning 128
6
PROCEDURE foo does not exist
Warning 128
7
PROCEDURE foo does not exist
show create procedure foo;
show create procedure foo;
ERROR 42000: PROCEDURE foo does not exist
ERROR 42000: PROCEDURE foo does not exist
create procedure foo()
create procedure foo()
...
@@ -71,7 +71,7 @@ declare y int;
...
@@ -71,7 +71,7 @@ declare y int;
set x = y;
set x = y;
end;
end;
Warnings:
Warnings:
Warning 129
2
Referring to uninitialized variable y
Warning 129
3
Referring to uninitialized variable y
drop procedure foo;
drop procedure foo;
create procedure foo()
create procedure foo()
begin
begin
...
...
mysql-test/r/sp.result
View file @
da7ca9ba
...
@@ -618,7 +618,7 @@ create procedure hndlr4()
...
@@ -618,7 +618,7 @@ create procedure hndlr4()
begin
begin
declare x int default 0;
declare x int default 0;
declare val int; # No default
declare val int; # No default
declare continue handler for
1310
set x=1;
declare continue handler for
sqlstate '02000'
set x=1;
select data into val from test.t3 where id='z' limit 1; # No hits
select data into val from test.t3 where id='z' limit 1; # No hits
insert into test.t3 values ('z', val);
insert into test.t3 values ('z', val);
end;
end;
...
@@ -631,7 +631,7 @@ drop procedure hndlr4;
...
@@ -631,7 +631,7 @@ drop procedure hndlr4;
create procedure cur1()
create procedure cur1()
begin
begin
declare done int default 0;
declare done int default 0;
declare continue handler for
1310
set done = 1;
declare continue handler for
sqlstate '02000'
set done = 1;
declare c cursor for select * from test.t2;
declare c cursor for select * from test.t2;
declare a char(16);
declare a char(16);
declare b int;
declare b int;
...
@@ -658,7 +658,7 @@ create table t3 ( s char(16), i int );
...
@@ -658,7 +658,7 @@ create table t3 ( s char(16), i int );
create procedure cur2()
create procedure cur2()
begin
begin
declare done int default 0;
declare done int default 0;
declare continue handler for
1310
set done = 1;
declare continue handler for
sqlstate '02000'
set done = 1;
declare c1 cursor for select id,data from test.t1;
declare c1 cursor for select id,data from test.t1;
declare c2 cursor for select i from test.t2;
declare c2 cursor for select i from test.t2;
open c1;
open c1;
...
...
mysql-test/r/variables.result
View file @
da7ca9ba
...
@@ -360,7 +360,7 @@ set sql_log_bin=1;
...
@@ -360,7 +360,7 @@ set sql_log_bin=1;
set sql_log_off=1;
set sql_log_off=1;
set sql_log_update=1;
set sql_log_update=1;
Warnings:
Warnings:
Note 129
6
The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
Note 129
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_low_priority_updates=1;
set sql_max_join_size=200;
set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size;
select @@sql_max_join_size,@@max_join_size;
...
...
mysql-test/t/sp-error.test
View file @
da7ca9ba
...
@@ -32,18 +32,18 @@ create function func1() returns int
...
@@ -32,18 +32,18 @@ create function func1() returns int
return
42
|
return
42
|
# Can't create recursively
# Can't create recursively
--
error
128
4
--
error
128
5
create
procedure
foo
()
create
procedure
foo
()
create
procedure
bar
()
set
@
x
=
3
|
create
procedure
bar
()
set
@
x
=
3
|
--
error
128
4
--
error
128
5
create
procedure
foo
()
create
procedure
foo
()
create
function
bar
()
returns
double
return
2.3
|
create
function
bar
()
returns
double
return
2.3
|
# Already exists
# Already exists
--
error
128
5
--
error
128
6
create
procedure
proc1
()
create
procedure
proc1
()
set
@
x
=
42
|
set
@
x
=
42
|
--
error
128
5
--
error
128
6
create
function
func1
()
returns
int
create
function
func1
()
returns
int
return
42
|
return
42
|
...
@@ -51,39 +51,39 @@ drop procedure proc1|
...
@@ -51,39 +51,39 @@ drop procedure proc1|
drop
function
func1
|
drop
function
func1
|
# Does not exist
# Does not exist
--
error
128
6
--
error
128
7
alter
procedure
foo
|
alter
procedure
foo
|
--
error
128
6
--
error
128
7
alter
function
foo
|
alter
function
foo
|
--
error
128
6
--
error
128
7
drop
procedure
foo
|
drop
procedure
foo
|
--
error
128
6
--
error
128
7
drop
function
foo
|
drop
function
foo
|
--
error
128
6
--
error
128
7
call
foo
()
|
call
foo
()
|
drop
procedure
if
exists
foo
|
drop
procedure
if
exists
foo
|
--
error
128
6
--
error
128
7
show
create
procedure
foo
|
show
create
procedure
foo
|
# LEAVE/ITERATE with no match
# LEAVE/ITERATE with no match
--
error
12
89
--
error
12
90
create
procedure
foo
()
create
procedure
foo
()
foo
:
loop
foo
:
loop
leave
bar
;
leave
bar
;
end
loop
|
end
loop
|
--
error
12
89
--
error
12
90
create
procedure
foo
()
create
procedure
foo
()
foo
:
loop
foo
:
loop
iterate
bar
;
iterate
bar
;
end
loop
|
end
loop
|
--
error
12
89
--
error
12
90
create
procedure
foo
()
create
procedure
foo
()
foo
:
begin
foo
:
begin
iterate
foo
;
iterate
foo
;
end
|
end
|
# Redefining label
# Redefining label
--
error
129
0
--
error
129
1
create
procedure
foo
()
create
procedure
foo
()
foo
:
loop
foo
:
loop
foo
:
loop
foo
:
loop
...
@@ -92,7 +92,7 @@ foo: loop
...
@@ -92,7 +92,7 @@ foo: loop
end
loop
foo
|
end
loop
foo
|
# End label mismatch
# End label mismatch
--
error
129
1
--
error
129
2
create
procedure
foo
()
create
procedure
foo
()
foo
:
loop
foo
:
loop
set
@
x
=
2
;
set
@
x
=
2
;
...
@@ -113,17 +113,17 @@ begin
...
@@ -113,17 +113,17 @@ begin
select
name
from
mysql
.
proc
;
select
name
from
mysql
.
proc
;
select
type
from
mysql
.
proc
;
select
type
from
mysql
.
proc
;
end
|
end
|
--
error
129
3
--
error
129
4
call
foo
()
|
call
foo
()
|
drop
procedure
foo
|
drop
procedure
foo
|
# RETURN in FUNCTION only
# RETURN in FUNCTION only
--
error
129
4
--
error
129
5
create
procedure
foo
()
create
procedure
foo
()
return
42
|
return
42
|
# Doesn't allow queries in FUNCTIONs (for now :-( )
# Doesn't allow queries in FUNCTIONs (for now :-( )
--
error
129
5
--
error
129
6
create
function
foo
()
returns
int
create
function
foo
()
returns
int
begin
begin
declare
x
int
;
declare
x
int
;
...
@@ -137,19 +137,19 @@ create procedure p(x int)
...
@@ -137,19 +137,19 @@ create procedure p(x int)
create
function
f
(
x
int
)
returns
int
create
function
f
(
x
int
)
returns
int
return
x
+
42
|
return
x
+
42
|
--
error
1
299
--
error
1
300
call
p
()
|
call
p
()
|
--
error
1
299
--
error
1
300
call
p
(
1
,
2
)
|
call
p
(
1
,
2
)
|
--
error
1
299
--
error
1
300
select
f
()
|
select
f
()
|
--
error
1
299
--
error
1
300
select
f
(
1
,
2
)
|
select
f
(
1
,
2
)
|
drop
procedure
p
|
drop
procedure
p
|
drop
function
f
|
drop
function
f
|
--
error
130
0
--
error
130
1
create
procedure
p
(
val
int
,
out
res
int
)
create
procedure
p
(
val
int
,
out
res
int
)
begin
begin
declare
x
int
default
0
;
declare
x
int
default
0
;
...
@@ -163,7 +163,7 @@ begin
...
@@ -163,7 +163,7 @@ begin
end
if
;
end
if
;
end
|
end
|
--
error
130
0
--
error
130
1
create
procedure
p
(
val
int
,
out
res
int
)
create
procedure
p
(
val
int
,
out
res
int
)
begin
begin
declare
x
int
default
0
;
declare
x
int
default
0
;
...
@@ -178,7 +178,7 @@ begin
...
@@ -178,7 +178,7 @@ begin
end
if
;
end
if
;
end
|
end
|
--
error
130
1
--
error
130
2
create
function
f
(
val
int
)
returns
int
create
function
f
(
val
int
)
returns
int
begin
begin
declare
x
int
;
declare
x
int
;
...
@@ -196,12 +196,12 @@ begin
...
@@ -196,12 +196,12 @@ begin
end
if
;
end
if
;
end
|
end
|
--
error
130
2
--
error
130
3
select
f
(
10
)
|
select
f
(
10
)
|
drop
function
f
|
drop
function
f
|
--
error
130
3
--
error
130
4
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
c
cursor
for
insert
into
test
.
t1
values
(
"foo"
,
42
);
declare
c
cursor
for
insert
into
test
.
t1
values
(
"foo"
,
42
);
...
@@ -210,7 +210,7 @@ begin
...
@@ -210,7 +210,7 @@ begin
close
c
;
close
c
;
end
|
end
|
--
error
130
4
--
error
130
5
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
x
int
;
declare
x
int
;
...
@@ -220,7 +220,7 @@ begin
...
@@ -220,7 +220,7 @@ begin
close
c
;
close
c
;
end
|
end
|
--
error
130
5
--
error
130
6
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
c
cursor
for
select
*
from
test
.
t
;
declare
c
cursor
for
select
*
from
test
.
t
;
...
@@ -242,7 +242,7 @@ begin
...
@@ -242,7 +242,7 @@ begin
open
c
;
open
c
;
close
c
;
close
c
;
end
|
end
|
--
error
130
6
--
error
130
7
call
p
()
|
call
p
()
|
drop
procedure
p
|
drop
procedure
p
|
...
@@ -254,11 +254,11 @@ begin
...
@@ -254,11 +254,11 @@ begin
close
c
;
close
c
;
close
c
;
close
c
;
end
|
end
|
--
error
130
7
--
error
130
8
call
p
()
|
call
p
()
|
drop
procedure
p
|
drop
procedure
p
|
--
error
128
6
--
error
128
7
alter
procedure
bar3
sql
security
invoker
|
alter
procedure
bar3
sql
security
invoker
|
--
error
1059
--
error
1059
alter
procedure
bar3
name
alter
procedure
bar3
name
...
@@ -272,7 +272,7 @@ drop table if exists t1|
...
@@ -272,7 +272,7 @@ drop table if exists t1|
create
table
t1
(
val
int
,
x
float
)
|
create
table
t1
(
val
int
,
x
float
)
|
insert
into
t1
values
(
42
,
3.1
),
(
19
,
1.2
)
|
insert
into
t1
values
(
42
,
3.1
),
(
19
,
1.2
)
|
--
error
130
8
--
error
130
9
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
c
cursor
for
select
*
from
t1
;
declare
c
cursor
for
select
*
from
t1
;
...
@@ -292,7 +292,7 @@ begin
...
@@ -292,7 +292,7 @@ begin
fetch
c
into
x
;
fetch
c
into
x
;
close
c
;
close
c
;
end
|
end
|
--
error
13
09
--
error
13
10
call
p
()
|
call
p
()
|
drop
procedure
p
|
drop
procedure
p
|
...
@@ -307,34 +307,34 @@ begin
...
@@ -307,34 +307,34 @@ begin
fetch
c
into
x
,
y
,
z
;
fetch
c
into
x
,
y
,
z
;
close
c
;
close
c
;
end
|
end
|
--
error
13
09
--
error
13
10
call
p
()
|
call
p
()
|
drop
procedure
p
|
drop
procedure
p
|
--
error
131
1
--
error
131
2
create
procedure
p
(
in
x
int
,
x
char
(
10
))
create
procedure
p
(
in
x
int
,
x
char
(
10
))
begin
begin
end
|
end
|
--
error
131
1
--
error
131
2
create
function
p
(
x
int
,
x
char
(
10
))
create
function
p
(
x
int
,
x
char
(
10
))
begin
begin
end
|
end
|
--
error
131
2
--
error
131
3
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
x
float
;
declare
x
float
;
declare
x
int
;
declare
x
int
;
end
|
end
|
--
error
131
3
--
error
131
4
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
c
condition
for
1064
;
declare
c
condition
for
1064
;
declare
c
condition
for
1065
;
declare
c
condition
for
1065
;
end
|
end
|
--
error
131
4
--
error
131
5
create
procedure
p
()
create
procedure
p
()
begin
begin
declare
c
cursor
for
select
*
from
t1
;
declare
c
cursor
for
select
*
from
t1
;
...
@@ -358,7 +358,7 @@ drop procedure bug1965|
...
@@ -358,7 +358,7 @@ drop procedure bug1965|
#
#
# BUG#1966
# BUG#1966
#
#
--
error
130
8
--
error
130
9
select
1
into
a
|
select
1
into
a
|
...
...
mysql-test/t/sp.test
View file @
da7ca9ba
...
@@ -734,7 +734,7 @@ create procedure hndlr4()
...
@@ -734,7 +734,7 @@ create procedure hndlr4()
begin
begin
declare
x
int
default
0
;
declare
x
int
default
0
;
declare
val
int
;
# No default
declare
val
int
;
# No default
declare
continue
handler
for
1310
set
x
=
1
;
declare
continue
handler
for
sqlstate
'02000'
set
x
=
1
;
select
data
into
val
from
test
.
t3
where
id
=
'z'
limit
1
;
# No hits
select
data
into
val
from
test
.
t3
where
id
=
'z'
limit
1
;
# No hits
...
@@ -753,7 +753,7 @@ drop procedure hndlr4|
...
@@ -753,7 +753,7 @@ drop procedure hndlr4|
create
procedure
cur1
()
create
procedure
cur1
()
begin
begin
declare
done
int
default
0
;
declare
done
int
default
0
;
declare
continue
handler
for
1310
set
done
=
1
;
declare
continue
handler
for
sqlstate
'02000'
set
done
=
1
;
declare
c
cursor
for
select
*
from
test
.
t2
;
declare
c
cursor
for
select
*
from
test
.
t2
;
declare
a
char
(
16
);
declare
a
char
(
16
);
declare
b
int
;
declare
b
int
;
...
@@ -782,7 +782,7 @@ create table t3 ( s char(16), i int )|
...
@@ -782,7 +782,7 @@ create table t3 ( s char(16), i int )|
create
procedure
cur2
()
create
procedure
cur2
()
begin
begin
declare
done
int
default
0
;
declare
done
int
default
0
;
declare
continue
handler
for
1310
set
done
=
1
;
declare
continue
handler
for
sqlstate
'02000'
set
done
=
1
;
declare
c1
cursor
for
select
id
,
data
from
test
.
t1
;
declare
c1
cursor
for
select
id
,
data
from
test
.
t1
;
declare
c2
cursor
for
select
i
from
test
.
t2
;
declare
c2
cursor
for
select
i
from
test
.
t2
;
...
...
sql/protocol_cursor.cc
View file @
da7ca9ba
...
@@ -108,7 +108,7 @@ bool Protocol_cursor::write()
...
@@ -108,7 +108,7 @@ bool Protocol_cursor::write()
data_tmp
=
(
byte
**
)(
new_record
+
1
);
data_tmp
=
(
byte
**
)(
new_record
+
1
);
new_record
->
data
=
(
char
**
)
data_tmp
;
new_record
->
data
=
(
char
**
)
data_tmp
;
to
=
(
byte
*
)
data
+
(
field_count
+
1
)
*
sizeof
(
char
*
);
to
=
(
byte
*
)
data
_tmp
+
(
field_count
+
1
)
*
sizeof
(
char
*
);
for
(;
cur_field
<
fields_end
;
++
cur_field
,
++
data_tmp
)
for
(;
cur_field
<
fields_end
;
++
cur_field
,
++
data_tmp
)
{
{
...
@@ -123,7 +123,7 @@ bool Protocol_cursor::write()
...
@@ -123,7 +123,7 @@ bool Protocol_cursor::write()
// TODO error signal send_error(thd, CR_MALFORMED_PACKET);
// TODO error signal send_error(thd, CR_MALFORMED_PACKET);
return
TRUE
;
return
TRUE
;
}
}
*
data
=
to
;
*
data
_tmp
=
to
;
memcpy
(
to
,(
char
*
)
cp
,
len
);
memcpy
(
to
,(
char
*
)
cp
,
len
);
to
[
len
]
=
0
;
to
[
len
]
=
0
;
to
+=
len
+
1
;
to
+=
len
+
1
;
...
@@ -132,7 +132,7 @@ bool Protocol_cursor::write()
...
@@ -132,7 +132,7 @@ bool Protocol_cursor::write()
cur_field
->
max_length
=
len
;
cur_field
->
max_length
=
len
;
}
}
}
}
*
data
=
0
;
*
data
_tmp
=
0
;
*
prev_record
=
new_record
;
*
prev_record
=
new_record
;
prev_record
=
&
new_record
->
next
;
prev_record
=
&
new_record
->
next
;
...
...
sql/sql_union.cc
View file @
da7ca9ba
...
@@ -221,7 +221,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result)
...
@@ -221,7 +221,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result)
union_result
->
set_table
(
table
);
union_result
->
set_table
(
table
);
item_list
.
empty
();
item_list
.
empty
();
thd_arg
->
lex
.
current_select
=
lex_select_save
;
thd_arg
->
lex
->
current_select
=
lex_select_save
;
{
{
Field
**
field
;
Field
**
field
;
for
(
field
=
table
->
field
;
*
field
;
field
++
)
for
(
field
=
table
->
field
;
*
field
;
field
++
)
...
@@ -234,7 +234,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result)
...
@@ -234,7 +234,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result)
else
else
first_select
->
braces
=
0
;
// remove our changes
first_select
->
braces
=
0
;
// remove our changes
thd_arg
->
lex
.
current_select
=
lex_select_save
;
thd_arg
->
lex
->
current_select
=
lex_select_save
;
DBUG_RETURN
(
res
||
thd_arg
->
is_fatal_error
?
1
:
0
);
DBUG_RETURN
(
res
||
thd_arg
->
is_fatal_error
?
1
:
0
);
...
...
sql/sql_yacc.yy
View file @
da7ca9ba
...
@@ -1777,7 +1777,7 @@ sp_case:
...
@@ -1777,7 +1777,7 @@ sp_case:
{ /* Simple case: <caseval> = <whenval> */
{ /* Simple case: <caseval> = <whenval> */
LEX_STRING ivar;
LEX_STRING ivar;
ivar.str= "_tmp_";
ivar.str=
(char *)
"_tmp_";
ivar.length= 5;
ivar.length= 5;
Item *var= (Item*) new Item_splocal(ivar,
Item *var= (Item*) new Item_splocal(ivar,
ctx->current_framesize()-1);
ctx->current_framesize()-1);
...
...
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