~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/t/trigger_notembedded.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
932
932
DROP USER 'no_rights'@'localhost';
933
933
DROP DATABASE db1;
934
934
 
 
935
#
 
936
# Bug#55421 Protocol::end_statement(): Assertion `0' on multi-table UPDATE IGNORE
 
937
# To reproduce a crash we need to provoke a trigger execution with
 
938
# the following conditions:
 
939
#   - active SELECT statement during trigger execution
 
940
#    (i.e. LEX::current_select != NULL);
 
941
#   - IGNORE option (i.e. LEX::current_select->no_error == TRUE);
 
942
--disable_warnings
 
943
DROP DATABASE IF EXISTS mysqltest_db1;
 
944
--enable_warnings
 
945
 
 
946
CREATE DATABASE mysqltest_db1;
 
947
USE mysqltest_db1;
 
948
 
 
949
GRANT ALL ON mysqltest_db1.* TO mysqltest_u1@localhost;
 
950
 
 
951
--connect(con1,localhost,mysqltest_u1,,mysqltest_db1)
 
952
 
 
953
CREATE TABLE t1 (
 
954
  a1 int,
 
955
  a2 int
 
956
);
 
957
INSERT INTO t1 VALUES (1, 20);
 
958
 
 
959
CREATE TRIGGER mysqltest_db1.upd_t1
 
960
BEFORE UPDATE ON t1 FOR EACH ROW SET new.a2 = 200;
 
961
 
 
962
CREATE TABLE t2 (
 
963
  a1 int
 
964
);
 
965
 
 
966
INSERT INTO t2 VALUES (2);
 
967
 
 
968
--connection default
 
969
 
 
970
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
 
971
 
 
972
--error ER_TABLEACCESS_DENIED_ERROR
 
973
UPDATE IGNORE t1, t2 SET t1.a1 = 2, t2.a1 = 3 WHERE t1.a1 = 1 AND t2.a1 = 2;
 
974
# Cleanup
 
975
 
 
976
DROP DATABASE mysqltest_db1;
 
977
DROP USER mysqltest_u1@localhost;
 
978
 
 
979
--disconnect con1
 
980
--connection default
 
981
USE test;
 
982
 
935
983
--echo End of 5.1 tests.