List:Bugs« Previous MessageNext Message »
From:tomo Date:February 20 2000 11:26am
Subject:large hexdecimal constant dosen't work on WHERE
View as plain text  
>Description:
large hexdecimal constant dosen't work on WHERE

>How-To-Repeat:

mysql> create table SAMPLE (
    ->  ID int(8) unsigned zerofill not null auto_increment,
    -> UNIQ bigint(21) unsigned zerofill not null,
    -> primary key (ID),
    -> unique (UNIQ) );
Query OK, 0 rows affected (0.12 sec)

mysql> insert into SAMPLE set UNIQ=0x38afba1d73e6a18a;
Query OK, 1 row affected (0.07 sec)

mysql> insert into SAMPLE set UNIQ=123;
Query OK, 1 row affected (0.08 sec)

mysql> select * from SAMPLE ;
+----------+-----------------------+
| ID       | UNIQ                  |
+----------+-----------------------+
| 00000001 | 004084688022709641610 |
| 00000002 | 000000000000000000123 |
+----------+-----------------------+
2 rows in set (0.12 sec)

mysql> select * from SAMPLE where UNIQ=004084688022709641610;
+----------+-----------------------+
| ID       | UNIQ                  |
+----------+-----------------------+
| 00000001 | 004084688022709641610 |
+----------+-----------------------+
1 row in set (0.12 sec)

mysql> select ID,hex(UNIQ) from SAMPLE ;
+----------+------------------+
| ID       | hex(UNIQ)        |
+----------+------------------+
| 00000001 | 38AFBA1D73E6A18A |
| 00000002 | 7B               |
+----------+------------------+
2 rows in set (0.12 sec)

mysql> explain select * from SAMPLE where UNIQ=0x38afba1d73e6a18a;
+-----------------------------------------------------+
| Comment                                             |
+-----------------------------------------------------+
| Impossible WHERE noticed after reading const tables |
+-----------------------------------------------------+
1 row in set (0.06 sec)

mysql> select * from SAMPLE where UNIQ=0x38afba1d73e6a18a;
Empty set (0.21 sec)

>Fix:


>Submitter-Id:  <submitter ID>
>Originator:    Tomoyuki Kano
>Organization:

>MySQL support: none
>Synopsis:	
>Severity:	serious
>Priority:	high
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.23.11-alpha (Source distribution)

>Environment:
System: FreeBSD ngo120.mill.to 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Fri Nov 19 07:56:02 GMT
1999     root@stripped:/usr/src/sys/compile/NGO120  i386


Some paths:  /usr/local/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: gcc version 2.7.2.1
Compilation info: CC='gcc'  CFLAGS='-O2'  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-r--r--r--  1 root  wheel  1043748 May 18  1999 /usr/lib/libc.a
lrwxrwxrwx  1 root  wheel  9 Nov  2 15:56 /usr/lib/libc.so -> libc.so.3
-r--r--r--  1 root  wheel  514015 May 18  1999 /usr/lib/libc.so.3
Configure command: ./configure  --localstatedir=/mysql/var --with-named-thread-libs=-lc_r
--with-thread-safe-client '--with-named-curses-libs=-lncurses -ltermcap' --enable-strcoll
--enable-assembler --enable-large-files --with-mysqld-user=mysql --without-debug
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --without-bench
--with-charset=ujis
Perl: This is perl, version 5.005_03 built for i386-freebsd
EUC version
Thread
large hexdecimal constant dosen't work on WHEREtomo20 Feb