summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2006-05-01 11:22:47 -0700
committerunknown <jimw@mysql.com>2006-05-01 11:22:47 -0700
commitae75af8cb75ccd088121e1fe3b01a0090a11808b (patch)
treef9dd19567eff08869eae289644f874649a8b75e7 /client
parent8c9f60a7ba22c6443071b21535cc47b674f7b50f (diff)
parent8057e30909d8433ca102bd31d3ba855cc3441043 (diff)
downloadmariadb-git-ae75af8cb75ccd088121e1fe3b01a0090a11808b.tar.gz
Merge mysql.com:/home/jimw/my/mysql-5.1-18495
into mysql.com:/home/jimw/my/mysql-5.1-clean
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index cfd69e45ba7..b630de8be4e 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -1956,7 +1956,13 @@ static uint get_errcodes(match_err *to,struct st_query *q)
;
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;