Commit graph

65658 commits

Author SHA1 Message Date
Alexey Kopytov
eaea879db3 Fixed an incorrect merge from 5.1-bugteam. 2010-05-27 14:48:50 +04:00
Alexey Kopytov
17325b8d67 Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.
Null-merged patch for bug 53907.

Conflicts:

   conflict      sql/sql_parse.cc
2010-05-27 14:42:12 +04:00
Alexey Kopytov
54a006fa0f Automerge. 2010-05-27 14:14:27 +04:00
Alexey Kopytov
b19c880522 Automerge. 2010-05-27 14:08:44 +04:00
Vasil Dimov
96c47c4df1 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(skipping the change to storage/innobase/os/os0file.c because
that issue has already been addressed in mysql-trunk-innodb)
2010-05-27 12:47:57 +03:00
Tor Didriksen
2857b55a46 Bug #53445 Build with -Wall and fix warnings that it generates
Post-push fix: -Wall implies -Wunused on some platforms,
which will generate thousands of warnings about unused parameters.
2010-05-27 09:42:48 +02:00
Vasil Dimov
0efa64d440 Fix a compiler warning introduced in
jimmy.yang@oracle.com-20100526014433-bx0t9794mnvkiaft
2010-05-27 08:51:03 +03:00
Kristofer Pettersson
fd75f56fd5 automerge 2010-05-26 17:17:33 +02:00
Kristofer Pettersson
0ffa3863c7 Bug#52107 Comment in sql/net_serv.cc still makes "GPL protocol" claim
Removed misleading comments.
2010-05-26 17:13:02 +02:00
a19c5a6608 Manual merge 2010-05-26 22:34:25 +08:00
Tor Didriksen
d8536dfbdd Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.
2010-05-26 16:12:23 +02:00
Alexander Nozdrin
33e9d05c08 Ignore files auto-generated for each build by CMake-build-scripts. 2010-05-26 14:34:41 +04:00
Alexander Nozdrin
34c7685b24 Patch for Bug#53937 (Junk make-ccc files included in MySQL Server bzr repo).
Remove make-ccc files.
2010-05-26 14:20:14 +04:00
Mattias Jonsson
b3259e93ea pre push fix of test results 2010-05-26 09:56:55 +02:00
Jimmy Yang
1ecfadf83b Update ChangeLog for bug fix regarding 53582. 2010-05-25 22:38:14 -07:00
Jimmy Yang
0aed1f061e Fix Bug #53592 in plugin code, "crash replacing duplicates into table
after fast alter table added unique key". Look up MySQL index number should
go through index translation table.

rb://347, approved by Marko
2010-05-25 22:31:27 -07:00
Jimmy Yang
00dfb12b92 Check in the support for Information Schema System Table Views. Users
can now view the content of InnoDB System Tables through following
information schema tables:

information_schema.INNODB_SYS_TABLES
information_schema.INNODB_SYS_INDEXES
information_schema.INNODB_SYS_COUMNS
information_schema.INNODB_SYS_FIELDS
information_schema.INNODB_SYS_FOREIGN
information_schema.INNODB_SYS_FOREIGN_COLS
information_schema.INNODB_SYS_TABLESTATS

rb://330 Approved by Marko
2010-05-25 18:44:33 -07:00
Ramil Kalimullin
442e0f01f2 Manual merge. 2010-05-25 22:30:08 +04:00
Mattias Jonsson
2e1ade56f8 merge 2010-05-25 17:41:11 +02:00
Mattias Jonsson
e596ae0795 merge 2010-05-25 17:26:48 +02:00
Alexey Kopytov
8fabbdd789 Bug #53830: !table || (!table->read_set ||
bitmap_is_set(table->read_set, field_index))

UPDATE on an InnoDB table modifying the same index that is used
to satisfy the WHERE condition could trigger a debug assertion
under some circumstances.

Since for engines with the HA_PRIMARY_KEY_IN_READ_INDEX flag
set results of an index scan on a secondary index are appended
by the primary key value, if a query involves only columns from
the primary key and a secondary index, the latter is considered
to be covering.

