2019-02-27 02:38:46 +01:00
|
|
|
create table t1 (a int, b int, c int, d int, e int);
|
|
|
|
insert into t1 () values
|
|
|
|
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
|
|
|
|
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
|
|
|
|
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
|
|
|
|
(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),
|
|
|
|
(),(),(),();
|
|
|
|
select * into outfile 'load.data' from t1;
|
|
|
|
create temporary table tmp (a varchar(1024), b int, c int, d int, e linestring, unique (e));
|
|
|
|
load data infile 'load.data' into table tmp;
|
|
|
|
delete from tmp;
|
|
|
|
drop table t1;
|
2019-02-27 03:36:37 +01:00
|
|
|
create table t1 (b blob) engine=innodb;
|
|
|
|
alter table t1 add unique (b);
|
|
|
|
alter table t1 force;
|
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`b` blob DEFAULT NULL,
|
|
|
|
UNIQUE KEY `b` (`b`) USING HASH
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
|
|
drop table t1;
|
2019-02-26 22:55:39 -05:00
|
|
|
create table t1 (pk int, b blob, primary key(pk), unique(b)) engine=myisam;
|
|
|
|
insert into t1 values (1,'foo');
|
|
|
|
replace into t1 (pk) values (1);
|
|
|
|
alter table t1 force;
|
|
|
|
replace into t1 (pk) values (1);
|
|
|
|
drop table t1;
|
2019-02-27 07:35:46 -05:00
|
|
|
create table t1 (t time, unique(t)) engine=innodb;
|
|
|
|
insert into t1 values (null),(null);
|
|
|
|
alter ignore table t1 modify t text not null default '';
|
|
|
|
Warnings:
|
|
|
|
Warning 1265 Data truncated for column 't' at row 1
|
|
|
|
Warning 1265 Data truncated for column 't' at row 2
|
|
|
|
drop table t1;
|