Commit graph

55666 commits

Author SHA1 Message Date
Alexey Kopytov
1571f06196 Merge into dev tree. 2009-02-10 16:27:35 +03:00
Alexey Kopytov
a01946373d Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases 
depending on whether the text-based or prepared statements protocol is used for a query.

Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.

This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).

client/sql_string.cc:
  Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
libmysql/libmysql.c:
  Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
mysql-test/r/archive_gis.result:
  Fixed test results to take additional precision into account.
mysql-test/r/func_group.result:
  Fixed test results to take additional precision into account.
mysql-test/r/func_math.result:
  Fixed test results to take additional precision into account.
mysql-test/r/func_str.result:
  Fixed test results to take additional precision into account.
mysql-test/r/gis.result:
  Fixed test results to take additional precision into account.
mysql-test/r/innodb_gis.result:
  Fixed test results to take additional precision into account.
mysql-test/r/select.result:
  Fixed test results to take additional precision into account.
mysql-test/r/sp.result:
  Fixed test results to take additional precision into account.
mysql-test/r/type_float.result:
  Fixed test results to take additional precision into account.
mysql-test/t/type_float.test:
  Fixed test results to take additional precision into account.
sql/sql_string.cc:
  Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
2009-01-28 20:59:08 +03:00
Alfranio Correia
0888d7c0a8 BUG#36391: "mysqlbinlog creates invalid charset statements"
The fix for BUG#20103 "Escaping with backslash does not work as expected"
was implemented too greedy though in that it not only changes the behavior
of backslashes within strings but in general, so disabling command shortcuts
like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
statements").
      
The fix allows the escaping with backslash to take place only inside a string, 
thus enabling the execution of command shortcuts and presevering the fix for
BUG#20103.
2009-01-27 20:49:37 +00:00
Chad MILLER
34dabc062f Merge fix for bug 38145 from 5.0. 2009-01-26 10:27:51 -05:00
Ramil Kalimullin
80fe6268f7 Fix for bug #37756: enabling fulltext indexes with
myisam_repair_threads > 1 causes crash

Problem: parallel repair (myisam_repair_threads > 1) of a myisam
table with two or more fulltext keys that use the same parser may
lead to a server crash. ALTER TABLE ENABLE KEYS is affected as well.

Fix: properly initialize fulltext structures for parallel repair.

Note: 1. there's no deterministic test case.
2. now we call parser->init() for each fulltext key
(not for each fulltext parser used).


storage/myisam/ft_parser.c:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  In ftparser_call_initializer() we "group" parsers
  and allocate parameters for each unique parser used.
  In case of parallel repairing we may have a bunch
  of parsers that use the only MI_INFO structure.
  Each of these parsers must have its own parameter
  structure in order not to interfere with others.
  
  Moreover, the allocation is done without mutex
  lock so parallel ftparser_call_initializer() calls
  are unsafe.
  
  Now we don't "group" the fulltext parsers.
  Parameter allocation code moved to ftparser_alloc_param()
  function which is called from mi_repair_parallel() as well
  to allocate parameters for each parser used.
storage/myisam/ftdefs.h:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  ftparser_alloc_param(MI_INFO *info) added.
storage/myisam/mi_check.c:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  ftparser_alloc_param(info) called in case of parallel
  repair to allocate fulltext parser parameters.
storage/myisam/mi_open.c:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  set keyinfo->ftkey_nr and share->ftkeys.
2009-01-26 10:35:15 +04:00
Gleb Shchepa
add8e4d159 Bug #42188: After-push test file update (see bug 42321) 2009-01-24 18:07:10 +04:00
Horst Hunger
02c57a12f3 due to merge 2009-01-23 19:26:59 +01:00
Horst Hunger
2775f86773 due to merge. 2009-01-23 19:21:08 +01:00
Gleb Shchepa
93991b6be9 Bug#42188: crash and/or memory corruption with user variables
in trigger

Interchangeable calls to the mysql_change_user client function
and invocations of a trigger changing some user variable caused
a memory corruption and a crash.

The mysql_change_user API call forces TDH::cleanup() on a server
that frees user variable entries.
However it didn't reset Item_func_set_user_var::entry to NULL
because Item_func_set_user_var::cleanup() was not overloaded.
So, Item_func_set_user_var::entry held a pointer to freed memory,
that caused a crash.

The Item_func_set_user_var::cleanup method has been overloaded
to cleanup the Item_func_set_user_var::entry field.


mysql-test/r/user_var.result:
  Added test case for bug #42188.
mysql-test/t/user_var.test:
  Added test case for bug #42188.
