List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 18 2012 8:55am
Subject:bzr push into mysql-trunk-wl5522 branch (marko.makela:4072 to 4075) WL#5522
View as plain text  
 4075 Marko Mäkelä	2012-04-18
      WL#5522: Remove trailing space from code and tests.

    modified:
      mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result
      mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result
      mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
      mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
      storage/innobase/btr/btr0btr.cc
      storage/innobase/fil/fil0fil.cc
      storage/innobase/mtr/mtr0mtr.cc
      storage/innobase/row/row0import.cc
      storage/innobase/row/row0mysql.cc
 4074 Marko Mäkelä	2012-04-18 [merge]
      Merge mysql-trunk to mysql-trunk-wl5522.
      
      Several tests crash before and after this merge. To mention some:
      --suite innodb: innodb-wl5522-debug (glibc detected double free)
      --suite main: date_formats ctype_errors ctype_ucs ctype_utf8mb4_heap
      ctype_utf8mb4_myisam variables mysql ctype_utf8mb4 create-big

    added:
      mysql-test/suite/innodb/r/innodb-alter-discard.result
      mysql-test/suite/innodb/t/innodb-alter-discard.test
    modified:
      mysql-test/suite/innodb/r/innodb-index-online.result
      mysql-test/suite/innodb/t/innodb-index-online.test
      storage/innobase/handler/handler0alter.cc
      storage/innobase/log/log0recv.cc
 4073 Marko Mssions for changed InnoDB message.

    modified:
      mysql-test/include/mix1.inc
      mysql-test/lib/v1/mtr_report.pl
      mysql-test/r/lowercase_table3.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb_mysql.test
      mysql-test/t/lowercase_table3.test
 4072 Sunny Bains	2012-04-18 [merge]
      WL#5522 - Merge from mysql-trunk.

    added:
      mysql-test/r/mysql_embedded_client_test.result
      mysql-test/t/mysql_embedded_client_test.test
    modified:
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/suite/engines/funcs/t/crash_manytables_number.test
      mysql-test/suite/engines/funcs/t/ld_all_number_string_calendar_types.test
      mysql-test/suite/engines/funcs/t/se_join_cross.test
      mysql-test/suite/engines/funcs/t/se_join_default.test
      mysql-test/suite/engines/funcs/t/se_join_inner.test
      mysql-test/suite/engines/funcs/t/se_join_left.test
      mysql-test/suite/engines/funcs/t/se_join_natural_left.test
      mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test
      mysql-test/suite/engines/funcs/t/se_join_natural_right.test
      mysql-test/suite/engines/funcs/t/se_join_natural_right_outer.test
      mysql-test/suite/engines/funcs/t/se_join_right.test
      mysql-test/suite/engines/funcs/t/se_join_right_outer.test
      mysql-test/suite/engines/funcs/t/se_join_straight.test
      mysql-test/suite/engines/funcs/t/se_string_limit.test
      mysql-test/suite/engines/iuds/t/update_delete_number.test
      mysql-test/suite/innodb/t/innodb_bug30423.test
      mysql-test/suite/innodb/t/innodb_bug53290.test
      mysql-test/suite/parts/t/partition_float_myisam.test
      mysql-test/suite/rpl/r/rpl_binlog_index.result
      mysql-test/suite/rpl/r/rpl_loaddata.result
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
      mysql-test/suite/rpl/t/rpl_binlog_index.test
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
      mysql-test/suite/rpl/t/rpl_parallel_innodb.test
      mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
      mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test
      mysql-test/suite/rpl/t/rpl_row_img_blobs.test
      mysql-test/suite/rpl/t/rpl_row_img_eng_full.test
      mysql-test/suite/rpl/t/rpl_row_img_idx_full.test
      mysql-test/suite/rpl/t/rpl_stop_slave.test
      mysql-test/suite/rpl/t/rpl_typeconv.test
      mysql-test/t/disabled.def
      mysql-test/t/index_merge_innodb.test
      mysql-test/t/innodb_explain_json_non_select_all.test
      mysql-test/t/innodb_explain_non_select_all.test
      mysql-test/t/innodb_explain_non_select_none.test
      mysql-test/t/mysql_client_test_embedded.test
      sql/handler.cc
      sql/item.cc
      sql/item.h
      sql/item_create.cc
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/item_subselect.cc
      sql/item_xmlfunc.cc
      sql/sp_head.cc
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_optimizer.cc
      sql/sql_parse.cc
      sql/sql_show.cc
      sql/sql_string.h
      sql/sql_table.cc
      sql/sql_yacc.yy
      storage/innobase/buf/buf0flu.cc
