summaryrefslogtreecommitdiff
path: root/mysql-test/t/warnings.test
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-06-04 14:58:32 +0400
committerunknown <konstantin@mysql.com>2005-06-04 14:58:32 +0400
commitd6e0883b070cbb66a3dc94384816835964025aba (patch)
tree91657c41a2b675fcb61fa27bfbfa7e79aa8806f9 /mysql-test/t/warnings.test
parenta681af904d4fc8e02042b93b9035855ea989a155 (diff)
downloadmariadb-git-d6e0883b070cbb66a3dc94384816835964025aba.tar.gz
Fix show warnings limit 0 and show warnings limit 0, 0.
Add test coverage for SHOW WARNINGS LIMIT a, b; mysql-test/r/warnings.result: Add test coverage for SHOW WARNINGS LIMIT a,b mysql-test/t/warnings.test: Add test coverage for SHOW WARNINGS LIMIT a,b sql/sql_error.cc: Fix show warnings limit 0 and show warnings limit 0, 0
Diffstat (limited to 'mysql-test/t/warnings.test')
-rw-r--r--mysql-test/t/warnings.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 2a90f5f637d..6a6d533ad61 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -133,3 +133,25 @@ drop table t1;
# Test for deprecated table_type variable
#
set table_type=MYISAM;
+
+#
+# Tests for show warnings limit a, b
+#
+create table t1 (a int);
+insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+# should generate 10 warnings
+update t1 set a='abc';
+show warnings limit 2, 1;
+show warnings limit 0, 10;
+show warnings limit 9, 1;
+show warnings limit 10, 1;
+show warnings limit 9, 2;
+show warnings limit 0, 0;
+show warnings limit 1;
+show warnings limit 0;
+show warnings limit 1, 0;
+# make sure behaviour is consistent with select ... limit
+select * from t1 limit 0;
+select * from t1 limit 1, 0;
+select * from t1 limit 0, 0;
+drop table t1;