Commit 1c10a014 authored by unknown's avatar unknown

Fix for bug#2972 Problem the the CONV() function

parent eb1f6c53
......@@ -624,6 +624,9 @@ Note 1003 select high_priority md5(_latin1'hello') AS `md5('hello')`,sha(_latin1
SELECT lpad(12345, 5, "#");
lpad(12345, 5, "#")
12345
SELECT conv(71, 10, 36), conv('1Z', 36, 10);
conv(71, 10, 36) conv('1Z', 36, 10)
1Z 71
create table t1 (id int(1), str varchar(10)) DEFAULT CHARSET=utf8;
insert into t1 values (1,'aaaaaaaaaa'), (2,'bbbbbbbbbb');
create table t2 (id int(1), str varchar(10)) DEFAULT CHARSET=utf8;
......
......@@ -361,6 +361,13 @@ explain extended select md5('hello'), sha('abc'), sha1('abc'), soundex(''), 'moo
SELECT lpad(12345, 5, "#");
#
# Bug #2972
#
SELECT conv(71, 10, 36), conv('1Z', 36, 10);
#
# Bug #3089
......
......@@ -262,9 +262,9 @@ long my_strntol_8bit(CHARSET_INFO *cs,
{
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='F')
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='f')
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
......@@ -384,9 +384,9 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
{
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='F')
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='f')
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
......@@ -499,9 +499,9 @@ longlong my_strntoll_8bit(CHARSET_INFO *cs __attribute__((unused)),
{
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='F')
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='f')
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
......@@ -622,9 +622,9 @@ ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
{
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='F')
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='f')
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment