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
afe2186e
Commit
afe2186e
authored
Nov 19, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes.
parent
214ad828
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
66 additions
and
66 deletions
+66
-66
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+6
-7
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+1
-1
mysql-test/r/sp.result
mysql-test/r/sp.result
+3
-3
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+40
-40
mysql-test/t/sp.test
mysql-test/t/sp.test
+3
-3
sql/protocol.cc
sql/protocol.cc
+1
-1
sql/sp_head.cc
sql/sp_head.cc
+1
-0
sql/sql_class.cc
sql/sql_class.cc
+1
-1
sql/sql_delete.cc
sql/sql_delete.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+5
-5
sql/sql_union.cc
sql/sql_union.cc
+1
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/r/query_cache.result
View file @
afe2186e
...
...
@@ -808,17 +808,17 @@ Qcache_hits 6
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 4
DROP TABLE
t1;
drop table
t1;
create table t1 (a int);
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts
4
8
Qcache_inserts 8
show status like "Qcache_hits";
Variable_name Value
Qcache_hits
12
Qcache_hits
6
/**/ select * from t1;
a
/**/ select * from t1;
...
...
@@ -828,10 +828,9 @@ Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts
4
9
Qcache_inserts 9
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 13
drop table t1;
Qcache_hits 7
DROP TABLE t1;
SET GLOBAL query_cache_size=0;
mysql-test/r/sp-error.result
View file @
afe2186e
...
...
@@ -35,7 +35,7 @@ call foo();
ERROR HY000: PROCEDURE foo does not exist
drop procedure if exists foo;
Warnings:
Warning 128
2
PROCEDURE foo does not exist
Warning 128
6
PROCEDURE foo does not exist
create procedure foo()
foo: loop
leave bar;
...
...
mysql-test/r/sp.result
View file @
afe2186e
...
...
@@ -606,7 +606,7 @@ create procedure hndlr4()
begin
declare x int default 0;
declare val int; # No default
declare continue handler for 13
06
set x=1;
declare continue handler for 13
10
set x=1;
select data into val from test.t3 where id='z' limit 1; # No hits
insert into test.t3 values ('z', val);
end;
...
...
@@ -619,7 +619,7 @@ drop procedure hndlr4;
create procedure cur1()
begin
declare done int default 0;
declare continue handler for 13
06
set done = 1;
declare continue handler for 13
10
set done = 1;
declare c cursor for select * from test.t2;
declare a char(16);
declare b int;
...
...
@@ -646,7 +646,7 @@ create table t3 ( s char(16), i int );
create procedure cur2()
begin
declare done int default 0;
declare continue handler for 13
06
set done = 1;
declare continue handler for 13
10
set done = 1;
declare c1 cursor for select id,data from test.t1;
declare c2 cursor for select i from test.t2;
open c1;
...
...
mysql-test/t/sp-error.test
View file @
afe2186e
...
...
@@ -32,18 +32,18 @@ create function func1() returns int
return
42
|
# Can't create recursively
--
error
128
0
--
error
128
4
create
procedure
foo
()
create
procedure
bar
()
set
@
x
=
3
|
--
error
128
0
--
error
128
4
create
procedure
foo
()
create
function
bar
()
returns
double
return
2.3
|
# Already exists
--
error
128
1
--
error
128
5
create
procedure
proc1
()
set
@
x
=
42
|
--
error
128
1
--
error
128
5
create
function
func1
()
returns
int
return
42
|
...
...
@@ -51,37 +51,37 @@ drop procedure proc1|
drop
function
func1
|
# Does not exist
--
error
128
2
--
error
128
6
alter
procedure
foo
|
--
error
128
2
--
error
128
6
alter
function
foo
|
--
error
128
2
--
error
128
6
drop
procedure
foo
|
--
error
128
2
--
error
128
6
drop
function
foo
|
--
error
128
2
--
error
128
6
call
foo
()
|
drop
procedure
if
exists
foo
|
# LEAVE/ITERATE with no match
--
error
128
5
--
error
128
9
create
procedure
foo
()
foo
:
loop
leave
bar
;
end
loop
|
--
error
128
5
--
error
128
9
create
procedure
foo
()
foo
:
loop
iterate
bar
;
end
loop
|
--
error
128
5
--
error
128
9
create
procedure
foo
()
foo
:
begin
iterate
foo
;
end
|
# Redefining label
--
error
12
86
--
error
12
90
create
procedure
foo
()
foo
:
loop
foo
:
loop
...
...
@@ -90,14 +90,14 @@ foo: loop
end
loop
foo
|
# End label mismatch
--
error
12
87
--
error
12
91
create
procedure
foo
()
foo
:
loop
set
@
x
=
2
;
end
loop
bar
|
# Referring to undef variable
--
error
12
88
--
error
12
92
create
procedure
foo
(
out
x
int
)
begin
declare
y
int
;
...
...
@@ -111,17 +111,17 @@ begin
select
name
from
mysql
.
proc
;
select
type
from
mysql
.
proc
;
end
|
--
error
12
89
--
error
12
93
call
foo
()
|
drop
procedure
foo
|
# RETURN in FUNCTION only
--
error
129
0
--
error
129
4
create
procedure
foo
()
return
42
|
# Doesn't allow queries in FUNCTIONs (for now :-( )
--
error
129
1
--
error
129
5
create
function
foo
()
returns
int
begin
declare
x
int
;
...
...
@@ -135,19 +135,19 @@ create procedure p(x int)
create
function
f
(
x
int
)
returns
int
return
x
+
42
|
--
error
129
5
--
error
129
9
call
p
()
|
--
error
129
5
--
error
129
9
call
p
(
1
,
2
)
|
--
error
129
5
--
error
129
9
select
f
()
|
--
error
129
5
--
error
129
9
select
f
(
1
,
2
)
|
drop
procedure
p
|
drop
function
f
|
--
error
1
296
--
error
1
300
create
procedure
p
(
val
int
,
out
res
int
)
begin
declare
x
int
default
0
;
...
...
@@ -161,7 +161,7 @@ begin
end
if
;
end
|
--
error
1
296
--
error
1
300
create
procedure
p
(
val
int
,
out
res
int
)
begin
declare
x
int
default
0
;
...
...
@@ -176,7 +176,7 @@ begin
end
if
;
end
|
--
error
1
297
--
error
1
301
create
function
f
(
val
int
)
returns
int
begin
declare
x
int
;
...
...
@@ -194,12 +194,12 @@ begin
end
if
;
end
|
--
error
1
298
--
error
1
302
select
f
(
10
)
|
drop
function
f
|
--
error
1
299
--
error
1
303
create
procedure
p
()
begin
declare
c
cursor
for
insert
into
test
.
t1
values
(
"foo"
,
42
);
...
...
@@ -208,7 +208,7 @@ begin
close
c
;
end
|
--
error
130
0
--
error
130
4
create
procedure
p
()
begin
declare
x
int
;
...
...
@@ -218,7 +218,7 @@ begin
close
c
;
end
|
--
error
130
1
--
error
130
5
create
procedure
p
()
begin
declare
c
cursor
for
select
*
from
test
.
t
;
...
...
@@ -240,7 +240,7 @@ begin
open
c
;
close
c
;
end
|
--
error
130
2
--
error
130
6
call
p
()
|
drop
procedure
p
|
...
...
@@ -252,11 +252,11 @@ begin
close
c
;
close
c
;
end
|
--
error
130
3
--
error
130
7
call
p
()
|
drop
procedure
p
|
--
error
128
2
--
error
128
6
alter
procedure
bar3
sql
security
invoker
|
--
error
1059
alter
procedure
bar3
name
...
...
@@ -270,7 +270,7 @@ drop table if exists t1|
create
table
t1
(
val
int
,
x
float
)
|
insert
into
t1
values
(
42
,
3.1
),
(
19
,
1.2
)
|
--
error
130
4
--
error
130
8
create
procedure
p
()
begin
declare
c
cursor
for
select
*
from
t1
;
...
...
@@ -290,7 +290,7 @@ begin
fetch
c
into
x
;
close
c
;
end
|
--
error
130
5
--
error
130
9
call
p
()
|
drop
procedure
p
|
...
...
@@ -305,34 +305,34 @@ begin
fetch
c
into
x
,
y
,
z
;
close
c
;
end
|
--
error
130
5
--
error
130
9
call
p
()
|
drop
procedure
p
|
--
error
13
07
--
error
13
11
create
procedure
p
(
in
x
int
,
x
char
(
10
))
begin
end
|
--
error
13
07
--
error
13
11
create
function
p
(
x
int
,
x
char
(
10
))
begin
end
|
--
error
13
08
--
error
13
12
create
procedure
p
()
begin
declare
x
float
;
declare
x
int
;
end
|
--
error
13
09
--
error
13
13
create
procedure
p
()
begin
declare
c
condition
for
1064
;
declare
c
condition
for
1065
;
end
|
--
error
131
0
--
error
131
4
create
procedure
p
()
begin
declare
c
cursor
for
select
*
from
t1
;
...
...
mysql-test/t/sp.test
View file @
afe2186e
...
...
@@ -727,7 +727,7 @@ create procedure hndlr4()
begin
declare
x
int
default
0
;
declare
val
int
;
# No default
declare
continue
handler
for
13
06
set
x
=
1
;
declare
continue
handler
for
13
10
set
x
=
1
;
select
data
into
val
from
test
.
t3
where
id
=
'z'
limit
1
;
# No hits
...
...
@@ -746,7 +746,7 @@ drop procedure hndlr4|
create
procedure
cur1
()
begin
declare
done
int
default
0
;
declare
continue
handler
for
13
06
set
done
=
1
;
declare
continue
handler
for
13
10
set
done
=
1
;
declare
c
cursor
for
select
*
from
test
.
t2
;
declare
a
char
(
16
);
declare
b
int
;
...
...
@@ -775,7 +775,7 @@ create table t3 ( s char(16), i int )|
create
procedure
cur2
()
begin
declare
done
int
default
0
;
declare
continue
handler
for
13
06
set
done
=
1
;
declare
continue
handler
for
13
10
set
done
=
1
;
declare
c1
cursor
for
select
id
,
data
from
test
.
t1
;
declare
c2
cursor
for
select
i
from
test
.
t2
;
...
...
sql/protocol.cc
View file @
afe2186e
...
...
@@ -127,7 +127,7 @@ void send_error(THD *thd, uint sql_errno, const char *err)
thd
->
net
.
report_error
=
0
;
/* Abort multi-result sets */
thd
->
lex
.
found_colon
=
0
;
thd
->
lex
->
found_colon
=
0
;
thd
->
server_status
=
~
SERVER_MORE_RESULTS_EXISTS
;
DBUG_VOID_RETURN
;
}
...
...
sql/sp_head.cc
View file @
afe2186e
...
...
@@ -454,6 +454,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
suv
=
new
Item_func_set_user_var
(
guv
->
get_name
(),
item
);
suv
->
fix_fields
(
thd
,
NULL
,
&
item
);
suv
->
fix_length_and_dec
();
suv
->
check
();
suv
->
update
();
}
}
...
...
sql/sql_class.cc
View file @
afe2186e
...
...
@@ -108,7 +108,7 @@ THD::THD():user_time(0), is_fatal_error(0),
used_tables
=
0
;
cuted_fields
=
sent_row_count
=
current_stmt_id
=
0L
;
// Must be reset to handle error with THD's created for init of mysqld
lex
.
current_select
=
0
;
lex
->
current_select
=
0
;
start_time
=
(
time_t
)
0
;
current_linfo
=
0
;
slave_thread
=
0
;
...
...
sql/sql_delete.cc
View file @
afe2186e
...
...
@@ -66,8 +66,8 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
DBUG_RETURN
(
1
);
}
if
(
thd
->
lex
.
duplicates
==
DUP_IGNORE
)
thd
->
lex
.
select_lex
.
no_error
=
1
;
if
(
thd
->
lex
->
duplicates
==
DUP_IGNORE
)
thd
->
lex
->
select_lex
.
no_error
=
1
;
/* Test if the user wants to delete all rows */
if
(
!
using_limit
&&
const_cond
&&
(
!
conds
||
conds
->
val_int
())
&&
...
...
sql/sql_parse.cc
View file @
afe2186e
...
...
@@ -1876,7 +1876,7 @@ mysql_execute_command(THD *thd)
char
buff
[
1024
];
String
str
(
buff
,(
uint32
)
sizeof
(
buff
),
system_charset_info
);
str
.
length
(
0
);
thd
->
lex
.
unit
.
print
(
&
str
);
thd
->
lex
->
unit
.
print
(
&
str
);
str
.
append
(
'\0'
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_YES
,
str
.
ptr
());
...
...
sql/sql_select.cc
View file @
afe2186e
...
...
@@ -1586,7 +1586,7 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
goto
err
;
// 1
}
if
(
thd
->
lex
.
describe
&
DESCRIBE_EXTENDED
)
if
(
thd
->
lex
->
describe
&
DESCRIBE_EXTENDED
)
{
join
->
conds_history
=
join
->
conds
;
join
->
having_history
=
(
join
->
having
?
join
->
having
:
join
->
tmp_having
);
...
...
@@ -1597,7 +1597,7 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
join
->
exec
();
if
(
thd
->
lex
.
describe
&
DESCRIBE_EXTENDED
)
if
(
thd
->
lex
->
describe
&
DESCRIBE_EXTENDED
)
{
select_lex
->
where
=
join
->
conds_history
;
select_lex
->
having
=
join
->
having_history
;
...
...
@@ -9095,8 +9095,8 @@ void st_select_lex::print(THD *thd, String *str)
//options
if
(
options
&
SELECT_STRAIGHT_JOIN
)
str
->
append
(
"straight_join "
,
14
);
if
((
thd
->
lex
.
lock_option
&
TL_READ_HIGH_PRIORITY
)
&&
(
this
==
&
thd
->
lex
.
select_lex
))
if
((
thd
->
lex
->
lock_option
&
TL_READ_HIGH_PRIORITY
)
&&
(
this
==
&
thd
->
lex
->
select_lex
))
str
->
append
(
"high_priority "
,
14
);
if
(
options
&
SELECT_DISTINCT
)
str
->
append
(
"distinct "
,
9
);
...
...
@@ -9108,7 +9108,7 @@ void st_select_lex::print(THD *thd, String *str)
str
->
append
(
"buffer_result "
,
14
);
if
(
options
&
OPTION_FOUND_ROWS
)
str
->
append
(
"calc_found_rows "
,
16
);
if
(
!
thd
->
lex
.
safe_to_cache_query
)
if
(
!
thd
->
lex
->
safe_to_cache_query
)
str
->
append
(
"no_cache "
,
9
);
if
(
options
&
OPTION_TO_QUERY_CACHE
)
str
->
append
(
"cache "
,
6
);
...
...
sql/sql_union.cc
View file @
afe2186e
...
...
@@ -382,7 +382,7 @@ int st_select_lex_unit::exec()
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
if
(
select_limit_cnt
==
HA_POS_ERROR
)
options
&=
~
OPTION_FOUND_ROWS
;
else
if
(
found_rows_for_union
&&
!
thd
->
lex
.
describe
)
else
if
(
found_rows_for_union
&&
!
thd
->
lex
->
describe
)
options
|=
OPTION_FOUND_ROWS
;
fake_select_lex
->
ftfunc_list
=
&
empty_list
;
fake_select_lex
->
table_list
.
link_in_list
((
byte
*
)
&
result_table_list
,
...
...
sql/sql_yacc.yy
View file @
afe2186e
...
...
@@ -1776,7 +1776,7 @@ sp_case:
else
{ /* Simple case: <caseval> = <whenval> */
Item *var= (Item*) new Item_splocal(ctx->current_framesize()-1);
Item *expr=
Item_bool_func2::eq_creator
(var, $1);
Item *expr=
new Item_func_eq
(var, $1);
i= new sp_instr_jump_if_not(ip, expr);
}
...
...
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