Commit graph

67153 commits

Author SHA1 Message Date
Vasil Dimov
3a43a2e265 Merge mysql-5.5-bugfixing -> mysql-5.5-innodb 2010-09-28 09:40:57 +03:00
Vasil Dimov
7535f1eec9 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-09-28 09:38:33 +03:00
Marc Alff
6a707718b9 Added missing paterns 2010-09-27 18:23:54 -06:00
Vasil Dimov
f661c09dd4 Use C-style comment instead of C++ in a C header.
Spotted by:	Davi Arnaut
2010-09-27 20:08:12 +03:00
Bjorn Munch
3a404d4966 Bug #57036 Add checks in mysqltest that variables treated as ints are in fact ints
Adds boolean flag is_int and a separete function to check for int value
Added tests to mysqltest.test
2010-09-27 14:36:16 +02:00
Alexey Botchkov
4a2dd398e2 log_tables_debug.test fix.
per-file comments:
  mysql-test/t/log_tables_debug.test
        This test shouldn't be run at the embedded server.
2010-09-27 15:18:10 +05:00
Davi Arnaut
657f07151a Merge of mysql-5.1-bugteam into mysql-5.5-merge. 2010-09-24 19:19:30 -03:00
Davi Arnaut
d47e8991cb Bug#45288: pb2 returns a lot of compilation warnings on linux
Use UNINIT_VAR workaround instead of LINT_INIT. The former can
also be used to silence false-positives in non-debug builds as
it actually does not cause new code to be generated.
2010-09-24 19:13:51 -03:00
Davi Arnaut
5713e1398c Bug#45288: pb2 returns a lot of compilation warnings on linux
Use UNINIT_VAR workaround instead of LINT_INIT. The former is
also used in non-debug builds as it doesn't cause changes.
2010-09-24 17:04:36 -03:00
Dmitry Lenev
afa568c24b Fix compile warning about passing NULL to non-pointer
argument of inline_mysql_mutex_init in sql_base.cc.

When initializing LOCK_dd_owns_lock_open mutex pass
correct PSI key instead of NULL value.
2010-09-24 20:26:24 +04:00
Konstantin Osipov
5b06699029 Merge 5.5 -> 5.5-merge. 2010-09-24 17:18:45 +04:00
Davi Arnaut
2044c80745 Merge of mysql-5.1-bugteam into mysql-5.5-merge. 2010-09-24 10:03:17 -03:00
Davi Arnaut
77a0ae9a9a Bug#45288: pb2 returns a lot of compilation warnings on linux
Temporarily disable strict aliasing warnings in order to get
wider coverage for optimized builds. Once the violations are
fixed and false-positives silenced, this flag should be removed.
2010-09-24 09:36:31 -03:00
Dmitry Shulga
e1b299ed02 Merged changes from 5.1-bugteam for bug#42503. 2010-09-24 19:12:09 +07:00
Dmitry Shulga
f14d8c2896 Follow-up for Bug#42503: fix a compilation warning. 2010-09-24 19:03:28 +07:00
Mattias Jonsson
3c8814cbc8 Bug#56659: Mismatch of CAPITAL vs small letters in "unified filelist" partitioning output
Update to previous patch according to reviewers comments.

