Commit graph

58245 commits

Author SHA1 Message Date
Mattias Jonsson
ecc556f492 merge 2009-09-29 10:12:04 +02:00
Sergey Glukhov
4299943064 Bug#47150 Assertion in Field_long::val_int() on MERGE + TRIGGER + multi-table UPDATE
The bug is not related to MERGE table or TRIGGER. More correct description
would be 'assertion on multi-table UPDATE + NATURAL JOIN + MERGEABLE VIEW'.
On PREPARE stage(see test case) we call mark_common_columns() func which
creates ON condition for NATURAL JOIN and sets appropriate
table read_set bitmaps for fields which are used in ON condition.
On EXECUTE stage mark_common_columns() is not called, we set
necessary read_set bitmaps in setup_conds(). But 'B.f1' field
is already processed and related item alredy fixed before
setup_conds() as updated field and setup_conds can not set
read_set bitmap because of that.
The fix is to set read_set bitmap for appropriate table field even
if Item_direct_view_ref item which represents a refernce to this field
is fixed.
2009-09-29 07:23:38 +05:00
Jonathan Perkin
3e56bac07c Merge up to mysql-5.1-bugteam 2009-09-28 17:32:14 +01:00
Jonathan Perkin
2f0a79a05a Merge to mysql-5.0-bugteam 2009-09-28 15:24:52 +01:00
Jonathan Perkin
8f640b6239 bug#30954: "configure" script in binary distributions considered harmfull
Add --help option.
2009-09-28 15:14:33 +01:00
Georgi Kodinov
da5d0c90a4 Fixed Sun Studio 8 compilation failures as suggested by Jorgen and reviewed
by Svoj over e-mail.
2009-09-28 16:55:01 +03:00
Georgi Kodinov
0213cd7976 merge 2009-09-28 16:48:40 +03:00
Magnus Blåudd
f165fa96b4 Merge 2009-09-28 14:54:36 +02:00
Magnus Blåudd
0b4b556911 Merge bug#42850 to 5.1 2009-09-28 14:40:45 +02:00
Magnus Blåudd
56b7b74b25 Merge bug#42850 to 5.0 2009-09-28 14:38:06 +02:00
Martin Hansson
99bb6acb62 Bug#46958: Assertion in Diagnostics_area::set_ok_status,
trigger, merge table
            
The problem with break statements is that they have very
local effects. Hence a break statement within the inner loop
of a nested-loops join caused execution to proceed to the
next table even though a serious error occurred. The problem
was fixed by breaking out the inner loop into its own
method. The change empowers all errors to terminate the
execution.
            
The errors that will now halt multi-DELETE execution
altogether are 
  - triggers returning errors
  - handler errors
  - server being killed
2009-09-28 12:48:52 +02:00
90d4b21d1d BUG#43579 mysql_upgrade tries to alter log tables on replicated database
All statements executed by mysql_upgrade are binlogged and then are replicated to slave.
This will result in some errors. The report of this bug has demonstrated some examples.

Master and slave should be upgraded separately. All statements executed by
mysql_upgrade will not be binlogged. 
--write-binlog and --skip-write-binlog options are added into mysql_upgrade. 
These options control whether sql statements are binlogged or not.
2009-09-28 14:24:19 +08:00
f8f2362bf4 BUG #46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior in ROW mode
In RBR, 'DROP TEMPORARY TABLE IF EXISTS...' statement is binlogged when the table
does not exist.
      
In fact, 'DROP TEMPORARY TABLE ...' statement should never be binlogged in RBR
no matter if the table exists or not. 
This patch addresses this by checking whether we are dropping a
temporary table or not, when building the custom drop statement.
2009-09-28 10:23:06 +08:00
Luis Soares
80f96fae63 BUG#47312: RBR: Disabling key on slave breaks replication:
HA_ERR_WRONG_INDEX
      
In RBR, disabling keys on slave table will break replication when
updating or deleting a record. When the slave thread tries to
find the row, by searching in the storage engine, it checks
whether the table has a key or not. If it has one, then the slave
thread uses it to search the record.
      
Nonetheless, the slave only checks whether the key exists or not,
it does not verify if it is active. Should the key be
disabled (eg, DBA has issued an ALTER TABLE ... DISABLE KEYS)
then it will result in error: HA_ERR_WRONG_INDEX.
      
