Commit graph

58221 commits

Author SHA1 Message Date
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
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
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
Alexey Kopytov
d39f0a72ad Bug #43606: 4GB Limit on huge_pages shared memory set-up
Large pages allocator could not allocate more than 4 GB due to
incorrect size alignment.
2009-09-18 11:19:02 +04:00
Staale Smedseng
5051100a1a Merge from 5.0 2009-09-17 17:25:52 +02:00
Staale Smedseng
38b6d49e82 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
This is the fifth patch cleaning up more GCC warnings about
variables used before initialized using the new macro
UNINIT_VAR().
2009-09-17 17:10:30 +02:00
Anurag Shekhar
05bf2ebaa8 Bug #45840 read_buffer_size allocated for each partition when
"insert into.. select * from"

When inserting into a partitioned table using 'insert into
<target> select * from <src>', read_buffer_size bytes of memory
are allocated for each partition in the target table.

This resulted in large memory consumption when the number of
partitions are high.

This patch introduces a new method which tries to estimate the
buffer size required for each partition and limits the maximum
buffer size used to maximum of 10 * read_buffer_size, 
11 * read_buffer_size in case of monotonic partition functions.
2009-09-17 17:35:43 +05:30
Sergey Glukhov
4d6bf3ce15 Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
additional backport of of bug43138 fix
2009-09-17 16:33:23 +05:00
Georgi Kodinov
6e6974a553 Bug #46917: mysqd-nt installs wrong
When parsing the service installation parameter in 
default_service_handling() make sure the value of the
optional parameter doesn't overwrite it's name.
2009-09-17 14:25:07 +03:00
Satya B
0b8243cb5b Applying InnoDB snapshot 5.1-ss5282, Fixes BUG#44030
1. Fixes BUG#44030 - Error: (1500) Couldn't read the MAX(ID) autoinc value 
                     from the index (PRIMARY)

2. Disables the innodb-autoinc test for innodb plugin temporarily.
   The testcase for this bug has different result file for InnoDB plugin.
   Should add the testcase to Innodb suite with a different result file.

Detailed revision comments:

r5243 | sunny | 2009-06-04 03:17:14 +0300 (Thu, 04 Jun 2009) | 14 lines
branches/5.1: When the InnoDB and MySQL data dictionaries go out of sync, before
the bug fix we would assert on missing autoinc columns. With this fix we allow
MySQL to open the table but set the next autoinc value for the column to the
MAX value. This effectively disables the next value generation. INSERTs will
fail with a generic AUTOINC failure. However, the user should be able to
read/dump the table, set the column values explicitly, use ALTER TABLE to
set the next autoinc value and/or sync the two data dictionaries to resume
normal operations.

Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value from the
index (PRIMARY)

rb://118

r5252 | sunny | 2009-06-04 10:16:24 +0300 (Thu, 04 Jun 2009) | 2 lines
branches/5.1: The version of the result file checked in was broken in r5243.

r5259 | vasil | 2009-06-05 10:29:16 +0300 (Fri, 05 Jun 2009) | 7 lines
branches/5.1:

Remove the word "Error" from the printout because the mysqltest suite
interprets it as an error and thus the innodb-autoinc test fails.

Approved by:	Sunny (via IM)
r5466 | vasil | 2009-07-02 10:46:45 +0300 (Thu, 02 Jul 2009) | 6 lines
branches/5.1:

Adjust the failing innodb-autoinc test to conform to the latest behavior
of the MySQL code. The idea and the comment in innodb-autoinc.test come
from Sunny.
2009-09-17 11:59:43 +05:30
Ingo Struewing
7b07ef35c0 Pull from mysql-5.0-bugteam 2009-09-16 12:07:57 +02:00
Ingo Struewing
a57ba331f1 auto-merge 2009-09-16 09:01:28 +02:00
Kristofer Pettersson
16d8401a28 autocommit 2009-09-15 09:34:30 +02:00
Kristofer Pettersson
a041c79ec9 autocommit 2009-09-15 09:33:25 +02:00
Luis Soares
09f07bc110 BUG#47016: rpl_do_grant fails on PB-2 with a failing connect
The test case rpl_do_grant fails sporadically on PB2 with "Access
denied for user 'create_rout_db'@'localhost' ...". Inspecting the
test case, one may find that if issues a GRANT on the master
connection and immediately after it creates two new connections
(one to the master and one to the slave) using the credentials
set with the GRANT.
      
