Below is the list of changes that have just been committed into a local
5.1 repository of jimw. When jimw 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.2350 06/04/21 19:29:22 jimw@stripped +2 -0
Bug #18495: mysqltest does not use the correct error number
When looking up the error number for named errors in mysqltest .test
files, we inadvertantly would match ER_WRONG_VALUE against
ER_WRONG_VALUE_COUNT because we were using the length of the shorter
string in strncmp(). Now we double-check the length of matches to
make sure it was a complete match.
mysql-test/t/events.test
1.28 06/04/21 19:29:18 jimw@stripped +2 -2
Replace error numbers with error names, with side-effect of testing
Bug #18495.
client/mysqltest.c
1.206 06/04/21 19:29:18 jimw@stripped +7 -1
Check the length of the error name to make sure it wasn't just a
partial match
# 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: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-5.1-18495
--- 1.27/mysql-test/t/events.test 2006-04-07 02:29:08 -07:00
+++ 1.28/mysql-test/t/events.test 2006-04-21 19:29:18 -07:00
@@ -320,9 +320,9 @@
create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
drop event e_26;
---error 1504
+--error ER_WRONG_VALUE
create event e_26 on schedule at NULL disabled do set @a = 5;
---error 1504
+--error ER_WRONG_VALUE
create event e_26 on schedule at 'definitely not a datetime' disabled do set @a = 5;
set names utf8;
--- 1.205/client/mysqltest.c 2006-04-13 01:12:39 -07:00
+++ 1.206/client/mysqltest.c 2006-04-21 19:29:18 -07:00
@@ -1956,7 +1956,13 @@
;
for (; e->name; e++)
{
- if (!strncmp(start, e->name, (int) (p - start)))
+ /*
+ If we get a match, we need to check the length of the name we
+ matched against in case it was longer than what we are checking
+ (as in ER_WRONG_VALUE vs. ER_WRONG_VALUE_COUNT).
+ */
+ if (!strncmp(start, e->name, (int) (p - start)) &&
+ strlen(e->name) == (p - start))
{
to[count].code.errnum= (uint) e->code;
to[count].type= ERR_ERRNO;
| Thread |
|---|
| • bk commit into 5.1 tree (jimw:1.2350) BUG#18495 | Jim Winstead | 22 Apr |