sql/item_func.cc:
  Bug#42188: crash and/or memory corruption with user variables
             in trigger
  
  The Item_func_set_user_var::cleanup method has been overloaded
  to cleanup the Item_func_set_user_var::entry field.
sql/item_func.h:
  Bug#42188: crash and/or memory corruption with user variables
             in trigger
  
  The Item_func_set_user_var::cleanup method has been overloaded
  to cleanup the Item_func_set_user_var::entry field.
2009-01-23 22:18:02 +04:00
Horst Hunger
d574142888 Fix for bug#39108: Set global wait timeout within the test, not more via opt file.
Deleted the opt file. Replaced the sleeps by wait condition. Made some beautyfications.
Inserted review results.
2009-01-23 18:19:09 +01:00
Andrei Elkin
db337eb8d8 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
an additional changeset to remove printing a path name.

mysql-test/suite/rpl/r/rpl_cross_version.result:
  removing a local exec env dependency
mysql-test/suite/rpl/t/rpl_cross_version.test:
  refining a test to not have local exec env dependency.
2009-01-23 19:15:27 +02:00
Andrei Elkin
00ca9099e6 merge from 5.1-bt to a local tree. 2009-01-23 19:10:13 +02:00
Andrei Elkin
8c3389f386 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
It's a regression issue.
The reason of the bug appeared to be an error introduced into 5.1 source code.
A piece of code in Create_file_log_event::do_apply_event() did not have test
coverage which made make test and pb unaware.
      
