mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
8f232cb75f
Improve mysql-test to be more robust. Fix that GRANT doesn't delete SSL options Change innobase_flush_log_at_trx_commit to uint. Don't rotate logs if we read a rotate log entry from the master. Docs/manual.texi: Changelog client/mysqlbinlog.cc: Handle empty binlogfiles gracefully client/mysqltest.c: Do a sleep after 'sync_with_master' Cleaned up sleep() handling. Free all memory on exit configure.in: Fix for Mac OS 10.2 include/my_sys.h: Added my_strdup_with_length() innobase/btr/btr0cur.c: Fixed wrong printf() libmysql/libmysql.c: Added DBUG_PRINT statements. Assume that mysql_...send() functions has correct query length. mysql-test/mysql-test-run.sh: Properly remove log files before starting new tests. mysql-test/r/grant.result: Update for new test results mysql-test/r/innodb.result: Update for new test results mysql-test/r/myisam.result: Update for new test results mysql-test/r/rpl_log.result: Update for new test results mysql-test/r/rpl_rotate_logs.result: Update for new test results mysql-test/r/variables.result: Update for new test results mysql-test/t/grant.test: Test that GRANT doesn't delete SSL options mysql-test/t/myisam.test: Test long key usage mysql-test/t/rpl_log.test: Disable 'show new master' mysql-test/t/rpl_mystery22.test: Longer sleep for more safety. mysql-test/t/rpl_rotate_logs.test: More comments mysys/my_malloc.c: Added my_strdup_with_length() mysys/safemalloc.c: Added my_strdup_with_length() mysys/thr_alarm.c: Fix of alarms for windows. sql/ha_innodb.cc: Change innobase_flush_log_at_trx_commit to uint mysql-test/r/rpl_redirect.result: Updated test results mysql-test/t/rpl_redirect.test: Added more tests to improve code coverage. sql/ha_innodb.h: Change innobase_flush_log_at_trx_commit to uint sql/item_func.cc: Return GLOBAL and SESSION as part of column names sql/log.cc: Only write STOP events when server goes down. sql/log_event.cc: Don't rotate logs if we read a rotate log entry from the master. sql/log_event.h: Change ident_len to uint (more efficient) sql/mysqld.cc: Change innobase_flush_log_at_trx_commit to uint sql/net_serv.cc: More debug output sql/repl_failsafe.cc: More DEBUG Search until we find next position in binary log (and not only =) sql/slave.cc: More DBUG & comments Don't rotate the binary log on master flush logs sql/slave.h: indentation change sql/sql_acl.cc: Test that GRANT doesn't delete SSL options sql/sql_parse.cc: Disable show_new_master. sql/sql_repl.cc: Chamger show_binlog_events() to use my_error() sql/sql_table.cc: Fixed check for too long keys in MyISAM sql/sql_udf.cc: Fix udf handling
116 lines
5.6 KiB
Text
116 lines
5.6 KiB
Text
drop table if exists t1;
|
|
CREATE TABLE t1 (
|
|
STRING_DATA char(255) default NULL,
|
|
KEY STRING_DATA (STRING_DATA)
|
|
) TYPE=MyISAM;
|
|
INSERT INTO t1 VALUES ('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
|
|
INSERT INTO t1 VALUES ('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD');
|
|
INSERT INTO t1 VALUES ('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF');
|
|
INSERT INTO t1 VALUES ('FGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG');
|
|
INSERT INTO t1 VALUES ('HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH');
|
|
INSERT INTO t1 VALUES ('WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW');
|
|
CHECK TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
create table t1 (a tinyint not null auto_increment, b blob not null, primary key (a));
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
repair table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair status OK
|
|
delete from t1 where (a & 1);
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
repair table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair status OK
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
create table t1 (a int not null auto_increment, b int not null, primary key (a), index(b));
|
|
insert into t1 (b) values (1),(2),(2),(2),(2);
|
|
optimize table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 optimize status OK
|
|
show index from t1;
|
|
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
|
t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
|
|
t1 1 b 1 b A 1 NULL NULL BTREE
|
|
optimize table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 optimize status Table is already up to date
|
|
show index from t1;
|
|
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
|
t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
|
|
t1 1 b 1 b A 1 NULL NULL BTREE
|
|
drop table t1;
|
|
create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) type=myisam;
|
|
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
|
|
explain select * from t1 order by a;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 ALL NULL NULL NULL NULL 4 Using filesort
|
|
explain select * from t1 order by b;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 ALL NULL NULL NULL NULL 4 Using filesort
|
|
explain select * from t1 order by c;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 ALL NULL NULL NULL NULL 4 Using filesort
|
|
explain select a from t1 order by a;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 index NULL PRIMARY 4 NULL 4 Using index
|
|
explain select b from t1 order by b;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 index NULL b 4 NULL 4 Using index
|
|
explain select a,b from t1 order by b;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 ALL NULL NULL NULL NULL 4 Using filesort
|
|
explain select a,b from t1;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 ALL NULL NULL NULL NULL 4
|
|
explain select a,b,c from t1;
|
|
table type possible_keys key key_len ref rows Extra
|
|
t1 ALL NULL NULL NULL NULL 4
|
|
drop table t1;
|
|
CREATE TABLE `t1` (
|
|
`post_id` mediumint(8) unsigned NOT NULL auto_increment,
|
|
`topic_id` mediumint(8) unsigned NOT NULL default '0',
|
|
`post_time` datetime NOT NULL default '0000-00-00 00:00:00',
|
|
`post_text` text NOT NULL,
|
|
`icon_url` varchar(10) NOT NULL default '',
|
|
`sign` tinyint(1) unsigned NOT NULL default '0',
|
|
`post_edit` varchar(150) NOT NULL default '',
|
|
`poster_login` varchar(35) NOT NULL default '',
|
|
`ip` varchar(15) NOT NULL default '',
|
|
PRIMARY KEY (`post_id`),
|
|
KEY `post_time` (`post_time`),
|
|
KEY `ip` (`ip`),
|
|
KEY `poster_login` (`poster_login`),
|
|
KEY `topic_id` (`topic_id`),
|
|
FULLTEXT KEY `post_text` (`post_text`)
|
|
) TYPE=MyISAM;
|
|
INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test');
|
|
REPAIR TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 repair status OK
|
|
CHECK TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
CREATE TABLE t1 (a INT);
|
|
INSERT INTO t1 VALUES (1), (2), (3);
|
|
LOCK TABLES t1 WRITE;
|
|
INSERT INTO t1 VALUES (1), (2), (3);
|
|
OPTIMIZE TABLE t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 optimize status OK
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c));
|
|
Specified key was too long. Max key length is 500
|
|
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255));
|
|
ALTER TABLE t1 ADD INDEX t1 (a, b, c);
|
|
Specified key was too long. Max key length is 500
|
|
DROP TABLE t1;
|