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 1d48aec228 A fix and test case for Bug#5987 "subselect in bool function
crashes server (prepared statements)": the bug was that all boolean
items always recovered its original arguments at statement cleanup 
stage.
This collided with Item_subselect::select_transformer, which tries to 
permanently change the item tree to use a transformed subselect instead of
original one.
So we had this call sequence for prepare:
mysql_stmt_prepare -> JOIN::prepare -> 
Item_subselect::fix_fields -> the item tree gets transformed ->
Item_bool_rowready_func2::cleanup, item tree is recovered to original
state, while it shouldn't have been;
mysql_stmt_execute -> attempts to execute a broken tree -> crash.
Now instead of bluntly recovering all arguments of bool functions in 
Item_bool_rowready_func2::cleanup, we recover only those
which were changed, and do it in one place.
There still would exist a possibility for a collision with subselect
tranformation, if permanent and temporary changes were performed at the 
same stage.
But fortunately subselect transformation is always done first, so it 
doesn't conflict with the optimization done by propogate_cond_constants.
Now we have: 
mysql_stmt_prepare -> JOIN::prepare -> subselect transformation 
permanently changes the tree -> cleanup doesn't recover anything, 
because nothing was registered for recovery.
mysql_stmt_execute -> JOIN::prepare (the tree is already transformed, 
so it doesn't change), JOIN::optimize -> 
propogate_cond_constants -> temporary changes the item tree 
with constants -> JOIN::execute -> cleanup -> 
the changes done by propogate_cond_constants are recovered, as
they were registered for recovery.


mysql-test/r/ps.result:
  Bug#5987: test results fixed.
mysql-test/t/ps.test:
  A test for bug#5987 "subselect in bool function crashes server 
  (prepared statements)"
sql/item.cc:
  resolve_const_item is now responsible to register all changes of the 
  item tree for recovery
sql/item.h:
  resolve_const_item signagture changed
sql/item_cmpfunc.h:
  Arguments of boolean functions are now recovered using the 
  centralized registry of THD.
sql/sql_class.cc:
  It's crucial to add new items to the beginning of the recovery list,
  so that the recovery is performed in LIFO mode: otherwise if we 
  change one node of a tree twice, it will be recovered to some intermediate
  state.
sql/sql_select.cc:
  change_cond_ref_to_const and propogate_cond_constants are now responsible
  to register all changes of the item tree for recovery.
  The recovery is done using the centralized THD registry of
  changed tree items.
2004-10-10 02:39:22 +04:00
bdb bdb bugfix: LTLIBOBJS didn't take --disable-shared into account 2004-08-23 13:55:40 +02:00
BitKeeper Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1 2004-10-07 22:09:14 +03:00
BUILD Merge 2004-08-05 22:32:25 +02:00
Build-tools Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
client Added option --sigint-ignore to mysql.cc 2004-10-07 22:47:11 +03:00
cmd-line-utils fixed Bug #5589 "libedit compile failure in term.c" 2004-09-15 21:50:32 +05:00
dbug Made my_snprintf() behavior snprintf() compatible when printing %x arguments (it should 2004-05-27 17:54:40 +04:00
Docs - removed the Docs/Flags and Docs/RawFlags directories 2004-10-07 18:30:56 +02:00
extra Merge with 4.0 2004-09-01 04:12:09 +03:00
heap Portability fixes 2004-08-26 18:26:38 +03:00
include After merge fixes 2004-10-07 10:50:13 +03:00
innobase row0sel.c, row0row.c: 2004-10-08 15:25:59 +03:00
isam Merge with 4.0 2004-09-01 04:12:09 +03:00
libmysql Activating the new string->number conversion functions 2004-09-25 17:20:50 +05:00
libmysql_r manually merged 2004-08-18 19:57:55 +02:00
libmysqld Fix asked by Ranger. 2004-09-25 21:56:52 +05:00
man - added mysqlman.1.in to the source distribution (generic fallback 2004-07-20 18:24:36 +02:00
merge Fix skipp -> skip once and for all. 2004-06-03 11:52:54 -05:00
myisam Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1 2004-10-07 12:51:32 +03:00
myisammrg Review of new pushed code (Indentation fixes and simple optimizations) 2004-08-31 14:35:04 +03:00
mysql-test A fix and test case for Bug#5987 "subselect in bool function 2004-10-10 02:39:22 +04:00
mysys Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
ndb forgot to remove ndbrequire 2004-10-06 13:26:38 +00:00
netware Applied a few Netware patches. 2004-09-16 16:24:44 +03:00
NEW-RPMS Import changeset 2000-07-31 21:29:14 +02:00
os2 - Updated OS/2 port with files provided by Yuri Dario <mc6530@mclink.it> 2002-07-15 18:26:11 +02:00
pstack fixed bug #1661 Compiling --pstack fails with binutils 2.13.90 2004-02-16 18:09:23 +04:00
regex - compile fix for regex/regcomp.c spotted on Mac OS X 2004-06-15 12:58:58 +02:00
scripts Fixed a bug in --log option. 2004-10-07 23:51:47 +03:00
sql A fix and test case for Bug#5987 "subselect in bool function 2004-10-10 02:39:22 +04:00
sql-bench Updated server-cfg, remove limitation for blobs + NDB 2004-08-16 13:06:32 +02:00
sql-common A fix and test case for Bug#5315 "mysql_change_user() doesn't free 2004-09-22 15:50:07 +04:00
SSL Added missing SSL library (Should be in source distribution) 2003-11-28 12:18:13 +02:00
strings Activating the new string->number conversion functions 2004-09-25 17:20:50 +05:00
support-files - typo fix - make sure to include an existing file in the source 2004-08-26 19:46:11 +02:00
tests Makefile.am, client_test.test, mysql-test-run.sh: 2004-10-08 01:39:20 +02:00
tools Merge with 4.0 2004-09-01 04:12:09 +03:00
VC++Files Adding the file needed for windows build (on behalf of Reggie) 2004-08-27 03:27:16 +04:00
vio Don't close already closed files in vio (not critical) 2004-07-12 07:38:46 +03:00
zlib WL#1518 "make bundled zlib usable for unix builds", post review fixes: 2004-07-27 10:05:55 -07:00
.bzrignore Merge bk-internal.mysql.com:/home/bk/mysql-4.1/ 2004-08-24 22:02:08 +02:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
acinclude.m4 Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
config.guess - updated config.guess, config.sub and ltmain.sh with versions from libtool 2004-02-06 00:58:15 +01:00
config.sub - updated config.guess, config.sub and ltmain.sh with versions from libtool 2004-02-06 00:58:15 +01:00
configure.in Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
depcomp - Applied required modifications for automake 1.5 2002-10-01 21:57:10 +02:00
install-sh install-sh: copy not move like any reasonably modern install does 2004-07-30 18:53:54 +02:00
ltconfig libtool tweaks 2004-02-17 21:46:40 +01:00
ltmain.sh Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
Makefile.am Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
missing - Applied required modifications for automake 1.5 2002-10-01 21:57:10 +02:00
mkinstalldirs Import changeset 2000-07-31 21:29:14 +02:00
README Removed URL (website is not actively maintained anymore) 2002-04-24 08:28:50 +02:00

This is a release of MySQL, a GPL (free) SQL database server (more
licence information in the PUBLIC file and in the reference manual).

Please read the "Upgrading from..." section in the manual first, if you are
migrating from older versions of MySQL!

The latest information about MySQL can be found at:
http://www.mysql.com

To see what it can do take a look at the features section in the
manual.

For installation instructions see the Installation chapter in the
manual.

For future plans see the TODO appendix in the manual.

New features/bug fixes history is in the news appendix in the manual.

For the currently known bugs/misfeatures (known errors) see the bugs
appendix in the manual.

For examples of SQL and benchmarking information see the bench
directory.

The manual mentioned above can be found in the Docs directory. The
manual is available in the following formats: as plain ASCII text in
Docs/manual.txt, in HTML format in Docs/manual_toc.html, as GNU Info in
Docs/mysql.info and as PostScript in Docs/manual.ps.

MySQL is brought to you by the MySQL team at MySQL AB

For a list of developers and other contributors, see the Credits appendix
in the manual.

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

IMPORTANT:

Send bug (error) reports, questions and comments to the mailing list
at mysql@lists.mysql.com

Please use the 'mysqlbug' script when posting bug reports or questions
about MySQL. mysqlbug will gather some information about your system
and start your editor with a form in which you can describe your
problem. Bug reports might be silently ignored by the MySQL
maintainers if there is not a good reason included in the report as to
why mysqlbug has not been used. A report that says 'MySQL does not
work for me. Why?' is not considered a valid bug report.

The mysqlbug script can be found in the 'scripts' directory of the
distribution, that is '<where-you-installed-mysql>/scripts'.