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 bcba75df42 Bug #25543 Replication of wrong values if using rand() in stored procedure
When rand() is called multiple times inside a stored procedure, the server does 
not binlog the correct random seed values.

This patch corrects the problem by resetting rand_used= 0 in 
THD::cleanup_after_query() allowing the system to save the random seeds if needed
for each command in a stored procedure body.

However, rand_used is not reset if executing in a stored function or trigger 
because these operations are binlogged by call and thus only the calling statement
need detect the call to rand() made by its substatements. These substatements must 
not set rand_used to 0 because it would remove the detection of rand() by the 
calling statement.


mysql-test/r/rpl_misc_functions.result:
  Bug #25543 Replication of wrong values if using rand() in stored procedure
  
  The result file was modified to include the correct processing of the new
  additions to the test. The results from execution are written to files on 
  both the master and the slave. The files are compared to ensure the values 
  from rand() generated on the master are correctly generated on the slave.
mysql-test/t/rpl_misc_functions.test:
  Bug #25543 Replication of wrong values if using rand() in stored procedure
  
  The test was modified to include a test of a stored procedure that calls
  the rand() function multiple times. 
  
  The results from execution are written to files on both the master and the
  slave. The files are compared to ensure the values from rand() generated
  on the master are correctly generated on the slave.
sql/sql_class.cc:
  Bug #25543 Replication of wrong values if using rand() in stored procedure
  
  The code was modified to reset rand_used so that detection of calls to rand() 
  will save random seeds if needed by the slave.
2007-03-09 12:18:28 -05:00
bdb
BitKeeper Bug#25807: LOAD DATA INFILE does not work with Pipes 2007-02-13 16:35:29 -05:00
BUILD Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
client Portability fix 2007-02-22 20:20:49 +02:00
cmd-line-utils Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
config/ac-macros Fixed the make distcheck problem. We only really need to create libndb.ver if we are building Ndb. 2007-01-19 16:54:01 -08:00
dbug Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
Docs
extra Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
heap Fixed compiler warnings 2007-01-22 15:52:15 +02:00
include Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
innobase Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
libmysql Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
libmysql_r
libmysqld Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
man
myisam Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
myisammrg
mysql-test Bug #25543 Replication of wrong values if using rand() in stored procedure 2007-03-09 12:18:28 -05:00
mysys Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
ndb Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-22 20:32:19 +02:00
netware
os2
pstack
regex
scripts Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0 2007-02-13 10:00:53 +01:00
server-tools Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
sql Bug #25543 Replication of wrong values if using rand() in stored procedure 2007-03-09 12:18:28 -05:00
sql-bench
sql-common Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
SSL
strings Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
support-files Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-22 20:32:19 +02:00
tests Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
tools Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
VC++Files gen_lex_hash.cc: 2007-01-31 00:06:42 +01:00
vio Merge 192.168.0.5:mysql/bug25203/my50-bug25203 2007-02-06 21:55:39 +01:00
win Merge mjorgensen@bk-internal.mysql.com:/home/bk/mysql-5.0-sage 2007-01-11 09:19:32 +01:00
zlib
.bzrignore Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0 2007-02-13 10:00:53 +01:00
.cvsignore
CMakeLists.txt
configure.in Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
configure.in.rej Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2007-01-22 03:33:59 +02:00
COPYING
Makefile.am Bug#25844: "make test" does not find mysql-test-run.pl 2007-02-01 15:59:51 +01:00
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.