diff options
author | unknown <pem@mysql.comhem.se> | 2003-12-01 18:24:09 +0100 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2003-12-01 18:24:09 +0100 |
commit | da7ca9ba04364f61a712102f8c7095ba7d182bf5 (patch) | |
tree | b726e4d966f0f53b2e8c810e3a57cf44e87c7f77 | |
parent | 38f853d291075a8eaa9d408a23626b09aa7ac1d2 (diff) | |
download | mariadb-git-da7ca9ba04364f61a712102f8c7095ba7d182bf5.tar.gz |
Post-merge fixes.
-rw-r--r-- | include/mysqld_error.h | 2 | ||||
-rw-r--r-- | mysql-test/r/sp-error.result | 4 | ||||
-rw-r--r-- | mysql-test/r/sp.result | 6 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 2 | ||||
-rw-r--r-- | mysql-test/t/sp-error.test | 82 | ||||
-rw-r--r-- | mysql-test/t/sp.test | 6 | ||||
-rw-r--r-- | sql/protocol_cursor.cc | 6 | ||||
-rw-r--r-- | sql/sql_union.cc | 4 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 2 |
9 files changed, 57 insertions, 57 deletions
diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 93f5e982736..6b2e5115a4e 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -302,7 +302,7 @@ #define ER_UNKNOWN_KEY_CACHE 1283 #define ER_WARN_HOSTNAME_WONT_WORK 1284 #define ER_SP_NO_RECURSIVE_CREATE 1285 -#define ER_SP_ALREADY_EXISTS 1285 +#define ER_SP_ALREADY_EXISTS 1286 #define ER_SP_DOES_NOT_EXIST 1287 #define ER_SP_DROP_FAILED 1288 #define ER_SP_STORE_FAILED 1289 diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 5f755592452..a1ac2a85b6e 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -35,7 +35,7 @@ call foo(); ERROR 42000: PROCEDURE foo does not exist drop procedure if exists foo; Warnings: -Warning 1286 PROCEDURE foo does not exist +Warning 1287 PROCEDURE foo does not exist show create procedure foo; ERROR 42000: PROCEDURE foo does not exist create procedure foo() @@ -71,7 +71,7 @@ declare y int; set x = y; end; Warnings: -Warning 1292 Referring to uninitialized variable y +Warning 1293 Referring to uninitialized variable y drop procedure foo; create procedure foo() begin diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index e8bc7b85e98..a419f4a0565 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -618,7 +618,7 @@ create procedure hndlr4() begin declare x int default 0; 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 insert into test.t3 values ('z', val); end; @@ -631,7 +631,7 @@ drop procedure hndlr4; create procedure cur1() begin 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 a char(16); declare b int; @@ -658,7 +658,7 @@ create table t3 ( s char(16), i int ); create procedure cur2() begin 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 c2 cursor for select i from test.t2; open c1; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 88f796f8c4e..3e7e6af7408 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -360,7 +360,7 @@ set sql_log_bin=1; set sql_log_off=1; set sql_log_update=1; Warnings: -Note 1296 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored. +Note 1297 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; diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 132a6b086c6..50a8b8c8768 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -32,18 +32,18 @@ create function func1() returns int return 42| # Can't create recursively ---error 1284 +--error 1285 create procedure foo() create procedure bar() set @x=3| ---error 1284 +--error 1285 create procedure foo() create function bar() returns double return 2.3| # Already exists ---error 1285 +--error 1286 create procedure proc1() set @x = 42| ---error 1285 +--error 1286 create function func1() returns int return 42| @@ -51,39 +51,39 @@ drop procedure proc1| drop function func1| # Does not exist ---error 1286 +--error 1287 alter procedure foo| ---error 1286 +--error 1287 alter function foo| ---error 1286 +--error 1287 drop procedure foo| ---error 1286 +--error 1287 drop function foo| ---error 1286 +--error 1287 call foo()| drop procedure if exists foo| ---error 1286 +--error 1287 show create procedure foo| # LEAVE/ITERATE with no match ---error 1289 +--error 1290 create procedure foo() foo: loop leave bar; end loop| ---error 1289 +--error 1290 create procedure foo() foo: loop iterate bar; end loop| ---error 1289 +--error 1290 create procedure foo() foo: begin iterate foo; end| # Redefining label ---error 1290 +--error 1291 create procedure foo() foo: loop foo: loop @@ -92,7 +92,7 @@ foo: loop end loop foo| # End label mismatch ---error 1291 +--error 1292 create procedure foo() foo: loop set @x=2; @@ -113,17 +113,17 @@ begin select name from mysql.proc; select type from mysql.proc; end| ---error 1293 +--error 1294 call foo()| drop procedure foo| # RETURN in FUNCTION only ---error 1294 +--error 1295 create procedure foo() return 42| # Doesn't allow queries in FUNCTIONs (for now :-( ) ---error 1295 +--error 1296 create function foo() returns int begin declare x int; @@ -137,19 +137,19 @@ create procedure p(x int) create function f(x int) returns int return x+42| ---error 1299 +--error 1300 call p()| ---error 1299 +--error 1300 call p(1, 2)| ---error 1299 +--error 1300 select f()| ---error 1299 +--error 1300 select f(1, 2)| drop procedure p| drop function f| ---error 1300 +--error 1301 create procedure p(val int, out res int) begin declare x int default 0; @@ -163,7 +163,7 @@ begin end if; end| ---error 1300 +--error 1301 create procedure p(val int, out res int) begin declare x int default 0; @@ -178,7 +178,7 @@ begin end if; end| ---error 1301 +--error 1302 create function f(val int) returns int begin declare x int; @@ -196,12 +196,12 @@ begin end if; end| ---error 1302 +--error 1303 select f(10)| drop function f| ---error 1303 +--error 1304 create procedure p() begin declare c cursor for insert into test.t1 values ("foo", 42); @@ -210,7 +210,7 @@ begin close c; end| ---error 1304 +--error 1305 create procedure p() begin declare x int; @@ -220,7 +220,7 @@ begin close c; end| ---error 1305 +--error 1306 create procedure p() begin declare c cursor for select * from test.t; @@ -242,7 +242,7 @@ begin open c; close c; end| ---error 1306 +--error 1307 call p()| drop procedure p| @@ -254,11 +254,11 @@ begin close c; close c; end| ---error 1307 +--error 1308 call p()| drop procedure p| ---error 1286 +--error 1287 alter procedure bar3 sql security invoker| --error 1059 alter procedure bar3 name @@ -272,7 +272,7 @@ drop table if exists t1| create table t1 (val int, x float)| insert into t1 values (42, 3.1), (19, 1.2)| ---error 1308 +--error 1309 create procedure p() begin declare c cursor for select * from t1; @@ -292,7 +292,7 @@ begin fetch c into x; close c; end| ---error 1309 +--error 1310 call p()| drop procedure p| @@ -307,34 +307,34 @@ begin fetch c into x, y, z; close c; end| ---error 1309 +--error 1310 call p()| drop procedure p| ---error 1311 +--error 1312 create procedure p(in x int, x char(10)) begin end| ---error 1311 +--error 1312 create function p(x int, x char(10)) begin end| ---error 1312 +--error 1313 create procedure p() begin declare x float; declare x int; end| ---error 1313 +--error 1314 create procedure p() begin declare c condition for 1064; declare c condition for 1065; end| ---error 1314 +--error 1315 create procedure p() begin declare c cursor for select * from t1; @@ -358,7 +358,7 @@ drop procedure bug1965| # # BUG#1966 # ---error 1308 +--error 1309 select 1 into a| diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index d8530b5130b..25657bd79e2 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -734,7 +734,7 @@ create procedure hndlr4() begin declare x int default 0; 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 @@ -753,7 +753,7 @@ drop procedure hndlr4| create procedure cur1() begin 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 a char(16); declare b int; @@ -782,7 +782,7 @@ create table t3 ( s char(16), i int )| create procedure cur2() begin 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 c2 cursor for select i from test.t2; diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc index b9e9c14f361..749b66785d4 100644 --- a/sql/protocol_cursor.cc +++ b/sql/protocol_cursor.cc @@ -108,7 +108,7 @@ bool Protocol_cursor::write() data_tmp= (byte **)(new_record + 1); 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) { @@ -123,7 +123,7 @@ bool Protocol_cursor::write() // TODO error signal send_error(thd, CR_MALFORMED_PACKET); return TRUE; } - *data= to; + *data_tmp= to; memcpy(to,(char*) cp,len); to[len]=0; to+=len+1; @@ -132,7 +132,7 @@ bool Protocol_cursor::write() cur_field->max_length=len; } } - *data= 0; + *data_tmp= 0; *prev_record= new_record; prev_record= &new_record->next; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 33204608fb1..25620229844 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -221,7 +221,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result) union_result->set_table(table); item_list.empty(); - thd_arg->lex.current_select= lex_select_save; + thd_arg->lex->current_select= lex_select_save; { 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) else 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); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index a4972231c29..cd08e702cd5 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1777,7 +1777,7 @@ sp_case: { /* Simple case: <caseval> = <whenval> */ LEX_STRING ivar; - ivar.str= "_tmp_"; + ivar.str= (char *)"_tmp_"; ivar.length= 5; Item *var= (Item*) new Item_splocal(ivar, ctx->current_framesize()-1); |