Commit 9a591471 authored by Aleksandr Kuzminsky's avatar Aleksandr Kuzminsky

Sync with rev.105

parent 22250790
Portions of this software contain modifications contributed by Percona, Inc.
These contributions are used with the following license:
Copyright (c) 2008, 2009, Percona Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of the Percona Inc. nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"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 THE COPYRIGHT
OWNER OR CONTRIBUTORS 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.
Portions of this software contain modifications contributed by
Sun Microsystems, Inc. These contributions are used with the following
license:
Copyright (c) 2009, Sun Microsystems, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of Sun Microsystems, Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"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 THE COPYRIGHT
OWNER OR CONTRIBUTORS 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 diff is collapsed.
......@@ -3296,6 +3296,7 @@ btr_estimate_number_of_different_key_vals(
}
while (rec != supremum) {
rec_t* next_rec;
/* count recs */
if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) {
n_recs++;
......@@ -3309,8 +3310,7 @@ btr_estimate_number_of_different_key_vals(
n_not_nulls[j]++;
}
}
rec_t* next_rec = page_rec_get_next(rec);
next_rec = page_rec_get_next(rec);
if (next_rec == supremum) {
break;
}
......
......@@ -471,16 +471,15 @@ buf_buddy_relocate(
actually is a properly initialized buf_page_t object. */
if (size >= PAGE_ZIP_MIN_SIZE) {
if (!have_page_hash_mutex)
mutex_exit(&zip_free_mutex);
/* This is a compressed page. */
mutex_t* mutex;
if (!have_page_hash_mutex) {
mutex_exit(&zip_free_mutex);
mutex_enter(&LRU_list_mutex);
rw_lock_x_lock(&page_hash_latch);
}
/* The src block may be split into smaller blocks,
some of which may be free. Thus, the
mach_read_from_4() calls below may attempt to read
......
......@@ -1263,13 +1263,13 @@ buf_flush_LRU_recommendation(void)
+ BUF_FLUSH_EXTRA_MARGIN)
&& (distance < BUF_LRU_FREE_SEARCH_LEN)) {
mutex_t* block_mutex;
if (!bpage->in_LRU_list) {
/* reatart. but it is very optimistic */
bpage = UT_LIST_GET_LAST(buf_pool->LRU);
continue;
}
mutex_t* block_mutex = buf_page_get_mutex_enter(bpage);
block_mutex = buf_page_get_mutex_enter(bpage);
ut_a(block_mutex);
......
......@@ -2995,6 +2995,13 @@ fil_open_single_table_tablespace(
ulint i;
int len;
ib_uint64_t current_lsn;
ulint size_low, size_high, size;
ib_int64_t size_bytes;
dict_table_t* table;
dict_index_t* index;
fil_system_t* system;
fil_node_t* node = NULL;
fil_space_t* space;
current_lsn = log_get_lsn();
......@@ -3016,25 +3023,20 @@ fil_open_single_table_tablespace(
success = os_file_write(filepath, file, page, 0, 0, UNIV_PAGE_SIZE);
/* get file size */
ulint size_low, size_high, size;
ib_int64_t size_bytes;
os_file_get_size(file, &size_low, &size_high);
size_bytes = (((ib_int64_t)size_high) << 32)
+ (ib_int64_t)size_low;
/* get cruster index information */
dict_table_t* table;
dict_index_t* index;
table = dict_table_get_low(name);
index = dict_table_get_first_index(table);
ut_a(index->page==3);
/* read metadata from .exp file */
n_index = 0;
bzero(old_id, sizeof(old_id));
bzero(new_id, sizeof(new_id));
bzero(root_page, sizeof(root_page));
memset(old_id, 0, sizeof(old_id));
memset(new_id, 0, sizeof(new_id));
memset(root_page, 0, sizeof(root_page));
info_file_path = fil_make_ibd_name(name, FALSE);
len = strlen(info_file_path);
......@@ -3084,18 +3086,54 @@ skip_info:
mem_heap_t* heap = NULL;
ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
ib_int64_t offset;
size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
/* over write space id of all pages */
ib_int64_t offset;
rec_offs_init(offsets_);
fprintf(stderr, "InnoDB: Progress in %:");
for (offset = 0; offset < size_bytes; offset += UNIV_PAGE_SIZE) {
ulint checksum_field;
ulint old_checksum_field;
success = os_file_read(file, page,
(ulint)(offset & 0xFFFFFFFFUL),
(ulint)(offset >> 32), UNIV_PAGE_SIZE);
/* skip inconsistent pages, it may be free page. */
if (memcmp(page + FIL_PAGE_LSN + 4,
page + UNIV_PAGE_SIZE
- FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) {
goto skip_write;
}
checksum_field = mach_read_from_4(page
+ FIL_PAGE_SPACE_OR_CHKSUM);
old_checksum_field = mach_read_from_4(
page + UNIV_PAGE_SIZE
- FIL_PAGE_END_LSN_OLD_CHKSUM);
if (old_checksum_field != mach_read_from_4(page
+ FIL_PAGE_LSN)
&& old_checksum_field != BUF_NO_CHECKSUM_MAGIC
&& old_checksum_field
!= buf_calc_page_old_checksum(page)) {
goto skip_write;
}
if (checksum_field != 0
&& checksum_field != BUF_NO_CHECKSUM_MAGIC
&& checksum_field
!= buf_calc_page_new_checksum(page)) {
goto skip_write;
}
if (mach_read_from_4(page + FIL_PAGE_OFFSET) || !offset) {
mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, id);
......@@ -3125,13 +3163,30 @@ skip_info:
n_recs = page_get_n_recs(page);
while (rec && rec != supremum && n_recs > 0) {
ulint n_fields;
ulint i;
ulint offset = index->trx_id_offset;
offsets = rec_get_offsets(rec, index, offsets,
ULINT_UNDEFINED, &heap);
n_fields = rec_offs_n_fields(offsets);
if (!offset) {
offsets = rec_get_offsets(rec, index, offsets,
ULINT_UNDEFINED, &heap);
offset = row_get_trx_id_offset(rec, index, offsets);
}
trx_write_trx_id(rec + offset, ut_dulint_create(0, 1));
for (i = 0; i < n_fields; i++) {
if (rec_offs_nth_extern(offsets, i)) {
ulint local_len;
byte* data;
data = rec_get_nth_field(rec, offsets, i, &local_len);
local_len -= BTR_EXTERN_FIELD_REF_SIZE;
mach_write_to_4(data + local_len + BTR_EXTERN_SPACE_ID, id);
}
}
rec = page_rec_get_next(rec);
n_recs--;
}
......@@ -3165,6 +3220,7 @@ skip_info:
(ulint)(offset >> 32), UNIV_PAGE_SIZE);
}
skip_write:
if (size_bytes
&& ((ib_int64_t)((offset + UNIV_PAGE_SIZE) * 100) / size_bytes)
!= ((offset * 100) / size_bytes)) {
......@@ -3240,10 +3296,8 @@ skip_info:
}
mem_free(info_file_path);
fil_system_t* system = fil_system;
system = fil_system;
mutex_enter(&(system->mutex));
fil_node_t* node = NULL;
fil_space_t* space;
space = fil_space_get_by_id(id);
if (space)
node = UT_LIST_GET_FIRST(space->chain);
......
......@@ -807,7 +807,7 @@ i_s_innodb_buffer_pool_pages_index_fill(
field_store_string(table->field[0], NULL);
p = (char *)index->table_name;
}
strcpy(table_name_raw, p);
strcpy(table_name_raw, (const char*)p);
filename_to_tablename(table_name_raw, table_name, sizeof(table_name));
field_store_string(table->field[1], table_name);
field_store_string(table->field[2], index->name);
......@@ -2862,7 +2862,7 @@ i_s_innodb_index_stats_fill(
} else {
rec_per_key = n_rows;
}
snprintf(buff, 256, (i == index->n_uniq)?"%llu":"%llu, ",
ut_snprintf(buff, 256, (i == index->n_uniq)?"%llu":"%llu, ",
rec_per_key);
strncat(row_per_keys, buff, 256 - strlen(row_per_keys));
}
......
/*****************************************************************************
Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved.
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
*****************************************************************************/
/******************************************************
@file include/fsp0types.h
File space management types
Created May 26, 2009 Vasil Dimov
*******************************************************/
#ifndef fsp0types_h
#define fsp0types_h
#include "univ.i"
#include "fil0fil.h" /* for FIL_PAGE_DATA */
/** @name Flags for inserting records in order
If records are inserted in order, there are the following
flags to tell this (their type is made byte for the compiler
to warn if direction and hint parameters are switched in
fseg_alloc_free_page) */
/* @{ */
#define FSP_UP ((byte)111) /*!< alphabetically upwards */
#define FSP_DOWN ((byte)112) /*!< alphabetically downwards */
#define FSP_NO_DIR ((byte)113) /*!< no order */
/* @} */
/** File space extent size (one megabyte) in pages */
#define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT))
/** On a page of any file segment, data may be put starting from this
offset */
#define FSEG_PAGE_DATA FIL_PAGE_DATA
/** @name File segment header
The file segment header points to the inode describing the file segment. */
/* @{ */
/** Data type for file segment header */
typedef byte fseg_header_t;
#define FSEG_HDR_SPACE 0 /*!< space id of the inode */
#define FSEG_HDR_PAGE_NO 4 /*!< page number of the inode */
#define FSEG_HDR_OFFSET 8 /*!< byte offset of the inode */
#define FSEG_HEADER_SIZE 10 /*!< Length of the file system
header, in bytes */
/* @} */
/** Flags for fsp_reserve_free_extents @{ */
#define FSP_NORMAL 1000000
#define FSP_UNDO 2000000
#define FSP_CLEANING 3000000
/* @} */
/* Number of pages described in a single descriptor page: currently each page
description takes less than 1 byte; a descriptor page is repeated every
this many file pages */
/* #define XDES_DESCRIBED_PER_PAGE UNIV_PAGE_SIZE */
/* This has been replaced with either UNIV_PAGE_SIZE or page_zip->size. */
/** @name The space low address page map
The pages at FSP_XDES_OFFSET and FSP_IBUF_BITMAP_OFFSET are repeated
every XDES_DESCRIBED_PER_PAGE pages in every tablespace. */
/* @{ */
/*--------------------------------------*/
#define FSP_XDES_OFFSET 0 /* !< extent descriptor */
#define FSP_IBUF_BITMAP_OFFSET 1 /* !< insert buffer bitmap */
/* The ibuf bitmap pages are the ones whose
page number is the number above plus a
multiple of XDES_DESCRIBED_PER_PAGE */
#define FSP_FIRST_INODE_PAGE_NO 2 /*!< in every tablespace */
/* The following pages exist
in the system tablespace (space 0). */
#define FSP_IBUF_HEADER_PAGE_NO 3 /*!< insert buffer
header page, in
tablespace 0 */
#define FSP_IBUF_TREE_ROOT_PAGE_NO 4 /*!< insert buffer
B-tree root page in
tablespace 0 */
/* The ibuf tree root page number in
tablespace 0; its fseg inode is on the page
number FSP_FIRST_INODE_PAGE_NO */
#define FSP_TRX_SYS_PAGE_NO 5 /*!< transaction
system header, in
tablespace 0 */
#define FSP_FIRST_RSEG_PAGE_NO 6 /*!< first rollback segment
page, in tablespace 0 */
#define FSP_DICT_HDR_PAGE_NO 7 /*!< data dictionary header
page, in tablespace 0 */
/*--------------------------------------*/
/* @} */
#endif /* fsp0types_h */
......@@ -11,6 +11,7 @@
-- disable_result_log
-- enable_warnings
SET @old_innodb_stats_sample_pages=@@innodb_stats_sample_pages;
SET GLOBAL innodb_stats_sample_pages=0;
# check that the value has been adjusted to 1
......@@ -61,3 +62,4 @@ SET GLOBAL innodb_stats_sample_pages=16;
ANALYZE TABLE innodb_analyze;
DROP TABLE innodb_analyze;
SET GLOBAL innodb_stats_sample_pages=@old_innodb_stats_sample_pages;
......@@ -46,13 +46,6 @@ t1 CREATE TABLE `t1` (
KEY `d2` (`d`),
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB;
alter table t1 add unique index (c), add index (d);
ERROR HY000: Table 'test.t1#1' already exists
rename table `t1#1` to `t1#2`;
alter table t1 add unique index (c), add index (d);
ERROR HY000: Table 'test.t1#2' already exists
drop table `t1#2`;
alter table t1 add unique index (c), add index (d);
show create table t1;
Table Create Table
......@@ -1168,3 +1161,4 @@ a b
3 a
3 b
DROP TABLE t1;
set global innodb_file_format_check=Antelope;
-- source include/have_innodb.inc
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
commit;
......@@ -17,16 +16,6 @@ show create table t1;
alter table t1 add index (b);
show create table t1;
# Check how existing tables interfere with temporary tables.
CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB;
--error 156
alter table t1 add unique index (c), add index (d);
rename table `t1#1` to `t1#2`;
--error 156
alter table t1 add unique index (c), add index (d);
drop table `t1#2`;
alter table t1 add unique index (c), add index (d);
show create table t1;
explain select * from t1 force index(c) order by c;
......@@ -532,3 +521,4 @@ disconnect a;
disconnect b;
DROP TABLE t1;
set global innodb_file_format_check=Antelope;
#
# Bug#21704: Renaming column does not update FK definition.
#
# Test that it's not possible to rename columns participating in a
# foreign key (either in the referencing or referenced table).
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
ROW_FORMAT=COMPACT ENGINE=INNODB;
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
ROW_FORMAT=COMPACT ENGINE=INNODB;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
# Test renaming the column in the referenced table.
ALTER TABLE t1 CHANGE a c INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150)
# Ensure that online column rename works.
ALTER TABLE t1 CHANGE b c INT;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
# Test renaming the column in the referencing table
ALTER TABLE t2 CHANGE a c INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
# Ensure that online column rename works.
ALTER TABLE t2 CHANGE b c INT;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
# Test with self-referential constraints
ALTER TABLE t3 CHANGE a d INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
ALTER TABLE t3 CHANGE b d INT;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
# Ensure that online column rename works.
ALTER TABLE t3 CHANGE c d INT;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
# Cleanup.
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
-- source include/have_innodb.inc
--echo #
--echo # Bug#21704: Renaming column does not update FK definition.
--echo #
--echo
--echo # Test that it's not possible to rename columns participating in a
--echo # foreign key (either in the referencing or referenced table).
--echo
--disable_warnings
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
--enable_warnings
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
ROW_FORMAT=COMPACT ENGINE=INNODB;
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
ROW_FORMAT=COMPACT ENGINE=INNODB;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
--echo
--echo # Test renaming the column in the referenced table.
--echo
# mysqltest first does replace_regex, then replace_result
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--error ER_ERROR_ON_RENAME
ALTER TABLE t1 CHANGE a c INT;
--echo # Ensure that online column rename works.
--enable_info
ALTER TABLE t1 CHANGE b c INT;
--disable_info
--echo
--echo # Test renaming the column in the referencing table
--echo
# mysqltest first does replace_regex, then replace_result
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--error ER_ERROR_ON_RENAME
ALTER TABLE t2 CHANGE a c INT;
--echo # Ensure that online column rename works.
--enable_info
ALTER TABLE t2 CHANGE b c INT;
--disable_info
--echo
--echo # Test with self-referential constraints
--echo
# mysqltest first does replace_regex, then replace_result
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--error ER_ERROR_ON_RENAME
ALTER TABLE t3 CHANGE a d INT;
# mysqltest first does replace_regex, then replace_result
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
--error ER_ERROR_ON_RENAME
ALTER TABLE t3 CHANGE b d INT;
--echo # Ensure that online column rename works.
--enable_info
ALTER TABLE t3 CHANGE c d INT;
--disable_info
--echo
--echo # Cleanup.
--echo
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
......@@ -30,3 +30,4 @@ ALTER TABLE bug34300 ADD COLUMN (f10 INT);
SELECT f4, f8 FROM bug34300;
DROP TABLE bug34300;
SET @@global.max_allowed_packet=1048576;
set @old_innodb_file_format=@@innodb_file_format;
set @old_innodb_file_per_table=@@innodb_file_per_table;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
......@@ -4,6 +4,8 @@
#
-- source include/have_innodb.inc
set @old_innodb_file_format=@@innodb_file_format;
set @old_innodb_file_per_table=@@innodb_file_per_table;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
......@@ -1153,3 +1155,5 @@ DROP TABLE IF EXISTS table4;
DROP TABLE IF EXISTS table5;
DROP TABLE IF EXISTS table6;
set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_per_table=@old_innodb_file_per_table;
......@@ -13,6 +13,8 @@ SET storage_engine=InnoDB;
-- disable_query_log
-- disable_result_log
set @old_innodb_file_per_table=@@innodb_file_per_table;
set @old_innodb_file_format=@@innodb_file_format;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=on;
......@@ -24,3 +26,6 @@ CHECK TABLE table0 EXTENDED;
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
CHECK TABLE table0 EXTENDED;
DROP TABLE table0;
set global innodb_file_per_table=@old_innodb_file_per_table;
set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_format_check=Antelope;
create table bug40565(value decimal(4,2)) engine=innodb;
insert into bug40565 values (1), (null);
update bug40565 set value=NULL;
affected rows: 1
info: Rows matched: 2 Changed: 1 Warnings: 0
update bug40565 set value=NULL;
affected rows: 0
info: Rows matched: 2 Changed: 0 Warnings: 0
drop table bug40565;
# Bug #40565 Update Query Results in "1 Row Affected" But Should Be "Zero Rows"
-- source include/have_innodb.inc
create table bug40565(value decimal(4,2)) engine=innodb;
insert into bug40565 values (1), (null);
--enable_info
update bug40565 set value=NULL;
update bug40565 set value=NULL;
--disable_info
drop table bug40565;
set global innodb_commit_concurrency=0;
ERROR HY000: Incorrect arguments to SET
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
set global innodb_commit_concurrency=1;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
set global innodb_commit_concurrency=42;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
42
set global innodb_commit_concurrency=DEFAULT;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
set global innodb_commit_concurrency=0;
ERROR HY000: Incorrect arguments to SET
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
set global innodb_commit_concurrency=1;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
1
#
# Bug#42101 Race condition in innodb_commit_concurrency
# http://bugs.mysql.com/42101
#
-- source include/have_innodb.inc
--error ER_WRONG_ARGUMENTS
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=1;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=42;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=DEFAULT;
select @@innodb_commit_concurrency;
--error ER_WRONG_ARGUMENTS
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=1;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=1;
ERROR HY000: Incorrect arguments to SET
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=42;
ERROR HY000: Incorrect arguments to SET
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
set global innodb_commit_concurrency=DEFAULT;
select @@innodb_commit_concurrency;
@@innodb_commit_concurrency
0
#
# Bug#42101 Race condition in innodb_commit_concurrency
# http://bugs.mysql.com/42101
#
-- source include/have_innodb.inc
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
--error ER_WRONG_ARGUMENTS
set global innodb_commit_concurrency=1;
select @@innodb_commit_concurrency;
--error ER_WRONG_ARGUMENTS
set global innodb_commit_concurrency=42;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=0;
select @@innodb_commit_concurrency;
set global innodb_commit_concurrency=DEFAULT;
select @@innodb_commit_concurrency;
CREATE TABLE bug44032(c CHAR(3) CHARACTER SET UTF8) ROW_FORMAT=REDUNDANT
ENGINE=InnoDB;
INSERT INTO bug44032 VALUES('abc'),(0xEFBCA4EFBCA4EFBCA4);
UPDATE bug44032 SET c='DDD' WHERE c=0xEFBCA4EFBCA4EFBCA4;
UPDATE bug44032 SET c=NULL WHERE c='DDD';
UPDATE bug44032 SET c='DDD' WHERE c IS NULL;
DROP TABLE bug44032;
# Bug44032 no update-in-place of UTF-8 columns in ROW_FORMAT=REDUNDANT
# (btr_cur_update_in_place not invoked when updating from/to NULL;
# the update is performed by delete and insert instead)
-- source include/have_innodb.inc
CREATE TABLE bug44032(c CHAR(3) CHARACTER SET UTF8) ROW_FORMAT=REDUNDANT
ENGINE=InnoDB;
INSERT INTO bug44032 VALUES('abc'),(0xEFBCA4EFBCA4EFBCA4);
UPDATE bug44032 SET c='DDD' WHERE c=0xEFBCA4EFBCA4EFBCA4;
UPDATE bug44032 SET c=NULL WHERE c='DDD';
UPDATE bug44032 SET c='DDD' WHERE c IS NULL;
DROP TABLE bug44032;
set session transaction isolation level read committed;
create table bug45357(a int, b int,key(b))engine=innodb;
insert into bug45357 values (25170,6122);
update bug45357 set a=1 where b=30131;
delete from bug45357 where b < 20996;
delete from bug45357 where b < 7001;
drop table bug45357;
-- source include/have_innodb.inc
set session transaction isolation level read committed;
create table bug45357(a int, b int,key(b))engine=innodb;
insert into bug45357 values (25170,6122);
update bug45357 set a=1 where b=30131;
delete from bug45357 where b < 20996;
delete from bug45357 where b < 7001;
drop table bug45357;
set @old_innodb_file_format=@@innodb_file_format;
select @@innodb_file_format;
@@innodb_file_format
Antelope
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
set global innodb_file_format=cheetah;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=default;
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=off;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
set global innodb_file_format_check=cheetah;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=default;
Warnings:
Warning 1210 Ignoring SET innodb_file_format=on
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format=on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=off;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_format_check=Antelope;
-- source include/have_innodb.inc
set @old_innodb_file_format=@@innodb_file_format;
select @@innodb_file_format;
select @@innodb_file_format_check;
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=cheetah;
select @@innodb_file_format;
set global innodb_file_format=default;
select @@innodb_file_format;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=on;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=off;
select @@innodb_file_format;
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check=cheetah;
select @@innodb_file_format_check;
set global innodb_file_format_check=default;
select @@innodb_file_format_check;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=on;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format=off;
select @@innodb_file_format_check;
set global innodb_file_format=@old_innodb_file_format;
set global innodb_file_format_check=Antelope;
--- mysql-test/t/disabled.def.orig 2009-09-21 20:12:29.000000000 +0000
+++ mysql-test/t/disabled.def 2009-09-21 20:20:16.000000000 +0000
@@ -13,4 +13,6 @@
innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently"
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
init_connect : Bug#44920 2009-07-06 pcrews MTR not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug*
+read_many_rows_innodb : Bug#433409 2009-09-20 the test fails on 5.1.37 https://bugs.launchpad.net/bugs/433409
+innodb-zip : Bug#47495 2009-09-21 the test fails on ubuntu
InnoDB's estimate for the index cardinality depends on a pseudo random
number generator (it picks up random pages to sample). After an
optimization that was made in r2625 the following EXPLAINs started
returning a different number of rows (3 instead of 4).
This patch adjusts the result file.
This patch cannot be proposed to MySQL because the failures occur only
in this tree and do not occur in the standard InnoDB 5.1. Furthermore,
the file index_merge2.inc is used by other engines too.
--- mysql-test/r/index_merge_innodb.result.orig 2008-09-30 18:32:13.000000000 +0300
+++ mysql-test/r/index_merge_innodb.result 2008-09-30 18:33:01.000000000 +0300
@@ -111,7 +111,7 @@
explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 4 Using intersect(i1,i2); Using where; Using index
+1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 3 Using intersect(i1,i2); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
count(*)
@@ -119,7 +119,7 @@
explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 4 Using intersect(i1,i3); Using where; Using index
+1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 3 Using intersect(i1,i3); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
count(*)
--- mysql-test/r/index_merge_innodb.result.orig 2009-09-19 20:51:58.000000000 +0000
+++ mysql-test/r/index_merge_innodb.result 2009-09-19 20:52:25.000000000 +0000
@@ -111,7 +111,7 @@
explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 4 Using intersect(i1,i2); Using where; Using index
+1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL REF Using intersect(i1,i2); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
count(*)
@@ -119,7 +119,7 @@
explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 4 Using intersect(i1,i3); Using where; Using index
+1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL REF Using intersect(i1,i3); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
count(*)
--- mysql-test/include/index_merge2.inc.orig 2009-09-19 20:50:04.000000000 +0000
+++ mysql-test/include/index_merge2.inc 2009-09-19 21:03:11.000000000 +0000
@@ -122,12 +122,14 @@
analyze table t1;
select count(*) from t1;
+--replace_column 9 REF
explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
+--replace_column 9 REF
explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
--- mysql-test/r/index_merge_myisam.result.orig 2009-09-20 07:00:29.000000000 +0000
+++ mysql-test/r/index_merge_myisam.result 2009-09-20 07:00:48.000000000 +0000
@@ -945,7 +945,7 @@
explain select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 2 Using intersect(i1,i2); Using where; Using index
+1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL REF Using intersect(i1,i2); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key2a = 2 and key2b is null;
count(*)
@@ -953,7 +953,7 @@
explain select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 2 Using intersect(i1,i3); Using where; Using index
+1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL REF Using intersect(i1,i3); Using where; Using index
select count(*) from t1 where
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
count(*)
--- mysql-test/r/information_schema.result.orig 2009-01-31 03:38:50.000000000 +0200
+++ mysql-test/r/information_schema.result 2009-01-31 07:51:58.000000000 +0200
@@ -71,6 +71,13 @@
--- mysql-test/r/information_schema.result.orig 2009-07-14 08:44:24.000000000 +0900
+++ mysql-test/r/information_schema.result 2009-09-07 16:42:01.000000000 +0900
@@ -71,6 +71,20 @@
TRIGGERS
USER_PRIVILEGES
VIEWS
+INNODB_CMP_RESET
+INNODB_BUFFER_POOL_PAGES_INDEX
+INNODB_RSEG
+INNODB_LOCKS
+INNODB_BUFFER_POOL_PAGES
+XTRADB_ENHANCEMENTS
+INNODB_TRX
+INNODB_CMPMEM_RESET
+INNODB_INDEX_STATS
+INNODB_LOCK_WAITS
+INNODB_CMPMEM
+INNODB_CMP_RESET
+INNODB_CMP
+INNODB_LOCKS
+INNODB_CMPMEM_RESET
+INNODB_BUFFER_POOL_PAGES_BLOB
+INNODB_CMPMEM
+INNODB_TABLE_STATS
columns_priv
db
event
@@ -799,6 +806,8 @@
@@ -799,6 +813,8 @@
TABLES UPDATE_TIME datetime
TABLES CHECK_TIME datetime
TRIGGERS CREATED datetime
......@@ -23,102 +30,167 @@
event execute_at datetime
event last_executed datetime
event starts datetime
@@ -852,7 +861,7 @@
@@ -847,12 +863,15 @@
TABLE_CONSTRAINTS TABLE_NAME select
TABLE_PRIVILEGES TABLE_NAME select
VIEWS TABLE_NAME select
+INNODB_BUFFER_POOL_PAGES_INDEX table_name select
+INNODB_INDEX_STATS table_name select
+INNODB_TABLE_STATS table_name select
delete from mysql.user where user='mysqltest_4';
delete from mysql.db where user='mysqltest_4';
flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*)
-information_schema 28
+information_schema 35
+information_schema 42
mysql 22
create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row
@@ -1267,6 +1276,13 @@
@@ -1267,6 +1286,20 @@
TRIGGERS TRIGGER_SCHEMA
USER_PRIVILEGES GRANTEE
VIEWS TABLE_SCHEMA
+INNODB_CMP_RESET page_size
+INNODB_BUFFER_POOL_PAGES_INDEX schema_name
+INNODB_RSEG rseg_id
+INNODB_LOCKS lock_id
+INNODB_BUFFER_POOL_PAGES page_type
+XTRADB_ENHANCEMENTS name
+INNODB_TRX trx_id
+INNODB_CMPMEM_RESET page_size
+INNODB_INDEX_STATS table_name
+INNODB_LOCK_WAITS requesting_trx_id
+INNODB_CMPMEM page_size
+INNODB_CMP_RESET page_size
+INNODB_CMP page_size
+INNODB_LOCKS lock_id
+INNODB_CMPMEM_RESET page_size
+INNODB_BUFFER_POOL_PAGES_BLOB space_id
+INNODB_CMPMEM page_size
+INNODB_TABLE_STATS table_name
SELECT t.table_name, c1.column_name
FROM information_schema.tables t
INNER JOIN
@@ -1310,6 +1326,13 @@
@@ -1310,14 +1343,28 @@
TRIGGERS TRIGGER_SCHEMA
USER_PRIVILEGES GRANTEE
VIEWS TABLE_SCHEMA
+INNODB_CMP_RESET page_size
+INNODB_BUFFER_POOL_PAGES_INDEX schema_name
+INNODB_RSEG rseg_id
+INNODB_LOCKS lock_id
+INNODB_BUFFER_POOL_PAGES page_type
+XTRADB_ENHANCEMENTS name
+INNODB_TRX trx_id
+INNODB_CMPMEM_RESET page_size
+INNODB_INDEX_STATS table_name
+INNODB_LOCK_WAITS requesting_trx_id
+INNODB_CMPMEM page_size
+INNODB_CMP_RESET page_size
+INNODB_CMP page_size
+INNODB_LOCKS lock_id
+INNODB_CMPMEM_RESET page_size
+INNODB_BUFFER_POOL_PAGES_BLOB space_id
+INNODB_CMPMEM page_size
+INNODB_TABLE_STATS table_name
SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test');
MAX(table_name)
VIEWS
@@ -1386,6 +1409,13 @@
-VIEWS
+XTRADB_ENHANCEMENTS
SELECT table_name from information_schema.tables
WHERE table_name=(SELECT MAX(table_name)
FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'));
table_name
-VIEWS
+XTRADB_ENHANCEMENTS
DROP TABLE IF EXISTS bug23037;
DROP FUNCTION IF EXISTS get_value;
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';
@@ -1386,6 +1433,19 @@
FILES information_schema.FILES 1
GLOBAL_STATUS information_schema.GLOBAL_STATUS 1
GLOBAL_VARIABLES information_schema.GLOBAL_VARIABLES 1
+INNODB_BUFFER_POOL_PAGES information_schema.INNODB_BUFFER_POOL_PAGES 1
+INNODB_BUFFER_POOL_PAGES_BLOB information_schema.INNODB_BUFFER_POOL_PAGES_BLOB 1
+INNODB_BUFFER_POOL_PAGES_INDEX information_schema.INNODB_BUFFER_POOL_PAGES_INDEX 1
+INNODB_CMP information_schema.INNODB_CMP 1
+INNODB_CMPMEM information_schema.INNODB_CMPMEM 1
+INNODB_CMPMEM_RESET information_schema.INNODB_CMPMEM_RESET 1
+INNODB_CMP_RESET information_schema.INNODB_CMP_RESET 1
+INNODB_INDEX_STATS information_schema.INNODB_INDEX_STATS 1
+INNODB_LOCKS information_schema.INNODB_LOCKS 1
+INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
+INNODB_RSEG information_schema.INNODB_RSEG 1
+INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1
+INNODB_TRX information_schema.INNODB_TRX 1
KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1
PARTITIONS information_schema.PARTITIONS 1
PLUGINS information_schema.PLUGINS 1
diff mysql-test/r/information_schema_db.result.orig mysql-test/r/information_schema_db.result
--- mysql-test/r/information_schema_db.result.orig 2008-08-04 09:27:49.000000000 +0300
+++ mysql-test/r/information_schema_db.result 2008-10-07 12:26:31.000000000 +0300
@@ -33,6 +33,13 @@
@@ -1404,6 +1464,7 @@
TRIGGERS information_schema.TRIGGERS 1
USER_PRIVILEGES information_schema.USER_PRIVILEGES 1
VIEWS information_schema.VIEWS 1
+XTRADB_ENHANCEMENTS information_schema.XTRADB_ENHANCEMENTS 1
create table t1(f1 int);
create view v1 as select f1+1 as a from t1;
create table t2 (f1 int, f2 int);
--- mysql-test/r/information_schema_db.result.orig 2009-07-14 08:44:24.000000000 +0900
+++ mysql-test/r/information_schema_db.result 2009-09-07 16:42:26.000000000 +0900
@@ -33,6 +33,20 @@
TRIGGERS
USER_PRIVILEGES
VIEWS
+INNODB_CMP_RESET
+INNODB_BUFFER_POOL_PAGES_INDEX
+INNODB_RSEG
+INNODB_LOCKS
+INNODB_BUFFER_POOL_PAGES
+XTRADB_ENHANCEMENTS
+INNODB_TRX
+INNODB_CMPMEM_RESET
+INNODB_INDEX_STATS
+INNODB_LOCK_WAITS
+INNODB_CMPMEM
+INNODB_CMP_RESET
+INNODB_CMP
+INNODB_LOCKS
+INNODB_CMPMEM_RESET
+INNODB_BUFFER_POOL_PAGES_BLOB
+INNODB_CMPMEM
+INNODB_TABLE_STATS
show tables from INFORMATION_SCHEMA like 'T%';
Tables_in_information_schema (T%)
TABLES
diff mysql-test/r/mysqlshow.result.orig mysql-test/r/mysqlshow.result
--- mysql-test/r/mysqlshow.result.orig 2008-08-04 09:27:51.000000000 +0300
+++ mysql-test/r/mysqlshow.result 2008-10-07 12:35:39.000000000 +0300
@@ -107,6 +107,13 @@
--- mysql-test/r/mysqlshow.result.orig 2009-07-14 08:44:28.000000000 +0900
+++ mysql-test/r/mysqlshow.result 2009-09-07 16:42:52.000000000 +0900
@@ -107,6 +107,20 @@
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
+| INNODB_CMP_RESET |
+| INNODB_BUFFER_POOL_PAGES_INDEX |
+| INNODB_RSEG |
+| INNODB_LOCKS |
+| INNODB_BUFFER_POOL_PAGES |
+| XTRADB_ENHANCEMENTS |
+| INNODB_TRX |
+| INNODB_CMPMEM_RESET |
+| INNODB_INDEX_STATS |
+| INNODB_LOCK_WAITS |
+| INNODB_CMPMEM |
+| INNODB_CMP_RESET |
+| INNODB_CMP |
+| INNODB_LOCKS |
+| INNODB_CMPMEM_RESET |
+| INNODB_BUFFER_POOL_PAGES_BLOB |
+| INNODB_CMPMEM |
+| INNODB_TABLE_STATS |
+---------------------------------------+
Database: INFORMATION_SCHEMA
+---------------------------------------+
@@ -140,6 +147,13 @@
@@ -140,6 +154,20 @@
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
+| INNODB_CMP_RESET |
+| INNODB_BUFFER_POOL_PAGES_INDEX |
+| INNODB_RSEG |
+| INNODB_LOCKS |
+| INNODB_BUFFER_POOL_PAGES |
+| XTRADB_ENHANCEMENTS |
+| INNODB_TRX |
+| INNODB_CMPMEM_RESET |
+| INNODB_INDEX_STATS |
+| INNODB_LOCK_WAITS |
+| INNODB_CMPMEM |
+| INNODB_CMP_RESET |
+| INNODB_CMP |
+| INNODB_LOCKS |
+| INNODB_CMPMEM_RESET |
+| INNODB_BUFFER_POOL_PAGES_BLOB |
+| INNODB_CMPMEM |
+| INNODB_TABLE_STATS |
+---------------------------------------+
Wildcard: inf_rmation_schema
+--------------------+
This part of the innodb-index test causes mysqld to print some warnings
and subsequently the whole mysql-test suite to fail.
A permanent solution is probably to remove the printouts from the source
code or to somehow tell the mysql-test suite that warnings are expected.
Currently we simply do not execute the problematic tests. Please
coordinate a permanent solution with Marko, who added those tests.
This cannot be proposed to MySQL because it touches files that are not
in the MySQL source repository.
Index: storage/innobase/mysql-test/innodb-index.result
===================================================================
--- storage/innobase/mysql-test/innodb-index.result (revision 2870)
+++ storage/innobase/mysql-test/innodb-index.result (working copy)
@@ -43,19 +43,12 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
`c` char(10) NOT NULL,
`d` varchar(20) DEFAULT NULL,
KEY `d2` (`d`),
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB;
-alter table t1 add unique index (c), add index (d);
-ERROR HY000: Table 'test.t1#1' already exists
-rename table `t1#1` to `t1#2`;
-alter table t1 add unique index (c), add index (d);
-ERROR HY000: Table 'test.t1#2' already exists
-drop table `t1#2`;
alter table t1 add unique index (c), add index (d);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` int(11) DEFAULT NULL,
Index: storage/innobase/mysql-test/innodb-index.test
===================================================================
--- storage/innobase/mysql-test/innodb-index.test (revision 2870)
+++ storage/innobase/mysql-test/innodb-index.test (working copy)
@@ -14,22 +14,12 @@ select * from t1 force index (d2) order
--error ER_DUP_ENTRY
alter table t1 add unique index (b);
show create table t1;
alter table t1 add index (b);
show create table t1;
-# Check how existing tables interfere with temporary tables.
-CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB;
-
---error 156
-alter table t1 add unique index (c), add index (d);
-rename table `t1#1` to `t1#2`;
---error 156
-alter table t1 add unique index (c), add index (d);
-drop table `t1#2`;
-
alter table t1 add unique index (c), add index (d);
show create table t1;
explain select * from t1 force index(c) order by c;
alter table t1 add primary key (a), drop index c;
show create table t1;
--error ER_MULTIPLE_PRI_KEY
......@@ -2741,11 +2741,11 @@ loop:
/* defence line (max_checkpoint_age * 1/2) */
ib_uint64_t lsn = log_sys->lsn;
mutex_exit(&(log_sys->mutex));
ib_uint64_t level, bpl;
buf_page_t* bpage;
mutex_exit(&(log_sys->mutex));
mutex_enter(&flush_list_mutex);
level = 0;
......
......@@ -1175,7 +1175,12 @@ innobase_start_or_create_for_mysql(void)
break;
default:
/* On Win 2000 and XP use async i/o */
os_aio_use_native_aio = TRUE;
//os_aio_use_native_aio = TRUE;
os_aio_use_native_aio = FALSE;
fprintf(stderr,
"InnoDB: Windows native async i/o is disabled as default.\n"
"InnoDB: It is not applicable for the current"
" multi io threads implementation.\n");
break;
}
#endif
......@@ -1212,6 +1217,12 @@ innobase_start_or_create_for_mysql(void)
} else if (0 == ut_strcmp(srv_file_flush_method_str,
"async_unbuffered")) {
srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
os_aio_use_native_aio = TRUE;
srv_n_read_io_threads = srv_n_write_io_threads = 1;
fprintf(stderr,
"InnoDB: 'async_unbuffered' was detected as innodb_flush_method.\n"
"InnoDB: Windows native async i/o is enabled.\n"
"InnoDB: And io threads are restricted.\n");
#endif
} else {
fprintf(stderr,
......
/*****************************************************************************
Copyright (c) 2009, Innobase Oy. All Rights Reserved.
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
*****************************************************************************/
/*****************************************************************************
If this program compiles, then pthread_t objects can be used as arguments
to GCC atomic builtin functions.
Created March 5, 2009 Vasil Dimov
*****************************************************************************/
#include <pthread.h>
#include <string.h>
int
main(int argc, char** argv)
{
pthread_t x1;
pthread_t x2;
pthread_t x3;
memset(&x1, 0x0, sizeof(x1));
memset(&x2, 0x0, sizeof(x2));
memset(&x3, 0x0, sizeof(x3));
__sync_bool_compare_and_swap(&x1, x2, x3);
return(0);
}
/*****************************************************************************
Copyright (c) 2009, Innobase Oy. All Rights Reserved.
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
*****************************************************************************/
/*****************************************************************************
If this program compiles, then pthread_t objects can be used as arguments
to Solaris libc atomic functions.
Created April 18, 2009 Vasil Dimov
*****************************************************************************/
#include <pthread.h>
int
main(int argc, char** argv)
{
pthread_t x = 0;
return(0);
}
/*****************************************************************************
Copyright (c) 2009, Innobase Oy. All Rights Reserved.
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
*****************************************************************************/
/*****************************************************************************
If this program compiles, then Solaris libc atomic funcions are available.
Created April 18, 2009 Vasil Dimov
*****************************************************************************/
#include <atomic.h>
int
main(int argc, char** argv)
{
ulong_t ulong = 0;
uint32_t uint32 = 0;
uint64_t uint64 = 0;
atomic_cas_ulong(&ulong, 0, 1);
atomic_cas_32(&uint32, 0, 1);
atomic_cas_64(&uint64, 0, 1);
atomic_add_long(&ulong, 0);
return(0);
}
/*****************************************************************************
Copyright (c) 2009, Innobase Oy. All Rights Reserved.
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
*****************************************************************************/
/*****************************************************************************
If this program compiles and can be run and returns 0, then the pause
instruction is available.
Created Jul 21, 2009 Vasil Dimov
*****************************************************************************/
int
main(int argc, char** argv)
{
__asm__ __volatile__ ("pause");
return(0);
}
/*****************************************************************************
Copyright (c) 2009, Innobase Oy. All Rights Reserved.
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
*****************************************************************************/
/*****************************************************************************
This program should compile and when run, print a single line like:
#define SIZEOF_PTHREAD_T %d
Created April 18, 2009 Vasil Dimov
*****************************************************************************/
#include <stdio.h>
#include <pthread.h>
int
main(int argc, char** argv)
{
printf("#define SIZEOF_PTHREAD_T %d\n", (int) sizeof(pthread_t));
return(0);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment