18
18
explain select count (*) from t1;
21
--error ER_WARN_DATA_OUT_OF_RANGE
22
22
insert into t1 values (2147483648, 1, 1);
26
26
insert into t1 values (1, 0, 0);
28
28
insert into t1 values (2, 0, 0);
30
30
insert into t1 values (3, 0, 0);
32
32
insert into t1 values (4, 0, 0);
34
34
# needle in a haystack
100
100
insert into t1 values (1.8e+18, 2);
103
--error ER_WARN_DATA_OUT_OF_RANGE
104
104
insert into t1 values (1.8e+19, 3);
106
106
insert into t1 values (1,1), (2,2), (3,3), (4,4);
109
109
update t1 set id = 4 where id = 1;
111
111
update t1 set id = 10 where id = 1;
183
183
insert into t1 values (2.2222, 8);
184
184
select * from t1;
187
187
update t1 set id = 1.11 where id = 1.1;
189
189
update t1 set id = 2.22 where id = 2.2;
191
191
update t1 set id = 3.3 where id = 1.1;
225
225
select country from t1 where id = 'budapest';
226
226
select count (id) from t1;
229
229
update t1 set id = 'dublin' where id = 'geneva';
230
230
update t1 set id = 'berlin', country = 'germany' where id = 'budapest';
231
231
update t1 set id = 'london', country = 'england' where id = 'copenhagen';
289
289
select * from t1 where a = '1984-09-24';
290
290
select * from t1 where a = '1984-09-25';
293
293
update t1 set a = '1984-09-22' where a = '1984-09-25';
295
295
update t1 set a = '19840922' where a = '1984-09-25';
297
297
update t1 set a = '2010-03-10' where a = '1984-09-22';
384
384
create table t1 (a int, unique index(a)) engine = blitzdb;
385
385
insert into t1 values (1), (2);
388
388
insert into t1 values (1);
390
390
insert into t1 values (2);
392
392
insert into t1 values (NULL);
404
404
create table t1 (a varchar(32), unique index(a)) engine = blitzdb;
405
405
insert into t1 values ('a'), ('b'), ('c');
408
408
insert into t1 values ('a');
410
410
insert into t1 values ('b');
412
412
insert into t1 values ('c');
414
414
insert into t1 values ('f'), ('e'), ('d');
476
476
select count(*) from t1;
479
# +-----------------+
480
# | INDEX: VARTEXT1 |
481
# +-----------------+
482
create table t1 (a varchar(32), index(a)) engine = blitzdb;
483
insert into t1 values ('ccc'), ('bbb'), ('aaa');
484
insert into t1 values ('eee'), ('ddd'), ('fff');
487
select * from t1 where a = 'aaa';
488
select * from t1 where a = 'bbb';
489
select * from t1 where a = 'ccc';
490
select * from t1 where a = 'ddd';
491
select * from t1 where a = 'eee';
492
delete from t1 where a = 'ddd';
493
delete from t1 where a = 'eee';
495
select count(*) from t1;
498
479
# +------------------------------+
499
480
# | UNIQUE INDEX: DUPLICATE NULL |
500
481
# +------------------------------+
503
484
select * from t1;
504
485
select * from t1 where a is NULL;
505
486
insert into t1 values (1, 5), (2, 6);
507
488
insert into t1 values (1, 7), (1, 8);
508
489
select * from t1 where a is not NULL;
509
490
delete from t1 where a is NULL;
541
522
# | COMPOSITE INDEX CHECK |
542
523
# +-----------------------+
544
--error ER_CANT_CREATE_TABLE
545
526
create table t1 (a int, b int, c int, d int, primary key(a, b)) engine = blitzdb;
546
--error ER_CANT_CREATE_TABLE
547
528
create table t1 (a int, b int, c int, d int, primary key(a, b, c)) engine = blitzdb;
548
--error ER_CANT_CREATE_TABLE
549
530
create table t1 (a int, b int, c int, d int, index(a, b)) engine = blitzdb;
550
--error ER_CANT_CREATE_TABLE
551
532
create table t1 (a int, b int, c int, d int, index(a, b, c)) engine = blitzdb;
552
--error ER_CANT_CREATE_TABLE
553
534
create table t1 (a int, b int, c int, d int, unique(a, b)) engine = blitzdb;
554
--error ER_CANT_CREATE_TABLE
555
536
create table t1 (a int, b int, c int, d int, unique(a, b, c)) engine = blitzdb;
557
538
# +------------------------------------------+