~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/select.result

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2,t3,t4,t11;
2
2
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
3
3
CREATE TABLE t1 (
4
 
Period smallint unsigned DEFAULT '0' NOT NULL,
5
 
Varor_period smallint unsigned DEFAULT '0' NOT NULL
 
4
Period int DEFAULT '0' NOT NULL,
 
5
Varor_period int DEFAULT '0' NOT NULL
6
6
);
7
7
INSERT INTO t1 VALUES (9410,9412);
8
8
select period from t1;
16
16
9410    9412
17
17
CREATE TABLE t2 (
18
18
auto int not null auto_increment,
19
 
fld1 int unsigned DEFAULT '0' NOT NULL,
20
 
companynr tinyint unsigned DEFAULT '0' NOT NULL,
 
19
fld1 int DEFAULT '0' NOT NULL,
 
20
companynr int DEFAULT '0' NOT NULL,
21
21
fld3 char(30) DEFAULT '' NOT NULL,
22
22
fld4 char(35) DEFAULT '' NOT NULL,
23
23
fld5 char(35) DEFAULT '' NOT NULL,
164
164
18054   fetters
165
165
18103   flint
166
166
18104   flopping
167
 
36002   funereal
168
 
38017   fetched
169
 
38205   firearm
170
 
58004   Fenton
171
 
88303   feminine
172
167
186002  freakish
173
168
188007  flurried
174
169
188505  fitting
187
182
232102  forgivably
188
183
238007  filial
189
184
238008  fixedly
 
185
36002   funereal
 
186
38017   fetched
 
187
38205   firearm
 
188
58004   Fenton
 
189
88303   feminine
190
190
select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
191
191
fld3
192
192
select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
250
250
0
251
251
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
252
252
fld3    period
253
 
overlay 9410
 
253
obliterates     9410
254
254
offload 9410
255
 
obliterates     9410
256
 
overestimating  9410
257
255
opaquely        9410
258
256
organizer       9410
 
257
overestimating  9410
 
258
overlay 9410
259
259
select distinct fld3 from t2 where companynr = 34 order by fld3;
260
260
fld3
261
261
absentee
331
331
select distinct fld3 from t2 limit 10;
332
332
fld3
333
333
Omaha
 
334
Romans
 
335
admonishing
 
336
astound
 
337
bewilderingly
334
338
breaking
335
 
Romans
 
339
combed
 
340
flanking
336
341
intercepted
337
 
bewilderingly
338
 
astound
339
 
admonishing
340
342
sumac
341
 
flanking
342
 
combed
343
343
select distinct fld3 from t2 having fld3 like "A%" limit 10;
344
344
fld3
345
345
abates
442
442
adj
443
443
select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
444
444
a
445
 
ast
 
445
Ado
 
446
Aug
446
447
adm
 
448
afi
 
449
agi
 
450
amm
447
451
ann
448
 
agi
449
 
afi
450
 
amm
451
 
Aug
 
452
ast
 
453
att
452
454
aud
453
 
att
454
 
Ado
455
455
create table t3 (
456
456
period    int not null,
457
457
name      char(32) not null,
481
481
insert into t3 select * from tmp;
482
482
alter table t3 add t2nr int not null auto_increment primary key first;
483
483
drop table tmp;
484
 
SET SQL_BIG_TABLES=1;
485
484
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
486
485
namn
487
486
Abraham Abraham
494
493
analyzable analyzable
495
494
animals animals
496
495
animized animized
497
 
SET SQL_BIG_TABLES=0;
498
496
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
499
497
concat(fld3," ",fld3)
500
498
Abraham Abraham
531
529
bedlam  1
532
530
bedpost 1
533
531
boasted 1
534
 
SET SQL_BIG_TABLES=1;
535
532
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
536
533
fld3    count(*)
537
534
affixed 1
544
541
bedlam  1
545
542
bedpost 1
546
543
boasted 1
547
 
SET SQL_BIG_TABLES=0;
548
544
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
549
545
fld3    repeat("a",length(fld3))        count(*)
550
546
circus  aaaaaa  1
581
577
breaking        1001
582
578
select fld3,period from t2,t1 where companynr*10 = 37*10;
583
579
fld3    period
584
 
breaking        9410
585
 
Romans  9410
586
 
intercepted     9410
587
 
bewilderingly   9410
588
 
astound 9410
589
 
admonishing     9410
590
 
sumac   9410
591
 
flanking        9410
592
 
combed  9410
593
 
subjective      9410
594
 
scatterbrain    9410
 
580
Abraham 9410
 
581
Aden    9410
 
582
Adolph  9410
 
583
Aldrich 9410
 
584
Alison  9410
 
585
Anatole 9410
 
586
Antarctica      9410
 
587
Antares 9410
 
588
Arabia  9410
 
589
Artemia 9410
 
590
Augustine       9410
 
591
Baird   9410
 
592
Beebe   9410
 
593
Butterfield     9410
 
594
CERN    9410
 
595
Cassites        9410
 
596
Chicana 9410
 
597
Chippewa        9410
 
598
Clayton 9410
 
599
Conley  9410
 
600
Connally        9410
 
601
Crays   9410
 
602
DiMaggio        9410
 
603
Dutchman        9410
595
604
Eulerian        9410
 
605
Evanston        9410
 
606
Everhart        9410
 
607
Fenton  9410
 
608
Fitzpatrick     9410
 
609
Galatean        9410
 
610
Gandhian        9410
 
611
Ganymede        9410
 
612
Goldstine       9410
 
613
Gothicism       9410
 
614
Graves  9410
 
615
Greenberg       9410
 
616
Gurkha  9410
 
617
Hawaii  9410
 
618
Hegelian        9410
 
619
Hornblower      9410
 
620
Huffman 9410
 
621
Hunter  9410
 
622
Joplin  9410
 
623
Judas   9410
596
624
Kane    9410
597
 
overlay 9410
598
 
perturb 9410
599
 
goblins 9410
600
 
annihilates     9410
 
625
Kantian 9410
 
626
Kevin   9410
 
627
Kinsey  9410
 
628
Kline   9410
 
629
Lars    9410
 
630
Latinizes       9410
 
631
Lillian 9410
 
632
Lizzy   9410
 
633
Majorca 9410
 
634
Manhattanize    9410
 
635
McGovern        9410
 
636
Melinda 9410
 
637
Merritt 9410
 
638
Micronesia      9410
 
639
Miles   9410
 
640
Miltonism       9410
 
641
Nabisco 9410
 
642
Nazis   9410
 
643
Newtonian       9410
 
644
Norwalk 9410
 
645
Pandora 9410
 
646
Parsifal        9410
 
647
Peruvian        9410
 
648
Punjab  9410
 
649
Pyle    9410
 
650
Quixotism       9410
 
651
Romano  9410
 
652
Romans  9410
 
653
Sabine  9410
 
654
Sault   9410
 
655
Saxony  9410
 
656
Selfridge       9410
 
657
Shanghais       9410
 
658
Simla   9410
 
659
Simon   9410
 
660
Stalin  9410
 
661
Steinberg       9410
 
662
Taoism  9410
 
663
Teresa  9410
 
664
Tipperary       9410
 
665
Weissmuller     9410
 
666
Winsett 9410
601
667
Wotan   9410
602
 
snatching       9410
603
 
concludes       9410
604
 
laterally       9410
605
 
yelped  9410
606
 
grazing 9410
607
 
Baird   9410
608
 
celery  9410
609
 
misunderstander 9410
610
 
handgun 9410
611
 
foldout 9410
612
 
mystic  9410
613
 
succumbed       9410
614
 
Nabisco 9410
615
 
fingerings      9410
 
668
abates  9410
 
669
abrogating      9410
 
670
accessed        9410
 
671
admiring        9410
 
672
admonishing     9410
 
673
afield  9410
 
674
afore   9410
616
675
aging   9410
617
 
afield  9410
 
676
airships        9410
 
677
alike   9410
 
678
allot   9410
 
679
already 9410
 
680
amenities       9410
618
681
ammonium        9410
619
 
boat    9410
620
 
intelligibility 9410
621
 
Augustine       9410
622
 
teethe  9410
623
 
dreaded 9410
624
 
scholastics     9410
 
682
analogy 9410
 
683
analyzable      9410
 
684
animals 9410
 
685
animized        9410
 
686
annihilates     9410
 
687
announced       9410
 
688
announces       9410
 
689
apiary  9410
 
690
appendixes      9410
 
691
appendixes      9410
 
692
appendixes      9410
 
693
appendixes      9410
 
694
appendixes      9410
 
695
appendixes      9410
 
696
arriving        9410
 
697
arteriole       9410
 
698
assails 9410
 
699
astound 9410
 
700
attainments     9410
 
701
attrition       9410
625
702
audiology       9410
626
 
wallet  9410
627
 
parters 9410
628
 
eschew  9410
629
 
quitter 9410
630
 
neat    9410
631
 
Steinberg       9410
632
 
jarring 9410
633
 
tinily  9410
 
703
avenge  9410
 
704
avoidable       9410
 
705
babies  9410
 
706
babysitting     9410
634
707
balled  9410
635
 
persist 9410
636
 
attainments     9410
637
 
fanatic 9410
638
 
measures        9410
639
 
rightfulness    9410
640
 
capably 9410
641
 
impulsive       9410
642
 
starlet 9410
643
 
terminators     9410
644
 
untying 9410
645
 
announces       9410
646
 
featherweight   9410
647
 
pessimist       9410
648
 
daughter        9410
649
 
decliner        9410
650
 
lawgiver        9410
651
 
stated  9410
652
 
readable        9410
653
 
attrition       9410
654
 
cascade 9410
655
 
motors  9410
656
 
interrogate     9410
657
 
pests   9410
658
 
stairway        9410
659
 
dopers  9410
660
 
testicle        9410
661
 
Parsifal        9410
662
 
leavings        9410
663
 
postulation     9410
664
 
squeaking       9410
665
 
contrasted      9410
666
 
leftover        9410
667
 
whiteners       9410
668
 
erases  9410
669
 
Punjab  9410
670
 
Merritt 9410
671
 
Quixotism       9410
672
 
sweetish        9410
673
 
dogging 9410
674
 
scornfully      9410
 
708
beaner  9410
 
709
beaters 9410
 
710
bee     9410
 
711
befouled        9410
675
712
bellow  9410
 
713
bestseller      9410
 
714
betroth 9410
 
715
bewilderingly   9410
676
716
bills   9410
677
 
cupboard        9410
678
 
sureties        9410
679
 
puddings        9410
680
 
fetters 9410
 
717
bitterroot      9410
681
718
bivalves        9410
682
 
incurring       9410
683
 
Adolph  9410
684
 
pithed  9410
685
 
Miles   9410
686
 
trimmings       9410
687
 
tragedies       9410
688
 
skulking        9410
689
 
flint   9410
690
 
flopping        9410
691
 
relaxing        9410
692
 
offload 9410
693
 
suites  9410
694
 
lists   9410
695
 
animized        9410
696
 
multilayer      9410
697
 
standardizes    9410
698
 
Judas   9410
699
 
vacuuming       9410
700
 
dentally        9410
701
 
humanness       9410
702
 
inch    9410
703
 
Weissmuller     9410
704
 
irresponsibly   9410
705
 
luckily 9410
706
 
culled  9410
707
 
medical 9410
 
719
bloater 9410
708
720
bloodbath       9410
709
 
subschema       9410
710
 
animals 9410
711
 
Micronesia      9410
712
 
repetitions     9410
713
 
Antares 9410
714
 
ventilate       9410
715
 
pityingly       9410
716
 
interdependent  9410
717
 
Graves  9410
718
 
neonatal        9410
 
721
boat    9410
 
722
boom    9410
 
723
boorish 9410
 
724
boulder 9410
 
725
breaking        9410
 
726
brunch  9410
 
727
buckboards      9410
 
728
burlesque       9410
 
729
cage    9410
 
730
capably 9410
 
731
capped  9410
 
732
cascade 9410
 
733
causality       9410
 
734
cautioned       9410
 
735
ceiling 9410
 
736
celery  9410
 
737
certificates    9410
719
738
chafe   9410
720
 
honoring        9410
721
 
realtor 9410
722
 
elite   9410
723
 
funereal        9410
724
 
abrogating      9410
725
 
sorters 9410
726
 
Conley  9410
727
 
lectured        9410
728
 
Abraham 9410
729
 
Hawaii  9410
730
 
cage    9410
731
 
hushes  9410
732
 
Simla   9410
733
 
reporters       9410
734
 
Dutchman        9410
735
 
descendants     9410
736
 
groupings       9410
737
 
dissociate      9410
 
739
chaperone       9410
 
740
charges 9410
 
741
chasm   9410
 
742
checkpoints     9410
 
743
chewing 9410
 
744
chews   9410
 
745
chillingly      9410
 
746
chronicle       9410
 
747
ciphers 9410
 
748
civics  9410
 
749
clamored        9410
 
750
clenched        9410
 
751
clockers        9410
738
752
coexist 9410
739
 
Beebe   9410
740
 
Taoism  9410
741
 
Connally        9410
742
 
fetched 9410
743
 
checkpoints     9410
744
 
rusting 9410
745
 
galling 9410
746
 
obliterates     9410
747
 
traitor 9410
748
 
resumes 9410
749
 
analyzable      9410
750
 
terminator      9410
751
 
gritty  9410
752
 
firearm 9410
753
 
minima  9410
754
 
Selfridge       9410
755
 
disable 9410
756
 
witchcraft      9410
757
 
betroth 9410
758
 
Manhattanize    9410
759
 
imprint 9410
760
 
peeked  9410
761
 
swelling        9410
762
 
interrelationships      9410
763
 
riser   9410
764
 
Gandhian        9410
765
 
peacock 9410
766
 
bee     9410
767
 
kanji   9410
768
 
dental  9410
769
 
scarf   9410
770
 
chasm   9410
771
 
insolence       9410
772
 
syndicate       9410
773
 
alike   9410
774
 
imperial        9410
 
753
cokes   9410
 
754
combed  9410
 
755
coming  9410
 
756
commencements   9410
 
757
commonplace     9410
 
758
communicants    9410
 
759
compartment     9410
 
760
comprehensive   9410
 
761
comprised       9410
 
762
conceptions     9410
 
763
concludes       9410
 
764
congregates     9410
 
765
contrary        9410
 
766
contrasted      9410
 
767
convenient      9410
775
768
convulsion      9410
776
 
railway 9410
777
 
validate        9410
778
 
normalizes      9410
779
 
comprehensive   9410
780
 
chewing 9410
 
769
corset  9410
 
770
count   9410
 
771
coverings       9410
 
772
craziness       9410
 
773
creak   9410
 
774
creek   9410
 
775
critiques       9410
 
776
crunches        9410
 
777
culled  9410
 
778
cult    9410
 
779
cupboard        9410
 
780
cured   9410
 
781
cute    9410
 
782
daughter        9410
 
783
decliner        9410
 
784
decomposition   9410
 
785
deductions      9410
 
786
dehydrate       9410
 
787
deludes 9410
781
788
denizen 9410
782
 
schemer 9410
783
 
chronicle       9410
784
 
Kline   9410
785
 
Anatole 9410
786
 
partridges      9410
787
 
brunch  9410
788
 
recruited       9410
 
789
denotative      9410
 
790
denounces       9410
 
791
dental  9410
 
792
dentally        9410
 
793
descendants     9410
 
794
despot  9410
 
795
destroyer       9410
 
796
detectably      9410
 
797
dialysis        9410
789
798
dimensions      9410
790
 
Chicana 9410
791
 
announced       9410
792
 
praised 9410
793
 
employing       9410
794
 
linear  9410
795
 
quagmire        9410
796
 
western 9410
797
 
relishing       9410
798
 
serving 9410
799
 
scheduling      9410
800
 
lore    9410
801
 
eventful        9410
802
 
arteriole       9410
 
799
disable 9410
 
800
discounts       9410
803
801
disentangle     9410
804
 
cured   9410
805
 
Fenton  9410
806
 
avoidable       9410
 
802
disobedience    9410
 
803
dissociate      9410
 
804
dogging 9410
 
805
dopers  9410
807
806
drains  9410
808
 
detectably      9410
809
 
husky   9410
810
 
impelling       9410
811
 
undoes  9410
 
807
dreaded 9410
 
808
ducks   9410
 
809
dusted  9410
 
810
effortlessly    9410
 
811
electroencephalography  9410
 
812
elite   9410
 
813
embassies       9410
 
814
employing       9410
 
815
encompass       9410
 
816
encompasses     9410
 
817
environing      9410
 
818
epistle 9410
 
819
equilibrium     9410
 
820
erases  9410
 
821
error   9410
 
822
eschew  9410
 
823
eternal 9410
812
824
evened  9410
813
 
squeezes        9410
814
 
destroyer       9410
815
 
rudeness        9410
816
 
beaner  9410
817
 
boorish 9410
818
 
Everhart        9410
819
 
encompass       9410
820
 
mushrooms       9410
821
 
Alison  9410
 
825
evenhandedly    9410
 
826
eventful        9410
 
827
excises 9410
 
828
exclamation     9410
 
829
excrete 9410
 
830
exhausts        9410
 
831
expelled        9410
 
832
extents 9410
822
833
externally      9410
823
 
pellagra        9410
824
 
cult    9410
825
 
creek   9410
826
 
Huffman 9410
827
 
Majorca 9410
828
 
governing       9410
829
 
gadfly  9410
830
 
reassigned      9410
831
 
intentness      9410
832
 
craziness       9410
833
 
psychic 9410
834
 
squabbled       9410
835
 
burlesque       9410
836
 
capped  9410
837
834
extracted       9410
838
 
DiMaggio        9410
839
 
exclamation     9410
840
 
subdirectory    9410
841
 
Gothicism       9410
 
835
faithful        9410
 
836
fanatic 9410
 
837
fated   9410
 
838
featherweight   9410
 
839
feed    9410
842
840
feminine        9410
843
 
metaphysically  9410
844
 
sanding 9410
845
 
Miltonism       9410
 
841
fetched 9410
 
842
fetters 9410
 
843
fiftieth        9410
 
844
filial  9410
 
845
fingerings      9410
 
846
finishers       9410
 
847
firearm 9410
 
848
fitting 9410
 
849
fixedly 9410
 
850
flanking        9410
 
851
flint   9410
 
852
flopping        9410
 
853
flurried        9410
 
854
foldout 9410
 
855
foothill        9410
 
856
forgivably      9410
 
857
forthcoming     9410
846
858
freakish        9410
847
 
index   9410
848
 
straight        9410
849
 
flurried        9410
850
 
denotative      9410
851
 
coming  9410
852
 
commencements   9410
 
859
freest  9410
 
860
freezes 9410
 
861
funereal        9410
 
862
furnishings     9410
 
863
furthermore     9410
 
864
gadfly  9410
 
865
gainful 9410
 
866
galling 9410
 
867
garage  9410
853
868
gentleman       9410
854
869
gifted  9410
855
 
Shanghais       9410
856
 
sportswriting   9410
857
 
sloping 9410
858
 
navies  9410
859
 
leaflet 9410
860
 
shooter 9410
861
 
Joplin  9410
862
 
babies  9410
863
 
assails 9410
864
 
admiring        9410
865
 
swaying 9410
866
 
Goldstine       9410
867
 
fitting 9410
868
 
Norwalk 9410
869
 
analogy 9410
870
 
deludes 9410
871
 
cokes   9410
872
 
Clayton 9410
873
 
exhausts        9410
874
 
causality       9410
875
 
sating  9410
 
870
gleaning        9410
 
871
glut    9410
 
872
goblins 9410
 
873
governing       9410
 
874
gradually       9410
 
875
grazing 9410
 
876
gritty  9410
 
877
groupings       9410
 
878
guides  9410
 
879
guitars 9410
 
880
handgun 9410
 
881
handy   9410
 
882
heiress 9410
 
883
hoarder 9410
 
884
honoring        9410
 
885
hostess 9410
 
886
humanness       9410
 
887
humiliation     9410
 
888
humility        9410
 
889
hushes  9410
 
890
husky   9410
 
891
hypothesizer    9410
876
892
icon    9410
877
 
throttles       9410
878
 
communicants    9410
879
 
dehydrate       9410
880
 
priceless       9410
881
 
publicly        9410
 
893
ideas   9410
 
894
impelling       9410
 
895
impending       9410
 
896
imperial        9410
 
897
imperiously     9410
 
898
imprint 9410
 
899
impulsive       9410
 
900
inaccuracy      9410
 
901
inch    9410
882
902
incidentals     9410
883
 
commonplace     9410
 
903
incorrectly     9410
 
904
incurring       9410
 
905
index   9410
 
906
indulge 9410
 
907
indulgences     9410
 
908
ineffective     9410
 
909
infallibly      9410
 
910
infest  9410
 
911
inform  9410
 
912
inmate  9410
 
913
insolence       9410
 
914
instruments     9410
 
915
intelligibility 9410
 
916
intentness      9410
 
917
intercepted     9410
 
918
interdependent  9410
 
919
interrelationships      9410
 
920
interrogate     9410
 
921
investigations  9410
 
922
irresponsibly   9410
 
923
jarring 9410
 
924
journalizing    9410
 
925
juveniles       9410
 
926
kanji   9410
 
927
kingdom 9410
 
928
kiting  9410
 
929
labeled 9410
 
930
languages       9410
 
931
laterally       9410
 
932
lawgiver        9410
 
933
leaflet 9410
 
934
leavings        9410
 
935
lectured        9410
 
936
leftover        9410
 
937
lewdly  9410
 
938
lied    9410
 
939
linear  9410
 
940
lists   9410
 
941
lithograph      9410
 
942
lore    9410
 
943
luckily 9410
 
944
males   9410
 
945
marginal        9410
 
946
mastering       9410
 
947
mayoral 9410
 
948
meanwhile       9410
 
949
measures        9410
 
950
measures        9410
 
951
mechanizing     9410
 
952
medical 9410
 
953
meditation      9410
 
954
metaphysically  9410
 
955
mineral 9410
 
956
miniaturizes    9410
 
957
minima  9410
 
958
minion  9410
 
959
minting 9410
 
960
misted  9410
 
961
misunderstander 9410
 
962
mixture 9410
 
963
motors  9410
 
964
mournfulness    9410
 
965
multilayer      9410
884
966
mumbles 9410
885
 
furthermore     9410
886
 
cautioned       9410
 
967
mushrooms       9410
 
968
mystic  9410
 
969
navies  9410
 
970
navigate        9410
 
971
neat    9410
 
972
neonatal        9410
 
973
nested  9410
 
974
noncritical     9410
 
975
normalizes      9410
 
976
obliterates     9410
 
977
offload 9410
 
978
opaquely        9410
 
979
organizer       9410
 
980
overestimating  9410
 
981
overlay 9410
887
982
parametrized    9410
 
983
parenthood      9410
 
984
parters 9410
 
985
participated    9410
 
986
partridges      9410
 
987
peacock 9410
 
988
peeked  9410
 
989
pellagra        9410
 
990
percentage      9410
 
991
percentage      9410
 
992
persist 9410
 
993
perturb 9410
 
994
pessimist       9410
 
995
pests   9410
 
996
petted  9410
 
997
pictures        9410
 
998
pithed  9410
 
999
pityingly       9410
 
1000
poison  9410
 
1001
posed   9410
 
1002
positioning     9410
 
1003
postulation     9410
 
1004
praised 9410
 
1005
precaution      9410
 
1006
precipitable    9410
 
1007
preclude        9410
 
1008
presentation    9410
 
1009
pressure        9410
 
1010
previewing      9410
 
1011
priceless       9410
 
1012
primary 9410
 
1013
psychic 9410
 
1014
publicly        9410
 
1015
puddings        9410
 
1016
quagmire        9410
 
1017
quitter 9410
 
1018
railway 9410
 
1019
raining 9410
 
1020
rains   9410
 
1021
ravines 9410
 
1022
readable        9410
 
1023
realized        9410
 
1024
realtor 9410
 
1025
reassigned      9410
 
1026
recruited       9410
 
1027
reduce  9410
 
1028
regimented      9410
888
1029
registration    9410
 
1030
relatively      9410
 
1031
relaxing        9410
 
1032
relishing       9410
 
1033
relives 9410
 
1034
renew   9410
 
1035
repelled        9410
 
1036
repetitions     9410
 
1037
reporters       9410
 
1038
reporters       9410
 
1039
repressions     9410
 
1040
resplendent     9410
 
1041
resumes 9410
 
1042
rifles  9410
 
1043
rightful        9410
 
1044
rightfully      9410
 
1045
rightfulness    9410
 
1046
ripeness        9410
 
1047
riser   9410
 
1048
roped   9410
 
1049
rudeness        9410
 
1050
rules   9410
 
1051
rural   9410
 
1052
rusting 9410
889
1053
sadly   9410
890
 
positioning     9410
891
 
babysitting     9410
892
 
eternal 9410
893
 
hoarder 9410
894
 
congregates     9410
895
 
rains   9410
896
 
workers 9410
897
1054
sags    9410
898
 
unplug  9410
899
 
garage  9410
900
 
boulder 9410
901
 
specifics       9410
902
 
Teresa  9410
903
 
Winsett 9410
904
 
convenient      9410
905
 
buckboards      9410
906
 
amenities       9410
907
 
resplendent     9410
908
 
sews    9410
909
 
participated    9410
910
 
Simon   9410
911
 
certificates    9410
912
 
Fitzpatrick     9410
913
 
Evanston        9410
914
 
misted  9410
915
 
textures        9410
 
1055
sanding 9410
 
1056
saplings        9410
 
1057
sating  9410
916
1058
save    9410
917
 
count   9410
918
 
rightful        9410
919
 
chaperone       9410
920
 
Lizzy   9410
921
 
clenched        9410
922
 
effortlessly    9410
923
 
accessed        9410
924
 
beaters 9410
925
 
Hornblower      9410
926
 
vests   9410
927
 
indulgences     9410
928
 
infallibly      9410
929
 
unwilling       9410
930
 
excrete 9410
931
 
spools  9410
932
 
crunches        9410
933
 
overestimating  9410
934
 
ineffective     9410
935
 
humiliation     9410
936
 
sophomore       9410
937
 
star    9410
938
 
rifles  9410
939
 
dialysis        9410
940
 
arriving        9410
941
 
indulge 9410
942
 
clockers        9410
943
 
languages       9410
944
 
Antarctica      9410
945
 
percentage      9410
946
 
ceiling 9410
947
 
specification   9410
948
 
regimented      9410
949
 
ciphers 9410
950
 
pictures        9410
 
1059
sawtooth        9410
 
1060
scarf   9410
 
1061
scatterbrain    9410
 
1062
scheduling      9410
 
1063
schemer 9410
 
1064
scholastics     9410
 
1065
scornfully      9410
 
1066
secures 9410
 
1067
securing        9410
 
1068
seminaries      9410
 
1069
serializations  9410
951
1070
serpents        9410
952
 
allot   9410
953
 
realized        9410
954
 
mayoral 9410
955
 
opaquely        9410
956
 
hostess 9410
957
 
fiftieth        9410
958
 
incorrectly     9410
959
 
decomposition   9410
960
 
stranglings     9410
961
 
mixture 9410
962
 
electroencephalography  9410
 
1071
serving 9410
 
1072
severely        9410
 
1073
sews    9410
 
1074
shapelessly     9410
 
1075
shipyard        9410
 
1076
shooter 9410
963
1077
similarities    9410
964
 
charges 9410
965
 
freest  9410
966
 
Greenberg       9410
967
 
tinting 9410
968
 
expelled        9410
969
 
warm    9410
 
1078
skulking        9410
 
1079
slaughter       9410
 
1080
sloping 9410
970
1081
smoothed        9410
971
 
deductions      9410
972
 
Romano  9410
973
 
bitterroot      9410
974
 
corset  9410
975
 
securing        9410
976
 
environing      9410
977
 
cute    9410
978
 
Crays   9410
979
 
heiress 9410
980
 
inform  9410
981
 
avenge  9410
982
 
universals      9410
983
 
Kinsey  9410
984
 
ravines 9410
985
 
bestseller      9410
986
 
equilibrium     9410
987
 
extents 9410
988
 
relatively      9410
989
 
pressure        9410
990
 
critiques       9410
991
 
befouled        9410
992
 
rightfully      9410
993
 
mechanizing     9410
994
 
Latinizes       9410
995
 
timesharing     9410
996
 
Aden    9410
997
 
embassies       9410
998
 
males   9410
999
 
shapelessly     9410
1000
 
mastering       9410
1001
 
Newtonian       9410
1002
 
finishers       9410
1003
 
abates  9410
1004
 
teem    9410
1005
 
kiting  9410
 
1082
snatching       9410
 
1083
socializes      9410
 
1084
sophomore       9410
 
1085
sorters 9410
 
1086
spatial 9410
 
1087
specification   9410
 
1088
specifics       9410
 
1089
spongers        9410
 
1090
spools  9410
 
1091
sportswriting   9410
 
1092
sporty  9410
 
1093
squabbled       9410
 
1094
squeaking       9410
 
1095
squeezes        9410
 
1096
stabilizes      9410
 
1097
stairway        9410
 
1098
standardizes    9410
 
1099
star    9410
 
1100
starlet 9410
 
1101
stated  9410
 
1102
stint   9410
1006
1103
stodgy  9410
1007
 
feed    9410
1008
 
guitars 9410
1009
 
airships        9410
1010
1104
store   9410
1011
 
denounces       9410
1012
 
Pyle    9410
1013
 
Saxony  9410
1014
 
serializations  9410
1015
 
Peruvian        9410
 
1105
straight        9410
 
1106
stranglings     9410
 
1107
subdirectory    9410
 
1108
subjective      9410
 
1109
subschema       9410
 
1110
succumbed       9410
 
1111
suites  9410
 
1112
sumac   9410
 
1113
sureties        9410
 
1114
swaying 9410
 
1115
sweetish        9410
 
1116
swelling        9410
 
1117
syndicate       9410
1016
1118
taxonomically   9410
1017
 
kingdom 9410
1018
 
stint   9410
1019
 
Sault   9410
1020
 
faithful        9410
1021
 
Ganymede        9410
 
1119
techniques      9410
 
1120
teem    9410
 
1121
teethe  9410
 
1122
tempering       9410
 
1123
terminal        9410
 
1124
terminator      9410
 
1125
terminators     9410
 
1126
test    9410
 
1127
testicle        9410
 
1128
textures        9410
 
1129
theorizers      9410
 
1130
throttles       9410
1022
1131
tidiness        9410
1023
 
gainful 9410
1024
 
contrary        9410
1025
 
Tipperary       9410
 
1132
timesharing     9410
 
1133
tinily  9410
 
1134
tinting 9410
 
1135
title   9410
 
1136
tragedies       9410
 
1137
traitor 9410
 
1138
trimmings       9410
1026
1139
tropics 9410
1027
 
theorizers      9410
1028
 
renew   9410
1029
 
already 9410
1030
 
terminal        9410
1031
 
Hegelian        9410
1032
 
hypothesizer    9410
 
1140
unaffected      9410
 
1141
uncovering      9410
 
1142
undoes  9410
 
1143
ungrateful      9410
 
1144
universals      9410
 
1145
unplug  9410
 
1146
unruly  9410
 
1147
untying 9410
 
1148
unwilling       9410
 
1149
vacuuming       9410
 
1150
validate        9410
 
1151
vanish  9410
 
1152
ventilate       9410
 
1153
veranda 9410
 
1154
vests   9410
 
1155
wallet  9410
 
1156
waltz   9410
 
1157
warm    9410
1033
1158
warningly       9410
1034
 
journalizing    9410
1035
 
nested  9410
1036
 
Lars    9410
1037
 
saplings        9410
1038
 
foothill        9410
1039
 
labeled 9410
1040
 
imperiously     9410
1041
 
reporters       9410
1042
 
furnishings     9410
1043
 
precipitable    9410
1044
 
discounts       9410
1045
 
excises 9410
1046
 
Stalin  9410
1047
 
despot  9410
1048
 
ripeness        9410
1049
 
Arabia  9410
1050
 
unruly  9410
1051
 
mournfulness    9410
1052
 
boom    9410
1053
 
slaughter       9410
1054
 
Sabine  9410
1055
 
handy   9410
1056
 
rural   9410
1057
 
organizer       9410
1058
 
shipyard        9410
1059
 
civics  9410
1060
 
inaccuracy      9410
1061
 
rules   9410
1062
 
juveniles       9410
1063
 
comprised       9410
1064
 
investigations  9410
1065
 
stabilizes      9410
1066
 
seminaries      9410
1067
 
Hunter  9410
1068
 
sporty  9410
1069
 
test    9410
 
1159
watering        9410
1070
1160
weasels 9410
1071
 
CERN    9410
1072
 
tempering       9410
1073
 
afore   9410
1074
 
Galatean        9410
1075
 
techniques      9410
1076
 
error   9410
1077
 
veranda 9410
1078
 
severely        9410
1079
 
Cassites        9410
1080
 
forthcoming     9410
1081
 
guides  9410
1082
 
vanish  9410
1083
 
lied    9410
1084
 
sawtooth        9410
1085
 
fated   9410
1086
 
gradually       9410
 
1161
western 9410
 
1162
whiteners       9410
1087
1163
widens  9410
1088
 
preclude        9410
1089
 
evenhandedly    9410
1090
 
percentage      9410
1091
 
disobedience    9410
1092
 
humility        9410
1093
 
gleaning        9410
1094
 
petted  9410
1095
 
bloater 9410
1096
 
minion  9410
1097
 
marginal        9410
1098
 
apiary  9410
1099
 
measures        9410
1100
 
precaution      9410
1101
 
repelled        9410
1102
 
primary 9410
1103
 
coverings       9410
1104
 
Artemia 9410
1105
 
navigate        9410
1106
 
spatial 9410
1107
 
Gurkha  9410
1108
 
meanwhile       9410
1109
 
Melinda 9410
1110
 
Butterfield     9410
1111
 
Aldrich 9410
1112
 
previewing      9410
1113
 
glut    9410
1114
 
unaffected      9410
1115
 
inmate  9410
1116
 
mineral 9410
1117
 
impending       9410
1118
 
meditation      9410
1119
 
ideas   9410
1120
 
miniaturizes    9410
1121
 
lewdly  9410
1122
 
title   9410
 
1164
witchcraft      9410
 
1165
workers 9410
 
1166
yelped  9410
1123
1167
youthfulness    9410
1124
 
creak   9410
1125
 
Chippewa        9410
1126
 
clamored        9410
1127
 
freezes 9410
1128
 
forgivably      9410
1129
 
reduce  9410
1130
 
McGovern        9410
1131
 
Nazis   9410
1132
 
epistle 9410
1133
 
socializes      9410
1134
 
conceptions     9410
1135
 
Kevin   9410
1136
 
uncovering      9410
1137
 
chews   9410
1138
 
appendixes      9410
1139
 
raining 9410
1140
 
infest  9410
1141
 
compartment     9410
1142
 
minting 9410
1143
 
ducks   9410
1144
 
roped   9410
1145
 
waltz   9410
1146
 
Lillian 9410
1147
 
repressions     9410
1148
 
chillingly      9410
1149
 
noncritical     9410
1150
 
lithograph      9410
1151
 
spongers        9410
1152
 
parenthood      9410
1153
 
posed   9410
1154
 
instruments     9410
1155
 
filial  9410
1156
 
fixedly 9410
1157
 
relives 9410
1158
 
Pandora 9410
1159
 
watering        9410
1160
 
ungrateful      9410
1161
 
secures 9410
1162
 
poison  9410
1163
 
dusted  9410
1164
 
encompasses     9410
1165
 
presentation    9410
1166
 
Kantian 9410
1167
 
appendixes      9410
1168
 
appendixes      9410
1169
 
appendixes      9410
1170
 
appendixes      9410
1171
 
appendixes      9410
1172
1168
select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price;
1173
1169
fld3    period  price   price2
1174
1170
admonishing     1002    28357832        8723648
1237
1233
18801   inch    1001    5987435 234724
1238
1234
18811   repetitions     1001    5987435 234724
1239
1235
create table t4 (
1240
 
companynr tinyint unsigned NOT NULL default '0',
 
1236
companynr int NOT NULL default '0',
1241
1237
companyname char(30) NOT NULL default '',
1242
1238
PRIMARY KEY (companynr),
1243
1239
UNIQUE KEY companyname(companyname)
1941
1937
show full columns from t2;
1942
1938
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
1943
1939
auto    int     NULL    NO      PRI     NULL    auto_increment  #       
1944
 
fld1    int unsigned    NULL    NO      UNI     NULL            #       
1945
 
companynr       tinyint(3) unsigned     NULL    NO              NULL            #       
 
1940
fld1    int     NULL    NO      UNI     NULL            #       
 
1941
companynr       int     NULL    NO              NULL            #       
1946
1942
fld3    varchar(30)     utf8_general_ci NO      MUL     NULL            #       
1947
1943
fld4    varchar(35)     utf8_general_ci NO              NULL            #       
1948
1944
fld5    varchar(35)     utf8_general_ci NO              NULL            #       
1949
1945
fld6    varchar(4)      utf8_general_ci NO              NULL            #       
1950
1946
show full columns from t2 from test like 'f%';
1951
1947
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
1952
 
fld1    int unsigned    NULL    NO      UNI     NULL            #       
 
1948
fld1    int     NULL    NO      UNI     NULL            #       
1953
1949
fld3    varchar(30)     utf8_general_ci NO      MUL     NULL            #       
1954
1950
fld4    varchar(35)     utf8_general_ci NO              NULL            #       
1955
1951
fld5    varchar(35)     utf8_general_ci NO              NULL            #       
1958
1954
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
1959
1955
drop table t4, t3, t2, t1;
1960
1956
CREATE TABLE t1 (
1961
 
id bigint unsigned NOT NULL auto_increment,
 
1957
id bigint NOT NULL auto_increment,
1962
1958
pseudo varchar(35) NOT NULL default '',
1963
1959
PRIMARY KEY  (id),
1964
1960
UNIQUE KEY pseudo (pseudo)
1968
1964
SELECT 1 as rnd1 from t1 where rand() > 2;
1969
1965
rnd1
1970
1966
DROP TABLE t1;
1971
 
CREATE TABLE t1 (gvid int unsigned default NULL,  hmid int unsigned default NULL,  volid int unsigned default NULL,  mmid int unsigned default NULL,  hdid int unsigned default NULL,  fsid int unsigned default NULL,  ctid int unsigned default NULL,  dtid int unsigned default NULL,  cost int unsigned default NULL,  performance int unsigned default NULL,  serialnumber bigint unsigned default NULL,  monitored tinyint unsigned default '1',  removed tinyint unsigned default '0',  target tinyint unsigned default '0',  dt_modified timestamp NOT NULL,  name varchar(255) binary default NULL,  description varchar(255) default NULL,  UNIQUE KEY hmid (hmid,volid)) ENGINE=MyISAM;
 
1967
CREATE TABLE t1 (gvid int default NULL,  hmid int default NULL,  volid int default NULL,  mmid int default NULL,  hdid int default NULL,  fsid int default NULL,  ctid int default NULL,  dtid int default NULL,  cost int default NULL,  performance int default NULL,  serialnumber bigint default NULL,  monitored int default '1',  removed int default '0',  target int default '0',  dt_modified timestamp NOT NULL,  name varchar(255) binary default NULL,  description varchar(255) default NULL,  UNIQUE KEY hmid (hmid,volid)) ENGINE=MyISAM;
1972
1968
INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL);
1973
 
CREATE TABLE t2 (  hmid int unsigned default NULL,  volid int unsigned default NULL,  sampletid smallint unsigned default NULL,  sampletime datetime default NULL,  samplevalue bigint unsigned default NULL,  KEY idx1 (hmid,volid,sampletid,sampletime)) ENGINE=MyISAM;
 
1969
CREATE TABLE t2 (  hmid int default NULL,  volid int default NULL,  sampletid int default NULL,  sampletime datetime default NULL,  samplevalue bigint default NULL,  KEY idx1 (hmid,volid,sampletid,sampletime)) ENGINE=MyISAM;
1974
1970
INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12:00:01',35);
1975
1971
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
1976
1972
gvid    the_success     the_fail        the_size        the_time
2270
2266
city
2271
2267
London
2272
2268
DROP TABLE t1;
2273
 
create table t1 (a int unsigned, b int unsigned);
 
2269
create table t1 (a int, b int);
2274
2270
insert into t1 values (1,0), (1,1), (1,2);
2275
2271
select a-b  from t1 order by 1;
2276
2272
a-b  
2286
2282
d       (a-b >= 0)      b
2287
2283
1       1       0
2288
2284
0       1       1
2289
 
select cast((a - b) as unsigned) from t1 order by 1;
2290
 
cast((a - b) as unsigned)
 
2285
select a - b from t1 order by 1;
 
2286
a - b 
 
2287
-1
2291
2288
0
2292
2289
1
2293
 
18446744073709551615
2294
2290
drop table t1;
2295
2291
create table t1 (a int);
2296
2292
select all all * from t1;
2303
2299
ERROR HY000: Incorrect usage of ALL and DISTINCT
2304
2300
drop table t1;
2305
2301
CREATE TABLE t1 (
2306
 
kunde_intern_id int unsigned NOT NULL default '0',
2307
 
kunde_id int unsigned NOT NULL default '0',
2308
 
FK_firma_id int unsigned NOT NULL default '0',
 
2302
kunde_intern_id int NOT NULL default '0',
 
2303
kunde_id int NOT NULL default '0',
 
2304
FK_firma_id int NOT NULL default '0',
2309
2305
aktuell enum('Ja','Nein') NOT NULL default 'Ja',
2310
2306
vorname varchar(128) NOT NULL default '',
2311
2307
nachname varchar(128) NOT NULL default '',
2356
2352
COUNT(*)
2357
2353
0
2358
2354
drop table t1;
2359
 
CREATE TABLE t1 (b BIGINT UNSIGNED NOT NULL, PRIMARY KEY (b));
2360
 
INSERT INTO t1 VALUES (0x8000000000000000);
2361
 
SELECT b FROM t1 WHERE b=0x8000000000000000;
 
2355
CREATE TABLE t1 (b BIGINT NOT NULL, PRIMARY KEY (b));
 
2356
INSERT INTO t1 VALUES (0x4000000000000000);
 
2357
SELECT b FROM t1 WHERE b=0x4000000000000000;
2362
2358
b
2363
 
9223372036854775808
 
2359
4611686018427387904
2364
2360
DROP TABLE t1;
2365
2361
CREATE TABLE `t1` ( `gid` int default NULL, `uid` int default NULL);
2366
2362
CREATE TABLE `t2` ( `ident` int default NULL, `level` char(16) default NULL);
2373
2369
drop table t1,t2,t3;
2374
2370
CREATE TABLE t1 (
2375
2371
acct_id int NOT NULL default '0',
2376
 
profile_id smallint default NULL,
 
2372
profile_id int default NULL,
2377
2373
UNIQUE KEY t1$acct_id (acct_id),
2378
2374
KEY t1$profile_id (profile_id)
2379
2375
);
2380
2376
INSERT INTO t1 VALUES (132,17),(133,18);
2381
2377
CREATE TABLE t2 (
2382
 
profile_id smallint default NULL,
 
2378
profile_id int default NULL,
2383
2379
queue_id int default NULL,
2384
2380
seq int default NULL,
2385
2381
KEY t2$queue_id (queue_id)
2391
2387
seq int default NULL,
2392
2388
warn_lvl int default NULL,
2393
2389
crit_lvl int default NULL,
2394
 
rr1 tinyint NOT NULL default '0',
 
2390
rr1 int NOT NULL default '0',
2395
2391
rr2 int default NULL,
2396
 
default_queue tinyint NOT NULL default '0',
 
2392
default_queue int NOT NULL default '0',
2397
2393
KEY t3$qtype (qtype),
2398
2394
KEY t3$id (id)
2399
2395
);
2417
2413
1
2418
2414
NULL
2419
2415
drop table t1,t2;
2420
 
create table t2 (a tinyint unsigned);
 
2416
create table t2 (a int);
2421
2417
create index t2i on t2(a);
2422
2418
insert into t2 values (0), (254), (255);
2423
2419
select * from t2 where a > -1;
2584
2580
min(key1)
2585
2581
0.3762
2586
2582
DROP TABLE t1,t2;
2587
 
CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
 
2583
CREATE TABLE t1 (i BIGINT NOT NULL);
2588
2584
INSERT INTO t1 VALUES (10);
2589
2585
SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
2590
2586
i='1e+01'       i=1e+01 i in (1e+01,1e+01)      i in ('1e+01','1e+01')
2723
2719
a
2724
2720
b
2725
2721
drop table t1, t2;
2726
 
CREATE TABLE t1 (`id` TINYINT);
2727
 
CREATE TABLE t2 (`id` TINYINT);
2728
 
CREATE TABLE t3 (`id` TINYINT);
 
2722
CREATE TABLE t1 (`id` int);
 
2723
CREATE TABLE t2 (`id` int);
 
2724
CREATE TABLE t3 (`id` int);
2729
2725
INSERT INTO t1 VALUES (1),(2),(3);
2730
2726
INSERT INTO t2 VALUES (2);
2731
2727
INSERT INTO t3 VALUES (3);
2987
2983
1       SIMPLE  t2      ref     c       c       5       test.t1.a       1       
2988
2984
DROP TABLE t1, t2;
2989
2985
create table t1 (
2990
 
a int unsigned    not null auto_increment primary key,
2991
 
b bit             not null,
2992
 
c bit             not null
 
2986
a int    not null auto_increment primary key,
 
2987
b int             not null,
 
2988
c int             not null
2993
2989
);
2994
2990
create table t2 (
2995
 
a int unsigned    not null auto_increment primary key,
2996
 
b bit             not null,
2997
 
c int unsigned    not null,
 
2991
a int    not null auto_increment primary key,
 
2992
b int             not null,
 
2993
c int    not null,
2998
2994
d varchar(50)
2999
2995
);
3000
2996
insert into t1 (b,c) values (0,1), (0,1);
3108
3104
t3.a=t2.a AND t3.c IN ('bb','ee');
3109
3105
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3110
3106
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   1       
3111
 
1       SIMPLE  t2      range   si      si      5       NULL    4       Using index condition; Using MRR
 
3107
1       SIMPLE  t2      range   si      si      5       NULL    4       Using where; Using MRR
3112
3108
1       SIMPLE  t3      eq_ref  PRIMARY,ci      PRIMARY 4       test.t2.a       1       Using where
3113
3109
EXPLAIN
3114
3110
SELECT t3.a FROM t1,t2,t3
3124
3120
t3.c IN ('bb','ee');
3125
3121
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3126
3122
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   1       
3127
 
1       SIMPLE  t2      range   si      si      5       NULL    2       Using index condition; Using MRR
 
3123
1       SIMPLE  t2      range   si      si      5       NULL    2       Using where; Using MRR
3128
3124
1       SIMPLE  t3      eq_ref  PRIMARY,ci      PRIMARY 4       test.t2.a       1       Using where
3129
3125
EXPLAIN 
3130
3126
SELECT t3.a FROM t1,t2,t3
3132
3128
t3.c IN ('bb','ee');
3133
3129
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3134
3130
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   1       
3135
 
1       SIMPLE  t2      range   si,ai   si      5       NULL    2       Using index condition; Using MRR
 
3131
1       SIMPLE  t2      range   si,ai   si      5       NULL    2       Using where; Using MRR
3136
3132
1       SIMPLE  t3      eq_ref  PRIMARY,ci      PRIMARY 4       test.t2.a       1       Using where
3137
3133
DROP TABLE t1,t2,t3;
3138
3134
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
3206
3202
EXPLAIN SELECT * FROM t1
3207
3203
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null=3 ;
3208
3204
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3209
 
1       SIMPLE  t1      index_merge     idx1,idx2       idx2,idx1       4,10    NULL    1       Using intersect(idx2,idx1); Using where; Using index
 
3205
1       SIMPLE  t1      index_merge     idx1,idx2       idx2,idx1       4,10    NULL    #       Using intersect(idx2,idx1); Using where; Using index
3210
3206
EXPLAIN SELECT * FROM t1
3211
3207
WHERE ID_better=1 AND ID1_with_null=3 AND ID2_with_null=3 IS NULL ;
3212
3208
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3213
 
1       SIMPLE  t1      ref     idx1,idx2       idx2    4       const   2       Using where
 
3209
1       SIMPLE  t1      ref     idx1,idx2       idx2    4       const   #       Using where
3214
3210
EXPLAIN SELECT * FROM t1
3215
3211
WHERE ID_better=1 AND ID1_with_null IS NULL AND ID2_with_null IS NULL;
3216
3212
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3217
 
1       SIMPLE  t1      ref     idx1,idx2       idx2    4       const   2       Using where
 
3213
1       SIMPLE  t1      ref     idx1,idx2       idx2    4       const   #       Using where
3218
3214
DROP INDEX idx1 ON t1;
3219
3215
CREATE UNIQUE INDEX idx1 ON t1(ID1_with_null,ID2_with_null);
3220
3216
EXPLAIN SELECT * FROM t1
3252
3248
AND t1.ts BETWEEN "2006-01-01" AND "2006-12-31";
3253
3249
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3254
3250
1       SIMPLE  t2      const   PRIMARY PRIMARY 4       const   1       
3255
 
1       SIMPLE  t1      range   ts      ts      4       NULL    1       Using index condition; Using where; Using MRR
 
3251
1       SIMPLE  t1      range   ts      ts      4       NULL    1       Using where; Using MRR
3256
3252
Warnings:
3257
3253
Warning 1292    Incorrect datetime value: '2999-12-31 00:00:00' for column 'ts' at row 1
3258
3254
SELECT * FROM t1 LEFT JOIN t2 ON (t1.a=t2.a) WHERE t1.a=30
3263
3259
Warnings:
3264
3260
Warning 1292    Incorrect datetime value: '2999-12-31 00:00:00' for column 'ts' at row 1
3265
3261
DROP TABLE t1,t2;
3266
 
create table t1 (a bigint unsigned);
 
3262
create table t1 (a bigint);
3267
3263
insert into t1 values
3268
 
(if(1, 9223372036854775808, 1)),
3269
 
(case when 1 then 9223372036854775808 else 1 end),
3270
 
(coalesce(9223372036854775808, 1));
 
3264
(if(1, 92233720368547758, 1)),
 
3265
(case when 1 then 92233720368547758 else 1 end),
 
3266
(coalesce(92233720368547758, 1));
3271
3267
select * from t1;
3272
3268
a
3273
 
9223372036854775808
3274
 
9223372036854775808
3275
 
9223372036854775808
 
3269
92233720368547758
 
3270
92233720368547758
 
3271
92233720368547758
3276
3272
drop table t1;
3277
3273
create table t1 select
3278
3274
if(1, 9223372036854775808, 1) i,
3287
3283
) ENGINE=InnoDB
3288
3284
drop table t1;
3289
3285
select 
3290
 
if(1, cast(1111111111111111111 as unsigned), 1) i,
3291
 
case when 1 then cast(1111111111111111111 as unsigned) else 1 end c,
3292
 
coalesce(cast(1111111111111111111 as unsigned), 1) co;
 
3286
if(1, 1111111111111111111, 1) i,
 
3287
case when 1 then 1111111111111111111 else 1 end c,
 
3288
coalesce(1111111111111111111, 1) co;
3293
3289
i       c       co
3294
3290
1111111111111111111     1111111111111111111     1111111111111111111
3295
3291
CREATE TABLE t1 (name varchar(255));
3576
3572
1
3577
3573
Warnings:
3578
3574
Warning 1466    Leading spaces are removed from name ' x'
3579
 
CREATE TABLE t1 (c11 INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY);
3580
 
CREATE TABLE t2 (c21 INT UNSIGNED NOT NULL, 
 
3575
CREATE TABLE t1 (c11 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
 
3576
CREATE TABLE t2 (c21 INT NOT NULL, 
3581
3577
c22 INT DEFAULT NULL, 
3582
3578
KEY(c21, c22));
3583
 
CREATE TABLE t3 (c31 INT UNSIGNED NOT NULL DEFAULT 0, 
 
3579
CREATE TABLE t3 (c31 INT NOT NULL DEFAULT 0, 
3584
3580
c32 INT DEFAULT NULL, 
3585
3581
c33 INT NOT NULL, 
3586
 
c34 INT UNSIGNED DEFAULT 0,
 
3582
c34 INT DEFAULT 0,
3587
3583
KEY (c33, c34, c32));
3588
3584
INSERT INTO t1 values (),(),(),(),();
3589
3585
INSERT INTO t2 SELECT a.c11, b.c11 FROM t1 a, t1 b;