mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge magare.gmz:/home/kgeorge/mysql/work/B26794-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B26794-5.1-opt mysql-test/r/gis-rtree.result: Auto merged sql/field.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged mysql-test/r/alter_table.result: tests merge mysql-test/t/alter_table.test: tests merge
This commit is contained in:
@ -881,6 +881,40 @@ create table t1 (t varchar(255) default null, key t (t(80)))
|
||||
engine=myisam default charset=latin1;
|
||||
alter table t1 change t t text;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a varchar(500));
|
||||
ALTER TABLE t1 ADD b GEOMETRY NOT NULL, ADD SPATIAL INDEX(b);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(500) default NULL,
|
||||
`b` geometry NOT NULL,
|
||||
SPATIAL KEY `b` (`b`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD KEY(b(50));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(500) default NULL,
|
||||
`b` geometry NOT NULL,
|
||||
SPATIAL KEY `b` (`b`),
|
||||
KEY `b_2` (`b`(50))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD c POINT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(500) default NULL,
|
||||
`b` geometry NOT NULL,
|
||||
`c` point default NULL,
|
||||
SPATIAL KEY `b` (`b`),
|
||||
KEY `b_2` (`b`(50))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
CREATE TABLE t2 (a INT, KEY (a(20)));
|
||||
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
|
||||
ALTER TABLE t1 ADD d INT;
|
||||
ALTER TABLE t1 ADD KEY (d(20));
|
||||
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;
|
||||
CREATE TABLE t1 (s CHAR(8) BINARY);
|
||||
INSERT INTO t1 VALUES ('test');
|
||||
SELECT LENGTH(s) FROM t1;
|
||||
|
Reference in New Issue
Block a user