List:Commits« Previous MessageNext Message »
From:Marc Alff Date:August 26 2008 10:56pm
Subject:bzr commit into mysql-6.0 branch (marc.alff:2804) Bug#11714 Bug#38696
View as plain text  
#At file:///home/malff/BZR-TREE/mysql-6.0-11714/

 2804 Marc Alff	2008-08-26
      Bug#11714 (Non-sensical ALTER TABLE ADD CONSTRAINT allowed)
      Bug#38696 (CREATE TABLE ... CHECK ... allows illegal syntax)
      
      These two bugs have been fixed indirectly by the fix for 35578,
      adding the test cases to the test suite for coverage.
modified:
  mysql-test/r/constraints.result
  mysql-test/t/constraints.test

=== modified file 'mysql-test/r/constraints.result'
--- a/mysql-test/r/constraints.result	2008-08-22 11:16:08 +0000
+++ b/mysql-test/r/constraints.result	2008-08-26 20:56:15 +0000
@@ -34,3 +34,12 @@ create table t_illegal (a int, b int, co
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'a>b)' at line 1
 create table t_illegal (a int, b int, constraint abc);
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near ')' at line 1
+drop table if exists t_11714;
+create table t_11714(a int, b int);
+alter table t_11714 add constraint cons1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '' at line 1
+drop table t_11714;
+CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'something (whatever))' at
line 1
+CREATE TABLE t_illegal (col_1 INT CHECK something);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'something)' at line 1

=== modified file 'mysql-test/t/constraints.test'
--- a/mysql-test/t/constraints.test	2008-08-22 11:16:08 +0000
+++ b/mysql-test/t/constraints.test	2008-08-26 20:56:15 +0000
@@ -47,3 +47,27 @@ create table t_illegal (a int, b int, co
 --error ER_PARSE_ERROR
 create table t_illegal (a int, b int, constraint abc);
 
+#
+# Bug#11714 (Non-sensical ALTER TABLE ADD CONSTRAINT allowed)
+#
+
+--disable_warnings
+drop table if exists t_11714;
+--enable_warnings
+
+create table t_11714(a int, b int);
+
+--error ER_PARSE_ERROR
+alter table t_11714 add constraint cons1;
+
+drop table t_11714;
+
+#
+# Bug#38696 (CREATE TABLE ... CHECK ... allows illegal syntax)
+
+--error ER_PARSE_ERROR
+CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
+
+--error ER_PARSE_ERROR
+CREATE TABLE t_illegal (col_1 INT CHECK something);
+

Thread
bzr commit into mysql-6.0 branch (marc.alff:2804) Bug#11714 Bug#38696Marc Alff26 Aug