), mysqldump will create rows up to net_buffer_length length. If you increase this variable, you should also ensure that the max_allowed_packet variable in the MySQL server is bigger than the net_buffer_length.
.SH EXAMPLES
.TP
The most normal use of mysqldump is probably for making a backup of whole databases. See Mysql Manual section 21.2 Database Backups.
The most normal use of mysqldump is probably for making a backup of whole
databases. See the section on Database Backups in the MySQL Reference Manual.
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
drop table t1;
drop table if exists t1, t2;
create table t1 ( a varchar(10) not null primary key ) engine=myisam;
create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1);
flush tables;
alter table t1 modify a varchar(10);
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(10) NOT NULL default '',
PRIMARY KEY (`a`)
) TYPE=MRG_MyISAM UNION=(t1)
flush tables;
alter table t1 modify a varchar(10) not null;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(10) NOT NULL default '',
PRIMARY KEY (`a`)
) TYPE=MRG_MyISAM UNION=(t1)
drop table if exists t1, t2;
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
insert into t1 (a) values(1);
show table status like 't1';
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Create_options Comment
t1 MyISAM Fixed 1 37 37 X X X X X X X X
alter table t1 modify a int;
show table status like 't1';
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Create_options Comment
t1 MyISAM Fixed 1 37 37 X X X X X X X X
drop table t1;
create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
insert into t1 (a) values(1);
show table status like 't1';
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Create_options Comment
#insert into t1 values("hello world"),("Hello mars"),(NULL);
#select * into outfile "/tmp/select-test.1" from t1;
#select load_file("/tmp/select-test.1");
#select * into dumpfile "/tmp/select-test.2" from t1 limit 1;
#select load_file("/tmp/select-test.2");
#select * into dumpfile "/tmp/select-test.3" from t1 where a is null;
#select load_file("/tmp/select-test.3");
#
## the following should give errors
#
#select * into outfile "/tmp/select-test.1" from t1;
#select * into dumpfile "/tmp/select-test.1" from t1;
#select * into dumpfile "/tmp/select-test.99" from t1;
#select load_file("/tmp/select-test.not-exist");
#drop table t1;
#drop table if exists t;
#CREATE TABLE t ( t timestamp NOT NULL, c char(200) character set latin1 NOT NULL default '', i int(11), v varchar(200), b blob, KEY t (t)) ENGINE=MyISAM;
#INSERT INTO t VALUES ('2002-12-20 12:01:20','',1,"aaa","bbb");
#select * from t into outfile "check";
#drop table if exists t;
# the following should give errors
#disabled as error message has variable path
#disable_query_log;
#--error 1086
#eval select * into outfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.1" from t1;
#--error 1086
#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.2" from t1;
#--error 1086
#eval select * into dumpfile "$MYSQL_TEST_DIR/var/tmp/outfile-test.3" from t1;