Commit 9e371dd2 authored by mleich@five.local.lan's avatar mleich@five.local.lan

Minor corrections within the script

parent d42545fb
......@@ -192,6 +192,7 @@ SUCCESS
select @message;
@message
new trigger: 11
Test 6-e: removing a relevant trigger
drop trigger t1_bi;
set @val=12;
execute stmt using @val;
......@@ -338,7 +339,7 @@ SUCCESS
#
# Sic: the insert went into t3, even though the view now
# points at t2. This is because neither the merged view
# nor its prelocking list are affected by view DDL
# nor its prelocking list are affected by view DDL
# The binary log is of course wrong, since it is not
# using prepared statements
#
......@@ -380,7 +381,7 @@ set @var=2;
# Since the dependent table is tracked in the prelocked
# list of the prepared statement, invalidation happens
# and the statement is re-prepared. This is an unnecessary
# side effect, since the statement that *is* dependent
# side effect, since the statement that *is* dependent
# on t2 definition is inside the trigger, and it is currently
# not reprepared (see the previous test case).
execute stmt using @var;
......@@ -398,7 +399,7 @@ a comment
drop table t1,t2;
# Test 7-e: dependent TABLE TRIGGER has changed
create table t1 (a int);
create trigger t1_ai after insert on t1 for each row
create trigger t1_ai after insert on t1 for each row
insert into t2 (a) values (new.a);
create table t2 (a int unique);
create trigger t2_ai after insert on t2 for each row
......@@ -740,6 +741,7 @@ drop procedure p1;
create procedure p1(out x int) select max(a) from t2 into x;
# XXX: bug. The prelocked list is not invalidated
# and we keep opening table t1, whereas the procedure
# is now referring to table t2
execute stmt;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
call p_verify_reprepare_count(0);
......@@ -1007,7 +1009,7 @@ prepare stmt from "alter table t1 add column b int";
execute stmt;
drop table t1;
create table t1 (a1 int, a2 int);
# t1 has changed, and it's does not lead to reprepare
# t1 has changed, and it's does not lead to reprepare
execute stmt;
alter table t1 drop column b;
execute stmt;
......@@ -1030,7 +1032,7 @@ test.t1 repair status OK
drop table t1;
create table t1 (a1 int, a2 int);
insert into t1 values (1, 10), (2, 20), (3, 30);
# t1 has changed, and it's does not lead to reprepare
# t1 has changed, and it's does not lead to reprepare
execute stmt;
Table Op Msg_type Msg_text
test.t1 repair status OK
......@@ -1333,7 +1335,7 @@ insert into t_27430_2 values
(2, 2),
(1234, 3),
(1234, 4);
prepare stmt from
prepare stmt from
"select oref, a, a in (select a from t_27430_1 where oref=t_27430_2.oref) Z from t_27430_2";
execute stmt;
oref a Z
......@@ -1346,7 +1348,7 @@ SUCCESS
drop table t_27430_1, t_27430_2;
create table t_27430_1 (a int, oref int, key(a));
insert into t_27430_1 values
insert into t_27430_1 values
(1, 1),
(1, NULL),
(2, 3),
......@@ -1500,7 +1502,7 @@ drop procedure p_12093;
deallocate prepare stmt_sf;
deallocate prepare stmt_sp;
=====================================================================
Ensure that metadata validation is performed for every type of
Ensure that metadata validation is performed for every type of
SQL statement where it is needed.
=====================================================================
drop table if exists t1;
......@@ -1586,7 +1588,7 @@ deallocate prepare stmt;
# CREATE TEMPORARY TABLE. This is a shortcoming of the current code,
# but since validation is not strictly necessary, nothing is done
# about it.
# Will be fixed as part of work on Bug#21431 "Incomplete support of
# Will be fixed as part of work on Bug#21431 "Incomplete support of
# temporary tables"
create table t1 (a int);
insert into t1 (a) values (1);
......@@ -1839,11 +1841,11 @@ Variable_name Value
drop table t1;
deallocate prepare stmt;
#
# SQLCOM_SHOW_ENGINE_STATUS, SQLCOM_SHOW_ENGINE_LOGS,
# SQLCOM_SHOW_ENGINE_STATUS, SQLCOM_SHOW_ENGINE_LOGS,
# SQLCOM_SHOW_ENGINE_MUTEX, SQLCOM_SHOW_PROCESSLIST
#
# Currently can not have a where clause, need to be covered
# with tests
# with tests
drop table if exists t1;
create table t1 (a int);
prepare stmt from "show engine all status where (1) in (select * from t1)";
......@@ -2035,7 +2037,7 @@ prepare stmt from "alter view v1 as select 2";
ERROR HY000: This command is not supported in the prepared statement protocol yet
drop view v1;
# Cleanup
#
#
drop temporary table if exists t1, t2, t3;
drop table if exists t1, t2, t3, v1, v2;
drop procedure if exists p_verify_reprepare_count;
......
......@@ -181,7 +181,7 @@ select @message;
# Unrelated trigger: reprepare may or may not happen, implementation dependent
create trigger t1_bd before delete on t1 for each row
set @message= old.a;
set @val=5;
execute stmt using @val;
call p_verify_reprepare_count(1);
......@@ -229,7 +229,7 @@ execute stmt using @val;
call p_verify_reprepare_count(1);
select @message;
--ehco Test 6-e: removing a relevant trigger
--echo Test 6-e: removing a relevant trigger
drop trigger t1_bi;
......@@ -338,7 +338,7 @@ call p_verify_reprepare_count(0);
--echo #
--echo # Sic: the insert went into t3, even though the view now
--echo # points at t2. This is because neither the merged view
--echo # nor its prelocking list are affected by view DDL
--echo # nor its prelocking list are affected by view DDL
--echo # The binary log is of course wrong, since it is not
--echo # using prepared statements
--echo #
......@@ -367,7 +367,7 @@ set @var=2;
--echo # Since the dependent table is tracked in the prelocked
--echo # list of the prepared statement, invalidation happens
--echo # and the statement is re-prepared. This is an unnecessary
--echo # side effect, since the statement that *is* dependent
--echo # side effect, since the statement that *is* dependent
--echo # on t2 definition is inside the trigger, and it is currently
--echo # not reprepared (see the previous test case).
execute stmt using @var;
......@@ -378,7 +378,7 @@ drop table t1,t2;
--echo # Test 7-e: dependent TABLE TRIGGER has changed
create table t1 (a int);
create trigger t1_ai after insert on t1 for each row
create trigger t1_ai after insert on t1 for each row
insert into t2 (a) values (new.a);
create table t2 (a int unique);
create trigger t2_ai after insert on t2 for each row
......@@ -674,7 +674,7 @@ drop procedure p1;
create procedure p1(out x int) select max(a) from t2 into x;
--echo # XXX: bug. The prelocked list is not invalidated
--echo # and we keep opening table t1, whereas the procedure
--ehco # is now referring to table t2
--echo # is now referring to table t2
--error ER_VIEW_INVALID
execute stmt;
call p_verify_reprepare_count(0);
......@@ -702,7 +702,7 @@ execute stmt;
call p_verify_reprepare_count(1);
execute stmt;
--echo # Test 18-d: dependent TABLE has changed
drop view v2;
drop view v2;
create table v2 as select * from t1;
execute stmt;
call p_verify_reprepare_count(1);
......@@ -854,7 +854,7 @@ execute stmt;
drop table t1;
create table t1 (a1 int, a2 int);
--echo # t1 has changed, and it's does not lead to reprepare
--echo # t1 has changed, and it's does not lead to reprepare
execute stmt;
alter table t1 drop column b;
......@@ -881,7 +881,7 @@ drop table t1;
create table t1 (a1 int, a2 int);
insert into t1 values (1, 10), (2, 20), (3, 30);
--echo # t1 has changed, and it's does not lead to reprepare
--echo # t1 has changed, and it's does not lead to reprepare
execute stmt;
alter table t1 add column b varchar(50) default NULL;
......@@ -1190,16 +1190,16 @@ insert into t_27430_2 values
(1234, 3),
(1234, 4);
prepare stmt from
prepare stmt from
"select oref, a, a in (select a from t_27430_1 where oref=t_27430_2.oref) Z from t_27430_2";
execute stmt;
execute stmt;
call p_verify_reprepare_count(0);
drop table t_27430_1, t_27430_2;
create table t_27430_1 (a int, oref int, key(a));
insert into t_27430_1 values
insert into t_27430_1 values
(1, 1),
(1, NULL),
(2, 3),
......@@ -1237,7 +1237,7 @@ insert into t_27690_1 values (1,1),(2,2);
create table v_27690_1 as select * from t_27690_1;
create table v_27690_2 as select * from t_27690_1;
prepare stmt from "select * from v_27690_1, v_27690_2";
prepare stmt from "select * from v_27690_1, v_27690_2";
execute stmt;
execute stmt;
......@@ -1327,17 +1327,17 @@ drop procedure p_12093_unrelated;
connection default;
--echo # XXX: bug
--error ER_SP_DOES_NOT_EXIST
--error ER_SP_DOES_NOT_EXIST
execute stmt_sf;
--echo # XXX: bug
--error ER_SP_DOES_NOT_EXIST
--error ER_SP_DOES_NOT_EXIST
execute stmt_sp;
--echo # XXX: bug
--error ER_SP_DOES_NOT_EXIST
--error ER_SP_DOES_NOT_EXIST
execute stmt_sf;
--echo # XXX: bug
--error ER_SP_DOES_NOT_EXIST
--error ER_SP_DOES_NOT_EXIST
execute stmt_sp;
call p_verify_reprepare_count(0);
......@@ -1351,7 +1351,7 @@ deallocate prepare stmt_sp;
--echo =====================================================================
--echo Ensure that metadata validation is performed for every type of
--echo Ensure that metadata validation is performed for every type of
--echo SQL statement where it is needed.
--echo =====================================================================
--disable_warnings
......@@ -1421,7 +1421,7 @@ deallocate prepare stmt;
--echo # CREATE TEMPORARY TABLE. This is a shortcoming of the current code,
--echo # but since validation is not strictly necessary, nothing is done
--echo # about it.
--echo # Will be fixed as part of work on Bug#21431 "Incomplete support of
--echo # Will be fixed as part of work on Bug#21431 "Incomplete support of
--echo # temporary tables"
create table t1 (a int);
insert into t1 (a) values (1);
......@@ -1697,12 +1697,12 @@ drop table t1;
deallocate prepare stmt;
--echo #
--echo # SQLCOM_SHOW_ENGINE_STATUS, SQLCOM_SHOW_ENGINE_LOGS,
--echo # SQLCOM_SHOW_ENGINE_STATUS, SQLCOM_SHOW_ENGINE_LOGS,
--echo # SQLCOM_SHOW_ENGINE_MUTEX, SQLCOM_SHOW_PROCESSLIST
--echo #
--echo # Currently can not have a where clause, need to be covered
--echo # with tests
--echo # with tests
--disable_warnings
drop table if exists t1;
......@@ -1932,7 +1932,7 @@ prepare stmt from "alter view v1 as select 2";
drop view v1;
--echo # Cleanup
--echo #
--echo #
--disable_warnings
drop temporary table if exists t1, t2, t3;
drop table if exists t1, t2, t3, v1, v2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment