Commit graph

65658 commits

Author SHA1 Message Date
Jimmy Yang
e9c542b05e Merge Bug#54044 fix from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3520
committer: Jimmy Yang <jimmy.yang@oracle.com>
branch nick: mysql-5.1-innodb
timestamp: Tue 2010-06-22 19:04:31 -0700
message:
  Fix bug #54044, Create temporary tables and using innodb crashes. Screen
  out NULL type columns, and return without creating the table.
  
  rb://378 approved by Marko
------------------------------------------------------------
2010-06-23 03:46:57 -07:00
Vasil Dimov
0a7d579992 Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG[_FULL] is defined
This will make PB2 test InnoDB with UNIV_DEBUG on its *_debug platforms

Discussed with:	Marko (on IRC)
2010-06-23 13:02:49 +03:00
Vasil Dimov
e3d842c60d Merge Bug#47991 fix from mysql-5.1-innodb
------------------------------------------------------------
  revno: 3517
  revision-id: vasil.dimov@oracle.com-20100622163043-dc0lxy0byg74viet
  parent: marko.makela@oracle.com-20100621095148-8g73k8k68dpj080u
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Tue 2010-06-22 19:30:43 +0300
  message:
    Fix Bug#47991 InnoDB Dictionary Cache memory usage increases indefinitely
    when renaming tables
    
    Allocate the table name using ut_malloc() instead of table->heap because
    the latter cannot be freed.
    
    Adjust dict_sys->size calculations all over the code.
    
    Change dict_table_t::name from const char* to char* because we need to
    ut_malloc()/ut_free() it.
    
    Reviewed by:	Inaam, Marko, Heikki (rb://384)
    Approved by:	Heikki (rb://384)
  ------------------------------------------------------------
2010-06-23 10:17:21 +03:00
Marko Mäkelä
f776568e32 Merge Bug#54686 fix from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3517
revision-id: marko.makela@oracle.com-20100622115215-kxtzx7xuugcxd375
parent: marko.makela@oracle.com-20100621095148-8g73k8k68dpj080u
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Tue 2010-06-22 14:52:15 +0300
message:
  Bug#54686 "field->col->mtype == type" assertion error at row/row0sel.c
  ha_innobase::index_read(), ha_innobase::records_in_range(): Check that
  the index is useable before invoking row_sel_convert_mysql_key_to_innobase().

  This fix is based on a suggestion by Yasufumi Kinoshita.
2010-06-22 15:05:33 +03:00
Marko Mäkelä
3ba73a2173 buf_flush_insert_in_flush_rbt(), buf_flush_validate_low():
Silence GCC warnings about dereferencing a type-punned pointer.
Approved by Jimmy Yang.
2010-06-22 13:43:17 +03:00
Marko Mäkelä
84b51676bf dict_load_column_low(): Initialize pos. Improve documentation.
Approved by Jimmy Yang.
2010-06-22 13:42:39 +03:00
Inaam Rana
72e5d2ae11 Fixes bug#39168.
Make a call to log_free_check() on all DML paths.
2010-06-21 11:52:09 -04:00
Vladislav Vaintroub
23d05c1c6e Bug#53593: Add some instrumentation to improve Valgrind sensitivity.
Implement WITH_VALGRIND for the CMake build.
2010-06-21 13:39:30 +02:00
Marko Mäkelä
cda93dfc8f Merge Bug #54658 fix from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3515
revision-id: marko.makela@oracle.com-20100621094008-o9fa153s3f09merw
parent: vasil.dimov@oracle.com-20100618085155-xnm469cbhedqea96
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Mon 2010-06-21 12:40:08 +0300
message:
  Bug #54658: InnoDB: Warning: allocated tablespace %lu, old maximum was 0

  dict_check_tablespaces_and_store_max_id(): Initialize max_space_id
  and fil_system->max_assigned_id from DICT_HDR_MAX_SPACE_ID.

  fil_space_create(): Suppress the warning unless !recv_recovery_on
  (do not complain while applying the redo log).
2010-06-21 13:32:39 +03:00
Vasil Dimov
e368a06464 Adjust innodb_mysql.result after the resolved conflict from the merge 2010-06-17 12:59:53 +03:00
Vasil Dimov
847ea21e82 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb 2010-06-17 12:41:20 +03:00
Vasil Dimov
9989cc8e99 Decrement version number from 1.1.2 to 1.1.1, this latest tree
is going to be 1.1.1.
2010-06-17 12:35:23 +03:00
Jimmy Yang
689d245782 This change splits innodb_file_format_check into innodb_file_format_check
and innodb_file_format_max two system variables. And this also fixes
bug #53654 after 2nd shutdown innodb_file_format_check attains strange
values.

rb://366 approved by Marko
2010-06-17 02:13:53 -07:00
Sunny Bains
146617790b Merge from parent. 2010-06-17 17:48:14 +10:00
Alexander Nozdrin
1337df3b79 Auto-merge from mysql-trunk. 2010-06-17 10:13:11 +04:00
Sunny Bains
24e30932d6 Revert a change that should have been a part of 3008.2.76..3008.2.78. 2010-06-17 11:06:13 +10:00
Alexey Kopytov
48c07a39c4 Bug#52208: gis fails on some platforms (Solaris, HP-UX, Linux)
On [Open]Solaris/x86 the FPU was not switched to 64-bit double
precision mode when the server binary was built with Sun
Studio. That caused GIS test failures due to differences in
expected and actual results.
2010-06-15 18:52:47 +04:00
Vasil Dimov
66c8b4eafc Increment InnoDB version number from 1.1.1 to 1.1.2,
the 1.1.1 release will be included inside MySQL 5.5.5 and is
up to (inclusive):
vasil.dimov@oracle.com-20100602124314-21l3cb27w4rbfqrq
2010-06-15 17:51:57 +03:00
Alexey Kopytov
6497bd3784 Backport of the patch for bug52208 to 5.1 since the
root cause of 52208 resulted in another test failure
in 5.1.
2010-06-15 18:29:53 +04:00
Bjorn Munch
baf3611a00 null upmerge 53424 2010-06-15 11:08:41 +02:00
Bjorn Munch
bc21a167f6 null upmerge 53424, irrelevant for 5.1 2010-06-15 11:03:52 +02:00
Bjorn Munch
b785819582 Bug #53424 Certain combination of flags give internal error
Reorder code breaks when finding tests skipped due to --skip-rpl etc.
Add simple test that master_opt is non-empty
2010-06-15 11:00:02 +02:00
Alexander Nozdrin
63f529a469 Make perfschema.pfs_upgrade and sys_vars.wait_timeout_func experimental. 2010-06-15 12:58:52 +04:00
Alexander Nozdrin
72584c312d Auto-merge (empty) from mysql-trunk. 2010-06-15 12:31:01 +04:00
Alexander Nozdrin
0b3751be6b Auto-merge from mysql-trunk. 2010-06-15 12:25:44 +04:00
Alexander Nozdrin
4135383c59 Auto-merge from mysql-trunk-bugfixing. 2010-06-15 12:04:59 +04:00
Vasil Dimov
6d84dd5ff3 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb 2010-06-14 14:46:36 +03:00
Bjorn Munch
61ace7c932 Upmerge and port 46882 2010-06-14 11:33:10 +02:00
Bjorn Munch
51a965f371 Upmerge and port 46882 2010-06-14 11:31:22 +02:00
Bjorn Munch
45c5eca0aa Bug #46882 Suite timeout doesn't kill stray processes
Kill mysqltest and call mtr_kill_leftovers() before terminating
2010-06-14 11:26:42 +02:00
Tor Didriksen
407da94893 Bug #53261 MTR tests archive_plugin and blackhole_plugin fail when compiling with cmake
Let mtr lookup the plugins, rather than hard-coding autotools lib path.
2010-06-14 11:23:49 +02:00
Marko Mäkelä
549d52dff6 Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3507
revision-id: marko.makela@oracle.com-20100610125623-ar6qf4w2pv2kr7mb
parent: sergey.glukhov@sun.com-20100609121718-04mpk5kjxvnrxdu8
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Thu 2010-06-10 15:56:23 +0300
message:
  Bug #38999: Re-enable innodb_multi_update.test
2010-06-14 09:50:30 +03:00
Marko Mäkelä
44df5a6d51 Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3506
revision-id: sergey.glukhov@sun.com-20100609121718-04mpk5kjxvnrxdu8
parent: sergey.glukhov@sun.com-20100609120734-ndy2281wau9067zv
committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
branch nick: mysql-5.1-innodb
timestamp: Wed 2010-06-09 16:17:18 +0400
message:
  Bug#38999 valgrind warnings for update statement in function compare_record()
  (InnoDB plugin branch)

 @ mysql-test/suite/innodb_plugin/r/innodb_mysql.result
    test case

 @ mysql-test/suite/innodb_plugin/t/innodb_mysql.test
    test case

 @ storage/innodb_plugin/row/row0sel.c
    init null bytes with default values as they might be
    left uninitialized in some cases and these uninited bytes
    might be copied into mysql record buffer that leads to
    valgrind warnings on next use of the buffer.
2010-06-14 09:35:01 +03:00
Alexey Kopytov
982c026282 Manual merge from mysql-5.1-bugteam.
conflicts:
   conflict      sql/sql_prepare.cc
2010-06-12 09:56:28 +04:00
Alexey Kopytov
13a43a1aac Addendum for the fix for bug #42064:
In Prepared_statement::prepare() bail out as soon as
parser_state.init() fails, trying to continue leads to crashes.
2010-06-12 09:52:31 +04:00
Alexey Kopytov
e69c738fe1 Automerge. 2010-06-12 00:40:02 +04:00
Alexey Kopytov
61aaf4edbb Fixed ha_ndbcluster_binlog.cc to use Parser_state::init(). 2010-06-12 00:35:28 +04:00
Alexey Kopytov
08f3b0ab92 Automerge. 2010-06-11 23:44:01 +04:00
Ramil Kalimullin
20e0a9ab8f Automerge. 2010-06-11 19:36:57 +04:00
Ramil Kalimullin
d4746b8e84 Automerge. 2010-06-11 18:43:36 +04:00
Alexey Kopytov
1ab6c34341 Null merge. 2010-06-11 17:54:39 +04:00
Alexey Kopytov
eae3b4fe76 Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.
conflicts:
   conflict      mysys/safemalloc.c
   conflict      sql/mysqld.cc
   conflict      sql/sp.cc
   conflict      sql/sql_lex.cc
   conflict      sql/sql_lex.h
   conflict      sql/sql_parse.cc
   conflict      sql/sql_prepare.cc
2010-06-11 17:48:24 +04:00
Alexey Kopytov
162e426238 Manual merge from the bugfix tree.
conflicts:
   conflict      sql/sql_parse.cc
2010-06-11 16:52:06 +04:00
Alexey Kopytov
b497e2c6b2 Manual merge from the bugfix tree.
conflicts:
   conflict      sql/sql_parse.cc
2010-06-11 14:51:21 +04:00
Martin Hansson
6d38a625c1 Merge of fix for bug#53859. 2010-06-11 10:15:55 +02:00
Martin Hansson
5bace3f049 Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&,
Item*) at opt_sum.cc:305
      
Queries applying MIN/MAX functions to indexed columns are
optimized to read directly from the index if all key parts
of the index preceding the aggregated key part are bound to
constants by the WHERE clause. A prefix length is also
produced, equal to the total length of the bound key
parts. If the aggregated column itself is bound to a
constant, however, it is also included in the prefix.

Such full search keys are read as closed intervals for
reasons beyond the scope of this bug. However, the procedure
missed one case where a key part meant for use as range
endpoint was being overwritten with a NULL value destined
for equality checking. In this case the key part was
overwritten but the range flag remained, causing open
interval reading to be performed.

Bug was fixed by adding more stringent checking to the
search key building procedure (matching_cond) and never
allow overwrites of range predicates with non-range
predicates.

An assertion was added to make sure open intervals are never
used with full search keys.
2010-06-11 09:38:29 +02:00
Davi Arnaut
d6e003545a Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-10 22:30:49 -03:00
Davi Arnaut
53b8829682 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

One somewhat major source of strict-aliasing violations and
related warnings is the SQL_LIST structure. For example,
consider its member function `link_in_list` which takes
a pointer to pointer of type T (any type) as a pointer to
pointer to unsigned char. Dereferencing this pointer, which
is done to reset the next field, violates strict-aliasing
rules and might cause problems for surrounding code that
uses the next field of the object being added to the list.

The solution is to use templates to parametrize the SQL_LIST
structure in order to deference the pointers with compatible
types. As a side bonus, it becomes possible to remove quite
a few casts related to acessing data members of SQL_LIST.
2010-06-10 17:45:22 -03:00
Davi Arnaut
bb036c93b4 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.

As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.

The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
2010-06-10 17:16:43 -03:00
Alexander Nozdrin
222076528d Auto-merge from mysql-trunk-bugfixing. 2010-06-10 18:00:32 +04:00