That tricks mysql_update() to mark for reading only columns
from the secondary index when it does an index scan to retrieve
rows to update in case a part of that key is also being
updated. However, there may be other columns in WHERE that are
part of the primary key, but not the secondary one.

What we actually want to do in this case is to add index
columns to the existing WHERE columns bitmap rather than
replace it.
2010-05-25 18:43:45 +04:00
Vasil Dimov
5ae998292c Merge mysql-5.1-innodb from bk-internal into my local tree 2010-05-25 17:21:33 +03:00
Ramil Kalimullin
422621a43f Automerge. 2010-05-25 18:07:47 +04:00
Ramil Kalimullin
edfea7d590 Fix for bug #53907: Table dump command can be abused to dump arbitrary tables.
Problem: one with SELECT privilege on some table may dump other table
performing COM_TABLE_DUMP command due to missed check of the table name.

Fix: check the table name.
2010-05-25 17:56:23 +04:00
Mattias Jonsson
427436d4b8 merge 2010-05-25 15:45:01 +02:00
Mattias Jonsson
ff36f028c3 Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
Problem was reporting wrong error

Fixed by adding a new error which better explain the problem.
2010-05-25 15:41:00 +02:00
Jonathan Perkin
6ed71b7d1e Pull in time.h for localtime_r. 2010-05-25 14:37:35 +01:00
Davi Arnaut
5f5e23fea9 Bug#53908: compile failure with embedded enabled
This fixes a recently introduced regression, where a variable is
not defined for the embedded server. Although the embedded server
is not supported in 5.0, make it at least compile.
2010-05-25 10:36:48 -03:00
Jonathan Perkin
baa8f0127b bug#49968: Properly define HAVE_ERRNO_AS_DEFINE for the appropriate
OpenBSD releases.

Apply patch from Brad Smith, thanks!
2010-05-25 14:27:52 +01:00
Marko Mäkelä
34b126a238 row_search_for_mysql(): Add assertions to track down Bug #53627. 2010-05-25 15:53:52 +03:00
Marko Mäkelä
10b06978fe Suppress bogus Valgrind warnings about buf_buddy_relocate()
accessing uninitialized memory in Valgrind-instrumented builds.
2010-05-25 15:37:48 +03:00
Vasil Dimov
f67c8ebeea Merge mysql-5.1 into mysql-5.1-innodb
(this changeset does not introduce any changes)
2010-05-25 12:45:17 +03:00
Mattias Jonsson
39d9765297 post push fix 2010-05-25 11:34:36 +02:00
Vasil Dimov
f27f15987f Merge mysql-5.1-innodb from bk-internal into my local tree 2010-05-25 12:14:57 +03:00
Vasil Dimov
c28e99a5a4 Fix comments on row_merge_write()
This is a port of
vasil.dimov@oracle.com-20100521175337-c1b1lqxgizqegb0w and
vasil.dimov@oracle.com-20100521180951-mef23h24k023xuwq
from mysql-trunk-innodb
2010-05-25 11:01:03 +03:00
Vasil Dimov
7d50be10d2 (second attempt) Disable the tests on embedded windows that fail due to
Bug #53947 InnoDB: Assertion failure in thread 4224 in file
.\sync\sync0sync.c line 324

This changeset should be reverted once the bug is fixed.
2010-05-25 10:36:06 +03:00
Vasil Dimov
c44ff04954 Revert a changeset since it does not disable the tests:
------------------------------------------------------------
  revno: 3116
  revision-id: vasil.dimov@oracle.com-20100524182209-sk114oipf1vhjbv5
  parent: vasil.dimov@oracle.com-20100524175802-twmwb29vvaehe6b8
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-trunk-innodb
  timestamp: Mon 2010-05-24 21:22:09 +0300
  message:
    Disable the tests on embedded windows that fail due to
    
    Bug #53947 InnoDB: Assertion failure in thread 4224 in file
    .\sync\sync0sync.c line 324
    
    This changeset should be reverted once the bug is fixed.
