Below is the list of changes that have just been committed into a local
5.1 repository of istruewing. When istruewing 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@stripped, 2008-01-24 18:56:42+01:00, istruewing@stripped +3 -0
Bug#29182 - MyISAMCHK reports wrong character set
myisamchk did always show Character set: latin1_swedish_ci (8),
regardless what DEFAULT CHARSET the table had.
When the server created a MyISAM table, it did not copy the
characterset number into the MyISAM create info structure.
Added assignment of charset number to MI_CREATE_INFO.
mysql-test/r/myisam.result@stripped, 2008-01-24 18:56:41+01:00, istruewing@stripped +19 -0
Bug#29182 - MyISAMCHK reports wrong character set
Added test result.
mysql-test/t/myisam.test@stripped, 2008-01-24 18:56:41+01:00, istruewing@stripped +14 -0
Bug#29182 - MyISAMCHK reports wrong character set
Added test.
storage/myisam/ha_myisam.cc@stripped, 2008-01-24 18:56:41+01:00, istruewing@stripped +1 -0
Bug#29182 - MyISAMCHK reports wrong character set
Added assignment of charset number to MI_CREATE_INFO.
diff -Nrup a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
--- a/mysql-test/r/myisam.result 2008-01-16 15:38:39 +01:00
+++ b/mysql-test/r/myisam.result 2008-01-24 18:56:41 +01:00
@@ -2185,4 +2185,23 @@ CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
+CREATE TABLE t1 (
+c1 VARCHAR(10) NOT NULL,
+c2 CHAR(10) DEFAULT NULL,
+c3 VARCHAR(10) NOT NULL,
+KEY (c1),
+KEY (c2)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
+
+MyISAM file: MYSQLTEST_VARDIR/master-data/test/t1
+Record format: Packed
+Character set: utf8_general_ci (33)
+Data records: 0 Deleted blocks: 0
+Recordlength: 94
+
+table description:
+Key Start Len Index Type
+1 2 30 multip. varchar
+2 33 30 multip. char NULL
+DROP TABLE t1;
End of 5.1 tests
diff -Nrup a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
--- a/mysql-test/t/myisam.test 2008-01-16 12:55:35 +01:00
+++ b/mysql-test/t/myisam.test 2008-01-24 18:56:41 +01:00
@@ -1448,5 +1448,19 @@ CHECK TABLE t1;
CHECK TABLE t1 EXTENDED;
DROP TABLE t1;
+#
+# Bug#29182 - MyISAMCHK reports wrong character set
+#
+CREATE TABLE t1 (
+ c1 VARCHAR(10) NOT NULL,
+ c2 CHAR(10) DEFAULT NULL,
+ c3 VARCHAR(10) NOT NULL,
+ KEY (c1),
+ KEY (c2)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYISAMCHK -d $MYSQLTEST_VARDIR/master-data/test/t1
+DROP TABLE t1;
+
--echo End of 5.1 tests
diff -Nrup a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
--- a/storage/myisam/ha_myisam.cc 2007-12-14 14:01:12 +01:00
+++ b/storage/myisam/ha_myisam.cc 2008-01-24 18:56:41 +01:00
@@ -1859,6 +1859,7 @@ int ha_myisam::create(const char *name,
share->avg_row_length);
create_info.data_file_name= ha_create_info->data_file_name;
create_info.index_file_name= ha_create_info->index_file_name;
+ create_info.language= share->table_charset->number;
if (ha_create_info->options & HA_LEX_CREATE_TMP_TABLE)
create_flags|= HA_CREATE_TMP_TABLE;
| Thread |
|---|
| • bk commit into 5.1 tree (istruewing:1.2657) BUG#29182 | Ingo Struewing | 24 Jan |