summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Langford <karen.langford@oracle.com>2012-01-11 18:51:42 +0100
committerKaren Langford <karen.langford@oracle.com>2012-01-11 18:51:42 +0100
commit4b0d98b28cf47ab80a0202db417e015ba932e867 (patch)
tree6e6e6c8ee901626080c876320e6f68c81e8483f6
parent99e462ab0b308e629f4604adc3a33e2cf817be82 (diff)
parentdacaaf22a3f132df5573fe8e58c0617c30c5e9fc (diff)
downloadmariadb-git-4b0d98b28cf47ab80a0202db417e015ba932e867.tar.gz
Merge from mysql-5.1.61-release
-rw-r--r--cmd-line-utils/libedit/chartype.h6
-rw-r--r--cmd-line-utils/libedit/eln.c2
-rw-r--r--cmd-line-utils/libedit/readline.c2
-rw-r--r--mysql-test/r/key_cache.result16
-rw-r--r--mysql-test/r/mysqlcheck.result1
-rw-r--r--mysql-test/t/key_cache.test16
-rw-r--r--mysql-test/t/merge.test10
-rw-r--r--mysql-test/t/mysqlcheck.test1
-rw-r--r--sql/sql_table.cc5
-rw-r--r--storage/innodb_plugin/ChangeLog7
-rw-r--r--storage/myisam/mi_preload.c3
-rw-r--r--unittest/mysys/bitmap-t.c2
12 files changed, 61 insertions, 10 deletions
diff --git a/cmd-line-utils/libedit/chartype.h b/cmd-line-utils/libedit/chartype.h
index 678d13683be..40012afb47d 100644
--- a/cmd-line-utils/libedit/chartype.h
+++ b/cmd-line-utils/libedit/chartype.h
@@ -45,11 +45,11 @@
* seems to actually advertise this properly, despite Unicode 3.1 having
* been around since 2001... */
-/* XXXMYSQL : Added FreeBSD to bypass this check.
- TODO : Verify if FreeBSD stores ISO 10646 in wchar_t. */
+/* XXXMYSQL : Added FreeBSD & AIX to bypass this check.
+ TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */
#if !defined(__NetBSD__) && !defined(__sun) \
&& !(defined(__APPLE__) && defined(__MACH__)) \
- && !defined(__FreeBSD__)
+ && !defined(__FreeBSD__) && !defined(_AIX)
#ifndef __STDC_ISO_10646__
/* In many places it is assumed that the first 127 code points are ASCII
* compatible, so ensure wchar_t indeed does ISO 10646 and not some other
diff --git a/cmd-line-utils/libedit/eln.c b/cmd-line-utils/libedit/eln.c
index 4b9f16c38f3..f996367115a 100644
--- a/cmd-line-utils/libedit/eln.c
+++ b/cmd-line-utils/libedit/eln.c
@@ -200,7 +200,7 @@ el_set(EditLine *el, int op, ...)
ret = -1;
goto out;
}
- // XXX: The two strdup's leak
+ /* XXX: The two strdups leak. */
ret = map_addfunc(el, Strdup(wargv[0]), Strdup(wargv[1]),
func);
ct_free_argv(wargv);
diff --git a/cmd-line-utils/libedit/readline.c b/cmd-line-utils/libedit/readline.c
index eaf26d4c497..a2a92edc1b4 100644
--- a/cmd-line-utils/libedit/readline.c
+++ b/cmd-line-utils/libedit/readline.c
@@ -1978,7 +1978,7 @@ rl_callback_read_char()
} else
wbuf = NULL;
(*(void (*)(const char *))rl_linefunc)(wbuf);
- //el_set(e, EL_UNBUFFERED, 1);
+ /*el_set(e, EL_UNBUFFERED, 1);*/
}
}
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index f80fea0fc76..78dd65fdcb1 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -365,3 +365,19 @@ Variable_name Value
key_cache_block_size 1536
SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
DROP TABLE t1;
+#
+# Bug#12361113: crash when load index into cache
+#
+# Note that this creates an empty disabled key cache!
+SET GLOBAL key_cache_none.key_cache_block_size = 1024;
+CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) ) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1, 1);
+CACHE INDEX t1 in key_cache_none;
+ERROR HY000: Unknown key cache 'key_cache_none'
+# The bug crashed the server at LOAD INDEX below. Now it will succeed
+# since the default cache is used due to CACHE INDEX failed for
+# key_cache_none.
+LOAD INDEX INTO CACHE t1;
+Table Op Msg_type Msg_text
+test.t1 preload_keys status OK
+DROP TABLE t1;
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index 5f1a0565b10..ffba0d443e7 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -147,6 +147,7 @@ DROP TABLE `@`;
CREATE TABLE `я` (a INT);
SET NAMES DEFAULT;
mysqlcheck --default-character-set="latin1" --databases test
+call mtr.add_suppression("Can't find file: '..test.@003f.frm'");
test.?
Error : Table doesn't exist
status : Operation failed
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index f12d20e962e..adba2adddb5 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -248,3 +248,19 @@ SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
DROP TABLE t1;
# End of 4.1 tests
+
+--echo #
+--echo # Bug#12361113: crash when load index into cache
+--echo #
+
+--echo # Note that this creates an empty disabled key cache!
+SET GLOBAL key_cache_none.key_cache_block_size = 1024;
+CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) ) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1, 1);
+--error ER_UNKNOWN_KEY_CACHE
+CACHE INDEX t1 in key_cache_none;
+--echo # The bug crashed the server at LOAD INDEX below. Now it will succeed
+--echo # since the default cache is used due to CACHE INDEX failed for
+--echo # key_cache_none.
+LOAD INDEX INTO CACHE t1;
+DROP TABLE t1;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index a6affbb0540..7954aed6a55 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -1817,9 +1817,13 @@ CREATE TABLE t1(a INT);
--echo # Test reattach merge failure
LOCK TABLES m1 READ;
--echo # Replace 't1' with 't3' table using file operations.
-remove_file $MYSQLD_DATADIR/test/t1.frm;
-remove_file $MYSQLD_DATADIR/test/t1.MYI;
-remove_file $MYSQLD_DATADIR/test/t1.MYD;
+# move + remove is a work around for windows.
+move_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/oldt1.frm;
+move_file $MYSQLD_DATADIR/test/t1.MYI $MYSQLD_DATADIR/test/oldt1.MYI;
+move_file $MYSQLD_DATADIR/test/t1.MYD $MYSQLD_DATADIR/test/oldt1.MYD;
+remove_file $MYSQLD_DATADIR/test/oldt1.frm;
+remove_file $MYSQLD_DATADIR/test/oldt1.MYI;
+remove_file $MYSQLD_DATADIR/test/oldt1.MYD;
copy_file $MYSQLD_DATADIR/test/t3.frm $MYSQLD_DATADIR/test/t1.frm;
copy_file $MYSQLD_DATADIR/test/t3.MYI $MYSQLD_DATADIR/test/t1.MYI;
copy_file $MYSQLD_DATADIR/test/t3.MYD $MYSQLD_DATADIR/test/t1.MYD;
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index 986b5aba385..bf99d48fd6a 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -138,6 +138,7 @@ CREATE TABLE `я` (a INT);
SET NAMES DEFAULT;
--echo mysqlcheck --default-character-set="latin1" --databases test
# Error returned depends on platform, replace it with "Table doesn't exist"
+call mtr.add_suppression("Can't find file: '..test.@003f.frm'");
--replace_result "Can't find file: './test/@003f.frm' (errno: 22)" "Table doesn't exist" "Table 'test.?' doesn't exist" "Table doesn't exist"
--exec $MYSQL_CHECK --default-character-set="latin1" --databases test
--echo mysqlcheck --default-character-set="utf8" --databases test
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index b7feed5ab4c..39eee62ee91 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -5126,6 +5126,11 @@ bool mysql_assign_to_keycache(THD* thd, TABLE_LIST* tables,
DBUG_RETURN(TRUE);
}
pthread_mutex_unlock(&LOCK_global_system_variables);
+ if (!key_cache->key_cache_inited)
+ {
+ my_error(ER_UNKNOWN_KEY_CACHE, MYF(0), key_cache_name->str);
+ DBUG_RETURN(TRUE);
+ }
check_opt.key_cache= key_cache;
DBUG_RETURN(mysql_admin_table(thd, tables, &check_opt,
"assign_to_keycache", TL_READ_NO_INSERT, 0, 0,
diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog
index d33dfd33043..5b1e2181e42 100644
--- a/storage/innodb_plugin/ChangeLog
+++ b/storage/innodb_plugin/ChangeLog
@@ -34,7 +34,12 @@
2011-10-27 The InnoDB Team
* row/row0mysql.c:
- Fix Bug#12884631 62146: TABLES ARE LOST FOR DDL
+ Fix Bug #12884631 62146: TABLES ARE LOST FOR DDL
+
+2011-10-25 The InnoDB Team
+
+ * handler/ha_innodb.cc, row/row0ins.c:
+ Fix Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR
2011-10-20 The InnoDB Team
diff --git a/storage/myisam/mi_preload.c b/storage/myisam/mi_preload.c
index cb8d2984921..b5594f63d47 100644
--- a/storage/myisam/mi_preload.c
+++ b/storage/myisam/mi_preload.c
@@ -56,6 +56,9 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
if (!keys || !mi_is_any_key_active(key_map) || key_file_length == pos)
DBUG_RETURN(0);
+ /* Preload into a non initialized key cache should never happen. */
+ DBUG_ASSERT(share->key_cache->key_cache_inited);
+
block_length= keyinfo[0].block_length;
if (ignore_leaves)
diff --git a/unittest/mysys/bitmap-t.c b/unittest/mysys/bitmap-t.c
index 0127b7b86f4..9a5337c79b5 100644
--- a/unittest/mysys/bitmap-t.c
+++ b/unittest/mysys/bitmap-t.c
@@ -429,7 +429,7 @@ my_bool test_intersect(MY_BITMAP *map, uint bitsize)
{
uint bitsize2 = 1 + get_rand_bit(MAX_TESTED_BITMAP_SIZE - 1);
MY_BITMAP map2;
- uint32 map2buf[bitsize2];
+ uint32 map2buf[MAX_TESTED_BITMAP_SIZE];
uint i, test_bit1, test_bit2, test_bit3;
if (bitmap_init(&map2, map2buf, bitsize2, FALSE))
{