Commit a009a3dc authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new


mysql-test/r/view.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
parents 2761c648 20c8bfe7
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -3225,4 +3225,43 @@ select @var|
@var
abcdabcd
drop procedure bug12849_2|
drop procedure if exists bug131333|
drop function if exists bug131333|
create procedure bug131333()
begin
begin
declare a int;
select a;
set a = 1;
select a;
end;
begin
declare b int;
select b;
end;
end|
create function bug131333()
returns int
begin
begin
declare a int;
set a = 1;
end;
begin
declare b int;
return b;
end;
end|
call bug131333()|
a
NULL
a
1
b
NULL
select bug131333()|
bug131333()
NULL
drop procedure bug131333|
drop function bug131333|
drop table t1,t2;
+6 −2
Original line number Diff line number Diff line
@@ -1146,11 +1146,11 @@ create view v2 as select * from v1;
alter view v1 as select * from v2;
ERROR 42S02: Table 'test.v1' doesn't exist
alter view v1 as select * from v1;
ERROR 42000: Not unique table/alias: 'v1'
ERROR 42S02: Table 'test.v1' doesn't exist
create or replace view v1 as select * from v2;
ERROR 42S02: Table 'test.v1' doesn't exist
create or replace view v1 as select * from v1;
ERROR 42000: Not unique table/alias: 'v1'
ERROR 42S02: Table 'test.v1' doesn't exist
drop view v2,v1;
drop table t1;
create table t1 (a int);
@@ -2186,3 +2186,7 @@ r_object_id users_names
120001a080000542	guser02
drop view v1, v2;
drop table t1, t2;
create table t1 (s1 int);
create view abc as select * from t1 as abc;
drop table t1;
drop view abc;
+3 −3
Original line number Diff line number Diff line
@@ -826,10 +826,10 @@ DROP TABLE t1, t2;
# Bugs #9136, #12917: problems with --defaults-extra-file option
#

--exec echo "[client]" > $MYSQL_TEST_DIR/var/tmp/tmp.cnf
--exec echo "[mysqltest1]" > $MYSQL_TEST_DIR/var/tmp/tmp.cnf
--exec echo "port=1234" >> $MYSQL_TEST_DIR/var/tmp/tmp.cnf
--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQL_TEST_DIR/var/tmp/tmp.cnf client
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQL_TEST_DIR/var/tmp/tmp.cnf client
--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQL_TEST_DIR/var/tmp/tmp.cnf mysqltest1
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQL_TEST_DIR/var/tmp/tmp.cnf mysqltest1
--exec rm $MYSQL_TEST_DIR/var/tmp/tmp.cnf

#
+45 −0
Original line number Diff line number Diff line
@@ -4063,6 +4063,51 @@ call bug12849_2(@var)|
select @var|
drop procedure bug12849_2|

#
# BUG#13133: Local variables in stored procedures are not initialized correctly.
#
--disable_warnings
drop procedure if exists bug131333|
drop function if exists bug131333|
--enable_warnings
create procedure bug131333()
begin
  begin
    declare a int;

    select a;
    set a = 1;
    select a;
  end;
  begin
    declare b int;

    select b;
  end;
end|

create function bug131333()
  returns int
begin
  begin
    declare a int;

    set a = 1;
  end;
  begin
    declare b int;

    return b;
  end;
end|

call bug131333()|
select bug131333()|

drop procedure bug131333|
drop function bug131333|


#
# BUG#NNNN: New bug synopsis
#
+11 −2
Original line number Diff line number Diff line
@@ -1083,11 +1083,11 @@ create view v1 as select * from t1;
create view v2 as select * from v1;
-- error 1146
alter view v1 as select * from v2;
-- error 1066
-- error 1146
alter view v1 as select * from v1;
-- error 1146
create or replace view v1 as select * from v2;
-- error 1066
-- error 1146
create or replace view v1 as select * from v1;
drop view v2,v1;
drop table t1;
@@ -2059,3 +2059,12 @@ order by users_names;

drop view v1, v2;
drop table t1, t2;

#
# Bug #6808 - Views: CREATE VIEW v ... FROM t AS v fails
#

create table t1 (s1 int); 
create view abc as select * from t1 as abc;
drop table t1;
drop view abc;
Loading