← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2711: Added tests to cover more server code

 

------------------------------------------------------------
revno: 2711
committer: Michael Widenius <monty@xxxxxxxxxxxx>
branch nick: mysql-maria
timestamp: Sun 2009-06-07 13:05:19 +0300
message:
  Added tests to cover more server code
  Author: Stewart Smith
modified:
  mysql-test/r/alter_table.result
  mysql-test/r/limit.result
  mysql-test/t/alter_table.test
  mysql-test/t/limit.test

=== modified file 'mysql-test/r/alter_table.result'
--- mysql-test/r/alter_table.result	2009-02-19 09:01:25 +0000
+++ mysql-test/r/alter_table.result	2009-06-07 10:05:19 +0000
@@ -1268,4 +1268,21 @@
 4	b
 5	a
 DROP TABLE t1;
+SET @save_sql_mode=@@sql_mode;
+SET sql_mode=strict_all_tables;
+CREATE TABLE t1 (a int NOT NULL default 42);
+INSERT INTO t1 values ();
+SELECT * FROM t1;
+a
+42
+ALTER TABLE t1 ALTER COLUMN a DROP DEFAULT;
+INSERT INTO t1 values ();
+ERROR HY000: Field 'a' doesn't have a default value
+INSERT INTO t1 (a) VALUES (11);
+SELECT * FROM t1 ORDER BY a;
+a
+11
+42
+DROP TABLE t1;
+SET @@sql_mode=@save_sql_mode;
 End of 5.1 tests

=== modified file 'mysql-test/r/limit.result'
--- mysql-test/r/limit.result	2008-10-15 21:34:51 +0000
+++ mysql-test/r/limit.result	2009-06-07 10:05:19 +0000
@@ -113,4 +113,36 @@
 End of 5.0 tests
 select 1 as a limit 4294967296,10;
 a
+CREATE TABLE t1 (a int PRIMARY KEY auto_increment);
+INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
+INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
+SELECT a FROM t1 ORDER BY a LIMIT 10 OFFSET 1;
+a
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+SELECT a FROM t1 ORDER BY a LIMIT 10 OFFSET 10;
+a
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+SELECT a FROM t1 ORDER BY a LIMIT 2 OFFSET 14;
+a
+15
+16
+DROP TABLE t1;
 End of 5.1 tests

=== modified file 'mysql-test/t/alter_table.test'
--- mysql-test/t/alter_table.test	2009-02-19 09:01:25 +0000
+++ mysql-test/t/alter_table.test	2009-06-07 10:05:19 +0000
@@ -1000,4 +1000,22 @@
 SELECT * FROM t1;
 DROP TABLE t1;
 
+#
+# Test for ALTER column DROP DEFAULT
+#
+
+SET @save_sql_mode=@@sql_mode;
+SET sql_mode=strict_all_tables;
+
+CREATE TABLE t1 (a int NOT NULL default 42);
+INSERT INTO t1 values ();
+SELECT * FROM t1;
+ALTER TABLE t1 ALTER COLUMN a DROP DEFAULT;
+--error 1364
+INSERT INTO t1 values ();
+INSERT INTO t1 (a) VALUES (11);
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+SET @@sql_mode=@save_sql_mode;
+
 --echo End of 5.1 tests

=== modified file 'mysql-test/t/limit.test'
--- mysql-test/t/limit.test	2008-10-16 01:50:56 +0000
+++ mysql-test/t/limit.test	2009-06-07 10:05:19 +0000
@@ -102,4 +102,16 @@
 
 select 1 as a limit 4294967296,10;
 
+#
+# Test for LIMIT X OFFSET Y
+#
+
+CREATE TABLE t1 (a int PRIMARY KEY auto_increment);
+INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
+INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
+SELECT a FROM t1 ORDER BY a LIMIT 10 OFFSET 1;
+SELECT a FROM t1 ORDER BY a LIMIT 10 OFFSET 10;
+SELECT a FROM t1 ORDER BY a LIMIT 2 OFFSET 14;
+DROP TABLE t1;
+
 --echo End of 5.1 tests



--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.