2010-05-25 10:29:36 +03:00
Mattias Jonsson
2b846b39c1 merge 2010-05-25 08:35:48 +02:00
69c9dbabe6 Postfix BUG#49741 2010-05-25 11:39:45 +08:00
Mattias Jonsson
b0ecceb95b merge 2010-05-24 23:21:08 +02:00
Alexander Nozdrin
f54464035a Fix for Bug#53925 (valgrind failures in rpl.rpl_get_master_version_and_clock
in mysql-trunk-merge).

There were two problems:
  - a mistake during merge of a patch for Bug 52629 from 5.1;
  - MTR treated auxilary output of newer valgrind as an error.

The fixes are:
  - Fix merge error;
  - Teach MTR to skip 'HEAP summary' section of valgrind output.
2010-05-24 22:57:25 +04:00
Vasil Dimov
080a0aaba9 Merge a changeset from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3477
  revision-id: vasil.dimov@oracle.com-20100520132735-a120y85kqmhp7hxi
  parent: vasil.dimov@oracle.com-20100520125403-3u9ydcfu8vz8spls
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Thu 2010-05-20 16:27:35 +0300
  message:
    Disable main.ps_3innodb for valgrind tests since it results in known
    failures, that are described in
    
    Bug#38999 valgrind warnings for update statement in function compare_record()
    
    At the time I am adding this the failures are:
    
    main.ps_3innodb                          [ fail ]  Found warnings/errors in server log file!
            Test ended at 2010-05-20 01:17:34
    line
    ==31559== Thread 11:
    ==31559== Conditional jump or move depends on uninitialised value(s)
    ==31559==    at 0x75C5BD: compare_record(st_table*) (sql_update.cc:35)
    ==31559==    by 0x744732: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
    ==31559==    by 0x74A0D7: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
    ==31559==    by 0x6A79B4: mysql_execute_command(THD*) (sql_parse.cc:3198)
    ==31559==    by 0x754998: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
    ==31559==    by 0x754C4F: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
    ==31559==    by 0x754F33: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
    ==31559==    by 0x6A5028: mysql_execute_command(THD*) (sql_parse.cc:2272)
    ==31559==    by 0x6ADAE8: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5986)
    ==31559==    by 0x6AF3A4: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
    ==31559==    by 0x6B0800: do_command(THD*) (sql_parse.cc:874)
    ==31559==    by 0x69CB46: handle_one_connection (sql_connect.cc:1134)
    ==31559==    by 0x33EDA062F6: start_thread (in /lib64/libpthread-2.5.so)
    ==31559==    by 0x33ECED1B6C: clone (in /lib64/libc-2.5.so)
    ==31559== Conditional jump or move depends on uninitialised value(s)
    ==31559==    at 0x75C5D0: compare_record(st_table*) (sql_update.cc:35)
    ==31559==    by 0x744732: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
    ==31559==    by 0x74A0D7: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
    ==31559==    by 0x6A79B4: mysql_execute_command(THD*) (sql_parse.cc:3198)
    ==31559==    by 0x754998: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
    ==31559==    by 0x754C4F: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
    ==31559==    by 0x754F33: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
    ==31559==    by 0x6A5028: mysql_execute_command(THD*) (sql_parse.cc:2272)
    ==31559==    by 0x6ADAE8: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5986)
    ==31559==    by 0x6AF3A4: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
    ==31559==    by 0x6B0800: do_command(THD*) (sql_parse.cc:874)
    ==31559==    by 0x69CB46: handle_one_connection (sql_connect.cc:1134)
    ==31559==    by 0x33EDA062F6: start_thread (in /lib64/libpthread-2.5.so)
    ==31559==    by 0x33ECED1B6C: clone (in /lib64/libc-2.5.so)
    ^ Found warnings in /export/home4/pb2/test/sb_3-1827397-1274300957.87/mysql-5.1.48-linux-x86_64-test/mysql-test/var-n_mix/log/mysqld.1.err
