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
Georgi Kodinov 6d54b0443a Bug #32124: crash if prepared statements refer to variables in the where clause
The code to get read the value of a system variable was extracting its value 
on PREPARE stage and was substituting the value (as a constant) into the parse tree.
Note that this must be a reversible transformation, i.e. it must be reversed before
each re-execution.
Unfortunately this cannot be reliably done using the current code, because there are
other non-reversible source tree transformations that can interfere with this
reversible transformation.
Fixed by not resolving the value at PREPARE, but at EXECUTE (as the rest of the 
functions operate). Added a cache of the value (so that it's constant throughout
the execution of the query). Note that the cache also caches NULL values.
Updated an obsolete related test suite (variables-big) and the code to test the 
result type of system variables (as per bug 74).

mysql-test/extra/rpl_tests/rpl_insert_id.test:
  Bug #32124: removed ambiguous testcase
mysql-test/r/innodb_data_home_dir_basic.result:
  Bug #32124: fixed wrong test case
mysql-test/r/innodb_flush_method_basic.result:
  Bug #32124: fixed wrong test case
mysql-test/r/ps_11bugs.result:
  Bug #32124: test case
mysql-test/r/ssl_capath_basic.result:
  Bug #32124: fixed wrong test case
mysql-test/r/ssl_cipher_basic.result:
  Bug #32124: fixed wrong test case
mysql-test/r/variables.result:
  Bug #32124: system vars are shown as such in EXPLAIN EXTENDED, not as constants.
mysql-test/suite/rpl/r/rpl_insert_id.result:
  Bug #32124: removed ambiguous testcase
mysql-test/t/ps_11bugs.test:
  Bug #32124: test case
sql/item.cc:
  Bug #32124: placed the code to convert string to longlong or double 
  to a function (so that it can be reused)
sql/item.h:
  Bug #32124: placed the code to convert string to longlong or double 
  to a function (so that it can be reused)
sql/item_func.cc:
  Bug #32124: moved the evaluation of system variables at runtime (val_xxx).
sql/item_func.h:
  Bug #32124: moved the evaluation of system variables at runtime (val_xxx).
sql/set_var.cc:
  Bug #32124: removed the code that calculated the system variable's value 
  at PREPARE
sql/set_var.h:
  Bug #32124: removed the code that calculated the system variable's value 
  at PREPARE
tests/mysql_client_test.c:
  Bug #32124 : removed the reading of the system variable, because its max
  length is depended on the system charset and client charset and can't be
  easily calculated.
2008-10-08 14:23:53 +03:00
.bzr-mysql Restore team tree name. 2008-09-20 03:56:33 -03:00
BitKeeper
BUILD Bug#38727: BUILD/compile-solaris-* scripts should compile MySQL with libmtmalloc 2008-09-30 17:57:48 -03:00
client Bug#31434 mysqldump dumps view as table 2008-09-11 08:14:19 +02:00
cmd-line-utils
config/ac-macros
dbug
Docs
extra Auto merge 5.1-build -> 5.1-bugteam 2008-09-10 19:35:11 -06:00
include merge 2008-10-01 12:27:57 +02:00
libmysql Bug#37226 Explicit call of my_thread_init() on Windows for every new thread. 2008-09-01 17:46:37 -04:00
libmysql_r
libmysqld
man Bug#37098 Get rid of "Installed (but unpackaged)" files in the RPM build 2008-08-27 16:03:39 +02:00
mysql-test Bug #32124: crash if prepared statements refer to variables in the where clause 2008-10-08 14:23:53 +03:00
mysys Bug#37958 - test main.plugin crash on Mac OS X when selecting from EXAMPLE engine. 2008-10-01 12:21:15 +02:00
netware
plugin
pstack
regex
scripts Merge fix for Bug#35754. 2008-10-03 11:54:22 -04:00
server-tools merge 2008-09-01 11:48:21 +02:00
sql Bug #32124: crash if prepared statements refer to variables in the where clause 2008-10-08 14:23:53 +03:00
sql-bench
sql-common
storage Merge 2008-08-26 18:53:22 +05:00
strings
support-files Removed option to control if federated is enabled, and enabled it. 2008-08-29 17:31:31 +02:00
tests Bug #32124: crash if prepared statements refer to variables in the where clause 2008-10-08 14:23:53 +03:00
unittest
vio
win Auto merge 5.1-build -> 5.1-bugteam 2008-09-10 19:35:11 -06:00
zlib Auto merge 5.1-build -> 5.1-bugteam 2008-09-10 19:35:11 -06:00
.bzrignore Bug#31455 mysqlbinlog don't print user readable info about RBR events 2008-08-20 19:06:31 +05:00
.cvsignore
CMakeLists.txt merge 2008-09-01 11:48:21 +02:00
configure.in Merge fix of autoconf substitution of string containing single quotes. 2008-10-06 11:49:53 -04:00
COPYING
EXCEPTIONS-CLIENT
INSTALL-SOURCE
INSTALL-WIN-SOURCE
Makefile.am merging mysql-5.1->mysql-5.1-sea 2008-09-04 17:23:16 +05:30
README

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 and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql 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 Installing and Upgrading chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors 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.