1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Reuse more code: two equal pieces for ENUM and SET where moved

into a function.
This commit is contained in:
unknown
2004-10-26 09:13:52 +05:00
parent f4295a0537
commit 52da7eb858
3 changed files with 58 additions and 26 deletions

View File

@ -799,3 +799,16 @@ select * from t1 where b like 'foob%';
a b
2 foobar
drop table t1;
create table t1 (
a enum('петя','вася','анюта') character set utf8 not null default 'анюта',
b set('петя','вася','анюта') character set utf8 not null default 'анюта'
);
create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` char(5) character set utf8 NOT NULL default '',
`b` char(15) character set utf8 NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
drop table t1;

View File

@ -644,3 +644,15 @@ create table t1 (
insert into t1 values(1,'foo'),(2,'foobar');
select * from t1 where b like 'foob%';
drop table t1;
#
# Test for calculate_interval_lengths() function
#
create table t1 (
a enum('петя','вася','анюта') character set utf8 not null default 'анюта',
b set('петя','вася','анюта') character set utf8 not null default 'анюта'
);
create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1;
show create table t2;
drop table t2;
drop table t1;