MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
unknown 7a11df8c93 Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
A date can be represented as an int (like 20060101) and as a string (like
"2006.01.01"). When a DATE/TIME field is compared in one SELECT against both
representations the constant propagation mechanism leads to comparison
of DATE as a string and DATE as an int. In this example it compares 2006 and
20060101 integers. Obviously it fails comparison although they represents the
same date.


Now the Item_bool_func2::fix_length_and_dec() function sets the comparison
context for items being compared. I.e. if items compared as strings the
comparison context is STRING.
The constant propagation mechanism now doesn't mix items used in different
comparison contexts. The context check is done in the
Item_field::equal_fields_propagator() and in the change_cond_ref_to_const() 
functions.

Also the better fix for bug 21159 is introduced.


mysql-test/t/type_datetime.test:
  Added a test case for bug#21475: Wrongly applied constant propagation leads to a false comparison.
mysql-test/r/type_datetime.result:
  Added a test case for bug#21475: Wrongly applied constant propagation leads to a false comparison.
sql/sql_select.cc:
  Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
  The constant propagation mechanism now doesn't mix items used in different
  comparison contexts. The check is done in the change_cond_ref_to_const() function.
sql/item_cmpfunc.cc:
  Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
  Now the Item_bool_func2::fix_length_and_dec() function sets the comparison
  context for items being compared.
sql/item.h:
  Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
  To the Item class a new field called cmp_context is added.
  It represents the comparison context of an item.
sql/item.cc:
  Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison.
  The constant propagation mechanism now doesn't mix items used in different
  comparison contexts. The context check is done in the
  Item_field::equal_fields_propagator() function.
2006-08-21 00:23:57 +04:00
bdb BUG#15734: Fix undefined awk behaviour breaking compilation on Debian. 2005-12-14 13:09:37 +01:00
BitKeeper Bug #21396: Wrong error number generated for a missing table 2006-08-02 10:00:28 +02:00
BUILD Fix for check_cpu to work correctly on MacOSX/Intel. 2006-08-10 17:35:21 +03:00
client Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1 2006-08-09 22:23:41 -04:00
cmd-line-utils Merge neptunus.(none):/home/msvensson/mysql/bug16557/my50-bug16557 2006-02-21 08:58:19 +01:00
config/ac-macros Merge xiphis.org:/home/antony/work2/p4-bug12096.2 2006-06-28 09:54:40 -07:00
dbug Bug#19517 No simple way to detect wether server was compiled with libdbug 2006-06-12 13:07:40 +02:00
Docs Merge mysql.com:/home/tomash/src/mysql_ab/tmp_merge 2006-05-06 11:18:42 +04:00
extra Merge 192.168.0.20:mysql/mysql-5.0-maint 2006-08-01 20:39:48 +02:00
heap Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1 2006-08-09 22:23:41 -04:00
include Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-02 14:13:01 +04:00
innobase Applied innodb-5.0-ss677 snapshot. 2006-08-01 21:59:58 +02:00
libmysql Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-02 14:13:01 +04:00
libmysql_r Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
libmysqld Merge mysql.com:/home/hf/work/mysql-4.1.mrg 2006-07-25 13:50:17 +05:00
man Makefile.am, configure.in: 2006-07-28 23:12:40 +02:00
myisam Merge may.pils.ru:/home/svoj/devel/mysql/BUG20060/mysql-4.1 2006-08-09 14:33:45 +05:00
myisammrg BUG#17314: Can't use index_merge/intersection for MERGE tables 2006-02-11 21:51:43 +03:00
mysql-test Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison. 2006-08-21 00:23:57 +04:00
mysys Bug #21396: Wrong error number generated for a missing table 2006-08-02 10:00:28 +02:00
ndb Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0 2006-08-01 20:24:30 +02:00
netware mwldnlm, mwccnlm, mwasmnlm: 2006-07-03 16:44:17 +02:00
os2
pstack
regex Bug#19407 Test 'func_regexp' fails on Windows x64 2006-06-19 22:19:05 -04:00
scripts Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1 2006-08-09 22:23:41 -04:00
server-tools mysqlmanager.vcproj: 2006-07-22 02:00:33 +02:00
sql Fixed bug#21475: Wrongly applied constant propagation leads to a false comparison. 2006-08-21 00:23:57 +04:00
sql-bench Set thread_stack after return from end_thread() 2005-12-03 18:13:06 +02:00
sql-common Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0 2006-08-03 09:32:58 +02:00
SSL Remove client-req-pem and server-req.pem 2006-05-03 11:53:16 +02:00
strings Merge trift2.:/M41/push-1-4.1 2006-07-24 16:04:40 +02:00
support-files Merge moonlight.intranet:/home/tomash/src/mysql_ab/tmp_merge 2006-07-29 13:43:34 +04:00
tests Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-08-02 14:13:01 +04:00
tools Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
VC++Files Add my_memmem.c to mysys.dsp (needed by mysql_client_test) 2006-08-04 01:41:21 +04:00
vio Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
zlib Changes after initial patch to #15787 2006-01-23 21:35:11 +03:00
.bzrignore Fix a bug in the .dsp file. Ignore a symlink. 2006-08-04 00:00:48 +04:00
.cvsignore
configure.in Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug21215 2006-08-03 11:48:08 +02:00
COPYING
Makefile.am Merge 2005-11-04 02:17:11 +01:00
README README: 2006-04-01 04:13:33 +02:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file.
- For commercial distributions, see the MySQLEULA.txt file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter.
- For future plans, see the TODO appendix.
- For the new features/bugfix history, see the News appendix.
- For the currently known bugs/misfeatures (known errors) see the problems
  appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.