diff options
-rw-r--r-- | mysql-test/r/rpl_set_charset.result | 7 | ||||
-rw-r--r-- | mysql-test/t/rpl_set_charset.test | 7 | ||||
-rw-r--r-- | sql/sql_table.cc | 5 |
3 files changed, 4 insertions, 15 deletions
diff --git a/mysql-test/r/rpl_set_charset.result b/mysql-test/r/rpl_set_charset.result index 7297d80865b..fd9c99d35d8 100644 --- a/mysql-test/r/rpl_set_charset.result +++ b/mysql-test/r/rpl_set_charset.result @@ -1,9 +1,9 @@ -slave stop; +stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -slave start; +start slave; drop database if exists mysqltest1; create database mysqltest1 /*!40100 character set latin2 */; use mysqltest1; @@ -31,9 +31,6 @@ C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF C0 D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF D0 E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF E0 F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF F0 -show binlog events from 1979; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.001 1979 Query 1 1979 use `mysqltest1`; SET CHARACTER SET DEFAULT use mysqltest1; select "--- on slave ---"; --- on slave --- diff --git a/mysql-test/t/rpl_set_charset.test b/mysql-test/t/rpl_set_charset.test index dcfc11bf25e..1c0bd62fa55 100644 --- a/mysql-test/t/rpl_set_charset.test +++ b/mysql-test/t/rpl_set_charset.test @@ -20,13 +20,6 @@ INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0'); INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0'); select "--- on master ---"; select hex(a),b from t1 order by b; -# It's complicated to verify that the charset is reset to default in -# the binlog after each query, except by checking the binlog. When you -# merge this into 4.1/5.0, the 1979 will have to be changed; all you have -# to do is read the var/log/master-bin.0*01 with mysqlbinlog, verify -# that a SET CHARACTER SET DEFAULT is just after the last INSERT, and -# replace 1979 by its position (the "# at" line above the SET). -show binlog events from 1979; save_master_pos; connection slave; sync_with_master; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 129d63ff529..7f9898df76e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -35,8 +35,7 @@ #define reenable_binlog(A) (A)->options= save_options; -//extern HASH open_cache; // leftover from the merge. to be deleted -static const char *primary_key_name="PRIMARY"; +const char *primary_key_name="PRIMARY"; static bool check_if_keyname_exists(const char *name,KEY *start, KEY *end); static char *make_unique_key_name(const char *field_name,KEY *start,KEY *end); @@ -1398,7 +1397,7 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, open_table(). */ tmp_disable_binlog(thd); - if (mysql_create_table(thd,db,name,create_info,*extra_fields, + if (!mysql_create_table(thd,db,name,create_info,*extra_fields, *keys,0,select_field_count)) { if (!(table=open_table(thd,db,name,name,(bool*) 0))) |