Loading include/my_base.h +2 −1 Original line number Diff line number Diff line Loading @@ -370,8 +370,9 @@ enum ha_base_keytype { would lead to a duplicate key error in some other table. */ #define HA_ERR_TABLE_NEEDS_UPGRADE 164 /* The table changed in storage engine */ #define HA_ERR_TABLE_READONLY 165 /* The table is not writable */ #define HA_ERR_LAST 164 /*Copy last error nr.*/ #define HA_ERR_LAST 165 /*Copy last error nr.*/ /* Add error numbers before HA_ERR_LAST and change it accordingly. */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) Loading libmysqld/lib_sql.cc +6 −2 Original line number Diff line number Diff line Loading @@ -894,10 +894,14 @@ bool Protocol::send_fields(List<Item> *list, uint flags) } else { uint max_char_len; /* With conversion */ client_field->charsetnr= thd_cs->number; uint char_len= server_field.length / item->collation.collation->mbmaxlen; client_field->length= char_len * thd_cs->mbmaxlen; max_char_len= (server_field.type >= (int) MYSQL_TYPE_TINY_BLOB && server_field.type <= (int) MYSQL_TYPE_BLOB) ? server_field.length / item->collation.collation->mbminlen : server_field.length / item->collation.collation->mbmaxlen; client_field->length= max_char_len * thd_cs->mbmaxlen; } client_field->type= server_field.type; client_field->flags= server_field.flags; Loading mysql-test/r/federated.result +51 −0 Original line number Diff line number Diff line Loading @@ -1603,6 +1603,44 @@ fld_cid fld_name fld_parentid fld_delt 5 Torkel 0 0 DROP TABLE federated.t1; DROP TABLE federated.bug_17377_table; DROP TABLE IF EXISTS federated.test; CREATE TABLE federated.test ( `id` int(11) NOT NULL, `val1` varchar(255) NOT NULL, `val2` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS federated.test_local; DROP TABLE IF EXISTS federated.test_remote; CREATE TABLE federated.test_local ( `id` int(11) NOT NULL, `val1` varchar(255) NOT NULL, `val2` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO federated.test_local VALUES (1, 'foo', 'bar'), (2, 'bar', 'foo'); CREATE TABLE federated.test_remote ( `id` int(11) NOT NULL, `val1` varchar(255) NOT NULL, `val2` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/test'; insert into federated.test_remote select * from federated.test_local; select * from federated.test_remote; id val1 val2 1 foo bar 2 bar foo delete from federated.test_remote where id in (1,2); insert into federated.test_remote select * from federated.test_local; select * from federated.test_remote; id val1 val2 2 bar foo 1 foo bar DROP TABLE federated.test_local; DROP TABLE federated.test_remote; DROP TABLE federated.test; drop table if exists federated.t1; create table federated.t1 (a int, b int, c int); drop table if exists federated.t1; Loading Loading @@ -1733,6 +1771,19 @@ id val 2 0 drop table t1; drop table t1; create table t1 (a longblob not null); create table t1 (a longblob not null) engine=federated connection='mysql://root@127.0.0.1:SLAVE_PORT/test/t1'; insert into t1 values (repeat('a',5000)); select length(a) from t1; length(a) 5000 select length(a) from t1; length(a) 5000 drop table t1; drop table t1; End of 5.0 tests DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; Loading mysql-test/r/merge.result +12 −0 Original line number Diff line number Diff line Loading @@ -777,3 +777,15 @@ create table tm (b bit(1)) engine = merge union = (t1,t2); select * from tm; b drop table tm, t1, t2; create table t1 (a int) insert_method = last engine = merge; insert into t1 values (1); ERROR HY000: Table 't1' is read only create table t2 (a int) engine = myisam; alter table t1 union (t2); insert into t1 values (1); alter table t1 insert_method = no; insert into t1 values (1); ERROR HY000: Table 't1' is read only drop table t2; drop table t1; End of 5.0 tests mysql-test/t/disabled.def +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warnin ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed ndb_restore_compat : BUG#21283 2006-07-26 ingo Test fails randomly partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table ps : BUG#21524 2006-08-08 pgalbraith 'ps' test fails in --ps-protocol test AMD64 bit ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated rpl_ndb_2myisam : BUG#19227 Seems to pass currently Loading Loading
include/my_base.h +2 −1 Original line number Diff line number Diff line Loading @@ -370,8 +370,9 @@ enum ha_base_keytype { would lead to a duplicate key error in some other table. */ #define HA_ERR_TABLE_NEEDS_UPGRADE 164 /* The table changed in storage engine */ #define HA_ERR_TABLE_READONLY 165 /* The table is not writable */ #define HA_ERR_LAST 164 /*Copy last error nr.*/ #define HA_ERR_LAST 165 /*Copy last error nr.*/ /* Add error numbers before HA_ERR_LAST and change it accordingly. */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) Loading
libmysqld/lib_sql.cc +6 −2 Original line number Diff line number Diff line Loading @@ -894,10 +894,14 @@ bool Protocol::send_fields(List<Item> *list, uint flags) } else { uint max_char_len; /* With conversion */ client_field->charsetnr= thd_cs->number; uint char_len= server_field.length / item->collation.collation->mbmaxlen; client_field->length= char_len * thd_cs->mbmaxlen; max_char_len= (server_field.type >= (int) MYSQL_TYPE_TINY_BLOB && server_field.type <= (int) MYSQL_TYPE_BLOB) ? server_field.length / item->collation.collation->mbminlen : server_field.length / item->collation.collation->mbmaxlen; client_field->length= max_char_len * thd_cs->mbmaxlen; } client_field->type= server_field.type; client_field->flags= server_field.flags; Loading
mysql-test/r/federated.result +51 −0 Original line number Diff line number Diff line Loading @@ -1603,6 +1603,44 @@ fld_cid fld_name fld_parentid fld_delt 5 Torkel 0 0 DROP TABLE federated.t1; DROP TABLE federated.bug_17377_table; DROP TABLE IF EXISTS federated.test; CREATE TABLE federated.test ( `id` int(11) NOT NULL, `val1` varchar(255) NOT NULL, `val2` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS federated.test_local; DROP TABLE IF EXISTS federated.test_remote; CREATE TABLE federated.test_local ( `id` int(11) NOT NULL, `val1` varchar(255) NOT NULL, `val2` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO federated.test_local VALUES (1, 'foo', 'bar'), (2, 'bar', 'foo'); CREATE TABLE federated.test_remote ( `id` int(11) NOT NULL, `val1` varchar(255) NOT NULL, `val2` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/test'; insert into federated.test_remote select * from federated.test_local; select * from federated.test_remote; id val1 val2 1 foo bar 2 bar foo delete from federated.test_remote where id in (1,2); insert into federated.test_remote select * from federated.test_local; select * from federated.test_remote; id val1 val2 2 bar foo 1 foo bar DROP TABLE federated.test_local; DROP TABLE federated.test_remote; DROP TABLE federated.test; drop table if exists federated.t1; create table federated.t1 (a int, b int, c int); drop table if exists federated.t1; Loading Loading @@ -1733,6 +1771,19 @@ id val 2 0 drop table t1; drop table t1; create table t1 (a longblob not null); create table t1 (a longblob not null) engine=federated connection='mysql://root@127.0.0.1:SLAVE_PORT/test/t1'; insert into t1 values (repeat('a',5000)); select length(a) from t1; length(a) 5000 select length(a) from t1; length(a) 5000 drop table t1; drop table t1; End of 5.0 tests DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; Loading
mysql-test/r/merge.result +12 −0 Original line number Diff line number Diff line Loading @@ -777,3 +777,15 @@ create table tm (b bit(1)) engine = merge union = (t1,t2); select * from tm; b drop table tm, t1, t2; create table t1 (a int) insert_method = last engine = merge; insert into t1 values (1); ERROR HY000: Table 't1' is read only create table t2 (a int) engine = myisam; alter table t1 union (t2); insert into t1 values (1); alter table t1 insert_method = no; insert into t1 values (1); ERROR HY000: Table 't1' is read only drop table t2; drop table t1; End of 5.0 tests
mysql-test/t/disabled.def +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warnin ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed ndb_restore_compat : BUG#21283 2006-07-26 ingo Test fails randomly partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table ps : BUG#21524 2006-08-08 pgalbraith 'ps' test fails in --ps-protocol test AMD64 bit ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated rpl_ndb_2myisam : BUG#19227 Seems to pass currently Loading