Fixed with inverting the old value of the return value from 
Create_file_log_event::do_apply_event().
The rpl test suite is extended with `rpl_cross_version' the file to hold 
regression cases similar to the current.


mysql-test/suite/rpl/r/rpl_cross_version.result:
  new results file
mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  options to the server to be able to start replication to itself
mysql-test/suite/rpl/t/rpl_cross_version.test:
  regression test for bug#31240.
sql/log_event.cc:
  Correcting the return value from  Create_file_log_event::do_apply_event()
2009-01-22 16:55:14 +02:00
Satya B
2e3422fa71 updating to the latest bugteam-5.1 branch 2009-01-22 18:29:13 +05:30
Davi Arnaut
6157433b2a Merge test case of Bug#40264 to mysql-5.1-bugteam
sql/sql_cache.cc:
  Assert that results are always complete.
2009-01-22 09:22:26 -02:00
Davi Arnaut
ecfdc3560c Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit
The problem is that the query cache was storing partial results
if the statement failed when sending the results to the client.
This could cause clients to hang when trying to read the results
from the cache as they would, for example, wait indefinitely for
a eof packet that wasn't saved.

The solution is to always discard the caching of a query that
failed to send its results to the associated client.

mysql-test/r/query_cache_notembedded.result:
  Add test case result for Bug#40264
mysql-test/t/query_cache_notembedded.test:
  Add test case for Bug#40264
sql/sql_cache.cc:
  Abort if a unreported error was raised.
2009-01-22 08:28:01 -02:00
Satya B
4a3e9851cf TestCase for BUG#41574 - REPAIR TABLE: crashes for compressed tables
Extending the existing testcase written for BUG#40949 to verify
repair table operation for compressed tables



mysql-test/r/myisampack.result:
  Modified result file for myisampack.test
mysql-test/t/myisampack.test:
  Modified Testcase to test repair operation for compressed tables
2009-01-22 11:25:26 +05:30
Serge Kozlov
4562b69fed Bug#30128: The reason that sometimes events were executed because without STARTS
clause server fires immediately after creating event and time between create and delete
event sometimes is enough for firing. So adding STARTS clause moves first execution in
future after drop of event
1. Added STARTS clause for CREATE EVENT.
2. Updated result file.
2009-01-21 18:48:12 +03:00
Staale Smedseng
237ef78e1c Adding a test to verify that Bug#27208 "If no current database,
character_set_database !=character_set_server" is fixed.
2009-01-20 16:59:20 +01:00
Timothy Smith
75e1ed9618 Add another cast to ignore int/ulong difference in error types, silence warning on Win64 2009-01-16 17:49:07 +01:00
Timothy Smith
06adec7ad9 Auto merge 2009-01-16 17:47:09 +01:00
Timothy Smith
33ff35305d Auto-merge from upstream 5.1-bugteam 2009-01-16 17:33:24 +01:00
Georgi Kodinov
4d8e73c818 merged 5.0-bugteam -> 5.1-bugteam 2009-01-16 17:38:38 +02:00
Georgi Kodinov
bdec5458ae auto merge 2009-01-16 16:48:41 +02:00
Georgi Kodinov
47bd8d19fd merged 5.0-bugteam -> 5.1-bugteam 2009-01-16 13:42:01 +02:00
Georgi Kodinov
64ecdbe3f5 merged 5.1-main -> 5.1-bugteam 2009-01-16 13:41:12 +02:00
Georgi Kodinov
b6468e4a1a merged 5.0-main -> 5.0-bugteam 2009-01-16 13:19:42 +02:00
Georgi Kodinov
7ba31022e7 merged 5.1-main -> 5.1-bugteam 2009-01-16 12:47:48 +02:00
Georgi Kodinov
b385a2d8a5 merged 5.0-bugteam -> 5.1-bugtteam 2009-01-16 12:45:17 +02:00
Joerg Bruehe
aec81abb3b Upmerge changesets from 5.0-build to 5.1-build.
This does not bring any contents changes, it is purely
metadata which are affected.

Details:

Even within 5.0, most of these changesets did not cause
file contents changes, because they were backports done
for the "service pack" builds of 5.0.66sp1 and 5.0.72sp1.

The "real" changesets are also already present in 5.1,
so this upmerge doesn't change any contents.

The only "real" changeset in 5.0 was a fix of the shell
scripts used to configure bdb (BerkeleyDB).
As we completele removed bdb from the 5.1 sources already,
the affected files are not present in the 5.1 source tree,
so this changeset also does not cause any contents changes.
2009-01-15 19:11:25 +01:00
Joerg Bruehe
d5e10aec08 Again, the branch designation "-bugteam" made it to the main tree,
this should not happen.
2009-01-15 18:35:21 +01:00
Joerg Bruehe
65474bb120 Merge the version number increase. 2009-01-15 17:51:40 +01:00
Joerg Bruehe
f6d2d02237 Merge main tree to 5.1-build 2009-01-15 17:21:42 +01:00
unknown
f6c8f94d11 Raise version number after cloning 5.1.31 2009-01-15 16:48:10 +01:00
Georgi Kodinov
683542698f merged Bug 38795 to 5.0-bugteam 2009-01-15 16:15:38 +02:00
Davi Arnaut
637d488027 Post-merge fix for Bug#36326
mysql-test/r/cache_innodb.result:
  Update test case result.
2009-01-15 11:38:49 -02:00
Alexander Nozdrin
eb09f64a78 Bug#31222: adding missed file. 2009-01-15 14:58:32 +03:00
Joerg Bruehe
e48b721d5c Merge some tool fixes from the 5.0.72sp1 build back into the tree.
This is not the final merge of that release build, but we need early
access to these tool fixes (use of "awk" in the BDB configuration).
2009-01-15 12:08:09 +01:00
Joerg Bruehe
315c0ce163 Merge the changes of the 5.0.66sp1 build back into the tree. 2009-01-15 11:48:31 +01:00
Davi Arnaut
e48c7178f7 Merge from 5.0-bugteam 2009-01-15 08:28:10 -02:00
Alexander Nozdrin
852d1d66f6 Pull from 5.0-bugteam 2009-01-15 13:10:20 +03:00
Alexander Nozdrin
91e5423c64 Merge backport of patch for Bug#31222 from 5.0 to 5.1 2009-01-15 12:56:05 +03:00
Davi Arnaut
ed87b43915 Auto-merge from 5.1-bugteam 2009-01-15 07:52:06 -02:00
Alexander Nozdrin
9a6e05d8b9 Backport patch for Bug#31222 (com_% global status counters behave randomly
with mysql_change_user) to 5.0.
2009-01-15 12:36:34 +03:00
Georgi Kodinov
920021c9b8 merge 5.0-bugteam-> 5.1-bugteam 2009-01-15 07:31:47 +02:00
Georgi Kodinov
a08460b83a merge 5.0-main to 5.0-bugteam 2009-01-15 06:35:18 +02:00
MySQL Build Team
09ac5c45eb Oops, bumped version too high. Drop it back down from 5.0.78 to 5.0.77. 2009-01-15 00:14:07 +01:00
Ramil Kalimullin
7a23cfaac9 bug#33094: Error in upgrading from 5.0 to 5.1 when table contains triggers
Post-fix test failure: fixed mysqlcheck.test on Windows platforms.


mysql-test/r/mysqlcheck.result:
  fixed mysqlcheck.test on Windows platforms.
mysql-test/t/mysqlcheck.test:
  fixed mysqlcheck.test on Windows platforms.
2009-01-15 00:54:25 +04:00
unknown
ea75d58249 Raise version number after cloning 5.0.76 2009-01-14 20:16:10 +01:00
Chad MILLER
9b1b1d507e Merge from dev tree. 2009-01-14 11:15:11 -05:00