Commit graph

67154 commits

Author SHA1 Message Date
unknown
b3cba90626 Merge from mysql-5.1.51-release 2010-09-28 10:33:22 +02:00
Vasil Dimov
fbeb571369 Manually merge a GCC warning fix from 5.1 to 5.5:
------------------------------------------------------------
  revno: 3615
  revision-id: vasil.dimov@oracle.com-20100928081234-22qbm6cwht521484
  parent: vasil.dimov@oracle.com-20100928063833-snn6cjwgksa6gk3b
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Tue 2010-09-28 11:12:34 +0300
  message:
    Silence a GCC warning about reaching the end of non-void func
    
    Spotted by:	Marko
2010-09-28 11:14:42 +03:00
Vasil Dimov
9f3660c6e5 Silence a GCC warning about reaching the end of non-void func
Spotted by:	Marko
2010-09-28 11:12:34 +03:00
Vasil Dimov
394aa46d37 Merge mysql-5.5-bugfixing -> mysql-5.5-innodb 2010-09-28 09:40:57 +03:00
Vasil Dimov
57f59c738e Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-09-28 09:38:33 +03:00
Marc Alff
25bac73707 Added missing paterns 2010-09-27 18:23:54 -06:00
Vasil Dimov
b9f144fa4b 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
500cb49295 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
aa40040439 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
d63db001b6 Merge of mysql-5.1-bugteam into mysql-5.5-merge. 2010-09-24 19:19:30 -03:00
Davi Arnaut
58dfba2899 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
060289e9ce 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
48de6a60d2 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.

mysql-test/suite/perfschema/r/dml_setup_instruments.result:
  Updated test results after adding P_S instrumentation
  for LOCK_dd_owns_lock_open.
sql/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
7a30a12228 Merge 5.5 -> 5.5-merge. 2010-09-24 17:18:45 +04:00
Davi Arnaut
5c09a44d88 Merge of mysql-5.1-bugteam into mysql-5.5-merge. 2010-09-24 10:03:17 -03:00
Davi Arnaut
930a50f9d3 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
1718180766 Merged changes from 5.1-bugteam for bug#42503. 2010-09-24 19:12:09 +07:00
Dmitry Shulga
7461d92d45 Follow-up for Bug#42503: fix a compilation warning.
sql/sql_cache.cc:
  Added include of send_data_in_chunks() definiton when macros EMBEDDED_LIBRARY is on.
2010-09-24 19:03:28 +07:00
Mattias Jonsson
f7d82cd3a2 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.

mysql-test/collections/default.experimental:
  Removed partition_alter4_innodb since it now requires --big-test flag to run
  since it is very time consuming.
mysql-test/collections/default.weekly:
  Added run of test that require --big-test flag, to be run on weekly basis.
2010-09-24 11:39:47 +02:00
Jon Olav Hauglid
68f87c72c0 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
f89287cac4 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
bf1d4487fb Merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-09-24 08:46:43 +02:00
Sunny Bains
064fed3b25 This patch comes from Michael: See bug#56933. 2010-09-24 08:37:09 +10:00
Mats Kindahl
04b3b7c1a6 Merging into mysql-5.5-bugfixing. 2010-09-23 14:38:24 +02:00
Jon Olav Hauglid
6b8032ed4f 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
14c7c747a5 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
Alexey Kopytov
faf54ff95c Bug #56709: Memory leaks at running the 5.1 test suite
Fixed a number of memory leaks discovered by valgrind.

dbug/dbug.c:
  This is actually an addendum to the fix for bug #52629:
  
  - there is no point in limiting the fix to just global
  variables, session ones are also affected.
  - zero all fields when allocating a new 'state' structure so
  that FreeState() does not deal with unitialized data later.
  - add a check for a NULL pointer in DBUGCloseFile()
mysql-test/r/partition_error.result:
  Added a test case for bug #56709.
mysql-test/r/variables_debug.result:
  Added a test case for bug #56709.
mysql-test/t/partition_error.test:
  Added a test case for bug #56709.
mysql-test/t/variables_debug.test:
  Added a test case for bug #56709.
sql/item_timefunc.cc:
  There is no point in declaring 'value' as a member of
  Item_extract and dynamically allocating memory for it in
  Item_extract::fix_length_and_dec(), since this string is only
  used as a temporary storage in Item_extract::val_int().
sql/item_timefunc.h:
  Removed 'value' from the Item_extract class definition.
sql/sql_load.cc:
  - we may need to deallocate 'buffer' even when 'error' is
    non-zero in some cases, since 'error' is public, and there is
    external code modifying it.
  - assign NULL to buffer when deallocating it so that we don't
    do it twice in the destructor
  - there is no point in changing 'error' in the destructor.
2010-09-22 23:33:18 +04:00
Dmitry Shulga
3589c8729b Auto-merge from mysql-5.1-bugteam for bug#56821. 2010-09-22 20:11:40 +07:00
Dmitry Shulga
9516e824e0 Fixed bug#56821 - failure to start the MySQL Service.
sql/log.cc:
  reopen_fstreams modified: fixed error in processing of
  stdout/stderr when run mysqld as Windows service.
2010-09-22 19:53:06 +07:00
Bjorn Munch
7b216d7625 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
e14934d26d 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
3f975a7fcf Merging into mysql-5.5-bugfixing. 2010-09-21 23:24:29 +02:00
Ingo Struewing
b7a8979d0d 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
b288324a13 Bug#46339 - crash on REPAIR TABLE merge table USE_FRM
Merge from saved bundle.
2010-09-21 16:37:18 +02:00
Evgeny Potemkin
3055d13e7b Auto-merged. 2010-09-21 13:37:31 +04:00
Bjorn Munch
d244b2872d test fixes after 56753 2010-09-21 11:18:53 +02:00
Bjorn Munch
ee6f8ae1bd test fixes after 56753 2010-09-21 11:16:20 +02:00
Vasil Dimov
f482bce2c1 (ut0rnd.ic:88) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:41:58 +03:00
Vasil Dimov
a6cc6cd617 (trx0undo.c:1873) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:40:44 +03:00
Vasil Dimov
4d79dc6fab (trx0undo.c:1075) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:40:13 +03:00
Vasil Dimov
01e095df37 (trx0trx.c:1801) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:39:35 +03:00
Georgi Kodinov
5f9c629da0 WL#1054: code style remarks fixed. 2010-09-20 19:38:27 +03:00
Vasil Dimov
cbf60280af (trx0sys.c:252) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:37:53 +03:00
Vasil Dimov
154ea4f4c5 (trx0roll.c:746) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:36:08 +03:00
Vasil Dimov
f7af534a56 (trx0roll.c:747) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:35:13 +03:00
Vasil Dimov
9cf5e1de92 (trx0purge.c:1082) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:34:39 +03:00
Vasil Dimov
74162b2092 (trx0purge.c:674) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:33:38 +03:00
Vasil Dimov
81e539f3bc (trx0purge.c:316) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:32:35 +03:00
Vasil Dimov
d75e5995d1 (trx0purge.c:318) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:30:44 +03:00
Vasil Dimov
70a486c7e7 (row0vers.c:74) Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-20 19:17:20 +03:00