summaryrefslogtreecommitdiff
path: root/server-tools
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-07-22 18:26:16 -0700
committerunknown <igor@olga.mysql.com>2007-07-22 18:26:16 -0700
commitd50caace5fa82b2281f5118c49f6754609d51ba9 (patch)
tree8638b7ea7fd40550d394c0c24efe37926c8b09be /server-tools
parent240bb90ef1ed1bcde9a3420fe790a17bd4d45ee7 (diff)
downloadmariadb-git-d50caace5fa82b2281f5118c49f6754609d51ba9.tar.gz
Fixed bug #29611.
If a primary key is defined over column c of enum type then the EXPLAIN command for a look-up query of the form SELECT * FROM t WHERE c=0 said that the query was with an impossible where condition though the query correctly returned non-empty result set when the table indeed contained rows with error empty strings for column c. This kind of misbehavior was due to a bug in the function Field_enum::store(longlong,bool) that erroneously returned 1 if the the value to be stored was equal to 0. Note that the method Field_enum::store(const char *from,uint length,CHARSET_INFO *cs) correctly returned 0 if a value of the error empty string was stored. mysql-test/r/type_enum.result: Added a test case for bug #29661. mysql-test/t/type_enum.test: Added a test case for bug #29661. sql/field.cc: Fixed bug #29611. If a primary key was defined over column c of enum type then the EXPLAIN command for a look-up query of the form SELECT * FROM t WHERE c=0 said that the query was with an impossible where condition though the query correctly returned non-empty result set when the table indeed contained rows with error empty strings for column c. This kind of misbehavior was due to a bug in the function Field_enum::store(longlong,bool) that erroneously returned 1 if the the value to be stored was equal to 0. Note that the method Field_enum::store(const char *from,uint length,CHARSET_INFO *cs) correctly returned 0 if a value of the error empty string was stored.
Diffstat (limited to 'server-tools')
0 files changed, 0 insertions, 0 deletions