mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge
This commit is contained in:
@ -509,3 +509,5 @@ id id3
|
||||
1 1
|
||||
2 2
|
||||
100 2
|
||||
KINMU_DATE
|
||||
KINMU_DATE
|
||||
|
@ -5,5 +5,11 @@
|
||||
+9999999999999999999 -9999999999999999999
|
||||
10000000000000000000 -10000000000000000000
|
||||
a
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
a
|
||||
18446744073709551615
|
||||
a
|
||||
18446744073709551615
|
||||
a
|
||||
18446744073709551614
|
||||
|
@ -7,3 +7,5 @@ isbn city libname a
|
||||
isbn city libname a
|
||||
007 Berkeley Berkeley Public1 2
|
||||
000 New York New York Public Libra 2
|
||||
f1 count(distinct t2.f2) count(distinct 1,NULL)
|
||||
1 0 0
|
||||
|
@ -80,3 +80,13 @@ t1 CREATE TABLE `t1` (
|
||||
`test_set` set('val1','val2','val3') NOT NULL default '',
|
||||
`name` char(20) default 'O''Brien'
|
||||
) TYPE=MyISAM COMMENT='it''s a table'
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL default '0',
|
||||
UNIQUE KEY `aa` (`a`)
|
||||
) TYPE=MyISAM
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (`a`)
|
||||
) TYPE=MyISAM
|
||||
|
@ -705,3 +705,13 @@ commit;
|
||||
select id,id3 from t1;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Test with empty tables (crashed with lock error)
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (SYAIN_NO char(5) NOT NULL default '', KINMU_DATE char(6) NOT NULL default '', PRIMARY KEY (SYAIN_NO,KINMU_DATE)) TYPE=BerkeleyDB;
|
||||
CREATE TABLE t2 ( SYAIN_NO char(5) NOT NULL default '',STR_DATE char(8) NOT NULL default '',PRIMARY KEY (SYAIN_NO,STR_DATE) ) TYPE=BerkeleyDB;
|
||||
select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO;
|
||||
select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO;
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -6,7 +6,11 @@ select 9223372036854775807,-009223372036854775808;
|
||||
select +9999999999999999999,-9999999999999999999;
|
||||
|
||||
drop table if exists t1;
|
||||
create table t1 (a bigint unsigned);
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFF);
|
||||
create table t1 (a bigint unsigned not null, primary key(a));
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE);
|
||||
select * from t1;
|
||||
select * from t1 where a=18446744073709551615;
|
||||
select * from t1 where a='18446744073709551615';
|
||||
delete from t1 where a=18446744073709551615;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
@ -32,3 +32,13 @@ insert into t1 values ('NYC Lib','New York');
|
||||
select t2.isbn,city,t1.libname,count(t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city,t1.libname;
|
||||
select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
# Problem with LEFT JOIN
|
||||
#
|
||||
|
||||
create table t1 (f1 int);
|
||||
insert into t1 values (1);
|
||||
create table t2 (f1 int,f2 int);
|
||||
select t1.f1,count(distinct t2.f2),count(distinct 1,NULL) from t1 left join t2 on t1.f1=t2.f1 group by t1.f1;
|
||||
drop table t1,t2;
|
||||
|
@ -65,3 +65,10 @@ create table t1 (
|
||||
) comment = 'it\'s a table' ;
|
||||
show create table t1 ;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a int not null, unique aa (a));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
create table t1 (a int not null, primary key (a));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user