This patch addresses this issue by making the slave thread also
check whether the key is active or not before actually using it.
2009-09-27 22:02:47 +01:00
9256ace00a Bug #43913 rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
The failure is not reproduced on 5.1, so enable the 'rpl_cross_version' test.
2009-09-27 18:12:58 +08:00
774a8db960 Bug #46931 rpl.rpl_get_master_version_and_clock fails on hpux11.31
Network error happened here, but it can be caused by CR_CONNECTION_ERROR, 
CR_CONN_HOST_ERROR, CR_SERVER_GONE_ERROR, CR_SERVER_LOST, ER_CON_COUNT_ERROR, 
and ER_SERVER_SHUTDOWN. We just check CR_SERVER_LOST here, so the test fails.

To fix the problem, check all errors that can be cause by the master shutdown.
2009-09-27 17:00:29 +08:00
Omer BarNir
864ed1efd0 Checking in new version of 'mysql-stress-test.pl that was used for the last few month
from test-extra tree.

Changes include improvements to error handling and are based on WL#4685
2009-09-25 08:27:55 -07:00
Georgi Kodinov
2c1c014367 fixed a typo in valgrind.supp 2009-09-25 14:52:41 +03:00
Georgi Kodinov
1648dad6ed merge 2009-09-25 14:39:05 +03:00
Mattias Jonsson
7d9548d26b Bug#32430: 'show innodb status' causes errors
Invalid (old?) table or database name in logs

Problem was still not completely fixed, due to
qouting.

This is the server side only fix (in explain_filename),
the change from filename_to_tablename to use explain_filename
in the InnoDB code must be done before the bug is
fixed.
2009-09-25 11:26:49 +02:00
Georgi Kodinov
90f570b5b3 added more valgrind suppressions for glibc 2.6.1 2009-09-25 11:57:14 +03:00
Georgi Kodinov
138474ec03 More valgrind suppressions added for libc 2.6.1 64 bit 2009-09-24 18:29:00 +03:00
Georgi Kodinov
b67de14d44 merged compilation warning fixes 2009-09-24 16:28:13 +03:00
Georgi Kodinov
59069cac4a fixed compilation warnings 2009-09-24 16:21:46 +03:00
Georgi Kodinov
7dde009fff added suppressions for existing warnings in the result file. 2009-09-24 16:19:06 +03:00
Magnus Blåudd
40bd549b9b Bug#42850 race condition in my_thr_init.c
- Create the "dummy" thread joinable and wait for it to
   exit before continuing in 'my_thread_global_init'
 - This way we know that the pthread library is initialized
   by one thread only
2009-09-24 08:30:31 +02:00
Staale Smedseng
8b9843408d Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Cleaning up warnings not present in 5.0.
2009-09-23 15:21:29 +02:00
Alexander Nozdrin
613297ff1e A patch for Bug#47474 (mysqld hits Dbug_violation_helper assert
when compiled with Sun Studio compiler).

The thing is that Sun Studio compiler calls destructor of stack
objects when pthread_exit() is called. That triggered an assertion
in DBUG_ENTER()/DBUG_RETURN() validation logic (if DBUG_ENTER() is
used in the beginning of function, all returns should be replaced
by DBUG_RETURN/DBUG_VOID_RETURN macros).

A fix is to explicitly use DBUG_LEAVE macro.
2009-09-23 17:10:23 +04:00
Satya B
0c9b77803c merge to mysql-5.1-bugteam 2009-09-23 17:45:56 +05:30
Satya B
29b6cc60cd Additional Fix for BUG#44030 - Error: (1500) Couldn't read the MAX(ID) autoinc
value from the index (PRIMARY)


With the fix for BUG#46760, we correctly flag the presence of row_type 
only when it's actually changed and enables the FAST ALTER TABLE which was
disabled with the BUG#39200.

So the changes made by BUG#46760 makes MySQL data dictionaries to be out of 
sync but they are handled already by InnoDB with this BUG#44030.

The test was originally written to handle this but we requested Innodb to
update the test as the data dictionaries were in sync after the fix for 
BUG#39200.