2010-05-24 21:27:25 +03:00
Vasil Dimov
9f42efeb78 Disable the tests on embedded windows that fail due to
Bug #53947 InnoDB: Assertion failure in thread 4224 in file
.\sync\sync0sync.c line 324

This changeset should be reverted once the bug is fixed.
2010-05-24 21:22:09 +03:00
Vasil Dimov
d064f00aa7 Merge mysql-trunk-innodb from bk-internal into my local tree 2010-05-24 20:58:02 +03:00
Alexey Kopytov
71929d76d0 Fixed an incorrectly merged .result file. 2010-05-24 18:13:00 +04:00
cc05440836 Bug #49741 test files contain explicit references to bin/relay-log positions
Some of the test cases reference to binlog position and
these position numbers are written into result explicitly.
It is difficult to maintain if log event format changes. 

There are a couple of cases explicit position number appears, 
we handle them in different ways
A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options
   Use --replace_result to mask them.
B. 'SHOW BINLOG EVENT ...'
   Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. 
   show_binlog_events.inc file's function is enhanced by given
   $binlog_file and $binlog_limit.
C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc'
   For the test cases just care a few items in the result of 'SHOW SLAVE STATUS',
   only the items related to each test case are showed.
   'show_slave_status.inc' is rebuild, only the given items in $status_items
   will be showed.
   'check_slave_is_running.inc' and 'check_slave_no_error.inc'
   and 'check_slave_param.inc' are auxiliary files helping
   to show running status and error information easily.
2010-05-24 21:54:08 +08:00
Mattias Jonsson
d7e7afd403 Merge of bug#51851.
Also moved HA_DATA_PARTITION from ha_partition.cc to table.h.
2010-05-24 14:51:59 +02:00
Marko Mäkelä
42eff81005 Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3479
revision-id: marko.makela@oracle.com-20100524110439-fazi70rlmt07tzd9
parent: vasil.dimov@oracle.com-20100520133157-42uk5q3pp0vsinac
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Mon 2010-05-24 14:04:39 +0300
message:
  Bug#53578: assert on invalid page access, in fil_io()

  Store the max_space_id in the data dictionary header in order to avoid
  space_id reuse.

  DICT_HDR_MIX_ID: Renamed to DICT_HDR_MAX_SPACE_ID, DICT_HDR_MIX_ID_LOW.

  dict_hdr_get_new_id(): Return table_id, index_id, space_id or a subset of them.

  fil_system_t: Add ibool space_id_reuse_warned.

  fil_create_new_single_table_tablespace(): Get the space_id from the caller.

  fil_space_create(): Issue a warning if the fil_system->max_assigned_id
  is exceeded.

  fil_assign_new_space_id(): Return TRUE/FALSE and take a pointer to the
  space_id as a parameter. Make the function public.

  fil_init(): Initialize all fil_system fields by mem_zalloc(). Remove
  explicit initializations of certain fields to 0 or NULL.
2010-05-24 14:45:24 +03:00
Marko Mäkelä
1a892fa206 Document the Bug #53578 fix. 2010-05-24 14:43:49 +03:00
Marko Mäkelä
b7a2474416 Bug#53578: assert on invalid page access, in fil_io()
Store the max_space_id in the data dictionary header in order to avoid
space_id reuse.

DICT_HDR_MIX_ID: Renamed to DICT_HDR_MAX_SPACE_ID, DICT_HDR_MIX_ID_LOW.

dict_hdr_get_new_id(): Return table_id, index_id, space_id or a subset of them.

fil_system_t: Add ibool space_id_reuse_warned.

fil_create_new_single_table_tablespace(): Get the space_id from the caller.

fil_space_create(): Issue a warning if the fil_system->max_assigned_id
is exceeded.

fil_assign_new_space_id(): Return TRUE/FALSE and take a pointer to the
space_id as a parameter. Make the function public.

fil_init(): Initialize all fil_system fields by mem_zalloc(). Remove
explicit initializations of certain fields to 0 or NULL.
2010-05-24 14:04:39 +03:00