=== modified file 'mysql-test/include/mix1.inc'
--- a/mysql-test/include/mix1.inc	revid:sunny.bains@strippeds8oy4xn34koiue
+++ b/mysql-test/include/mix1.inc	revid:marko.makela@stripped
@@ -637,7 +637,7 @@ create table bug29807 (a int);
 drop table bug29807;
 --disable_query_log
 call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal");
-call mtr.add_suppression("Cannot find or open table test\/bug29807 from");
+call mtr.add_suppression("InnoDB: Cannot open table test/bug29807 from");
 --enable_query_log
 
 

=== modified file 'mysql-test/lib/v1/mtr_report.pl'
--- a/mysql-test/lib/v1/mtr_report.pl	revid:sunny.bains@strippedy4xn34koiue
+++ b/mysql-test/lib/v1/mtr_report.pl	revid:marko.makela@stripped
@@ -339,7 +339,7 @@ sub mtr_report_stats ($) {
 
                 # test case for Bug#bug29807 copies a stray frm into database
                 /InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal/ or
-                /Cannot find or open table test\/bug29807 from/ or
+                /InnoDB: Cannot open table test\/bug29807 from/ or
 
                 # innodb foreign key tests that fail in ALTER or RENAME produce this
                 /InnoDB: Error: in ALTER TABLE `test`.`t[12]`/ or
@@ -400,7 +400,7 @@ sub mtr_report_stats ($) {
 
                 # lowercase_table3 using case sensitive option on
                 # case insensitive filesystem (InnoDB error).
-                /Cannot find or open table test\/BUG29839 from/ or
+                /InnoDB: Cannot open table test\/BUG29839 from/ or
 
                 # When trying to set lower_case_table_names = 2
                 # on a case sensitive file system. Bug#37402.

=== modified file 'mysql-test/r/lowercase_table3.result'
--- a/mysql-test/r/lowercase_table3.result	revid:sunny.bains@oracle.com-20120417232232-tus8oy4xn34koiue
+++ b/mysql-test/r/lowercase_table3.result	revid:marko.makela@stripped0120418081223-lo1wmvdv7da8yi0y
@@ -1,4 +1,4 @@
-call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
+call mtr.add_suppression("InnoDB: Cannot open table test/BUG29839 from");
 DROP TABLE IF EXISTS t1,T1;
 CREATE TABLE t1 (a INT);
 SELECT * FROM T1;

=== added file 'mysql-test/suite/innodb/r/innodb-alter-discard.result'
--- a/mysql-test/suite/innodb/r/innodb-alter-discard.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb-alter-discard.result	revid:marko.makela@oracle.com-20120418081223-lo1wmvdv7da8yi0y
@@ -0,0 +1,19 @@
+SET GLOBAL innodb_file_per_table=1;
+CREATE TABLE t(a INT)ENGINE=InnoDB;
+call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
+call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
+call mtr.add_suppression("InnoDB: Error: table 'test/t'$");
+SELECT * FROM t;
+ERROR 42S02: Table 'test.t' doesn't exist
+ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
+ERROR 42S02: Table 'test.t' doesn't exist
+ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
+ERROR 42S02: Table 'test.t1' doesn't exist
+call mtr.add_suppression("InnoDB: Tablespace open failed for 'test/t', ignored");
+call mtr.add_suppression("InnoDB: Failed to find tablespace for table 'test/t' in the cache");
+call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found");
+ALTER TABLE t DISCARD TABLESPACE;
+Warnings:
+Warning	1808	InnoDB: Tablespace is missing for table 'test/t'
+Warning	1808	InnoDB: Tablespace is missing for table 'test/t'
+DROP TABLE t;

=== modified file 'mysql-test/suite/innodb/r/innodb-index-online.result'
--- a/mysql-test/suite/innodb/r/innodb-index-online.result	revid:sunny.bains@stripped
+++ b/mysql-test/suite/innodb/r/innodb-index-online.result	revid:marko.makela@strippedyi0y
@@ -4,6 +4,9 @@ SET DEBUG='d,query,debug_sync_exec:i:t:A
 call mtr.add_suppression("InnoDB: Warning: Small buffer pool size");
 call mtr.add_suppression("Cannot find index .*c2 in InnoDB index translation table");
 call mtr.add_suppression("Find index .*c2 in InnoDB index list but not its MySQL index number");
+call mtr.add_suppression("InnoDB: Error: table 'test/t1'$");
+call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for$");
+SET GLOBAL innodb_file_per_table=on;
 CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT, c3 INT) ENGINE=InnoDB;
 INSERT INTO t1 VALUES (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0);
 SET GLOBAL innodb_monitor_enable=module_ddl;
@@ -257,6 +260,48 @@ COUNT(c2)
 CHECK TABLE t1;
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
+SET DEBUG_SYNC='row_log_apply_before SIGNAL c2g_created WAIT_FOR dml4_done';
+SET lock_wait_timeout=1;
+ALTER TABLE t1 DROP INDEX c2f, ADD INDEX c2g(c2);
+SET DEBUG_SYNC='now WAIT_FOR c2g_created';
+SET lock_wait_timeout=10;
+ALTER TABLE t1 DISCARD TABLESPACE;
+SELECT state FROM information_schema.processlist
+WHERE info='ALTER TABLE t1 DISCARD TABLESPACE';
+state
+Waiting for table level lock
+SET DEBUG_SYNC='now SIGNAL dml4_done';
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `c1` int(11) NOT NULL,
+  `c2` int(11) DEFAULT NULL,
+  `c3` int(11) DEFAULT NULL,
+  PRIMARY KEY (`c1`),
+  KEY `c2d` (`c2`),
+  KEY `c2f` (`c2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='testing if c2e will be dropped'
+ALTER TABLE t1 DROP INDEX c2d, DROP INDEX c2f;
+Warnings:
+Warning	1810	InnoDB: Tablespace has been discarded for table 'test/t1'
+ALTER TABLE t1 ADD INDEX c2h(c2), ALGORITHM=INPLACE;
+Warnings:
+Warning	1810	InnoDB: Tablespace has been discarded for table 'test/t1'
+ALTER TABLE t1 ADD INDEX c2g(c2), ALGORITHM=COPY;
+ERROR HY000: Tablespace has been discarded for table 'test/t1'
+SELECT * FROM t1;
+ERROR HY000: Tablespace has been discarded for table 'test/t1'
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `c1` int(11) NOT NULL,
+  `c2` int(11) DEFAULT NULL,
+  `c3` int(11) DEFAULT NULL,
+  PRIMARY KEY (`c1`),
+  KEY `c2h` (`c2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='testing if c2e will be dropped'
+SET GLOBAL innodb_file_per_table=0;
 SET DEBUG_SYNC='RESET';
 SET DEBUG='-d,debug_sync_abort_on_timeout';
 SET DEBUG='';

=== modified file 'mysql-test/suite/innodb/r/innodb_mysql.result'
--- a/mysql-test/suite/innodb/r/innodb_mysql.result	revid:sunny.bains@strippedtus8oy4xn34koiue
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result	revid:marko.makela@strippedlo1wmvdv7da8yi0y
@@ -2846,5 +2846,4 @@ INDEX a (a)) ENGINE=innodb;
 ALTER TABLE t1 DROP INDEX a, ADD INDEX a (b, a);
 ALTER TABLE t1 DROP INDEX a, ADD INDEX (a, b);
 DROP TABLE t1;
-call mtr.add_suppression('InnoDB: Cannot open table .* from the internal data dictionary of InnoDB though the .frm file for the table exists.*');
 End of 6.0 tests

=== added file 'mysql-test/suite/innodb/t/innodb-alter-discard.test'
--- a/mysql-test/suite/innodb/t/innodb-alter-discard.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test	revid:marko.makela@stripped
@@ -0,0 +1,44 @@
+#Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES
+
+--source include/have_innodb.inc
+
+let $MYSQLD_DATADIR=`select @@datadir`;
+SET GLOBAL innodb_file_per_table=1;
+CREATE TABLE t(a INT)ENGINE=InnoDB;
+
+# Shut down the server
+-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+-- shutdown_server
+-- source include/wait_until_disconnected.inc
+
+# Remove the tablespace file.
+let IBD=$MYSQLD_DATADIR/test/t.ibd;
+perl;
+unlink "$ENV{IBD}" || die "Unable to unlink $ENV{IBD}\n";
+EOF
+
+# Restart the server.
+-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+-- enable_reconnect
+-- source include/wait_until_connected_again.inc
+
+call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
+call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
+call mtr.add_suppression("InnoDB: Error: table 'test/t'$");
+
+# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().
+# The table does exist, only the tablespace does not exist.
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t;
+
+--error ER_NO_SUCH_TABLE
+ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
+--error ER_NO_SUCH_TABLE
+ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
+
+call mtr.add_suppression("InnoDB: Tablespace open failed for 'test/t', ignored");
+call mtr.add_suppression("InnoDB: Failed to find tablespace for table 'test/t' in the cache");
+call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found");
+
+ALTER TABLE t DISCARD TABLESPACE;
+DROP TABLE t;

=== modified file 'mysql-test/suite/innodb/t/innodb-index-online.test'
--- a/mysql-test/suite/innodb/t/innodb-index-online.test	revid:sunny.bains@stripped
+++ b/mysql-test/suite/innodb/t/innodb-index-online.test	revid:marko.makela@strippedy
@@ -9,6 +9,13 @@ call mtr.add_suppression("InnoDB: Warnin
 # These will be triggered by INSERT INTO t1 VALUES(6,3,1);
 call mtr.add_suppression("Cannot find index .*c2 in InnoDB index translation table");
 call mtr.add_suppression("Find index .*c2 in InnoDB index list but not its MySQL index number");
+# these will be triggered by DISCARD TABLESPACE
+call mtr.add_suppression("InnoDB: Error: table 'test/t1'$");
+call mtr.add_suppression("MySQL is trying to open a table handle but the .ibd file for$");
+
+# DISCARD TABLESPACE needs file-per-table
+let $per_table=`select @@innodb_file_per_table`;
+SET GLOBAL innodb_file_per_table=on;
 
 # Save the initial number of concurrent sessions.
 --source include/count_sessions.inc
@@ -256,10 +263,48 @@ SELECT name,count FROM INFORMATION_SCHEM
 SELECT COUNT(c2) FROM t1;
 CHECK TABLE t1;
 
-disconnect con1;
+connection default;
+SET DEBUG_SYNC='row_log_apply_before SIGNAL c2g_created WAIT_FOR dml4_done';
+# The lock upgrade at the end of the ALTER will conflict with the DISCARD.
+SET lock_wait_timeout=1;
+--send
+ALTER TABLE t1 DROP INDEX c2f, ADD INDEX c2g(c2);
+
+connection con1;
+SET DEBUG_SYNC='now WAIT_FOR c2g_created';
+
+connect (con2,localhost,root,,);
+connection con2;
+
+# This will conflict with the ALTER in connection default, above.
+SET lock_wait_timeout=10;
+--send
+ALTER TABLE t1 DISCARD TABLESPACE;
 
+connection con1;
+SELECT state FROM information_schema.processlist
+WHERE info='ALTER TABLE t1 DISCARD TABLESPACE';
+
+SET DEBUG_SYNC='now SIGNAL dml4_done';
+disconnect con1;
+connection default;
+--error ER_LOCK_WAIT_TIMEOUT
+reap;
+connection con2;
+reap;
+disconnect con2;
 connection default;
 
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 DROP INDEX c2d, DROP INDEX c2f;
+ALTER TABLE t1 ADD INDEX c2h(c2), ALGORITHM=INPLACE;
+-- error ER_TABLESPACE_DISCARDED
+ALTER TABLE t1 ADD INDEX c2g(c2), ALGORITHM=COPY;
+-- error ER_TABLESPACE_DISCARDED
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+
+eval SET GLOBAL innodb_file_per_table=$per_table;
 SET DEBUG_SYNC='RESET';
 SET DEBUG='-d,debug_sync_abort_on_timeout';
 SET DEBUG='';

=== modified file 'mysql-test/suite/innodb/t/innodb_mysql.test'
--- a/mysql-test/suite/innodb/t/innodb_mysql.test	revid:sunny.bains@stripped
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test	revid:marko.makela@stripped
@@ -1003,5 +1003,4 @@ ALTER TABLE t1 DROP INDEX a, ADD INDEX (
 
 DROP TABLE t1;
 
-call mtr.add_suppression('InnoDB: Cannot open table .* from the internal data dictionary of InnoDB though the .frm file for the table exists.*');
 --echo End of 6.0 tests

=== modified file 'mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result'
--- a/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result	revid:sunny.bains@stripped34koiue
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result	revid:marko.makela@stripped081223-lo1wmvdv7da8yi0y
@@ -1,4 +1,4 @@
-SELECT name, count 
+SELECT name, count
 FROM information_schema.innodb_metrics
 WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 name	count
@@ -9,7 +9,7 @@ SELECT @orig;
 @orig
 0
 SET GLOBAL innodb_purge_stop_now = ON;
-SELECT name, count 
+SELECT name, count
 FROM information_schema.innodb_metrics
 WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 name	count
@@ -19,7 +19,7 @@ SET GLOBAL innodb_purge_run_now = ON;
 SELECT @@global.innodb_purge_run_now;
 @@global.innodb_purge_run_now
 0
-SELECT name, count 
+SELECT name, count
 FROM information_schema.innodb_metrics
 WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 name	count

=== modified file 'mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result'
--- a/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result	revid:sunny.bains@stripped7232232-tus8oy4xn34koiue
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result	revid:marko.makela@oracle.com-20120418081223-lo1wmvdv7da8yi0y
@@ -1,4 +1,4 @@
-SELECT name, count 
+SELECT name, count
 FROM information_schema.innodb_metrics
 WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 name	count
@@ -9,7 +9,7 @@ SELECT @orig;
 @orig
 0
 SET GLOBAL innodb_purge_stop_now = ON;
-SELECT name, count 
+SELECT name, count
 FROM information_schema.innodb_metrics
 WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 name	count
@@ -19,7 +19,7 @@ SET GLOBAL innodb_purge_run_now = ON;
 SELECT @@global.innodb_purge_run_now;
 @@global.innodb_purge_run_now
 0
-SELECT name, count 
+SELECT name, count
 FROM information_schema.innodb_metrics
 WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 name	count

=== modified file 'mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test'
--- a/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test	revid:sunny.bains@oracle.com-20120417232232-tus8oy4xn34koiue
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test	revid:marko.makela@stripped
@@ -15,7 +15,7 @@ set global innodb_monitor_enable = purge
 --enable_query_log
 
 # Should be 0 for both
-SELECT name, count 
+SELECT name, count
   FROM information_schema.innodb_metrics
   WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 
@@ -27,7 +27,7 @@ SELECT @orig;
 SET GLOBAL innodb_purge_stop_now = ON;
 
 # Stop count should now be 1
-SELECT name, count 
+SELECT name, count
   FROM information_schema.innodb_metrics
   WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 
@@ -37,7 +37,7 @@ SET GLOBAL innodb_purge_run_now = ON;
 SELECT @@global.innodb_purge_run_now;
 
 # Both should be 1 now
-SELECT name, count 
+SELECT name, count
   FROM information_schema.innodb_metrics
   WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 

=== modified file 'mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test'
--- a/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test	revid:sunny.bains@stripped232-tus8oy4xn34koiue
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test	revid:marko.makela@oracle.com-20120418081223-lo1wmvdv7da8yi0y
@@ -15,7 +15,7 @@ set global innodb_monitor_enable = purge
 --enable_query_log
 
 # Should be 0 for both
-SELECT name, count 
+SELECT name, count
   FROM information_schema.innodb_metrics
   WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 
@@ -27,7 +27,7 @@ SELECT @orig;
 SET GLOBAL innodb_purge_stop_now = ON;
 
 # Stop count should now be 1
-SELECT name, count 
+SELECT name, count
   FROM information_schema.innodb_metrics
   WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 
@@ -37,7 +37,7 @@ SET GLOBAL innodb_purge_run_now = ON;
 SELECT @@global.innodb_purge_run_now;
 
 # Both should be 1 now
-SELECT name, count 
+SELECT name, count
   FROM information_schema.innodb_metrics
   WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
 

=== modified file 'mysql-test/t/lowercase_table3.test'
--- a/mysql-test/t/lowercase_table3.test	revid:sunny.bains@stripped4xn34koiue
+++ b/mysql-test/t/lowercase_table3.test	revid:marko.makela@stripped
@@ -9,7 +9,7 @@
 --source include/have_case_insensitive_file_system.inc
 --source include/not_windows.inc
 
-call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
+call mtr.add_suppression("InnoDB: Cannot open table test/BUG29839 from");
 
 --disable_warnings
 DROP TABLE IF EXISTS t1,T1;

=== modified file 'storage/innobase/btr/btr0btr.cc'
--- a/storage/innobase/btr/btr0btr.cc	revid:sunny.bains@strippedoiue
+++ b/storage/innobase/btr/btr0btr.cc	revid:marko.makela@stripped
@@ -854,7 +854,7 @@ btr_root_adjust_on_import(
 		bool	page_is_compact_format;
 
 		page_is_compact_format = page_is_comp(page) > 0;
-		
+
 		/* Check if the page format and table format agree. */
 		if (page_is_compact_format != dict_table_is_comp(table)) {
 			err = DB_CORRUPTION;

=== modified file 'storage/innobase/fil/fil0fil.cc'
--- a/storage/innobase/fil/fil0fil.cc	revid:sunny.bains@stripped0417232232-tus8oy4xn34koiue
+++ b/storage/innobase/fil/fil0fil.cc	revid:marko.makela@strippedwmvdv7da8yi0y
@@ -2336,7 +2336,7 @@ fil_check_pending_io(
 		ut_a(!(*node)->being_extended);
 
 		if (count > 1000) {
-			ib_logf(IB_LOG_LEVEL_WARN, 
+			ib_logf(IB_LOG_LEVEL_WARN,
 				"Trying to close/delete tablespace '%s' "
 				"but there are %lu flushes "
 				" and %lu pending i/o's on it.",
@@ -2406,7 +2406,7 @@ fil_check_pending_operations(
 		if (count == 0) {
 			*path = mem_strdup(node->name);
 		}
-		
+
 		mutex_exit(&fil_system->mutex);
 
 		if (count > 0) {

=== modified file 'storage/innobase/handler/handler0alter.cc'
--- a/storage/innobase/handler/handler0alter.cc	revid:sunny.bains@stripped2232-tus8oy4xn34koiue
+++ b/storage/innobase/handler/handler0alter.cc	revid:marko.makela@stripped-lo1wmvdv7da8yi0y
@@ -38,9 +38,6 @@ Smart ALTER TABLE
 #include "handler0alter.h"
 #include "srv0mon.h"
 #include "fts0priv.h"
-#ifdef UNIV_DEBUG
-#include "btr0sea.h"
-#endif /* UNIV_DEBUG */
 
 #include "ha_innodb.h"
 
@@ -154,6 +151,10 @@ ha_innobase::check_if_supported_inplace_
 {
 	DBUG_ENTER("check_if_supported_inplace_alter");
 
+	if (srv_created_new_raw || srv_force_recovery) {
+		DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
+	}
+
 	HA_CREATE_INFO* create_info = ha_alter_info->create_info;
 
 	if (ha_alter_info->handler_flags
@@ -189,6 +190,7 @@ ha_innobase::check_if_supported_inplace_
 	}
 
 	update_thd();
+	trx_search_latch_release_if_reserved(prebuilt->trx);
 
 	/* Fix the key parts. */
 	for (KEY* new_key = ha_alter_info->key_info_buffer;
@@ -1628,7 +1630,9 @@ col_fail:
 		log is unnecessary. */
 		if (!num_fts_index
 		    && !(ha_alter_info->handler_flags
-			 & ~INNOBASE_ONLINE_OPERATIONS)) {
+			 & ~INNOBASE_ONLINE_OPERATIONS)
+		    && !user_table->ibd_file_missing
+		    && !dict_table_is_discarded(user_table)) {
 			DBUG_EXECUTE_IF("innodb_OOM_prepare_inplace_alter",
 					error = DB_OUT_OF_MEMORY;
 					goto error_handling;);
@@ -1828,19 +1832,11 @@ ha_innobase::prepare_inplace_alter_table
 		goto func_exit;
 	}
 
-	if (srv_created_new_raw || srv_force_recovery) {
-		my_error(ER_OPEN_AS_READONLY, MYF(0),
-			 table->s->table_name.str);
-		DBUG_RETURN(true);
-	}
-
 	ut_d(mutex_enter(&dict_sys->mutex));
 	ut_d(dict_table_check_for_dup_indexes(
 		     prebuilt->table, CHECK_ABORTED_OK));
 	ut_d(mutex_exit(&dict_sys->mutex));
 
-	update_thd();
-
 	/* In case MySQL calls this in the middle of a SELECT query, release
 	possible adaptive hash latch to avoid deadlocks of threads. */
 	trx_search_latch_release_if_reserved(prebuilt->trx);
@@ -2115,35 +2111,22 @@ ha_innobase::inplace_alter_table(
 	ut_ad(!rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED));
 #endif /* UNIV_SYNC_DEBUG */
 
-	class ha_innobase_inplace_ctx*	ctx
-		= static_cast<class ha_innobase_inplace_ctx*>
-		(ha_alter_info->handler_ctx);
-
-	update_thd();
-
 	if (!(ha_alter_info->handler_flags & INNOBASE_INPLACE_CREATE)) {
 		DBUG_RETURN(false);
-	} else if (dict_table_is_discarded(prebuilt->table)) {
+	}
 
-		/* Nothing to do. */
-		for (uint i = 0; i < ctx->num_to_add; ++i) {
-			dict_index_t*	index = ctx->add[i];
+	class ha_innobase_inplace_ctx*	ctx
+		= static_cast<class ha_innobase_inplace_ctx*>
+		(ha_alter_info->handler_ctx);
 
-			error = row_log_apply(prebuilt->trx, index, table);
-			ut_a(error == DB_SUCCESS);
-#ifdef UNIV_DEBUG
-			ut_a(index->info.search->magic_n == BTR_SEARCH_MAGIC_N);
-#endif /* UNIV_DEBUG */
-			index->page = FIL_NULL;
-		}
+	DBUG_ASSERT(ctx);
+	DBUG_ASSERT(ctx->trx);
 
-		DBUG_RETURN(false);
+	if (prebuilt->table->ibd_file_missing
+	    || dict_table_is_discarded(prebuilt->table)) {
+		goto all_done;
 	}
 
-	trx_search_latch_release_if_reserved(prebuilt->trx);
-
-	DBUG_ASSERT(ctx->trx != 0);
-
 	/* Read the clustered index of the table and build
 	indexes based on this information using temporary
 	files and merge sort. */
@@ -2163,6 +2146,7 @@ oom:
 
 	switch (error) {
 		KEY*	dup_key;
+	all_done:
 	case DB_SUCCESS:
 		ut_d(mutex_enter(&dict_sys->mutex));
 		ut_d(dict_table_check_for_dup_indexes(

=== modified file 'storage/innobase/log/log0recv.cc'
--- a/storage/innobase/log/log0recv.cc	revid:sunny.bains@stripped
+++ b/storage/innobase/log/log0recv.cc	revid:marko.makela@oracle.com-20120418081223-lo1wmvdv7da8yi0y
@@ -2894,7 +2894,7 @@ recv_recovery_from_checkpoint_start_func
 	lsn_t		checkpoint_lsn;
 	ib_uint64_t	checkpoint_no;
 	lsn_t		old_scanned_lsn;
-	lsn_t		group_scanned_lsn;
+	lsn_t		group_scanned_lsn = 0;
 	lsn_t		contiguous_lsn;
 #ifdef UNIV_LOG_ARCHIVE
 	lsn_t		archived_lsn;

=== modified file 'storage/innobase/mtr/mtr0mtr.cc'
--- a/storage/innobase/mtr/mtr0mtr.cc	revid:sunny.bains@strippedus8oy4xn34koiue
+++ b/storage/innobase/mtr/mtr0mtr.cc	revid:marko.makela@strippedy
@@ -248,8 +248,8 @@ mtr_log_reserve_and_write(
 
 	if (mlog->heap == NULL) {
 		ulint	len;
-		
-		len = mtr->log_mode != MTR_LOG_NO_REDO 
+
+		len = mtr->log_mode != MTR_LOG_NO_REDO
 			? dyn_block_get_used(mlog) : 0;
 
 		mtr->end_lsn = log_reserve_and_write_fast(

=== modified file 'storage/innobase/row/row0import.cc'
--- a/storage/innobase/row/row0import.cc	revid:sunny.bains@stripped417232232-tus8oy4xn34koiue
+++ b/storage/innobase/row/row0import.cc	revid:marko.makela@strippedo1wmvdv7da8yi0y
@@ -1982,8 +1982,8 @@ row_import_update_discarded_flag(
 					to set the root table->flags2 */
 	bool		discarded,	/*!< in: set MIX_LEN column bit
 					to discarded, if true */
-	bool		dict_locked)	/*!< in: set to true if the 
-					caller already owns the 
+	bool		dict_locked)	/*!< in: set to true if the
+					caller already owns the
 					dict_sys_t:: mutex. */
 
 {

=== modified file 'storage/innobase/row/row0mysql.cc'
--- a/storage/innobase/row/row0mysql.cc	revid:sunny.bains@stripped120417232232-tus8oy4xn34koiue
+++ b/storage/innobase/row/row0mysql.cc	revid:marko.makela@stripped-lo1wmvdv7da8yi0y
@@ -2921,7 +2921,7 @@ row_discard_tablespace_for_mysql(
 
 	if (err != DB_SUCCESS) {
 		return(row_discard_tablespace_end(trx, table, err));
-	}	
+	}
 
 	err = row_discard_tablespace(trx, table);
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5522 branch (marko.makela:4072 to 4075) WL#5522marko.makela20 Apr