Below is the list of changes that have just been committed into a local
4.1 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2312 05/06/04 14:18:08 konstantin@stripped +3 -0
Fix show warnings limit 0 and show warnings limit 0, 0.
Add test coverage for SHOW WARNINGS LIMIT a, b;
sql/sql_error.cc
1.23 05/06/04 14:18:04 konstantin@stripped +2 -2
Fix show warnings limit 0 and show warnings limit 0, 0
mysql-test/t/warnings.test
1.20 05/06/04 14:18:04 konstantin@stripped +15 -0
Add test coverage for SHOW WARNINGS LIMIT a,b
mysql-test/r/warnings.result
1.30 05/06/04 14:18:04 konstantin@stripped +45 -0
Add test coverage for SHOW WARNINGS LIMIT a,b
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: konstantin
# Host: dragonfly.local
# Root: /opt/local/work/mysql-4.1-root
--- 1.19/mysql-test/t/warnings.test 2005-03-21 13:07:28 +03:00
+++ 1.20/mysql-test/t/warnings.test 2005-06-04 14:18:04 +04:00
@@ -133,3 +133,18 @@
# 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;
+drop table t1;
--- 1.29/mysql-test/r/warnings.result 2005-03-21 13:07:28 +03:00
+++ 1.30/mysql-test/r/warnings.result 2005-06-04 14:18:04 +04:00
@@ -179,3 +179,48 @@
set table_type=MYISAM;
Warnings:
Warning 1287 'table_type' is deprecated; use 'storage_engine' instead
+create table t1 (a int);
+insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+update t1 set a='abc';
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 2
+Warning 1265 Data truncated for column 'a' at row 3
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 5
+Warning 1265 Data truncated for column 'a' at row 6
+Warning 1265 Data truncated for column 'a' at row 7
+Warning 1265 Data truncated for column 'a' at row 8
+Warning 1265 Data truncated for column 'a' at row 9
+Warning 1265 Data truncated for column 'a' at row 10
+show warnings limit 2, 1;
+Level Code Message
+Warning 1265 Data truncated for column 'a' at row 3
+show warnings limit 0, 10;
+Level Code Message
+Warning 1265 Data truncated for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 2
+Warning 1265 Data truncated for column 'a' at row 3
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 5
+Warning 1265 Data truncated for column 'a' at row 6
+Warning 1265 Data truncated for column 'a' at row 7
+Warning 1265 Data truncated for column 'a' at row 8
+Warning 1265 Data truncated for column 'a' at row 9
+Warning 1265 Data truncated for column 'a' at row 10
+show warnings limit 9, 1;
+Level Code Message
+Warning 1265 Data truncated for column 'a' at row 10
+show warnings limit 10, 1;
+Level Code Message
+show warnings limit 9, 2;
+Level Code Message
+Warning 1265 Data truncated for column 'a' at row 10
+show warnings limit 0, 0;
+Level Code Message
+show warnings limit 1;
+Level Code Message
+Warning 1265 Data truncated for column 'a' at row 1
+show warnings limit 0;
+Level Code Message
+drop table t1;
--- 1.22/sql/sql_error.cc 2005-02-22 14:40:27 +03:00
+++ 1.23/sql/sql_error.cc 2005-06-04 14:18:04 +04:00
@@ -203,6 +203,8 @@
offset--;
continue;
}
+ if (limit-- == 0)
+ break;
protocol->prepare_for_resend();
protocol->store(warning_level_names[err->level],
warning_level_length[err->level], system_charset_info);
@@ -210,8 +212,6 @@
protocol->store(err->msg, strlen(err->msg), system_charset_info);
if (protocol->write())
DBUG_RETURN(1);
- if (!--limit)
- break;
}
send_eof(thd);
DBUG_RETURN(0);
| Thread |
|---|
| • bk commit into 4.1 tree (konstantin:1.2312) | konstantin | 4 Jun |