Adjusting the innodb-autoinc testcase as mentioned in the comments.
2009-09-23 17:42:12 +05:30
Georgi Kodinov
1014e5a2fb automerge 2009-09-23 14:11:48 +03:00
Sergey Glukhov
185698530e Bug#45989 memory leak after explain encounters an error in the query
the fix is reverted from 5.1, mysql-pe as 
unnecessary(no valgrind warnings there).
2009-09-23 13:40:33 +05:00
Georgi Kodinov
bafc15748b automerge 2009-09-23 11:31:18 +03:00
Georgi Kodinov
6ba7a79111 automerge 2009-09-23 11:29:10 +03:00
Georgi Kodinov
afc64075e5 automerge 2009-09-23 11:27:12 +03:00
Davi Arnaut
0e7242d895 Bug#45498: Socket variable not available on Windows
The "socket" variable is not available on Windows even though
the --socket option can be used to specify the pipe name for
local connections that use a named pipe.

The solution is to ensure that the variable is always defined.
2009-09-22 08:22:07 -03:00
Anurag Shekhar
ecea4e9af5 merged with local branch. 2009-09-22 16:16:24 +05:30
hery.ramilison@sun.com
6e8dea64c1 Merge from mysql-5.0.86-release 2009-09-21 22:54:39 +02:00
Jonathan Perkin
54cc3ecd0e Merge from mysql-5.1.39-release 2009-09-21 12:10:32 +02:00
Kristofer Pettersson
b2beff7415 Fix for BUG#35570 "CHECKSUM TABLE unreliable if LINESTRING field (same content/ differen
checksum)"

The problem was that checksum of GEOMETRY type used memory addresses
in the computation, making it un-repeatable thus useless.
(This patch is a backport from 6.0 branch)
2009-09-21 11:58:15 +02:00
Georgi Kodinov
af92ff6bd9 automerge 2009-09-18 16:36:54 +03:00
Georgi Kodinov
5d68d4a534 automerge 2009-09-18 16:35:40 +03:00
Georgi Kodinov
cb66524875 automerge 2009-09-18 16:33:07 +03:00
Georgi Kodinov
264c433d53 automerge 2009-09-18 16:19:58 +03:00
Georgi Kodinov
faacd36a12 Bug#46760: Fast ALTER TABLE no longer works for InnoDB
Despite copying the value of the old table's row type
we don't always have to mark row type as being specified.
Innodb uses this to check if it can do fast ALTER TABLE
or not.
Fixed by correctly flagging the presence of row_type 
only when it's actually changed.
Added a test case for 39200.
2009-09-18 16:01:18 +03:00
Anurag Shekhar
b96142c263 merging with latest changes in bugteam. 2009-09-18 16:55:36 +05:30
Georgi Kodinov
a31f655d82 Bug #47106: Crash / segfault on adding EXPLAIN to a non-crashing
query
      
The fix for bug 46749 removed the check for OUTER_REF_TABLE_BIT 
and substituted it for a check on the presence of 
Item_ident::depended_from.
Removing it altogether was wrong : OUTER_REF_TABLE_BIT should 
still be checked in addition to depended_from (because it's not 
set in all cases and doesn't contradict to the check of depended_from).
Fixed by returning the old condition back as a compliment to the 
new one.
2009-09-18 12:34:08 +03:00
Magnus Blåudd
f66231be11 Merge bug#42850 to 5.0 2009-09-28 14:40:20 +02:00
7079338e0e Bug #42914 Log event that larger than max_allowed_packet results in stop of slave I/O thread,
But there is no Last_IO_Error reported.

On the master, if a binary log event is larger than max_allowed_packet,
ER_MASTER_FATAL_ERROR_READING_BINLOG and the specific reason of this error is
sent to a slave when it requests a dump from the master, thus leading
the I/O thread to stop.

On a slave, the I/O thread stops when receiving a packet larger than max_allowed_packet.

In both cases, however, there was no Last_IO_Error reported.

This patch adds code to report the Last_IO_Error and exact reason before stopping the
I/O thread and also reports the case the out memory pops up while
handling packets from the master.
2009-09-18 16:20:29 +08:00
Alexey Kopytov
ddd00a7771 Automerge. 2009-09-18 11:54:38 +04:00