Commit graph

58263 commits

Author SHA1 Message Date
Martin Hansson
4545c5ba3c Merge of Bug#35996 2009-09-30 09:31:20 +02:00
f4b6aeaf5b Bug #46998 mysqlbinlog can't output BEGIN even if the database is included in a transaction
The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the
database is not selected by --database option of mysqlbinlog command.
This can result in problem if there are some statements in the
transaction are not filtered out.

To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' 
in regardless of the database filtering rules.
2009-09-30 10:31:25 +08:00
869c011218 Bug #46998 mysqlbinlog can't output BEGIN even if the database is included in a transaction
The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the
database is not selected by --database option of mysqlbinlog command.
This can result in problem if there are some statements in the
transaction are not filtered out.

To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' 
in regardless of the database filtering rules.
2009-09-30 10:01:52 +08:00
Tatiana A. Nurnberg
00e5cea84d auto-merge 2009-09-29 09:09:17 -07:00
Kristofer Pettersson
4e9be70589 Null merge mysql-5.0-bugteam => mysql-5.1-bugteam 2009-09-29 17:26:54 +02:00
Tatiana A. Nurnberg
caf38a020c auto-merge 2009-09-29 08:19:46 -07:00
Kristofer Pettersson
f79b783b7e autocommit 2009-09-29 17:18:55 +02:00
Kristofer Pettersson
21d401c202 Bug#42108 Wrong locking for UPDATE with subqueries leads to broken statement
replication
              
MySQL server uses wrong lock type (always TL_READ instead of
TL_READ_NO_INSERT when appropriate) for tables used in
subqueries of UPDATE statement. This leads in some cases to
a broken replication as statements are written in the wrong
order to the binlog.
2009-09-29 17:06:51 +02:00
Martin Hansson
e6b1bade90 Merge of Bug#35996. 2009-09-29 16:57:20 +02:00
Alexey Botchkov
355b040547 merging 2009-09-29 18:28:01 +05:00
Davi Arnaut
73153f1cb3 Don't use the semicolon character as a argument separator as it
can be interpreted as a shell metacharacter in some circumstances.
For example, it is interpreted as a command separator when invoking
a debugger.
2009-09-29 11:11:46 -03:00
Alexey Botchkov
2cafcbb50c merging 2009-09-29 18:23:30 +05:00
Tatiana A. Nurnberg
ba6bd99620 auto-merge 2009-09-29 06:08:18 -07:00
Alexey Botchkov
45bdc1e063 merging 2009-09-29 17:49:36 +05:00
Davi Arnaut
fc3740368a Bug#45567: Fast ALTER TABLE broken for enum and set
The problem was that appending values to the end of an existing
ENUM or SET column was being treated as table data modification,
preventing a immediately (fast) table alteration that occurs when
only table metadata is being modified.

The cause was twofold: adding a enumeration or set members to the 
end of the list of valid member values was not being considered
a "compatible" table alteration, and for SET columns, the check
was being done upon the max display length and not the underlying
(pack) length of the field.

The solution is to augment the function that checks wether two ENUM
or SET fields are compatible -- by comparing the pack lengths and
performing a limited comparison of the member values.
2009-09-29 07:58:42 -03:00
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
Tatiana A. Nurnberg
197182d749 Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement
"load data" statements were written to the binlog as a mix of the original statement
and bits recreated from parse-info. This relied on implementation details and broke
with IGNORE_SPACES and versioned comments.

We now completely resynthesize the query for LOAD DATA for binlog (which among other
things normalizes them somewhat with regard to case, spaces, etc.).
We have already parsed the query properly, so we make use of that rather
than mix-and-match string literals and parsed items.
This should make us safe with regard to versioned comments, even those
spanning multiple tokens. Also no longer affected by IGNORE_SPACES.
2009-09-28 05:41:10 -07: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
4b17ef621f Bug#35996: SELECT + SHOW VIEW should be enough to display
view definition

During SHOW CREATE VIEW there is no reason to 'anonymize'
errors that name objects that a user does not have access
to. Moreover it was inconsistently implemented. For example
base tables being referenced from a view appear to be ok,
but not views. The manual on the other hand is clear: If a
user has the privileges SELECT and SHOW VIEW, the view
definition is available to that user, period. The fix
changes the behavior to support the manual.
2009-09-28 13:25:47 +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