Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

bk commit into 5.1 tree (anozdrin:1.2598) BUG#27610

From: Alexander Nozdrin <alik(at)mysql.com>
Date: Thu Oct 25 2007 - 07:54:42 EDT


Below is the list of changes that have just been committed into a local 5.1 repository of alik. When alik does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository.
For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@1.2598, 2007-10-25 15:54:37+04:00, anozdrin@station. +3 -0   Fix for BUG#27610: ALTER TABLE ROW_FORMAT=... does not   rebuild the table.   

  The problem was that ROW_FORMAT clause in ALTER TABLE did not trigger   table reconstruction.   

  The fix is to rebuild a table if ROW_FORMAT is specified.

  mysql-test/include/mix1.inc@1.58, 2007-10-25 15:54:34+04:00, anozdrin@station. +49 -0     Add a test case for BUG#27610: ALTER TABLE ROW_FORMAT=... does not     rebuild the table.

  mysql-test/r/innodb_mysql.result@1.61, 2007-10-25 15:54:34+04:00, anozdrin@station. +34 -0     Update result file.

  sql/sql_table.cc@1.452, 2007-10-25 15:54:34+04:00, anozdrin@station. +1 -0     Rebuild a table if ROW_FORMAT was specified in ALTER TABLE.

diff -Nrup a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc

--- a/mysql-test/include/mix1.inc	2007-10-19 02:57:40 +04:00

+++ b/mysql-test/include/mix1.inc 2007-10-25 15:54:34 +04:00
@@ -1019,6 +1019,55 @@ SELECT * FROM t1 ORDER BY b DESC, a ASC;  
Do you need help?X

 DROP TABLE t1;  

+###########################################################################
+
+--echo
+--echo #
+--echo # Bug#27610: ALTER TABLE ROW_FORMAT=... does not rebuild the table.
+--echo #
+
+--echo
+--echo # - prepare;
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+--echo
+
+CREATE TABLE t1(c INT)
+ ENGINE = InnoDB
+ ROW_FORMAT = COMPACT;
+
+--echo
+--echo # - initial check;
+--echo
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+
+--echo
+--echo # - change ROW_FORMAT and check;
+--echo
+
+ALTER TABLE t1 ROW_FORMAT = REDUNDANT;
+
+--echo
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+
+--echo
+--echo # - that's it, cleanup.
+--echo
+
+DROP TABLE t1;
+
+###########################################################################
+

 --echo End of 5.0 tests  

 # Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY diff -Nrup a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result

--- a/mysql-test/r/innodb_mysql.result	2007-10-19 02:57:40 +04:00

+++ b/mysql-test/r/innodb_mysql.result 2007-10-25 15:54:34 +04:00
@@ -1287,6 +1287,40 @@ a b 3 2 1 1

 DROP TABLE t1;
+
+#
+# Bug#27610: ALTER TABLE ROW_FORMAT=... does not rebuild the table.
+#
+
+# - prepare;
+
+DROP TABLE IF EXISTS t1;
+
+CREATE TABLE t1(c INT)
+ENGINE = InnoDB
+ROW_FORMAT = COMPACT;
+
+# - initial check;
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+table_schema table_name row_format
+test t1 Compact
+
+# - change ROW_FORMAT and check;
+
+ALTER TABLE t1 ROW_FORMAT = REDUNDANT;
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+table_schema table_name row_format
+test t1 Redundant
+
+# - that's it, cleanup.
+
+DROP TABLE t1;

 End of 5.0 tests
 CREATE TABLE `t2` (
 `k` int(11) NOT NULL auto_increment,
diff -Nrup a/sql/sql_table.cc b/sql/sql_table.cc
--- a/sql/sql_table.cc	2007-10-24 11:43:12 +04:00

+++ b/sql/sql_table.cc 2007-10-25 15:54:34 +04:00
@@ -4985,6 +4985,7 @@ compare_tables(TABLE *table, create_info->used_fields & HA_CREATE_USED_ENGINE || create_info->used_fields & HA_CREATE_USED_CHARSET || create_info->used_fields & HA_CREATE_USED_DEFAULT_CHARSET ||
+ create_info->used_fields & HA_CREATE_USED_ROW_FORMAT ||
(alter_info->flags & (ALTER_RECREATE | ALTER_FOREIGN_KEY)) || order_num || !table->s->mysql_version ||
-- 
MySQL Code Commits Mailing List
For list archives: 
http://lists.mysql.com/commits
To unsubscribe:    
http://lists.mysql.com/commits?unsub=lists@pantek.com
Received on Thu Oct 25 07:52:27 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 10:40:07 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library