Unfortunately, there is no synchronization between master and
slave after the grant and before the connections are
established. This can result in slave not having executed the
GRANT by the time the connection is attempted.
      
This patch fixes this by deploying a sync_slave_with_master
between the grant and the connections attempt.
2009-09-13 22:43:47 +01:00
Luis Soares
4cce928ea6 BUG#47014: rpl_drop_temp fails on PB-2 with results mismatch
The test case creates two temporary tables, then closes the
connection, waits for it to disconnect, then syncs the slave with
the master, checks for remaining opened temporary tables on
slave (which should be 0) and finally drops the used
database (mysqltest).
      
Unfortunately, sometimes, the test fails with one open table on
the slave. This seems to be caused by the fact that waiting for
the connection to be closed is not sufficient. The test needs to
wait for the DROP event to be logged and only then synchronize
the slave with the master and proceed with the check. This is
caused by the asynchronous nature of the disconnect wrt
binlogging of the DROP temporary table statement.
      
We fix this by deploying a call to wait_for_binlog_event.inc
on the test case, which makes execution to wait for the DROP
temp tables event before synchronizing master and slave.
2009-09-13 21:52:14 +01:00
Mattias Jonsson
3174c31dfc merge 2009-09-12 00:40:23 +02:00
Ramil Kalimullin
4def19eeac Fix for bug#47130: misplaced or redundant check for null pointer?
Problem: LOGGER::general_log_write() relied on valid "thd" parameter passed
but had inconsistent "if (thd)" check.

Fix: as we always pass a valid "thd" parameter to the method, 
redundant check removed.
2009-09-11 22:06:27 +05:00
Alexander Nozdrin
0bd2467ea2 Add DBUG_VIOLATION_HELPER_LEAVE definition to non-debug build. 2009-09-10 16:18:54 +04:00
Sergey Glukhov
b25b1be796 5.0-bugteam->5.1-bugteam merge 2009-09-10 15:30:03 +05:00
Sergey Glukhov
5fbc2904bc Bug#46815 CONCAT_WS returning wrong data
The problem is that argument buffer can be used as result buffer
and it leads to argument value change.
The fix is to use 'old buffer' as result buffer only
if first argument is not constant item.
2009-09-10 15:24:07 +05:00
df67d14983 BUG#45999 Row based replication fails when auto_increment field = 0
In RBR, There is an inconsistency between slaves and master.
When INSERT statement which includes an auto_increment field is executed,
Store engine of master will check the value of the auto_increment field. 
It will generate a sequence number and then replace the value, if its value is NULL or empty.
if the field's value is 0, the store engine will do like encountering the NULL values 
unless NO_AUTO_VALUE_ON_ZERO is set into SQL_MODE.
In contrast, if the field's value is 0, Store engine of slave always generates a new sequence number 
whether or not NO_AUTO_VALUE_ON_ZERO is set into SQL_MODE.

SQL MODE of slave sql thread is always consistency with master's.
Another variable is related to this bug.
If generateing a sequence number is decided by the values of
table->auto_increment_field_not_null and SQL_MODE(if includes MODE_NO_AUTO_VALUE_ON_ZERO)
The table->auto_increment_is_not_null is FALSE, which causes this bug to appear. ..
2009-09-10 18:05:53 +08:00
Sergey Glukhov
242bb2634c Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table
partial backport of bug43138 fix
2009-09-10 13:49:49 +05:00
Sergey Vojtovich
3a5b80ab95 Merge 5.1-bugteam -> 5.1-bugteam-local. 2009-09-10 13:38:59 +05:00
Alexander Nozdrin
96c8843514 A patch for Bug#45118 (mysqld.exe crashed in debug mode
on Windows in dbug.c) -- part 2: a patch for the DBUG subsystem
to detect misuse of DBUG_ENTER / DBUG_RETURN macros.
5.1 version.
2009-09-10 11:40:57 +04:00
Sergey Vojtovich
3e68a1c545 Local merge. 2009-09-10 11:58:13 +05:00