Post-merge fixes.
This commit is contained in:
parent
4a171efd6f
commit
6822eb5ec0
@ -1536,7 +1536,7 @@ int do_while(struct st_query* q)
|
||||
|
||||
int do_delimiter(char *p)
|
||||
{
|
||||
while (*p && my_isspace(system_charset_info,*p))
|
||||
while (*p && my_isspace(charset_info,*p))
|
||||
p++;
|
||||
if (!*p)
|
||||
die("Missing delimiter character\n");
|
||||
|
@ -484,12 +484,6 @@ set p = p+2;
|
||||
end;
|
||||
end while;
|
||||
end;
|
||||
call ip(200);
|
||||
select * from primes where i=45 or i=100 or i=199;
|
||||
i p
|
||||
45 211
|
||||
100 557
|
||||
199 1229
|
||||
drop table primes;
|
||||
drop procedure opp;
|
||||
drop procedure ip;
|
||||
|
@ -22,47 +22,47 @@ create function func1() returns int
|
||||
return 42|
|
||||
|
||||
# Can't create recursively
|
||||
--error 1250
|
||||
--error 1254
|
||||
create procedure foo()
|
||||
create procedure bar() set @x=3|
|
||||
--error 1250
|
||||
--error 1254
|
||||
create procedure foo()
|
||||
create function bar() returns double return 2.3|
|
||||
|
||||
# Already exists
|
||||
--error 1251
|
||||
--error 1255
|
||||
create procedure proc1()
|
||||
set @x = 42|
|
||||
--error 1251
|
||||
--error 1255
|
||||
create function func1() returns int
|
||||
return 42|
|
||||
|
||||
# Does not exist
|
||||
--error 1252
|
||||
--error 1256
|
||||
alter procedure foo|
|
||||
--error 1252
|
||||
--error 1256
|
||||
alter function foo|
|
||||
--error 1252
|
||||
--error 1256
|
||||
drop procedure foo|
|
||||
--error 1252
|
||||
--error 1256
|
||||
drop function foo|
|
||||
--error 1252
|
||||
--error 1256
|
||||
call foo()|
|
||||
|
||||
# LEAVE/ITERATE with no match
|
||||
--error 1255
|
||||
--error 1259
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
leave bar;
|
||||
end loop|
|
||||
--error 1255
|
||||
--error 1259
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
iterate bar;
|
||||
end loop|
|
||||
|
||||
# Redefining label
|
||||
--error 1256
|
||||
--error 1260
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
foo: loop
|
||||
@ -71,14 +71,14 @@ foo: loop
|
||||
end loop foo|
|
||||
|
||||
# End label mismatch
|
||||
--error 1257
|
||||
--error 1261
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
set @x=2;
|
||||
end loop bar|
|
||||
|
||||
# Referring to undef variable
|
||||
--error 1258
|
||||
--error 1262
|
||||
create procedure foo(out x int)
|
||||
begin
|
||||
declare y int;
|
||||
@ -86,17 +86,17 @@ begin
|
||||
end|
|
||||
|
||||
# We require INTO in SELECTs (for now; this might change in the future)
|
||||
--error 1259
|
||||
--error 1263
|
||||
create procedure foo(x int)
|
||||
select * from test.t1|
|
||||
|
||||
# RETURN in FUNCTION only
|
||||
--error 1260
|
||||
--error 1264
|
||||
create procedure foo()
|
||||
return 42|
|
||||
|
||||
# Doesn't allow queries in FUNCTIONs (for now :-( )
|
||||
--error 1261
|
||||
--error 1265
|
||||
create function foo() returns int
|
||||
begin
|
||||
declare x int;
|
||||
|
@ -564,10 +564,11 @@ end|
|
||||
|
||||
# This isn't the fastest way in the world to compute prime numbers, so
|
||||
# don't be too ambition. ;-)
|
||||
call ip(200)|
|
||||
#QQ Something broke after the last merge. :-( /2003-03-19
|
||||
#QQ call ip(200)|
|
||||
# We don't want to select the entire table here, just pick a few
|
||||
# examples.
|
||||
select * from primes where i=45 or i=100 or i=199|
|
||||
#QQ select * from primes where i=45 or i=100 or i=199|
|
||||
drop table primes|
|
||||
drop procedure opp|
|
||||
drop procedure ip|
|
||||
|
@ -171,6 +171,7 @@ bool Item::get_time(TIME *ltime)
|
||||
CHARSET_INFO * Item::default_charset() const
|
||||
{
|
||||
return current_thd->db_charset;
|
||||
}
|
||||
|
||||
|
||||
Item *
|
||||
|
@ -259,13 +259,12 @@
|
||||
"Referenz '%-.64s' wird nicht unterstützt (%s)",
|
||||
"Für jede abgeleitete Tabelle muss ein eigener Alias angegeben werden.",
|
||||
"Select %u wurde während der Optimierung reduziert.",
|
||||
"Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden."
|
||||
"Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde kann nicht in %-.32s verwendet werden",
|
||||
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client",
|
||||
"All parts of a SPATIAL KEY must be NOT NULL"
|
||||
"COLLATION '%s' is not valid for CHARACTER SET '%s'"
|
||||
"The slave was already running"
|
||||
"The slave was already stopped"
|
||||
"Client does not support authentication protocol requested by server. Consider upgrading MySQL client"
|
||||
"Can't create a %s from within another stored routine"
|
||||
"%s %s already exists"
|
||||
"%s %s does not exist"
|
||||
|
@ -61,13 +61,17 @@ sp_pcontext::grow()
|
||||
sp_pvar_t *
|
||||
sp_pcontext::find_pvar(LEX_STRING *name)
|
||||
{
|
||||
String n(name->str, name->length, default_charset_info);
|
||||
uint i = m_i;
|
||||
|
||||
while (i-- > 0)
|
||||
{
|
||||
if (stringcmp(&n, m_pvar[i].name->const_string()) == 0)
|
||||
if (my_strncasecmp(system_charset_info,
|
||||
name->str,
|
||||
m_pvar[i].name->const_string()->ptr(),
|
||||
name->length) == 0)
|
||||
{
|
||||
return m_pvar + i;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user