Commit graph

56690 commits

Author SHA1 Message Date
Georgi Kodinov
fb36c97705 merged 5.1-main -> 5.1-bugteam 2009-03-11 15:03:25 +02:00
Georgi Kodinov
ba1b5eb4b5 merged bug 43354 to 5.1-bugteam 2009-03-11 14:29:59 +02:00
Georgi Kodinov
d3d6f4fdad Bug #43354: Use key hint can crash server in explain extended query
The copy of the original arguments of a aggregate function was not
initialized until after fix_fields().
Sometimes (e.g. when there's an error processing the statement)
the print() can be called with no corresponding fix_fields() call.
      
Fixed by adding a check if the Item is fixed before using the arguments
copy.

mysql-test/r/explain.result:
  Bug #43354: test case
mysql-test/t/explain.test:
  Bug #43354: test case
sql/item_sum.cc:
  Bug #43354: use the argument list copy only if it's initialized
2009-03-11 14:10:44 +02:00
Leonard Zhou
16d7c26b71 Merge 2009-03-11 14:10:50 +08:00
Leonard Zhou
3c5c878715 BUG#39858 rpl.rpl_rotate (rpl.rpl_rotate_logs) failed on pushbuild: result mismatch
The method to purge binary log files produces different results in some platforms.
The reason is that the purge time is calculated based on table modified time and
that can't guarantee to purge master-bin.000002 in all platforms.(eg. windows)

Use a new way that sets the time to purge binlog file 1 second after the last modified time of master-bin.000002.
That can be sure that the file is always deleted in any platform.

mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Test result
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Change 'purge time' 1 sencond after the last modified time of master-bin.000002.
2009-03-11 13:35:58 +08:00
Matthias Leich
e68ea55b61 Merge 5.0 -> 5.1, no conflicts, no modified files 2009-03-10 18:27:33 +01:00
Matthias Leich
0614532a92 Merge of fix into actual tree 2009-03-10 18:21:35 +01:00
Matthias Leich
8b055e2444 Merge into actual tree 2009-03-10 16:54:24 +01:00
Bjorn Munch
11570d64fc merge from 5.1-mtr 2009-03-10 14:48:06 +01:00
Sergey Vojtovich
2b87788517 Merge 5.1-ibmdb2isee to 5.1-bugteam. 2009-03-10 16:27:53 +04:00
Patrick Crews
f66af418b0 merge 2009-03-09 20:47:58 -04:00
Timothy Smith
a5216560d0 Import the ibmdb2i-ga4-src snapshot from IBM 2009-03-09 15:20:14 -06:00
Patrick Crews
4d99f10126 merge 5.0 -> 5.1 2009-03-09 13:45:40 -04:00
Patrick Crews
636d8c5062 Fix of failing funcs_1 tests.
Changes are due to changes in precision.
Re-record of .result files to account for new server precision.
2009-03-09 11:32:07 -04:00
Tatiana A. Nurnberg
1c4fc84c9e automerge 2009-03-09 15:57:34 +01:00
Tatiana A. Nurnberg
e7afab7245 Bug#40657: assertion with out of range variables and traditional sql_mode
test-fixes for 32-bit

mysql-test/t/variables.test:
  Test for 10351 ("Max_Heap_Table_Size cannot be set to 4 gb")
  now throws a warning on 32-bit, as it should. As we're not
  actually interested in the warning but only in whether the
  variable is set to a correct value afterwards, we disable
  warnings for the duration of that test case so we won't have
  to split the test into a 32-bit and a 64-bit flavour for no
  real reason.
2009-03-09 15:26:53 +01:00
Bjorn Munch
4cab491915 Bug #43410 --skip-core-file has no effect if core file size is set
Would not prevent mysqld from core dumping
Passes --nocore arg to safe_process, which then sets rlimit core to 0 for child
2009-03-09 14:31:39 +01:00
Bjorn Munch
3cf777e1a2 Bug #43148 MTR2 + PB2 should display correct number of failures
Retried tests are reported the same as ordinary ones
Prepend "retry-" to fail or pass for retried tests
2009-03-09 12:59:34 +01:00
Georgi Kodinov
eedacc3174 merge 5.0-pe-stage -> 5.1-pe-stage 2009-03-09 13:15:46 +02:00
Georgi Kodinov
fac9dee474 merged 5.1-main -> 5.1-pe-stage 2009-03-09 12:52:08 +02:00
Georgi Kodinov
7541fec52d fixed a typo 2009-03-09 12:49:18 +02:00
Daniel Fischer
7a6133c77d merge from parent 2009-03-09 11:33:08 +01:00
Georgi Kodinov
56ae3bd155 fixed a win32 compile warning 2009-03-09 12:22:52 +02:00
Daniel Fischer
a0aa574d31 merge 42888 to 5.1-mtr 2009-03-09 11:11:27 +01:00
Anurag Shekhar
9540d3017e fixing warning during compilation. 2009-03-09 15:03:02 +05:30
He Zhenxing
1f1cdf9d50 Auto merge 2009-03-09 16:44:18 +08:00
He Zhenxing
6d3bdcf190 Auto merge 2009-03-09 16:42:31 +08:00
Anurag Shekhar
ec5e3b624c merging with latest changes. 2009-03-09 13:58:48 +05:30
Bjorn Munch
9c636e6bef merge from 5.1 main 2009-03-07 20:42:11 +01:00
Tatiana A. Nurnberg
cee070e1bb manual merge 2009-03-06 16:11:34 +01:00
Matthias Leich
2417d31045 Merge 5.0 -> 5.1 of fix for Bug#42003 and Bug#43114 2009-03-06 15:56:17 +01:00
Kristofer Pettersson
55c779cdbf Manual merge 2009-03-06 11:49:39 +01:00
He Zhenxing
5229ef4ac8 Merge BUG#22082 from 5.0-bugteam to 5.1-bugteam 2009-03-06 17:38:14 +08:00
He Zhenxing
37068efd81 Auto merge 2009-03-06 17:34:47 +08:00
He Zhenxing
82fc35475c BUG#22082 Slave hangs(holds mutex) on "disk full"
When disk is full, server may waiting for free space while
writing binlog, relay-log or MyISAM tables. The server will 
continue after user have freed some space. But the error
message printed was not quite clear about the how often the
error message is printed, and there will be a delay before
the server continue and user freeing space. And caused users
thinking that the server was hanging forever.

This patch fixed the problem by making the error messages
printed more clear. The error message is split into two part,
the first part will only be printed once, and the second part
will be printed very 10 times.

Message first part:
Disk is full writing '<filename>' (Errcode: <errorno>). Waiting
for someone to free space... (Expect up to 60 secs delay for 
server to continue after freeing disk space)

Message second part:
Retry in 60 secs, Message reprinted in 600 secs
2009-03-06 17:32:00 +08:00
Luis Soares
5833903889 BUG#39753: Replication failure on MIXED + bit + myisam + no PK
When using mixed mode the record values stored inside the storage
engine differed from the ones computed from the row event. This
happened because the prepare_record function was calling
empty_record macro causing some don't care bits to be left set.
                          
Replacing the empty_record plus explicitly setting defaults with 
restore_record to restore the record default values fixes this.
2009-03-05 20:54:53 +01:00
Tatiana A. Nurnberg
13328b0f45 Bug#40657: assertion with out of range variables and traditional sql_mode
Some changes that make things more elegant in 6.0,
backported so the code is mostly the same in 5.1,
for easier maintainence.

sql/set_var.cc:
  Backporting some changes to 5.1 so the code is
  mostly the same in both versions. Less to learn!
2009-03-05 16:42:12 +01:00
Matthias Leich
0183d4d842 Merge of fix for Bug#42003 and Bug#43114 into more actual GCA tree
modifications according to the reviews are included
2009-03-05 14:35:03 +01:00
Sergey Glukhov
abfe3437f7 removed unused variable 2009-03-05 17:23:16 +04:00
Kristofer Pettersson
ac821c6570 Bug#40363 Bug 20023 is not fixed on 5.0
This is a back port from 5.1 to 5.0.

Fix for BUG 20023: mysql_change_user() resets the value
of SQL_BIG_SELECTS.
  
The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.
  
The fix is to update SQL_BIG_SELECTS properly.



sql/sql_class.cc:
  Update THD::options with the respect to SQL_BIG_SELECTS
  in COM_CHANGE_USER.
tests/mysql_client_test.c:
  Add a test case BUG#20023.
2009-03-05 13:37:46 +01:00
Sergey Glukhov
aa5441e1c6 automerge 2009-03-05 15:58:04 +04:00
Guangbao Ni
d65f6b54ca Auto merged 2009-03-05 19:01:46 +00:00
Guangbao Ni
4f0f021c33 BUG#41980 SBL, INSERT .. SELECT .. LIMIT = ERROR, even when @@SQL_LOG_BIN is 0 !
When binlog_format is STATEMENT and the statement is unsafe before,
the unsafe warning/error message was issued without checking
whether the SQL_LOG_BIN was turned on or not.
      
Fixed with adding a sql_log_bin_toplevel flag in THD to check
whether SQL_LOG_BIN is ON in current session whatever the current is in sp or not.


mysql-test/suite/binlog/r/binlog_unsafe.result:
  Test case result for unsafe warning/error message
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Test case for unsafe message warning/error
sql/set_var.cc:
  Adding a function set_option_log_bin_bit() which specailly handles to
  the change of SQL_LOG_BIN bit in order to set sql_log_bin_toplevel
  according to SQL_LOG_BIN current value at the same time.
sql/sql_class.cc:
  Initialize the flag sql_log_bin_toplevel in THD::init(),
  and add the condition to check whether unsafe ror message was issued.
sql/sql_class.h:
  Add a sql_log_bin_toplevel flag in THD to indicate whether the toplevel SQL_LOG_BIN is
2009-03-05 18:39:02 +00:00
Sergey Glukhov
3ef86918a2 Bug#41030 Wrong meta data (incorrect fieldlen)
set user variable max length on
fix_length_and_dec() stage
using real value length.


mysql-test/r/variables.result:
  test result
mysql-test/t/variables.test:
  test case
sql/item_func.cc:
  set user variable max length on
  fix_length_and_dec() stage
  using real value length.
2009-03-05 15:34:02 +04:00
Davi Arnaut
53802ae6ca Bug#41465: confusing error message when comment is too long
The problem was that the server was trying to use the unknown
error format string (ER_UNKNOWN_ERROR) to print messages about
comments being too long, but the said format string does not
accept arguments and will always default to "Unknown error".

The solution is to introduce new error messages which are
specific to the error conditions so that server wants to
signal -- this also means that it's possible to translate
those messages.

mysql-test/r/strict.result:
  Update test case result.
mysql-test/t/strict.test:
  Update test case with new errors.
sql/share/errmsg.txt:
  Introduce new errors for long comments.
sql/unireg.cc:
  Use new errors.
2009-03-05 08:20:01 -03:00
Kristofer Pettersson
f44b2650fb merge 5.0->5.1 2009-03-06 11:19:02 +01:00
Kristofer Pettersson
d40b1be906 Automerge 2009-03-06 10:52:43 +01:00
Narayanan V
e4fd72fa46 merging with mysql-5.1-bugteam tree 2009-03-06 10:45:46 +05:30
Kristofer Pettersson
9db67e1cda Automerge 2009-03-05 15:30:59 +01:00
Kristofer Pettersson
ddaede8087 Bug#39843 DELETE requires write access to table in subquery in where clause
An unnecessarily restrictive lock were taken on sub-SELECTs during DELETE.

During parsing, a global structure is reused for sub-SELECTs and the attribute
keeping track of lock options were not reset properly.
This patch introduces a new attribute to keep track on the syntactical lock
option elements found in a sub-SELECT and then sets the lock options accordingly.

Now the sub-SELECTs will try to acquire a READ lock if possible
instead of a WRITE lock as inherited from the outer DELETE statement.


mysql-test/r/lock.result:
  Added test case for bug39843
mysql-test/t/lock.test:
  Added test case for bug39843
sql/sql_lex.cc:
  * Reset member variable lock_option on each new query.
sql/sql_lex.h:
  * Introduced new member variable 'lock_option' which is keeping track
    of the syntactical lock option of a (sub-)select query.
sql/sql_parse.cc:
  * Wrote comments to functions.
sql/sql_yacc.yy:
  * Introduced an attribute to keep track of syntactical lock options
    in sub-selects.
  * Made sure that the default value TL_READ_DEFAULT is at the begining
    of each subselect-rule.
2009-03-05 15:22:33 +01:00