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 c623e54fb8 Fixed bug#16861: User defined variable can have a wrong value if a tmp table was
used.

Sorting by RAND() uses a temporary table in order to get a correct results.
User defined variable was set during filling the temporary table and later
on it is substituted for its value from the temporary table. Due to this
it contains the last value stored in the temporary table.

Now if the result_field is set for the Item_func_set_user_var object it 
updates variable from the result_field value when being sent to a client.

The Item_func_set_user_var::check() now accepts a use_result_field
parameter. Depending on its value the result_field or the args[0] is used
to get current value.


mysql-test/r/user_var.result:
  Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
mysql-test/t/user_var.test:
  Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
sql/item_func.cc:
  Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
  Now if the result_field is set for the Item_func_set_user_var object it 
  updates variable from the result_field value when being sent to a client.
  
  The Item_func_set_user_var::check() now accepts a use_result_field
  parameter. Depending on its value the result_field or the args[0] is used
  to get current value.
sql/item_func.h:
  Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
  Added a new SUSERVAR_FUNC function type.
  Updated the Item_func_set_user_var::check() function declaration.
  Added the Item_func_set_user_var::send() member function.
sql/set_var.cc:
  Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
  Modified to use updated Item_func_set_user_var::check() function.
sql/sql_class.cc:
  Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
  Modified to use updated Item_func_set_user_var::check() function.
sql/sql_select.cc:
  Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
  Now an Item_func_set_user_var object isn't substituted for an Item_field object after filling a temporary table.
2006-08-22 17:37:41 +04:00
bdb
BitKeeper Bug #21396: Wrong error number generated for a missing table 2006-08-02 10:00:28 +02:00
BUILD Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-new 2006-06-17 15:42:24 +02:00
client Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1 2006-08-09 22:23:41 -04:00
cmd-line-utils
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
mysql-test Fixed bug#16861: User defined variable can have a wrong value if a tmp table was 2006-08-22 17:37:41 +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#16861: User defined variable can have a wrong value if a tmp table was 2006-08-22 17:37:41 +04:00
sql-bench
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
.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
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.
- 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.