Commit graph

62597 commits

Author SHA1 Message Date
Marko Mäkelä
a1250799af Work around Bug #53750 in innodb.innodb_bug48024 2010-05-19 10:56:13 +03:00
Marko Mäkelä
4ff217a458 Work around Bug #53750 in innodb_bug48024.test 2010-05-18 16:06:58 +03:00
Marko Mäkelä
d32bf00e21 Document Bug #48024 and Bug #53644 in the ChangeLog 2010-05-14 16:10:50 +03:00
Marko Mäkelä
54f59fb55e Make the InnoDB FOREIGN KEY parser understand multi-statements. (Bug #48024)
Also make InnoDB thinks that /*/ only starts a comment. (Bug #53644).

This fixes the bugs in the InnoDB Plugin.

ha_innodb.h: Use trx_query_string() instead of trx_query() when
available (MySQL 5.1.42 or later).

innobase_get_stmt(): New function, to retrieve the currently running
SQL statement.

struct trx_struct: Remove mysql_query_str. Use innobase_get_stmt() instead.

dict_strip_comments(): Add and observe the parameter sql_length. Treat
/*/ as the start of a comment.

dict_create_foreign_constraints(), row_table_add_foreign_constraints():
Add the parameter sql_length.
2010-05-14 16:08:15 +03:00
Marko Mäkelä
c3c2279cbd Make the InnoDB FOREIGN KEY parser understand multi-statements. (Bug #48024)
Also make InnoDB thinks that /*/ only starts a comment. (Bug #53644).

struct trx_struct: Add mysql_query_len.

ha_innodb.cc: Use trx_query_string() instead of trx_query() and
initialize trx->mysql_query_len.

INNOBASE_COPY_STMT(thd, trx): New macro, to initialize
trx->mysql_query_str and trx->mysql_query_len.

dict_strip_comments(): Add and observe the parameter sql_length. Treat
/*/ as the start of a comment.

dict_create_foreign_constraints(), row_table_add_foreign_constraints():
Add the parameter sql_length.
2010-05-14 16:02:28 +03:00
Marko Mäkelä
162ab29157 Remove unused code. 2010-05-14 13:51:26 +03:00
Marko Mäkelä
42a07d5040 Document the Bug #53591 fix in the ChangeLog. 2010-05-12 13:46:03 +03:00
Marko Mäkelä
bfdae6402c ha_innobase::add_index(): Reset trx->error_state in error handling.
(Bug #53591)
2010-05-12 13:42:12 +03:00
Marko Mäkelä
96853eed54 Document recent fixes in ChangeLog. 2010-05-12 09:09:22 +03:00
Marko Mäkelä
2c889b9dbc row_merge_drop_temp_indexes(): Do not reference freed memory.
(Bug #53471)
2010-05-12 08:39:25 +03:00
Marko Mäkelä
80323e5200 Fix sys_vars.tx_isolation_func.test, which was broken in revno 3432
when making READ UNCOMMITTED lock as little as READ COMMITTED.
2010-05-11 19:58:45 +03:00
Vasil Dimov
f4e5069f60 Merge mysql-5.1-innodb from bk-internal locally 2010-05-11 14:00:29 +03:00
Vasil Dimov
703309a3a8 Raise InnoDB Plugin version from 1.0.8 to 1.0.9.
1.0.8 will be released in MySQL 5.1.47, so
1.0.9 will be released in MySQL 5.1.48
2010-05-11 13:58:28 +03:00
Marko Mäkelä
537abedca7 Merge a patch from Facebook to fix Bug #53290
commit e759bc64eb5c5eed4f75677ad67246797d486460
Author: Ryan Mack
Date:   3 days ago

    Bugfix for 53290, fast unique index creation fails on duplicate null values

    Summary:
    Bug in the fast index creation code incorrectly considers null
    values to be duplicates during block merging.  Innodb policy is that
    multiple null values are allowed in a unique index.  Null duplicates
    were correctly ignored while sorting individual blocks and with slow
    index creation.

    Test Plan:
    mtr, including new test, load dbs using deferred index creation

    License:
    Copyright (C) 2009-2010 Facebook, Inc.  All Rights Reserved.

    Dual licensed under BSD license and GPLv2.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:
    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED BY FACEBOOK, INC. ``AS IS'' AND ANY EXPRESS OR
    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
    EVENT SHALL FACEBOOK, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the Free
    Software Foundation; version 2 of the License.

    This program is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
    more details.

    You should have received a copy of the GNU General Public License along with
    this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    Place, Suite 330, Boston, MA  02111-1307  USA
2010-05-11 13:53:08 +03:00
Marko Mäkelä
80142dd779 Do not demand that buf_page_t be fully initialized on 64-bit systems.
There may be padding before buf_page_t::zip. (Bug #53307)
2010-05-11 13:50:12 +03:00
Marko Mäkelä
b7cf210256 btr_page_split_and_insert(): Add an assertion
suggested by Sunny Bains when reviewing Bug #52964.
2010-05-11 13:49:10 +03:00
Marko Mäkelä
5acbc67f6e Remove a stray expression. Spotted by Sunny Bains. 2010-05-11 13:45:00 +03:00
Vasil Dimov
912750f2d2 Merge mysql-5.1 into mysql-5.1-innodb 2010-05-11 13:41:34 +03:00
Vasil Dimov
55968c768d Merge mysql-5.1-innodb from bk-internal into my local branch 2010-05-10 16:28:52 +03:00
Vasil Dimov
85f8f09c3e Make dict_index_stat_mutex[] static because it is only used in dict0dict.c 2010-05-10 16:24:33 +03:00
Marko Makela
dcdb8f82b3 Add an innodb_plugin test case for Bug #49164. 2010-05-10 13:38:25 +02:00
Marko Makela
6b062319d4 Add an innodb test case for Bug #49164. 2010-05-10 13:37:52 +02:00
unknown
f908dc88bc Raise version number after cloning 5.1.47 2010-05-05 19:58:16 +02:00
Georgi Kodinov
43bb40e0ac tree name change 2010-05-05 17:57:53 +03:00
Marko Mäkelä
326d75bd41 Merge a contribution from Ryan Mack at Facebook:
Bugfix for 53290, fast unique index creation fails on duplicate null values

    Summary:
    Bug in the fast index creation code incorrectly considers null
    values to be duplicates during block merging.  Innodb policy is that
    multiple null values are allowed in a unique index.  Null duplicates
    were correctly ignored while sorting individual blocks and with slow
    index creation.

    Test Plan:
    mtr, including new test, load dbs using deferred index creation

    DiffCamp Revision: 110840
    Reviewed By: mcallaghan
    CC: mcallaghan, mysql-devel@lists
    Revert Plan:
    OK
2010-05-05 15:39:01 +03:00
Marko Mäkelä
fa2c00d316 Re-enable ps_3innodb. 2010-05-05 15:05:55 +03:00
Marko Mäkelä
dc4abe9481 Document Bug #53256 2010-05-05 14:50:11 +03:00
Marko Mäkelä
3ea54dbfa9 Note the 1.0.7 release 2010-05-05 14:45:13 +03:00
Marko Mäkelä
3f8a812d7a row_merge_drop_temp_indexes(): Load the table via the dictionary cache.
Allow multiple indexes to be dropped. (Bug #53256)
2010-05-05 14:24:11 +03:00
Marko Mäkelä
415e5b282b Factor out innodb_multi_update.test from innodb.test 2010-05-05 13:44:25 +03:00
Marko Mäkelä
e73feed2d8 Factor out innodb_multi_update.test from innodb.test 2010-05-05 13:40:01 +03:00
Marko Mäkelä
356d3a6ddb Merge 2010-05-05 13:37:33 +03:00
Marko Mäkelä
d4b1117768 Add Valgrind diagnostics to track down Bug #38999. 2010-05-05 13:05:07 +03:00
Jimmy Yang
9141b67822 Update ChangeLog for bug fix of #53165 2010-05-05 03:02:19 -07:00
Marko Mäkelä
264942661b Add Valgrind diagnostics to track down Bug #38999. 2010-05-05 12:53:28 +03:00
Georgi Kodinov
aba66c6750 merge 2010-05-05 12:40:18 +03:00
Georgi Kodinov
c5b14cda44 tree name change 2010-05-05 12:38:59 +03:00
Georgi Kodinov
addd0a3e67 On behalf of Kristofer :
Bug#53417 my_getwd() makes assumptions on the buffer sizes which not always hold true
      
The mysys library contains many functions for rewriting file paths. Most of these
functions makes implicit assumptions on the buffer sizes they write to. If a path is put
in my_realpath() it will propagate to my_getwd() which assumes that the buffer holding
the path name is greater than 2. This is not true in cases.
      
In the special case where a VARBIN_ITEM is passed as argument to the LOAD_FILE function
this can lead to a crash.
      
This patch fixes the issue by introduce more safe guards agaist buffer overruns.
2010-05-05 11:54:52 +03:00
Jimmy Yang
6bc1a96b31 Port fix for 53165 to InnoDB 5.1 plugin. The change buffering options
are different in 5.1 comparing to that of 5.5, so a hand port is
necessary to avoid wrong default option to be set by a simple
branch merge.
2010-05-04 21:52:24 -07:00
Alfranio Correia
ed4819bbf7 merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-05-04 23:15:10 +01:00
Omer BarNir
fb47b30384 Updates to README file of the 'engines' test suites 2010-05-04 14:24:36 -07:00
Georgi Kodinov
71b453fa06 Bug #53371: COM_FIELD_LIST can be abused to bypass table level grants.
This is the 5.1 merge and extension of the fix.
The server was happily accepting paths in table name in all places a table
name is accepted (e.g. a SELECT). This allowed all users that have some 
privilege over some database to read all tables in all databases in all
mysql server instances that the server file system has access to.
Fixed by :
1. making sure no path elements are allowed in quoted table name when
constructing the path (note that the path symbols are still valid in table names
when they're properly escaped by the server).
2. checking the #mysql50# prefixed names the same way they're checked for
path elements in mysql-5.0.
2010-05-04 17:03:28 +03:00
Marko Mäkelä
322dda2397 Document Bug #53306 in the InnoDB Plugin ChangeLog. 2010-05-04 16:15:17 +03:00
Marko Mäkelä
304daa7431 fsp_init_file_page_low(): Zero out the page. (Bug #53306) 2010-05-04 16:13:58 +03:00
Marko Mäkelä
54b01fbff1 fsp_init_file_page_low(): Zero out the page. (Bug #53306) 2010-05-04 16:09:17 +03:00
Marko Mäkelä
6e5619be2c Add Valgrind checks to catch uninitialized writes to data files.
buf_flush_insert_into_flush_list(),
buf_flush_insert_sorted_into_flush_list(),
buf_flush_post_to_doublewrite_buf(): Check that the page is initialized.
2010-05-04 15:55:10 +03:00
Marko Mäkelä
19263724e4 Add Valgrind checks to catch uninitialized writes to data files.
buf_flush_insert_into_flush_list(),
buf_flush_insert_sorted_into_flush_list(),
buf_flush_post_to_doublewrite_buf(): Check that the page is initialized.
2010-05-04 15:47:44 +03:00
Marko Mäkelä
39be66c7ce Remove UNIV_BTR_AVOID_COPY. It was broken because btr_attach_half_pages()
would get the block, new_block in the wrong order.
Fixing that would have complicated the function even further
for this marginal case.
2010-05-04 13:55:46 +03:00
Alfranio Correia
3c30921662 BUG#43407 SET GLOBAL SQL_SLAVE_SKIP_COUNTER should log previous state in error log
When issuing a 'SET GLOBAL SQL_SLAVE_SKIP_COUNTER' statement, the previous
position along with the new position is dumped into the error log. Namely,
the following information is printed out: skip_counter, group_relay_log_name
and group_relay_log_pos.
2010-05-04 10:41:28 +01:00
Marko Mäkelä
4e76242675 btr_page_split_and_insert(): Correct the fix of Bug #52964.
When split_rec==NULL, choose the correct node pointer key (first_rec).
2010-05-04 12:31:28 +03:00