Removing parts.partition_alter4_innodb from default.experimental
(Also closed bug#45299 as a duplicate of bug#56659 as a result of this.)
Adding run of tests requiring --big-test flag to default.weekly to keep the coverage.
2010-09-24 11:39:47 +02:00
Jon Olav Hauglid
71affc142d Bug #56678 Valgrind warnings from binlog.binlog_unsafe
After the patch for Bug#54579, multi inserts done with INSERT DELAYED
are binlogged as normal INSERT. During processing of the statement,
a new query string without the DELAYED keyword is made. The problem
was that this new string was incorrectly made when the INSERT DELAYED
was part of a prepared statement - data was read outside the allocated
buffer.

The reason for this bug was that a pointer to the position of the
DELAYED keyword inside the query string was stored when parsing the
statement. This pointer was then later (at runtime) used (via pointer
subtraction) to find the number of characters to skip when making a
new query string without DELAYED. But when the statement was re-executed
as part of a prepared statement, the original pointer would be invalid
and the pointer subtraction would give a wrong/random result.

This patch fixes the problem by instead storing the offsets from the
beginning of the query string to the start and end of the DELAYED 
keyword. These values will not depend on the memory position
of the query string at runtime and therefore not give wrong results
when the statement is executed in a prepared statement.

This bug was a regression introduced by the patch for Bug#54579.

No test case added as this bug is already covered by the existing
binlog.binlog_unsafe test case when running with valgrind.
2010-09-24 10:44:09 +02:00
Jon Olav Hauglid
11c4d8ba1f Bug #54920 Stored functions are allowed in HANDLER statements,
but broken.

Before this patch, it was allowed to use stored functions in
HANDLER ... READ statements. The problem was that this functionality
was not really supported by the code. Proper locking would for example
not be performed, and it was also possible to break replication by
having stored functions that performed updates.

This patch disallows the use of stored functions in HANDLER ... READ.
Any such statement will now give an ER_NOT_SUPPORTED_YET error.
This is an incompatible change and should be reflected in the
documentation.

Test case added to handler_myisam/handler_innodb.test.
2010-09-24 09:18:16 +02:00
Jon Olav Hauglid
4ecf1d32ac Merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-09-24 08:46:43 +02:00
Sunny Bains
ae1f1a6798 This patch comes from Michael: See bug#56933. 2010-09-24 08:37:09 +10:00
Mats Kindahl
246b7b0b7d Merging into mysql-5.5-bugfixing. 2010-09-23 14:38:24 +02:00
Jon Olav Hauglid
9b9299f8d5 Followup to Bug #56422 CHECK TABLE run when the table is locked
reports corruption along with timeout

This patch updates the result file for the
parts.partition_special_innodb test case which was, by mistake,
not updated in the original patch.
2010-09-23 11:13:21 +02:00
Mark Leith
693f13463f Bug#56922 SHOW ENGINE INNODB STATUS truncation limit is too strict and not instrumented
rb://459 approved by Jimmuy / Inaam
2010-09-23 09:12:09 +01:00
Sergey Glukhov
5539072560 Bug#54494 crash with explain extended and prepared statements
In case of outer join and emtpy WHERE conditon
'always true' condition is created for WHERE clasue.
Later in mysql_select() original SELECT_LEX WHERE
condition is overwritten with created cond.
However SELECT_LEX condition is also used as inital
condition in mysql_select()->JOIN::prepare().
On second execution of PS modified SELECT_LEX condition
is taken and it leads to crash.
The fix is to restore original SELECT_LEX condition
(set to NULL if original cond is NULL) in
 reinit_stmt_before_use().
HAVING clause is fixed too for safety reason
(no test case as I did not manage to think out
 appropriate example).
2010-09-23 10:43:51 +04:00
Alexey Kopytov
a1f1e77c38 Bug #56709: Memory leaks at running the 5.1 test suite
Fixed a number of memory leaks discovered by valgrind.
2010-09-22 23:33:18 +04:00
Dmitry Shulga
7cc604561c Auto-merge from mysql-5.1-bugteam for bug#56821. 2010-09-22 20:11:40 +07:00
Dmitry Shulga
c7ccc7265e Fixed bug#56821 - failure to start the MySQL Service. 2010-09-22 19:53:06 +07:00
Bjorn Munch
80d666bc21 Bug #56921 It should be possible to log connection statements in mysqltest
Added --enable-connect-log, somewhet similar to --enable-query-log
If query log is disabled, disable connect log too
Also some related cleanup in mysqltest.test: removing duplicate test loop
2010-09-22 10:57:10 +02:00
Jon Olav Hauglid
5d06dddff3 Bug #56494 Segfault in upgrade_shared_lock_to_exclusive() for
REPAIR of merge table
Bug #56422 CHECK TABLE run when the table is locked reports
           corruption along with timeout

The crash happened if a table maintenance statement (ANALYZE TABLE,
REPAIR TABLE, etc.) was executed on a MERGE table and opening and 
locking a child table failed. This could for example happen if a child
table did not exist or if a lock timeout happened while waiting for
a conflicting metadata lock to disappear.

Since opening and locking the MERGE table and its children failed,
the tables would be closed and the metadata locks released.
However, TABLE_LIST::table for the MERGE table would still be set,
with its value invalid since the tables had been closed.
This caused the table maintenance statement to try to continue
and upgrade the metadata lock on the MERGE table. But since the lock
already had been released, this caused a segfault.

This patch fixes the problem by setting TABLE_LIST::table to NULL 
if open_and_lock_tables() fails. This prevents maintenance
statements from continuing and trying to upgrade the metadata lock.

The patch includes a 5.5 version of the fix for
Bug #46339 crash on REPAIR TABLE merge table USE_FRM.
This bug caused REPAIR TABLE ... USE_FRM to give an assert 
when used on merge tables.

The patch also enables the CHECK TABLE statement for log tables.
Before, CHECK TABLE for log tables gave ER_CANT_LOCK_LOG_TABLE,
yet still counted the statement as successfully executed.
With the changes to table maintenance statement error handling
in this patch, CHECK TABLE would no longer be considered as
successful in this case. This would have caused upgrade scripts
to mistakenly think that the general and slow logs are corrupted
and have to be repaired. Enabling CHECK TABLES for log tables
prevents this from happening.

Finally, the patch changes the error message from "Corrupt" to
"Operation failed" for a number of issues not related to table
corruption. For example "Lock wait timeout exceeded" and 
"Deadlock found trying to get lock".

Test cases added to merge.test and check.test.
2010-09-22 10:15:41 +02:00
Mats Kindahl
48ac52a861 Merging into mysql-5.5-bugfixing. 2010-09-21 23:24:29 +02:00
Ingo Struewing
56d205c904 Bug#46339 - crash on REPAIR TABLE merge table USE_FRM
Null-merge from 5.1
2010-09-21 16:47:41 +02:00
Ingo Struewing
386d50478c Bug#46339 - crash on REPAIR TABLE merge table USE_FRM
Merge from saved bundle.
2010-09-21 16:37:18 +02:00
Evgeny Potemkin
cd8710fe8a Auto-merged. 2010-09-21 13:37:31 +04:00
Bjorn Munch
d7672f40be test fixes after 56753 2010-09-21 11:18:53 +02:00
Bjorn Munch
8102240ce9 test fixes after 56753 2010-09-21 11:16:20 +02:00
Vasil Dimov
5af0e024ae (ut0rnd.ic:88) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:41:58 +03:00
Vasil Dimov
32e9abebd5 (trx0undo.c:1873) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:40:44 +03:00
Vasil Dimov
a5975d4304 (trx0undo.c:1075) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:40:13 +03:00
Vasil Dimov
862caf5d5c (trx0trx.c:1801) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:39:35 +03:00
Georgi Kodinov
99039957fe WL#1054: code style remarks fixed. 2010-09-20 19:38:27 +03:00
Vasil Dimov
f5d1b4787a (trx0sys.c:252) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:37:53 +03:00
Vasil Dimov
53be9a8204 (trx0roll.c:746) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:36:08 +03:00
Vasil Dimov
c2fc573435 (trx0roll.c:747) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:35:13 +03:00
Vasil Dimov
19a4c1429f (trx0purge.c:1082) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:34:39 +03:00
Vasil Dimov
202cebad7c (trx0purge.c:674) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:33:38 +03:00
Vasil Dimov
0babdaf233 (trx0purge.c:316) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:32:35 +03:00
Vasil Dimov
78d7f7b19a (trx0purge.c:318) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:30:44 +03:00
Vasil Dimov
6f082344d5 (row0vers.c:74) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:17:20 +03:00
Vasil Dimov
7f1ffcfbb3 (row0umod.c:117) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:10:33 +03:00
Vasil Dimov
60cd54f3ec (row0purge.c:789) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:09:30 +03:00