List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 10 2012 9:38am
Subject:bzr push into mysql-trunk-wl5259 branch (marc.alff:3342 to 3343)
View as plain text  
 3343 Marc Alff	2012-01-10 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5259

    added:
      mysql-test/suite/innodb/r/innodb_bug12400341.result
      mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
      mysql-test/suite/innodb/t/innodb_bug12400341.test
    modified:
      client/mysqlbinlog.cc
      mysql-test/collections/default.experimental
      mysql-test/suite/innodb_fts/r/innodb_fts_large_records.result
      mysql-test/suite/innodb_fts/t/disabled.def
      mysql-test/suite/innodb_fts/t/innodb_fts_large_records.test
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/t/all_vars.test
      mysql-test/suite/sys_vars/t/disabled.def
      storage/innobase/fts/fts0fts.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/trx0rseg.ic
      storage/innobase/include/trx0sys.h
      storage/innobase/row/row0mysql.cc
      storage/innobase/trx/trx0sys.cc
 3342 Marc Alff	2012-01-10
      Testing, in progress

    added:
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_peer_addr.result
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
      mysql-test/suite/perfschema/t/hostcache_peer_addr.test
    modified:
      sql/hostname.cc
      sql/hostname.h
      storage/perfschema/table_host_cache.cc
=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2011-12-14 05:03:54 +0000
+++ b/client/mysqlbinlog.cc	2012-01-10 06:46:14 +0000
@@ -757,21 +757,18 @@ Exit_status process_event(PRINT_EVENT_IN
           !((Query_log_event*) ev)->is_trans_keyword() &&
            shall_skip_database(((Query_log_event*) ev)->db);
            
-      for (uint dynamic_array_index= 0; dynamic_array_index < buff_ev.elements; 
-           dynamic_array_index++)
+      for (uint i= 0; i < buff_ev.elements; i++) 
       {
-        buff_event_info pop_event_array= *dynamic_element(&buff_ev, dynamic_array_index, buff_event_info *);
+        buff_event_info pop_event_array= *dynamic_element(&buff_ev, i, buff_event_info *);
         Log_event *temp_event= pop_event_array.event;
         my_off_t temp_log_pos= pop_event_array.event_pos;
-        (!opt_hexdump) ? print_event_info->hexdump_from= 0 : print_event_info->hexdump_from= temp_log_pos;
-
+        print_event_info->hexdump_from= (opt_hexdump ? temp_log_pos : 0); 
         if (!parent_query_skips)
           temp_event->print(result_file, print_event_info);
         delete temp_event;
       }
       
-      (!opt_hexdump) ? print_event_info->hexdump_from= 0 : print_event_info->hexdump_from= pos;      
-
+      print_event_info->hexdump_from= (opt_hexdump ? pos : 0);
       reset_dynamic(&buff_ev);
 
       if (parent_query_skips)
@@ -1344,6 +1341,14 @@ static void cleanup()
   my_free(host);
   my_free(user);
   my_free(dirname_for_local_load);
+  
+  for (uint i= 0; i < buff_ev.elements; i++)
+  {
+    buff_event_info pop_event_array= *dynamic_element(&buff_ev, i, buff_event_info *);
+    delete (pop_event_array.event);
+  }
+  delete_dynamic(&buff_ev);
+  
   delete glob_description_event;
   if (mysql)
     mysql_close(mysql);
@@ -2391,16 +2396,6 @@ int main(int argc, char** argv)
     my_fclose(result_file, MYF(0));
   cleanup();
 
-  if(buff_ev.elements)
-  {
-    for (uint i= 0; i < buff_ev.elements; i++)
-      {
-        buff_event_info pop_event_array= *dynamic_element(&buff_ev, i, buff_event_info *);
-        delete (pop_event_array.event);
-      }
-    delete_dynamic(&buff_ev);
-  }
-
   if (defaults_argv)
     free_defaults(defaults_argv);
   my_free_open_file_info();

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2012-01-05 05:16:25 +0000
+++ b/mysql-test/collections/default.experimental	2012-01-10 06:13:22 +0000
@@ -32,8 +32,6 @@ sys_vars.max_sp_recursion_depth_func @so
 sys_vars.ndb_log_update_as_write_basic
 sys_vars.have_ndbcluster_basic
 sys_vars.ndb_log_updated_only_basic
-sys_vars.query_cache_size_basic_64       # Bug#11748572 - 36747: ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC
-sys_vars.query_cache_size_basic_32       # Bug#11748572 - 36747: ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC
 sys_vars.rpl_init_slave_func		 # Bug#12535301 2011-05-09 andrei sys_vars.rpl_init_slave_func mismatches in daily-5.5
 
 rpl.rpl_mixed_mts_rec_crash_safe @solaris          # Bug#12902514 2011-08-19 andrei mts recovery tests are slow

=== added file 'mysql-test/suite/innodb/r/innodb_bug12400341.result'
--- a/mysql-test/suite/innodb/r/innodb_bug12400341.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug12400341.result	2012-01-10 05:26:29 +0000
@@ -0,0 +1,28 @@
+call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too");
+set @old_innodb_undo_logs = @@innodb_undo_logs;
+set global innodb_undo_logs=1;
+show variables like "max_connections";
+Variable_name	Value
+max_connections	64
+show variables like "innodb_thread_concurrency";
+Variable_name	Value
+innodb_thread_concurrency	0
+show variables like "innodb_file_per_table";
+Variable_name	Value
+innodb_file_per_table	ON
+drop database if exists mysqltest;
+create database mysqltest;
+CREATE TABLE mysqltest.transtable (id int unsigned NOT NULL PRIMARY KEY, val int DEFAULT 0) ENGINE=InnoDB;
+select count(*) from information_schema.processlist;
+count(*)
+33
+CREATE TABLE mysqltest.testtable (id int unsigned not null primary key) ENGINE=InnoDB;
+ERROR HY000: Can't create table 'mysqltest.testtable' (errno: 177)
+select count(*) from information_schema.processlist;
+count(*)
+33
+select count(*) from information_schema.processlist;
+count(*)
+33
+drop database mysqltest;
+set global innodb_undo_logs = @old_innodb_undo_logs;

=== added file 'mysql-test/suite/innodb/t/innodb_bug12400341-master.opt'
--- a/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt	2012-01-10 05:26:29 +0000
@@ -0,0 +1 @@
+--max_connections=64 --innodb_thread_concurrency=0 --innodb_file_per_table

=== added file 'mysql-test/suite/innodb/t/innodb_bug12400341.test'
--- a/mysql-test/suite/innodb/t/innodb_bug12400341.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test	2012-01-10 05:26:29 +0000
@@ -0,0 +1,108 @@
+# Test for bug #12400341: INNODB CAN LEAVE ORPHAN IBD FILES AROUND
+
+-- source include/have_innodb.inc
+
+if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_TRX_RSEG_N_SLOTS_DEBUG'`)
+{
+  --skip Test requires InnoDB built with UNIV_DEBUG definition.
+}
+
+call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too");
+
+--disable_query_log
+set @old_innodb_trx_rseg_n_slots_debug = @@innodb_trx_rseg_n_slots_debug;
+set global innodb_trx_rseg_n_slots_debug = 32;
+--enable_query_log
+
+set @old_innodb_undo_logs = @@innodb_undo_logs;
+set global innodb_undo_logs=1;
+
+show variables like "max_connections";
+show variables like "innodb_thread_concurrency";
+show variables like "innodb_file_per_table";
+
+--disable_warnings
+drop database if exists mysqltest;
+--enable_warnings
+
+create database mysqltest;
+CREATE TABLE mysqltest.transtable (id int unsigned NOT NULL PRIMARY KEY, val int DEFAULT 0) ENGINE=InnoDB;
+
+--disable_query_log
+#
+# Insert in 1 transaction which needs over 1 page undo record to avoid the insert_undo cached,
+# because the cached insert_undo can be reused at "CREATE TABLE" statement later.
+#
+START TRANSACTION;
+let $c = 1024;
+while ($c)
+{
+  eval INSERT INTO mysqltest.transtable (id) VALUES ($c);
+  dec $c;
+}
+COMMIT;
+
+let $c = 32;
+while ($c)
+{
+  # if failed at here, it might be shortage of file descriptors limit.
+  connect (con$c,localhost,root,,);
+  dec $c;
+}
+--enable_query_log
+
+select count(*) from information_schema.processlist;
+
+#
+# fill the all undo slots
+#
+--disable_query_log
+let $c = 32;
+while ($c)
+{
+  connection con$c;
+  START TRANSACTION;
+  eval UPDATE mysqltest.transtable SET val = 1 WHERE id = 33 - $c;
+  dec $c;
+}
+--enable_query_log
+
+connection default;
+
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE mysqltest.testtable (id int unsigned not null primary key) ENGINE=InnoDB;
+
+select count(*) from information_schema.processlist;
+
+--disable_query_log
+let $c = 32;
+while ($c)
+{
+  connection con$c;
+  ROLLBACK;
+  dec $c;
+}
+--enable_query_log
+
+connection default;
+select count(*) from information_schema.processlist;
+
+--disable_query_log
+let $c = 32;
+while ($c)
+{
+  disconnect con$c;
+  dec $c;
+}
+--enable_query_log
+
+#
+# If the isolated .ibd file remained, the drop database should fail.
+#
+drop database mysqltest;
+
+set global innodb_undo_logs = @old_innodb_undo_logs;
+
+--disable_query_log
+set global innodb_trx_rseg_n_slots_debug = @old_innodb_trx_rseg_n_slots_debug;
+--enable_query_log

=== modified file 'mysql-test/suite/innodb_fts/r/innodb_fts_large_records.result'
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_large_records.result	2011-11-18 14:16:55 +0000
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_large_records.result	2012-01-09 11:28:13 +0000
@@ -9,7 +9,7 @@ CREATE UNIQUE INDEX FTS_DOC_ID_INDEX on
 CREATE FULLTEXT INDEX idx on t1 (a,b);
 SELECT COUNT(*) FROM t1;
 COUNT(*)
-399
+49
 SELECT FTS_DOC_ID FROM t1 WHERE MATCH (a,b)
 AGAINST ('row35col2word49' IN NATURAL LANGUAGE MODE);
 FTS_DOC_ID
@@ -83,10 +83,9 @@ CREATE UNIQUE INDEX FTS_DOC_ID_INDEX on
 CREATE FULLTEXT INDEX idx on t1 (a,b);
 SELECT COUNT(*) FROM t1;
 COUNT(*)
-5000
+100
 SELECT FTS_DOC_ID from t1 WHERE b like '%row300col2word30%';
 FTS_DOC_ID
-300
 SELECT FTS_DOC_ID FROM t1 WHERE MATCH (a,b)
 AGAINST ('row35col2word49' IN NATURAL LANGUAGE MODE);
 FTS_DOC_ID
@@ -156,11 +155,11 @@ CREATE FULLTEXT INDEX idx on t1 (a,b);
 UPDATE t1 SET a = NULL , b = NULL, FTS_DOC_ID= 6000 + FTS_DOC_ID;
 SELECT COUNT(*) FROM t1 WHERE a IS NULL AND b IS NULL;
 COUNT(*)
-4999
+99
 ALTER TABLE t1 DROP INDEX idx;
 SELECT COUNT(*) FROM t1 WHERE a IS NULL AND b IS NULL;
 COUNT(*)
-4999
+99
 DROP TABLE t1;
 CREATE TABLE t1 (
 FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, 
@@ -172,26 +171,26 @@ CREATE UNIQUE INDEX FTS_DOC_ID_INDEX on
 CREATE FULLTEXT INDEX idx on t1 (a,b);
 SELECT COUNT(*) FROM t1;
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 WHERE b like '%samerowword%';
 COUNT(*)
-5000
+100
 SELECT COUNT(*) FROM t1 WHERE MATCH (a,b)
 AGAINST ('samerowword' IN NATURAL LANGUAGE MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("+samerowword +samerowword" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("+samerowword" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("+samerowword -(row45col2word49)" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 
 WHERE MATCH a,b AGAINST ("+sameroww" IN BOOLEAN MODE);
 COUNT(*)
@@ -199,7 +198,7 @@ COUNT(*)
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST ("samerowword" WITH QUERY EXPANSION);
 COUNT(*)
-5000
+100
 UPDATE t1 SET a = "using update" , b = "changing fulltext index record", 
 FTS_DOC_ID = FTS_DOC_ID + 10000 
 WHERE MATCH(a,b) AGAINST("+samerowword +samerowword" IN BOOLEAN MODE);
@@ -214,11 +213,11 @@ COUNT(*)
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("changing fulltext" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("+chang* +fulltext" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 DELETE FROM t1 WHERE MATCH(a,b) AGAINST("+chang* +fulltext" IN BOOLEAN MODE);
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("+chang* +fulltext" IN BOOLEAN MODE);
@@ -245,20 +244,20 @@ CREATE UNIQUE INDEX FTS_DOC_ID_INDEX on
 CREATE FULLTEXT INDEX idx on t1 (a,b);
 SELECT COUNT(*) FROM t1;
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 WHERE a like '%samerowword%';
 COUNT(*)
-5000
+100
 SELECT COUNT(*) FROM t1 WHERE MATCH (a,b)
 AGAINST ('samerowword' IN NATURAL LANGUAGE MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 WHERE MATCH(a,b) AGAINST("+samerowword +1050" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 WHERE MATCH(a,b) AGAINST("+samerowword" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 WHERE MATCH(a,b) AGAINST("+samerowword -(1050)" IN BOOLEAN MODE);
 COUNT(*)
 0
@@ -267,7 +266,7 @@ COUNT(*)
 0
 SELECT COUNT(*) from t1 WHERE MATCH(a,b) AGAINST ("samerowword" WITH QUERY EXPANSION);
 COUNT(*)
-5000
+100
 UPDATE t1 SET a = "using update" , b = "changing fulltext index record", 
 FTS_DOC_ID = FTS_DOC_ID + 10000 
 WHERE MATCH(a,b) AGAINST("+samerowword +1050" IN BOOLEAN MODE);
@@ -282,11 +281,11 @@ COUNT(*)
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("changing fulltext" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 SELECT COUNT(*) from t1 
 WHERE MATCH(a,b) AGAINST("+chang* +fulltext" IN BOOLEAN MODE);
 COUNT(*)
-5000
+100
 DELETE FROM t1 
 WHERE MATCH(a,b) AGAINST("+chang* +fulltext" IN BOOLEAN MODE);
 SELECT COUNT(*) from t1 

=== modified file 'mysql-test/suite/innodb_fts/t/disabled.def'
--- a/mysql-test/suite/innodb_fts/t/disabled.def	2011-11-28 11:41:20 +0000
+++ b/mysql-test/suite/innodb_fts/t/disabled.def	2012-01-09 11:28:13 +0000
@@ -9,4 +9,3 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-innodb_fts_large_records  : BUG#13436056 2011-11-28 agopi Test takes a long time and leads to PB2 timeout

=== modified file 'mysql-test/suite/innodb_fts/t/innodb_fts_large_records.test'
--- a/mysql-test/suite/innodb_fts/t/innodb_fts_large_records.test	2011-11-18 14:16:55 +0000
+++ b/mysql-test/suite/innodb_fts/t/innodb_fts_large_records.test	2012-01-09 11:28:13 +0000
@@ -25,7 +25,7 @@ use strict;
 my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/fts_input_data1.txt";
 open FH,">$fname";
 my $record_counter = 1;
-while ($record_counter < 400) { 
+while ($record_counter < 50) { 
    my $word_counter = 1;
    my ($col1,$col2);
    while ($word_counter < 51) {
@@ -115,7 +115,7 @@ use strict;
 my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/fts_input_data2.txt";
 open FH,">$fname";
 my $record_counter = 1;
-while ($record_counter < 5001) { 
+while ($record_counter < 101) { 
    my $word_counter = 1;
    my ($col1,$col2);
    while ($word_counter < 50) {
@@ -217,7 +217,7 @@ use strict;
 my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/fts_input_data3.txt";
 open FH,">$fname";
 my $record_counter = 1;
-while ($record_counter < 5001) { 
+while ($record_counter < 101) { 
    my $word_counter = 1;
    my ($col1,$col2);
    while ($word_counter < 50) {
@@ -310,7 +310,7 @@ use strict;
 my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/fts_input_data4.txt";
 open FH,">$fname";
 my $record_counter = 1;
-while ($record_counter < 5001) { 
+while ($record_counter < 101) { 
    my $word_counter = 1001;
    my ($col1,$col2);
    while ($word_counter < 1101) {

=== modified file 'mysql-test/suite/sys_vars/r/all_vars.result'
--- a/mysql-test/suite/sys_vars/r/all_vars.result	2011-11-17 11:20:13 +0000
+++ b/mysql-test/suite/sys_vars/r/all_vars.result	2012-01-10 05:26:29 +0000
@@ -6,6 +6,7 @@ insert into t2 select variable_name from
 delete from t2 where variable_name='innodb_change_buffering_debug';
 delete from t2 where variable_name='innodb_page_hash_locks';
 delete from t2 where variable_name='innodb_doublewrite_batch_size';
+delete from t2 where variable_name='innodb_trx_rseg_n_slots_debug';
 update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
 select variable_name as `There should be *no* long test name listed below:` from t2
 where length(variable_name) > 50;

=== modified file 'mysql-test/suite/sys_vars/t/all_vars.test'
--- a/mysql-test/suite/sys_vars/t/all_vars.test	2011-10-19 21:49:22 +0000
+++ b/mysql-test/suite/sys_vars/t/all_vars.test	2012-01-10 05:26:29 +0000
@@ -56,6 +56,7 @@ insert into t2 select variable_name from
 delete from t2 where variable_name='innodb_change_buffering_debug';
 delete from t2 where variable_name='innodb_page_hash_locks';
 delete from t2 where variable_name='innodb_doublewrite_batch_size';
+delete from t2 where variable_name='innodb_trx_rseg_n_slots_debug';
 
 # Performance schema variables are too long for files named
 # 'mysql-test/suite/sys_vars/t/' ...

=== modified file 'mysql-test/suite/sys_vars/t/disabled.def'
--- a/mysql-test/suite/sys_vars/t/disabled.def	2011-11-21 21:49:54 +0000
+++ b/mysql-test/suite/sys_vars/t/disabled.def	2012-01-10 06:13:22 +0000
@@ -11,4 +11,6 @@
 ##############################################################################
 transaction_prealloc_size_basic_32  : Bug#11748572
 transaction_prealloc_size_basic_64  : Bug#11748572
+query_cache_size_basic_32           : Bug#13535584
+query_cache_size_basic_64           : Bug#11748572
 #thread_cache_size_func             : Bug#11750172: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads

=== modified file 'storage/innobase/fts/fts0fts.cc'
--- a/storage/innobase/fts/fts0fts.cc	2011-12-20 09:45:15 +0000
+++ b/storage/innobase/fts/fts0fts.cc	2012-01-09 09:46:12 +0000
@@ -1692,8 +1692,7 @@ ulint
 fts_create_common_tables(
 /*=====================*/
 	trx_t*		trx,			/*!< in: transaction */
-	const dict_table_t*
-			table,			/*!< in: table with FTS index */
+	const dict_table_t* table,		/*!< in: table with FTS index */
 	const char*	name,			/*!< in: table name normalized.*/
 	ibool		skip_doc_id_index)	/*!< in: Skip index on doc id */
 
@@ -1732,7 +1731,7 @@ fts_create_common_tables(
 	graph = fts_parse_sql_no_dict_lock(
 		&fts_table, NULL, fts_config_table_insert_values_sql);
 
-	error = fts_eval_sql( trx, graph);
+	error = fts_eval_sql(trx, graph);
 
 	que_graph_free(graph);
 

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2012-01-05 12:12:18 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2012-01-10 05:26:29 +0000
@@ -14810,6 +14810,13 @@ static MYSQL_SYSVAR_BOOL(print_all_deadl
   "Print all deadlocks to MySQL error log (off by default)",
   NULL, NULL, FALSE);
 
+#ifdef UNIV_DEBUG
+static MYSQL_SYSVAR_UINT(trx_rseg_n_slots_debug, trx_rseg_n_slots_debug,
+  PLUGIN_VAR_RQCMDARG,
+  "Debug flags for InnoDB to limit TRX_RSEG_N_SLOTS for trx_rsegf_undo_find_free()",
+  NULL, NULL, 0, 0, 1024, 0);
+#endif /* UNIV_DEBUG */
+
 static struct st_mysql_sys_var* innobase_system_variables[]= {
   MYSQL_SYSVAR(additional_mem_pool_size),
   MYSQL_SYSVAR(autoextend_increment),
@@ -14922,6 +14929,9 @@ static struct st_mysql_sys_var* innobase
   MYSQL_SYSVAR(undo_directory),
   MYSQL_SYSVAR(undo_tablespaces),
   MYSQL_SYSVAR(sync_array_size),
+#ifdef UNIV_DEBUG
+  MYSQL_SYSVAR(trx_rseg_n_slots_debug),
+#endif /* UNIV_DEBUG */
   NULL
 };
 

=== modified file 'storage/innobase/include/trx0rseg.ic'
--- a/storage/innobase/include/trx0rseg.ic	2011-11-09 02:40:33 +0000
+++ b/storage/innobase/include/trx0rseg.ic	2012-01-10 05:26:29 +0000
@@ -25,6 +25,7 @@ Created 3/26/1996 Heikki Tuuri
 
 #include "srv0srv.h"
 #include "mtr0log.h"
+#include "trx0sys.h"
 
 /******************************************************************//**
 Gets a rollback segment header.
@@ -131,7 +132,13 @@ trx_rsegf_undo_find_free(
 	ulint		i;
 	ulint		page_no;
 
-	for (i = 0; i < TRX_RSEG_N_SLOTS; i++) {
+	for (i = 0;
+#ifndef UNIV_DEBUG
+	     i < TRX_RSEG_N_SLOTS;
+#else
+	     i < (trx_rseg_n_slots_debug ? trx_rseg_n_slots_debug : TRX_RSEG_N_SLOTS);
+#endif
+	     i++) {
 
 		page_no = trx_rsegf_get_nth_undo(rsegf, i, mtr);
 

=== modified file 'storage/innobase/include/trx0sys.h'
--- a/storage/innobase/include/trx0sys.h	2011-12-23 13:17:36 +0000
+++ b/storage/innobase/include/trx0sys.h	2012-01-10 05:26:29 +0000
@@ -184,6 +184,12 @@ trx_id_t
 trx_sys_get_max_trx_id(void);
 /*========================*/
 #endif /* !UNIV_HOTBACKUP */
+
+#ifdef UNIV_DEBUG
+/* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */
+extern uint			trx_rseg_n_slots_debug;
+#endif
+
 /*****************************************************************//**
 Writes a trx id to an index page. In case that the id size changes in
 some future version, this function should be used instead of

=== modified file 'storage/innobase/row/row0mysql.cc'
--- a/storage/innobase/row/row0mysql.cc	2012-01-04 14:34:41 +0000
+++ b/storage/innobase/row/row0mysql.cc	2012-01-10 05:26:29 +0000
@@ -2195,6 +2195,20 @@ err_exit:
 		}
 		break;
 
+	case DB_TOO_MANY_CONCURRENT_TRXS:
+		/* We already have .ibd file here. it should be deleted. */
+
+		if (table->space && !fil_delete_tablespace(table->space)) {
+			ut_print_timestamp(stderr);
+			fprintf(stderr,
+				"  InnoDB: Error: not able to"
+				" delete tablespace %lu of table ",
+				(ulong) table->space);
+			ut_print_name(stderr, trx, TRUE, table->name);
+			fputs("!\n", stderr);
+		}
+		/* fall through */
+
 	case DB_DUPLICATE_KEY:
 	default:
 		/* We may also get err == DB_ERROR if the .ibd file for the

=== modified file 'storage/innobase/trx/trx0sys.cc'
--- a/storage/innobase/trx/trx0sys.cc	2011-12-23 13:17:36 +0000
+++ b/storage/innobase/trx/trx0sys.cc	2012-01-10 05:26:29 +0000
@@ -121,6 +121,11 @@ UNIV_INTERN mysql_pfs_key_t	file_format_
 UNIV_INTERN mysql_pfs_key_t	trx_sys_mutex_key;
 #endif /* UNIV_PFS_RWLOCK */
 
+#ifdef UNIV_DEBUG
+/* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */
+uint		trx_rseg_n_slots_debug = 0;
+#endif
+
 #ifndef UNIV_HOTBACKUP
 /** This is used to track the maximum file format id known to InnoDB. It's
 updated via SET GLOBAL innodb_file_format_max = 'x' or when we open

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5259 branch (marc.alff:3342 to 3343) Marc Alff10 Jan