Removed bdb test cases.
This commit is contained in:
parent
e8289bfbc1
commit
5a466cc48c
@ -45,7 +45,7 @@ noinst_HEADERS = embedded_priv.h emb_qcache.h
|
||||
|
||||
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
|
||||
ha_innodb.cc ha_berkeley.cc ha_federated.cc ha_ndbcluster.cc \
|
||||
ha_innodb.cc ha_federated.cc ha_ndbcluster.cc \
|
||||
ha_ndbcluster_binlog.cc ha_partition.cc \
|
||||
handler.cc sql_handler.cc \
|
||||
hostname.cc init.cc password.c \
|
||||
@ -96,10 +96,6 @@ yassl_inc_libs= $(top_srcdir)/extra/yassl/src/.libs/libyassl.a \
|
||||
endif
|
||||
|
||||
# Storage engine specific compilation options
|
||||
|
||||
ha_berkeley.o: ha_berkeley.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_ndbcluster.o:ha_ndbcluster.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_bdb.inc
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_debug.inc
|
||||
|
||||
@ -12,7 +11,7 @@ drop table if exists t1, t2;
|
||||
--enable_warnings
|
||||
reset master;
|
||||
|
||||
create table t1 (a int) engine=bdb;
|
||||
create table t1 (a int) engine=innodb;
|
||||
create table t2 (a int) engine=innodb;
|
||||
begin;
|
||||
insert t1 values (5);
|
||||
|
@ -1,4 +0,0 @@
|
||||
-- require r/have_bdb.require
|
||||
disable_query_log;
|
||||
show variables like "have_bdb";
|
||||
enable_query_log;
|
@ -1,11 +0,0 @@
|
||||
drop table if exists t1;
|
||||
create table t1(objid BIGINT not null, tablename varchar(64), oid BIGINT not null, test BIGINT, PRIMARY KEY (objid), UNIQUE(tablename)) engine=BDB;
|
||||
insert into t1 values(1, 't1',4,9);
|
||||
insert into t1 values(2, 'metatable',1,9);
|
||||
insert into t1 values(3, 'metaindex',1,9 );
|
||||
select * from t1;
|
||||
objid tablename oid test
|
||||
1 t1 4 9
|
||||
2 metatable 1 9
|
||||
3 metaindex 1 9
|
||||
alter table t1 drop column test;
|
@ -1,6 +0,0 @@
|
||||
select * from t1;
|
||||
objid tablename oid
|
||||
1 t1 4
|
||||
2 metatable 1
|
||||
3 metaindex 1
|
||||
drop table t1;
|
@ -1,39 +0,0 @@
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (
|
||||
ChargeID int(10) unsigned NOT NULL auto_increment,
|
||||
ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
|
||||
ChargeDate date DEFAULT '0000-00-00' NOT NULL,
|
||||
ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
|
||||
FedTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
|
||||
ProvTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
|
||||
ChargeStatus enum('New','Auth','Unauth','Sale','Denied','Refund')
|
||||
DEFAULT 'New' NOT NULL,
|
||||
ChargeAuthorizationMessage text,
|
||||
ChargeComment text,
|
||||
ChargeTimeStamp varchar(20),
|
||||
PRIMARY KEY (ChargeID),
|
||||
KEY ServiceID (ServiceID),
|
||||
KEY ChargeDate (ChargeDate)
|
||||
) engine=BDB;
|
||||
BEGIN;
|
||||
INSERT INTO t1
|
||||
VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now');
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
UPDATE t1 SET ChargeAuthorizationMessage = 'blablabla' WHERE
|
||||
ChargeID = 1;
|
||||
COMMIT;
|
||||
INSERT INTO t1
|
||||
VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now');
|
||||
select * from t1;
|
||||
ChargeID ServiceID ChargeDate ChargeAmount FedTaxes ProvTaxes ChargeStatus ChargeAuthorizationMessage ChargeComment ChargeTimeStamp
|
||||
1 1 2001-03-01 1.00 1.00 1.00 New blablabla NULL now
|
||||
2 1 2001-03-01 1.00 1.00 1.00 New NULL NULL now
|
||||
drop table t1;
|
||||
create table t1 (a int) engine=bdb;
|
||||
set autocommit=0;
|
||||
insert into t1 values(1);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
drop table t1;
|
@ -1,31 +0,0 @@
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (id integer, x integer) engine=BDB;
|
||||
create table t2 (id integer, x integer) engine=BDB;
|
||||
insert into t1 values(0, 0);
|
||||
insert into t2 values(0, 0);
|
||||
set autocommit=0;
|
||||
update t1 set x = 1 where id = 0;
|
||||
set autocommit=0;
|
||||
update t2 set x = 1 where id = 0;
|
||||
select x from t1 where id = 0;
|
||||
select x from t2 where id = 0;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
commit;
|
||||
x
|
||||
1
|
||||
commit;
|
||||
select * from t1;
|
||||
id x
|
||||
0 1
|
||||
select * from t2;
|
||||
id x
|
||||
0 1
|
||||
commit;
|
||||
select * from t1;
|
||||
id x
|
||||
0 1
|
||||
select * from t2;
|
||||
id x
|
||||
0 1
|
||||
commit;
|
||||
drop table t1,t2;
|
File diff suppressed because it is too large
Load Diff
@ -1,99 +0,0 @@
|
||||
drop table if exists t1, t2, t3;
|
||||
flush status;
|
||||
set autocommit=0;
|
||||
create table t1 (a int not null) engine=bdb;
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
drop table t1;
|
||||
set autocommit=1;
|
||||
create table t1 (a int not null) engine=bdb;
|
||||
begin;
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
drop table t1;
|
||||
create table t1 (a int not null) engine=bdb;
|
||||
create table t2 (a int not null) engine=bdb;
|
||||
create table t3 (a int not null) engine=bdb;
|
||||
insert into t1 values (1),(2);
|
||||
insert into t2 values (1),(2);
|
||||
insert into t3 values (1),(2);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
select * from t2;
|
||||
a
|
||||
1
|
||||
2
|
||||
select * from t3;
|
||||
a
|
||||
1
|
||||
2
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 3
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
begin;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
select * from t2;
|
||||
a
|
||||
1
|
||||
2
|
||||
select * from t3;
|
||||
a
|
||||
1
|
||||
2
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 3
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
insert into t1 values (3);
|
||||
insert into t2 values (3);
|
||||
insert into t1 values (4);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
select * from t2;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
select * from t3;
|
||||
a
|
||||
1
|
||||
2
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 3
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 0
|
||||
commit;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
drop table if exists t1, t2, t3;
|
@ -1,462 +0,0 @@
|
||||
SET storage_engine=bdb;
|
||||
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT);
|
||||
CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING);
|
||||
CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON);
|
||||
CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT);
|
||||
CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING);
|
||||
CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON);
|
||||
CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION);
|
||||
CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
|
||||
SHOW CREATE TABLE gis_point;
|
||||
Table Create Table
|
||||
gis_point CREATE TABLE `gis_point` (
|
||||
`fid` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`g` point DEFAULT NULL,
|
||||
PRIMARY KEY (`fid`)
|
||||
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
|
||||
SHOW FIELDS FROM gis_point;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g point YES NULL
|
||||
SHOW FIELDS FROM gis_line;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g linestring YES NULL
|
||||
SHOW FIELDS FROM gis_polygon;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g polygon YES NULL
|
||||
SHOW FIELDS FROM gis_multi_point;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g multipoint YES NULL
|
||||
SHOW FIELDS FROM gis_multi_line;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g multilinestring YES NULL
|
||||
SHOW FIELDS FROM gis_multi_polygon;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g multipolygon YES NULL
|
||||
SHOW FIELDS FROM gis_geometrycollection;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g geometrycollection YES NULL
|
||||
SHOW FIELDS FROM gis_geometry;
|
||||
Field Type Null Key Default Extra
|
||||
fid int(11) NO PRI NULL auto_increment
|
||||
g geometry YES NULL
|
||||
INSERT INTO gis_point VALUES
|
||||
(101, PointFromText('POINT(10 10)')),
|
||||
(102, PointFromText('POINT(20 10)')),
|
||||
(103, PointFromText('POINT(20 20)')),
|
||||
(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
|
||||
INSERT INTO gis_line VALUES
|
||||
(105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
|
||||
(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
|
||||
(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))));
|
||||
INSERT INTO gis_polygon VALUES
|
||||
(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
|
||||
(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
|
||||
(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
|
||||
INSERT INTO gis_multi_point VALUES
|
||||
(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
|
||||
(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
|
||||
(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
|
||||
INSERT INTO gis_multi_line VALUES
|
||||
(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
|
||||
(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
|
||||
(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
|
||||
INSERT INTO gis_multi_polygon VALUES
|
||||
(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
|
||||
(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
|
||||
(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
|
||||
INSERT INTO gis_geometrycollection VALUES
|
||||
(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
|
||||
(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
|
||||
INSERT into gis_geometry SELECT * FROM gis_point;
|
||||
INSERT into gis_geometry SELECT * FROM gis_line;
|
||||
INSERT into gis_geometry SELECT * FROM gis_polygon;
|
||||
INSERT into gis_geometry SELECT * FROM gis_multi_point;
|
||||
INSERT into gis_geometry SELECT * FROM gis_multi_line;
|
||||
INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
|
||||
INSERT into gis_geometry SELECT * FROM gis_geometrycollection;
|
||||
SELECT fid, AsText(g) FROM gis_point ORDER by fid;
|
||||
fid AsText(g)
|
||||
101 POINT(10 10)
|
||||
102 POINT(20 10)
|
||||
103 POINT(20 20)
|
||||
104 POINT(10 20)
|
||||
SELECT fid, AsText(g) FROM gis_line ORDER by fid;
|
||||
fid AsText(g)
|
||||
105 LINESTRING(0 0,0 10,10 0)
|
||||
106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
107 LINESTRING(10 10,40 10)
|
||||
SELECT fid, AsText(g) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(g)
|
||||
108 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
|
||||
110 POLYGON((0 0,30 0,30 30,0 0))
|
||||
SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid;
|
||||
fid AsText(g)
|
||||
111 MULTIPOINT(0 0,10 10,10 20,20 20)
|
||||
112 MULTIPOINT(1 1,11 11,11 21,21 21)
|
||||
113 MULTIPOINT(3 6,4 10)
|
||||
SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid;
|
||||
fid AsText(g)
|
||||
114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
|
||||
115 MULTILINESTRING((10 48,10 21,10 0))
|
||||
116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
|
||||
SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid;
|
||||
fid AsText(g)
|
||||
117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
|
||||
SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid;
|
||||
fid AsText(g)
|
||||
120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
|
||||
121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
|
||||
SELECT fid, AsText(g) FROM gis_geometry ORDER by fid;
|
||||
fid AsText(g)
|
||||
101 POINT(10 10)
|
||||
102 POINT(20 10)
|
||||
103 POINT(20 20)
|
||||
104 POINT(10 20)
|
||||
105 LINESTRING(0 0,0 10,10 0)
|
||||
106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
107 LINESTRING(10 10,40 10)
|
||||
108 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
|
||||
110 POLYGON((0 0,30 0,30 30,0 0))
|
||||
111 MULTIPOINT(0 0,10 10,10 20,20 20)
|
||||
112 MULTIPOINT(1 1,11 11,11 21,21 21)
|
||||
113 MULTIPOINT(3 6,4 10)
|
||||
114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
|
||||
115 MULTILINESTRING((10 48,10 21,10 0))
|
||||
116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
|
||||
117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
|
||||
119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
|
||||
120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
|
||||
121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
|
||||
SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid;
|
||||
fid Dimension(g)
|
||||
101 0
|
||||
102 0
|
||||
103 0
|
||||
104 0
|
||||
105 1
|
||||
106 1
|
||||
107 1
|
||||
108 2
|
||||
109 2
|
||||
110 2
|
||||
111 0
|
||||
112 0
|
||||
113 0
|
||||
114 1
|
||||
115 1
|
||||
116 1
|
||||
117 2
|
||||
118 2
|
||||
119 2
|
||||
120 1
|
||||
121 1
|
||||
SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid;
|
||||
fid GeometryType(g)
|
||||
101 POINT
|
||||
102 POINT
|
||||
103 POINT
|
||||
104 POINT
|
||||
105 LINESTRING
|
||||
106 LINESTRING
|
||||
107 LINESTRING
|
||||
108 POLYGON
|
||||
109 POLYGON
|
||||
110 POLYGON
|
||||
111 MULTIPOINT
|
||||
112 MULTIPOINT
|
||||
113 MULTIPOINT
|
||||
114 MULTILINESTRING
|
||||
115 MULTILINESTRING
|
||||
116 MULTILINESTRING
|
||||
117 MULTIPOLYGON
|
||||
118 MULTIPOLYGON
|
||||
119 MULTIPOLYGON
|
||||
120 GEOMETRYCOLLECTION
|
||||
121 GEOMETRYCOLLECTION
|
||||
SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid;
|
||||
fid IsEmpty(g)
|
||||
101 0
|
||||
102 0
|
||||
103 0
|
||||
104 0
|
||||
105 0
|
||||
106 0
|
||||
107 0
|
||||
108 0
|
||||
109 0
|
||||
110 0
|
||||
111 0
|
||||
112 0
|
||||
113 0
|
||||
114 0
|
||||
115 0
|
||||
116 0
|
||||
117 0
|
||||
118 0
|
||||
119 0
|
||||
120 0
|
||||
121 0
|
||||
SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid;
|
||||
fid AsText(Envelope(g))
|
||||
101 POLYGON((10 10,10 10,10 10,10 10,10 10))
|
||||
102 POLYGON((20 10,20 10,20 10,20 10,20 10))
|
||||
103 POLYGON((20 20,20 20,20 20,20 20,20 20))
|
||||
104 POLYGON((10 20,10 20,10 20,10 20,10 20))
|
||||
105 POLYGON((0 0,10 0,10 10,0 10,0 0))
|
||||
106 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
107 POLYGON((10 10,40 10,40 10,10 10,10 10))
|
||||
108 POLYGON((10 10,20 10,20 20,10 20,10 10))
|
||||
109 POLYGON((0 0,50 0,50 50,0 50,0 0))
|
||||
110 POLYGON((0 0,30 0,30 30,0 30,0 0))
|
||||
111 POLYGON((0 0,20 0,20 20,0 20,0 0))
|
||||
112 POLYGON((1 1,21 1,21 21,1 21,1 1))
|
||||
113 POLYGON((3 6,4 6,4 10,3 10,3 6))
|
||||
114 POLYGON((10 0,16 0,16 48,10 48,10 0))
|
||||
115 POLYGON((10 0,10 0,10 48,10 48,10 0))
|
||||
116 POLYGON((1 2,21 2,21 8,1 8,1 2))
|
||||
117 POLYGON((28 0,84 0,84 42,28 42,28 0))
|
||||
118 POLYGON((28 0,84 0,84 42,28 42,28 0))
|
||||
119 POLYGON((0 0,3 0,3 3,0 3,0 0))
|
||||
120 POLYGON((0 0,10 0,10 10,0 10,0 0))
|
||||
121 POLYGON((3 6,44 6,44 9,3 9,3 6))
|
||||
explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00
|
||||
Warnings:
|
||||
Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry`
|
||||
SELECT fid, X(g) FROM gis_point ORDER by fid;
|
||||
fid X(g)
|
||||
101 10
|
||||
102 20
|
||||
103 20
|
||||
104 10
|
||||
SELECT fid, Y(g) FROM gis_point ORDER by fid;
|
||||
fid Y(g)
|
||||
101 10
|
||||
102 10
|
||||
103 20
|
||||
104 20
|
||||
explain extended select X(g),Y(g) FROM gis_point;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00
|
||||
Warnings:
|
||||
Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point`
|
||||
SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid;
|
||||
fid AsText(StartPoint(g))
|
||||
105 POINT(0 0)
|
||||
106 POINT(10 10)
|
||||
107 POINT(10 10)
|
||||
SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid;
|
||||
fid AsText(EndPoint(g))
|
||||
105 POINT(10 0)
|
||||
106 POINT(10 10)
|
||||
107 POINT(40 10)
|
||||
SELECT fid, GLength(g) FROM gis_line ORDER by fid;
|
||||
fid GLength(g)
|
||||
105 24.142135623731
|
||||
106 40
|
||||
107 30
|
||||
SELECT fid, NumPoints(g) FROM gis_line ORDER by fid;
|
||||
fid NumPoints(g)
|
||||
105 3
|
||||
106 5
|
||||
107 2
|
||||
SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid;
|
||||
fid AsText(PointN(g, 2))
|
||||
105 POINT(0 10)
|
||||
106 POINT(20 10)
|
||||
107 POINT(40 10)
|
||||
SELECT fid, IsClosed(g) FROM gis_line ORDER by fid;
|
||||
fid IsClosed(g)
|
||||
105 0
|
||||
106 1
|
||||
107 0
|
||||
explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line`
|
||||
SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(Centroid(g))
|
||||
108 POINT(15 15)
|
||||
109 POINT(25.416666666667 25.416666666667)
|
||||
110 POINT(20 10)
|
||||
SELECT fid, Area(g) FROM gis_polygon ORDER by fid;
|
||||
fid Area(g)
|
||||
108 100
|
||||
109 2400
|
||||
110 450
|
||||
SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(ExteriorRing(g))
|
||||
108 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
109 LINESTRING(0 0,50 0,50 50,0 50,0 0)
|
||||
110 LINESTRING(0 0,30 0,30 30,0 0)
|
||||
SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid;
|
||||
fid NumInteriorRings(g)
|
||||
108 0
|
||||
109 1
|
||||
110 0
|
||||
SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid;
|
||||
fid AsText(InteriorRingN(g, 1))
|
||||
108 NULL
|
||||
109 LINESTRING(10 10,20 10,20 20,10 20,10 10)
|
||||
110 NULL
|
||||
explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon`
|
||||
SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid;
|
||||
fid IsClosed(g)
|
||||
114 0
|
||||
115 0
|
||||
116 0
|
||||
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
|
||||
fid AsText(Centroid(g))
|
||||
117 POINT(55.588527753042 17.426536064114)
|
||||
118 POINT(55.588527753042 17.426536064114)
|
||||
119 POINT(2 2)
|
||||
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
|
||||
fid Area(g)
|
||||
117 1684.5
|
||||
118 1684.5
|
||||
119 4.5
|
||||
SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
111 4
|
||||
112 4
|
||||
113 2
|
||||
SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
114 2
|
||||
115 1
|
||||
116 2
|
||||
SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
117 2
|
||||
118 2
|
||||
119 1
|
||||
SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid;
|
||||
fid NumGeometries(g)
|
||||
120 2
|
||||
121 2
|
||||
explain extended SELECT fid, NumGeometries(g) from gis_multi_point;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point`
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
111 POINT(10 10)
|
||||
112 POINT(11 11)
|
||||
113 POINT(4 10)
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
114 LINESTRING(16 0,16 23,16 48)
|
||||
115 NULL
|
||||
116 LINESTRING(2 5,5 8,21 7)
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
117 POLYGON((59 18,67 18,67 13,59 13,59 18))
|
||||
118 POLYGON((59 18,67 18,67 13,59 13,59 18))
|
||||
119 NULL
|
||||
SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid;
|
||||
fid AsText(GeometryN(g, 2))
|
||||
120 LINESTRING(0 0,10 10)
|
||||
121 LINESTRING(3 6,7 9)
|
||||
SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid;
|
||||
fid AsText(GeometryN(g, 1))
|
||||
120 POINT(0 0)
|
||||
121 POINT(44 6)
|
||||
explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point`
|
||||
SELECT g1.fid as first, g2.fid as second,
|
||||
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
||||
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
first second w c o e d t i r
|
||||
120 120 1 1 0 1 0 0 1 0
|
||||
120 121 0 0 0 0 0 0 1 0
|
||||
121 120 0 0 1 0 0 0 1 0
|
||||
121 121 1 1 0 1 0 0 1 0
|
||||
explain extended SELECT g1.fid as first, g2.fid as second,
|
||||
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
|
||||
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
|
||||
Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
|
||||
FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
|
||||
DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
|
||||
CREATE TABLE t1 (
|
||||
a INTEGER PRIMARY KEY AUTO_INCREMENT,
|
||||
gp point,
|
||||
ln linestring,
|
||||
pg polygon,
|
||||
mp multipoint,
|
||||
mln multilinestring,
|
||||
mpg multipolygon,
|
||||
gc geometrycollection,
|
||||
gm geometry
|
||||
);
|
||||
SHOW FIELDS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) NO PRI NULL auto_increment
|
||||
gp point YES NULL
|
||||
ln linestring YES NULL
|
||||
pg polygon YES NULL
|
||||
mp multipoint YES NULL
|
||||
mln multilinestring YES NULL
|
||||
mpg multipolygon YES NULL
|
||||
gc geometrycollection YES NULL
|
||||
gm geometry YES NULL
|
||||
ALTER TABLE t1 ADD fid INT;
|
||||
SHOW FIELDS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) NO PRI NULL auto_increment
|
||||
gp point YES NULL
|
||||
ln linestring YES NULL
|
||||
pg polygon YES NULL
|
||||
mp multipoint YES NULL
|
||||
mln multilinestring YES NULL
|
||||
mpg multipolygon YES NULL
|
||||
gc geometrycollection YES NULL
|
||||
gm geometry YES NULL
|
||||
fid int(11) YES NULL
|
||||
DROP TABLE t1;
|
||||
create table t1 (pk integer primary key auto_increment, a geometry not null);
|
||||
insert into t1 (a) values (GeomFromText('Point(1 2)'));
|
||||
insert into t1 (a) values ('Garbage');
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert IGNORE into t1 (a) values ('Garbage');
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
drop table t1;
|
||||
create table t1 (pk integer primary key auto_increment, fl geometry);
|
||||
insert into t1 (fl) values (1);
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert into t1 (fl) values (1.11);
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert into t1 (fl) values ("qwerty");
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
insert into t1 (fl) values (pointfromtext('point(1,1)'));
|
||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||
drop table t1;
|
@ -12,7 +12,7 @@ master-bin.000001 367 Xid 1 394 COMMIT /* XID */
|
||||
drop table t1;
|
||||
drop table if exists t1, t2;
|
||||
reset master;
|
||||
create table t1 (a int) engine=bdb;
|
||||
create table t1 (a int) engine=innodb;
|
||||
create table t2 (a int) engine=innodb;
|
||||
begin;
|
||||
insert t1 values (5);
|
||||
@ -22,11 +22,11 @@ insert t2 values (5);
|
||||
commit;
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=bdb
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=innodb
|
||||
master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb
|
||||
master-bin.000001 # Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 # Query 1 # use `test`; insert t1 values (5)
|
||||
master-bin.000001 # Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 # Xid 1 # COMMIT /* xid= */
|
||||
master-bin.000001 # Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 # Query 1 # use `test`; insert t2 values (5)
|
||||
master-bin.000001 # Xid 1 # COMMIT /* xid= */
|
||||
|
@ -479,7 +479,7 @@ drop table t1;
|
||||
create table t1 (
|
||||
c char(10) character set utf8,
|
||||
unique key a (c(1))
|
||||
) engine=bdb;
|
||||
) engine=innodb;
|
||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||
insert into t1 values ('aa');
|
||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
||||
@ -637,7 +637,7 @@ drop table t1;
|
||||
create table t1 (
|
||||
c char(10) character set utf8 collate utf8_bin,
|
||||
unique key a (c(1))
|
||||
) engine=bdb;
|
||||
) engine=innodb;
|
||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||
insert into t1 values ('aa');
|
||||
ERROR 23000: Duplicate entry 'aa' for key 'a'
|
||||
@ -707,7 +707,7 @@ drop table t1;
|
||||
create table t1 (
|
||||
str varchar(255) character set utf8 not null,
|
||||
key str (str(2))
|
||||
) engine=bdb;
|
||||
) engine=innodb;
|
||||
INSERT INTO t1 VALUES ('str');
|
||||
INSERT INTO t1 VALUES ('str2');
|
||||
select * from t1 where str='str';
|
||||
@ -796,7 +796,7 @@ insert into t1 values(1,'foo'),(2,'foobar');
|
||||
select * from t1 where b like 'foob%';
|
||||
a b
|
||||
2 foobar
|
||||
alter table t1 engine=bdb;
|
||||
alter table t1 engine=innodb;
|
||||
select * from t1 where b like 'foob%';
|
||||
a b
|
||||
2 foobar
|
||||
|
@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_bdb YES
|
@ -1,136 +0,0 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (
|
||||
pk int primary key,
|
||||
key1 int,
|
||||
key2 int,
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2)
|
||||
) engine=bdb;
|
||||
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
|
||||
pk key1 key2 filler filler2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
9 9 9 filler-data filler-data-2
|
||||
10 10 10 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
5 5 5 filler-data filler-data-2
|
||||
6 6 6 filler-data filler-data-2
|
||||
7 7 7 filler-data filler-data-2
|
||||
8 8 8 filler-data filler-data-2
|
||||
set @maxv=1000;
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1=18 or key1=60;
|
||||
pk key1 key2 filler filler2
|
||||
18 18 18 filler-data filler-data-2
|
||||
60 60 60 filler-data filler-data-2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1 < 3 or key1 > @maxv-11;
|
||||
pk key1 key2 filler filler2
|
||||
990 990 990 filler-data filler-data-2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or
|
||||
(key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10);
|
||||
pk key1 key2 filler filler2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk > 10 and pk < 15) or (pk >= 50 and pk < 55 )
|
||||
or
|
||||
(key1 < 5) or (key1 > @maxv-10);
|
||||
pk key1 key2 filler filler2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
drop table t1;
|
File diff suppressed because it is too large
Load Diff
@ -1,186 +0,0 @@
|
||||
drop table if exists t1, t2, t3,t4;
|
||||
create table t1 (
|
||||
pk1 int not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values (-5, 1, 1),
|
||||
(-100, 1, 1),
|
||||
(3, 1, 1),
|
||||
(0, 1, 1),
|
||||
(10, 1, 1);
|
||||
explain select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 5 Using sort_union(key1,key2); Using where
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 key1 key2
|
||||
-100 1 1
|
||||
-5 1 1
|
||||
0 1 1
|
||||
3 1 1
|
||||
10 1 1
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
pk1 int unsigned not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values (0, 1, 1),
|
||||
(0xFFFFFFFF, 1, 1),
|
||||
(0xFFFFFFFE, 1, 1),
|
||||
(1, 1, 1),
|
||||
(2, 1, 1);
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 key1 key2
|
||||
0 1 1
|
||||
1 1 1
|
||||
2 1 1
|
||||
4294967294 1 1
|
||||
4294967295 1 1
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
pk1 char(4) not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb collate latin2_general_ci;
|
||||
insert into t1 values ('a1', 1, 1),
|
||||
('b2', 1, 1),
|
||||
('A3', 1, 1),
|
||||
('B4', 1, 1);
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 key1 key2
|
||||
a1 1 1
|
||||
A3 1 1
|
||||
b2 1 1
|
||||
B4 1 1
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
pk1 int not NULL,
|
||||
pk2 char(4) not NULL collate latin1_german1_ci,
|
||||
pk3 char(4) not NULL collate latin1_bin,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1,pk2,pk3),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values
|
||||
(1, 'u', 'u', 1, 1),
|
||||
(1, 'u', char(0xEC), 1, 1),
|
||||
(1, 'u', 'x', 1, 1);
|
||||
insert ignore into t1 select pk1, char(0xEC), pk3, key1, key2 from t1;
|
||||
insert ignore into t1 select pk1, 'x', pk3, key1, key2 from t1 where pk2='u';
|
||||
insert ignore into t1 select 2, pk2, pk3, key1, key2 from t1;
|
||||
select * from t1;
|
||||
pk1 pk2 pk3 key1 key2
|
||||
1 ì u 1 1
|
||||
1 ì x 1 1
|
||||
1 ì ì 1 1
|
||||
1 u u 1 1
|
||||
1 u x 1 1
|
||||
1 u ì 1 1
|
||||
1 x u 1 1
|
||||
1 x x 1 1
|
||||
1 x ì 1 1
|
||||
2 ì u 1 1
|
||||
2 ì x 1 1
|
||||
2 ì ì 1 1
|
||||
2 u u 1 1
|
||||
2 u x 1 1
|
||||
2 u ì 1 1
|
||||
2 x u 1 1
|
||||
2 x x 1 1
|
||||
2 x ì 1 1
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 pk2 pk3 key1 key2
|
||||
1 ì u 1 1
|
||||
1 ì x 1 1
|
||||
1 ì ì 1 1
|
||||
1 u u 1 1
|
||||
1 u x 1 1
|
||||
1 u ì 1 1
|
||||
1 x u 1 1
|
||||
1 x x 1 1
|
||||
1 x ì 1 1
|
||||
2 ì u 1 1
|
||||
2 ì x 1 1
|
||||
2 ì ì 1 1
|
||||
2 u u 1 1
|
||||
2 u x 1 1
|
||||
2 u ì 1 1
|
||||
2 x u 1 1
|
||||
2 x x 1 1
|
||||
2 x ì 1 1
|
||||
alter table t1 drop primary key;
|
||||
select * from t1;
|
||||
pk1 pk2 pk3 key1 key2
|
||||
1 ì u 1 1
|
||||
1 ì x 1 1
|
||||
1 ì ì 1 1
|
||||
1 u u 1 1
|
||||
1 u x 1 1
|
||||
1 u ì 1 1
|
||||
1 x u 1 1
|
||||
1 x x 1 1
|
||||
1 x ì 1 1
|
||||
2 ì u 1 1
|
||||
2 ì x 1 1
|
||||
2 ì ì 1 1
|
||||
2 u u 1 1
|
||||
2 u x 1 1
|
||||
2 u ì 1 1
|
||||
2 x u 1 1
|
||||
2 x x 1 1
|
||||
2 x ì 1 1
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 pk2 pk3 key1 key2
|
||||
1 ì u 1 1
|
||||
1 ì x 1 1
|
||||
1 ì ì 1 1
|
||||
1 u u 1 1
|
||||
1 u x 1 1
|
||||
1 u ì 1 1
|
||||
1 x u 1 1
|
||||
1 x x 1 1
|
||||
1 x ì 1 1
|
||||
2 ì u 1 1
|
||||
2 ì x 1 1
|
||||
2 ì ì 1 1
|
||||
2 u u 1 1
|
||||
2 u x 1 1
|
||||
2 u ì 1 1
|
||||
2 x u 1 1
|
||||
2 x x 1 1
|
||||
2 x ì 1 1
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
pk1 varchar(8) NOT NULL default '',
|
||||
pk2 varchar(4) NOT NULL default '',
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
primary key(pk1, pk2),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values ('','empt',2,2),
|
||||
('a','a--a',2,2),
|
||||
('bb','b--b',2,2),
|
||||
('ccc','c--c',2,2),
|
||||
('dddd','d--d',2,2);
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
pk1 pk2 key1 key2
|
||||
empt 2 2
|
||||
a a--a 2 2
|
||||
bb b--b 2 2
|
||||
ccc c--c 2 2
|
||||
dddd d--d 2 2
|
||||
drop table t1;
|
@ -1,18 +0,0 @@
|
||||
#
|
||||
# Test of problem when shutting down mysqld at once after ALTER TABLE
|
||||
#
|
||||
-- source include/have_bdb.inc
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(objid BIGINT not null, tablename varchar(64), oid BIGINT not null, test BIGINT, PRIMARY KEY (objid), UNIQUE(tablename)) engine=BDB;
|
||||
insert into t1 values(1, 't1',4,9);
|
||||
insert into t1 values(2, 'metatable',1,9);
|
||||
insert into t1 values(3, 'metaindex',1,9 );
|
||||
select * from t1;
|
||||
alter table t1 drop column test;
|
||||
|
||||
# Now we do a reboot and continue with the next test
|
||||
|
||||
# End of 4.1 tests
|
@ -1,2 +0,0 @@
|
||||
--skip-external-locking
|
||||
|
@ -1,10 +0,0 @@
|
||||
#
|
||||
# Note that this test uses tables from the previous test
|
||||
# This is to test that the table t1 survives a reboot of MySQL
|
||||
# The options in the -master.opt file are just there to force the reboot
|
||||
#
|
||||
-- source include/have_bdb.inc
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
@ -1,51 +0,0 @@
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
# test for bug reported by Mark Steele
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (
|
||||
ChargeID int(10) unsigned NOT NULL auto_increment,
|
||||
ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
|
||||
ChargeDate date DEFAULT '0000-00-00' NOT NULL,
|
||||
ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
|
||||
FedTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
|
||||
ProvTaxes decimal(20,2) DEFAULT '0.00' NOT NULL,
|
||||
ChargeStatus enum('New','Auth','Unauth','Sale','Denied','Refund')
|
||||
DEFAULT 'New' NOT NULL,
|
||||
ChargeAuthorizationMessage text,
|
||||
ChargeComment text,
|
||||
ChargeTimeStamp varchar(20),
|
||||
PRIMARY KEY (ChargeID),
|
||||
KEY ServiceID (ServiceID),
|
||||
KEY ChargeDate (ChargeDate)
|
||||
) engine=BDB;
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO t1
|
||||
VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now');
|
||||
COMMIT;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET ChargeAuthorizationMessage = 'blablabla' WHERE
|
||||
ChargeID = 1;
|
||||
COMMIT;
|
||||
|
||||
INSERT INTO t1
|
||||
VALUES(NULL,1,'2001-03-01',1,1,1,'New',NULL,NULL,'now');
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test for bug #2342 "Running ANALYZE TABLE on bdb table
|
||||
# inside a transaction hangs server thread"
|
||||
|
||||
create table t1 (a int) engine=bdb;
|
||||
|
||||
set autocommit=0;
|
||||
insert into t1 values(1);
|
||||
analyze table t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
@ -1,59 +0,0 @@
|
||||
# This test doesn't work with the embedded version as this code
|
||||
# assumes that one query is running while we are doing queries on
|
||||
# a second connection.
|
||||
# This would work if mysqltest run would be threaded and handle each
|
||||
# connection in a separate thread.
|
||||
#
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
--enable_warnings
|
||||
connection con1;
|
||||
create table t1 (id integer, x integer) engine=BDB;
|
||||
create table t2 (id integer, x integer) engine=BDB;
|
||||
insert into t1 values(0, 0);
|
||||
insert into t2 values(0, 0);
|
||||
set autocommit=0;
|
||||
update t1 set x = 1 where id = 0;
|
||||
|
||||
connection con2;
|
||||
set autocommit=0;
|
||||
update t2 set x = 1 where id = 0;
|
||||
|
||||
# The following query should hang because con1 is locking the page
|
||||
--send
|
||||
select x from t1 where id = 0;
|
||||
|
||||
connection con1;
|
||||
# This should generate a deadlock as we are trying to access a locked row
|
||||
--send
|
||||
select x from t2 where id = 0;
|
||||
|
||||
connection con2;
|
||||
--error 1213
|
||||
reap;
|
||||
commit;
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
commit;
|
||||
|
||||
connection con2;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
commit;
|
||||
|
||||
connection con1;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
commit;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
# End of 4.1 tests
|
@ -1,59 +0,0 @@
|
||||
# This test doesn't work with the embedded version as this code
|
||||
# assumes that one query is running while we are doing queries on
|
||||
# a second connection.
|
||||
# This would work if mysqltest run would be threaded and handle each
|
||||
# connection in a separate thread.
|
||||
#
|
||||
|
||||
#-- source include/not_embedded.inc
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
--enable_warnings
|
||||
connection con1;
|
||||
create table t1 (id integer, x integer) engine=BDB;
|
||||
create table t2 (id integer, x integer) engine=BDB;
|
||||
insert into t1 values(0, 0);
|
||||
insert into t2 values(0, 0);
|
||||
set autocommit=0;
|
||||
update t1 set x = 1 where id = 0;
|
||||
|
||||
connection con2;
|
||||
set autocommit=0;
|
||||
update t2 set x = 1 where id = 0;
|
||||
|
||||
# The following query should hang because con1 is locking the page
|
||||
--send
|
||||
select x from t1 where id = 0;
|
||||
|
||||
connection con1;
|
||||
# This should generate a deadlock as we are trying to access a locked row
|
||||
--send
|
||||
select x from t2 where id = 0;
|
||||
|
||||
connection con2;
|
||||
--error 1213
|
||||
reap;
|
||||
commit;
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
commit;
|
||||
|
||||
connection con2;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
commit;
|
||||
|
||||
connection con1;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
commit;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
# End of 4.1 tests
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
--set-variable=query_cache_size=1M
|
@ -1,53 +0,0 @@
|
||||
-- source include/have_bdb.inc
|
||||
-- source include/have_query_cache.inc
|
||||
|
||||
#
|
||||
# Without auto_commit.
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, t3;
|
||||
--enable_warnings
|
||||
flush status;
|
||||
set autocommit=0;
|
||||
create table t1 (a int not null) engine=bdb;
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
drop table t1;
|
||||
set autocommit=1;
|
||||
create table t1 (a int not null) engine=bdb;
|
||||
begin;
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
drop table t1;
|
||||
create table t1 (a int not null) engine=bdb;
|
||||
create table t2 (a int not null) engine=bdb;
|
||||
create table t3 (a int not null) engine=bdb;
|
||||
insert into t1 values (1),(2);
|
||||
insert into t2 values (1),(2);
|
||||
insert into t3 values (1),(2);
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
select * from t3;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
begin;
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
select * from t3;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
insert into t1 values (3);
|
||||
insert into t2 values (3);
|
||||
insert into t1 values (4);
|
||||
select * from t1;
|
||||
select * from t2;
|
||||
select * from t3;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
show status like "Qcache_hits";
|
||||
commit;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
drop table if exists t1, t2, t3;
|
||||
|
||||
# End of 4.1 tests
|
@ -1,3 +0,0 @@
|
||||
-- source include/have_bdb.inc
|
||||
SET storage_engine=bdb;
|
||||
--source include/gis_generic.inc
|
@ -360,7 +360,7 @@ drop table t1;
|
||||
create table t1 (
|
||||
c char(10) character set utf8,
|
||||
unique key a (c(1))
|
||||
) engine=bdb;
|
||||
) engine=innodb;
|
||||
--enable_warnings
|
||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||
--error 1062
|
||||
@ -483,7 +483,7 @@ drop table t1;
|
||||
create table t1 (
|
||||
c char(10) character set utf8 collate utf8_bin,
|
||||
unique key a (c(1))
|
||||
) engine=bdb;
|
||||
) engine=innodb;
|
||||
--enable_warnings
|
||||
insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f');
|
||||
--error 1062
|
||||
@ -558,7 +558,7 @@ drop table t1;
|
||||
create table t1 (
|
||||
str varchar(255) character set utf8 not null,
|
||||
key str (str(2))
|
||||
) engine=bdb;
|
||||
) engine=innodb;
|
||||
--enable_warnings
|
||||
INSERT INTO t1 VALUES ('str');
|
||||
INSERT INTO t1 VALUES ('str2');
|
||||
@ -644,7 +644,7 @@ create table t1 (
|
||||
insert into t1 values(1,'foo'),(2,'foobar');
|
||||
select * from t1 where b like 'foob%';
|
||||
--disable_warnings
|
||||
alter table t1 engine=bdb;
|
||||
alter table t1 engine=innodb;
|
||||
--enable_warnings
|
||||
select * from t1 where b like 'foob%';
|
||||
drop table t1;
|
||||
|
@ -1,52 +0,0 @@
|
||||
#
|
||||
# 2-sweeps read Index_merge test
|
||||
#
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (
|
||||
pk int primary key,
|
||||
key1 int,
|
||||
key2 int,
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2)
|
||||
) engine=bdb;
|
||||
|
||||
|
||||
--disable_query_log
|
||||
let $1=1000;
|
||||
while ($1)
|
||||
{
|
||||
eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2');
|
||||
dec $1;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
|
||||
|
||||
set @maxv=1000;
|
||||
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1=18 or key1=60;
|
||||
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1 < 3 or key1 > @maxv-11;
|
||||
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or
|
||||
(key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10);
|
||||
|
||||
select * from t1 where
|
||||
(pk > 10 and pk < 15) or (pk >= 50 and pk < 55 )
|
||||
or
|
||||
(key1 < 5) or (key1 > @maxv-10);
|
||||
|
||||
drop table t1;
|
@ -1,25 +0,0 @@
|
||||
###############################################
|
||||
# #
|
||||
# Prepared Statements test on BDB tables #
|
||||
# #
|
||||
###############################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
|
||||
-- source include/have_bdb.inc
|
||||
let $type= 'BDB' ;
|
||||
-- source include/ps_create.inc
|
||||
-- source include/ps_renew.inc
|
||||
|
||||
-- source include/ps_query.inc
|
||||
-- source include/ps_modify.inc
|
||||
-- source include/ps_modify1.inc
|
||||
-- source include/ps_conv.inc
|
||||
|
||||
drop table t1, t9;
|
||||
|
||||
# End of 4.1 tests
|
@ -1,108 +0,0 @@
|
||||
#
|
||||
# Test for rowid ordering (and comparison) functions.
|
||||
# do index_merge select for tables with PK of various types.
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, t3,t4;
|
||||
--enable_warnings
|
||||
|
||||
-- source include/have_bdb.inc
|
||||
|
||||
# Signed number as rowid
|
||||
create table t1 (
|
||||
pk1 int not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values (-5, 1, 1),
|
||||
(-100, 1, 1),
|
||||
(3, 1, 1),
|
||||
(0, 1, 1),
|
||||
(10, 1, 1);
|
||||
explain select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
drop table t1;
|
||||
|
||||
# Unsigned numbers as rowids
|
||||
create table t1 (
|
||||
pk1 int unsigned not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values (0, 1, 1),
|
||||
(0xFFFFFFFF, 1, 1),
|
||||
(0xFFFFFFFE, 1, 1),
|
||||
(1, 1, 1),
|
||||
(2, 1, 1);
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
drop table t1;
|
||||
|
||||
# Case-insensitive char(N)
|
||||
create table t1 (
|
||||
pk1 char(4) not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb collate latin2_general_ci;
|
||||
insert into t1 values ('a1', 1, 1),
|
||||
('b2', 1, 1),
|
||||
('A3', 1, 1),
|
||||
('B4', 1, 1);
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
drop table t1;
|
||||
|
||||
# Multi-part PK
|
||||
create table t1 (
|
||||
pk1 int not NULL,
|
||||
pk2 char(4) not NULL collate latin1_german1_ci,
|
||||
pk3 char(4) not NULL collate latin1_bin,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1,pk2,pk3),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values
|
||||
(1, 'u', 'u', 1, 1),
|
||||
(1, 'u', char(0xEC), 1, 1),
|
||||
(1, 'u', 'x', 1, 1);
|
||||
insert ignore into t1 select pk1, char(0xEC), pk3, key1, key2 from t1;
|
||||
insert ignore into t1 select pk1, 'x', pk3, key1, key2 from t1 where pk2='u';
|
||||
insert ignore into t1 select 2, pk2, pk3, key1, key2 from t1;
|
||||
select * from t1;
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
|
||||
# Hidden PK
|
||||
alter table t1 drop primary key;
|
||||
select * from t1;
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
drop table t1;
|
||||
|
||||
# Variable-length PK
|
||||
# this is also test for Bug#2688
|
||||
create table t1 (
|
||||
pk1 varchar(8) NOT NULL default '',
|
||||
pk2 varchar(4) NOT NULL default '',
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
primary key(pk1, pk2),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=bdb;
|
||||
insert into t1 values ('','empt',2,2),
|
||||
('a','a--a',2,2),
|
||||
('bb','b--b',2,2),
|
||||
('ccc','c--c',2,2),
|
||||
('dddd','d--d',2,2);
|
||||
select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3;
|
||||
|
||||
drop table t1;
|
||||
|
@ -29,7 +29,7 @@ ADD_DEFINITIONS(-DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER
|
||||
ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
|
||||
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
|
||||
filesort.cc gstream.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc
|
||||
ha_innodb.cc ha_partition.cc ha_federated.cc ha_berkeley.cc
|
||||
ha_innodb.cc ha_partition.cc ha_federated.cc
|
||||
handler.cc hash_filo.cc hash_filo.h
|
||||
hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc
|
||||
item_create.cc item_func.cc item_geofunc.cc item_row.cc
|
||||
|
@ -47,7 +47,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
||||
item_create.h item_subselect.h item_row.h \
|
||||
mysql_priv.h item_geofunc.h sql_bitmap.h \
|
||||
procedure.h sql_class.h sql_lex.h sql_list.h \
|
||||
sql_manager.h sql_map.h sql_string.h unireg.h \
|
||||
sql_map.h sql_string.h unireg.h \
|
||||
sql_error.h field.h handler.h mysqld_suffix.h \
|
||||
ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
|
||||
ha_innodb.h ha_federated.h \
|
||||
|
@ -23,7 +23,6 @@
|
||||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_manager.h"
|
||||
|
||||
ulong volatile manager_status;
|
||||
bool volatile manager_thread_in_use;
|
||||
|
@ -1,19 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
void berkeley_cleanup_log_files(void);
|
||||
#endif /* WITH_BERKELEY_STORAGE_ENGINE */
|
Loading…
x
Reference in New Issue
Block a user