481
select _latin1'1'=_latin2'1';
482
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation '='
483
select row('a','b','c') = row('a','b','c');
484
row('a','b','c') = row('a','b','c')
486
select row('A','b','c') = row('a','b','c');
487
row('A','b','c') = row('a','b','c')
489
select row('A' COLLATE latin1_bin,'b','c') = row('a','b','c');
490
row('A' COLLATE latin1_bin,'b','c') = row('a','b','c')
492
select row('A','b','c') = row('a' COLLATE latin1_bin,'b','c');
493
row('A','b','c') = row('a' COLLATE latin1_bin,'b','c')
495
select row('A' COLLATE latin1_general_ci,'b','c') = row('a' COLLATE latin1_bin,'b','c');
496
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation '='
497
select concat(_latin1'a',_latin2'a');
498
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat'
499
select concat(_latin1'a',_latin2'a',_latin5'a');
500
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin5_turkish_ci,COERCIBLE) for operation 'concat'
501
select concat(_latin1'a',_latin2'a',_latin5'a',_latin7'a');
502
ERROR HY000: Illegal mix of collations for operation 'concat'
503
select concat_ws(_latin1'a',_latin2'a');
504
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'concat_ws'
505
select FIELD('b','A','B');
508
select FIELD('B','A','B');
511
select FIELD('b' COLLATE latin1_bin,'A','B');
512
FIELD('b' COLLATE latin1_bin,'A','B')
514
select FIELD('b','A' COLLATE latin1_bin,'B');
515
FIELD('b','A' COLLATE latin1_bin,'B')
517
select FIELD(_latin2'b','A','B');
518
ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'field'
519
select FIELD('b',_latin2'A','B');
520
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'field'
521
select FIELD('1',_latin2'3','2',1);
522
FIELD('1',_latin2'3','2',1)
524
select POSITION(_latin1'B' IN _latin1'abcd');
525
POSITION(_latin1'B' IN _latin1'abcd')
527
select POSITION(_latin1'B' IN _latin1'abcd' COLLATE latin1_bin);
528
POSITION(_latin1'B' IN _latin1'abcd' COLLATE latin1_bin)
530
select POSITION(_latin1'B' COLLATE latin1_bin IN _latin1'abcd');
531
POSITION(_latin1'B' COLLATE latin1_bin IN _latin1'abcd')
533
select POSITION(_latin1'B' COLLATE latin1_general_ci IN _latin1'abcd' COLLATE latin1_bin);
534
ERROR HY000: Illegal mix of collations (latin1_bin,EXPLICIT) and (latin1_general_ci,EXPLICIT) for operation 'locate'
535
select POSITION(_latin1'B' IN _latin2'abcd');
536
ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation 'locate'
537
select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d');
538
FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')
540
select FIND_IN_SET(_latin1'B' COLLATE latin1_general_ci,_latin1'a,b,c,d' COLLATE latin1_bin);
541
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'find_in_set'
542
select FIND_IN_SET(_latin1'B',_latin2'a,b,c,d');
543
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'find_in_set'
544
select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2);
545
SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2)
547
select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2);
548
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'substring_index'
549
select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_general_ci,_latin1'd' COLLATE latin1_bin,2);
550
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'substring_index'
551
select _latin1'B' between _latin1'a' and _latin1'c';
552
_latin1'B' between _latin1'a' and _latin1'c'
554
select _latin1'B' collate latin1_bin between _latin1'a' and _latin1'c';
555
_latin1'B' collate latin1_bin between _latin1'a' and _latin1'c'
557
select _latin1'B' between _latin1'a' collate latin1_bin and _latin1'c';
558
_latin1'B' between _latin1'a' collate latin1_bin and _latin1'c'
560
select _latin1'B' between _latin1'a' and _latin1'c' collate latin1_bin;
561
_latin1'B' between _latin1'a' and _latin1'c' collate latin1_bin
563
select _latin2'B' between _latin1'a' and _latin1'b';
564
ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'between'
565
select _latin1'B' between _latin2'a' and _latin1'b';
566
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'between'
567
select _latin1'B' between _latin1'a' and _latin2'b';
568
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE) for operation 'between'
569
select _latin1'B' collate latin1_general_ci between _latin1'a' collate latin1_bin and _latin1'b';
570
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_bin,EXPLICIT), (latin1_swedish_ci,COERCIBLE) for operation 'between'
571
select _latin1'B' in (_latin1'a',_latin1'b');
572
_latin1'B' in (_latin1'a',_latin1'b')
574
select _latin1'B' collate latin1_bin in (_latin1'a',_latin1'b');
575
_latin1'B' collate latin1_bin in (_latin1'a',_latin1'b')
577
select _latin1'B' in (_latin1'a' collate latin1_bin,_latin1'b');
578
_latin1'B' in (_latin1'a' collate latin1_bin,_latin1'b')
580
select _latin1'B' in (_latin1'a',_latin1'b' collate latin1_bin);
581
_latin1'B' in (_latin1'a',_latin1'b' collate latin1_bin)
583
select _latin2'B' in (_latin1'a',_latin1'b');
584
ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation ' IN '
585
select _latin1'B' in (_latin2'a',_latin1'b');
586
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation ' IN '
587
select _latin1'B' in (_latin1'a',_latin2'b');
588
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE) for operation ' IN '
589
select _latin1'B' COLLATE latin1_general_ci in (_latin1'a' COLLATE latin1_bin,_latin1'b');
590
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_bin,EXPLICIT), (latin1_swedish_ci,COERCIBLE) for operation ' IN '
591
select _latin1'B' COLLATE latin1_general_ci in (_latin1'a',_latin1'b' COLLATE latin1_bin);
592
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_swedish_ci,COERCIBLE), (latin1_bin,EXPLICIT) for operation ' IN '
593
select collation(bin(130)), coercibility(bin(130));
594
collation(bin(130)) coercibility(bin(130))
596
select collation(oct(130)), coercibility(oct(130));
597
collation(oct(130)) coercibility(oct(130))
599
select collation(conv(130,16,10)), coercibility(conv(130,16,10));
600
collation(conv(130,16,10)) coercibility(conv(130,16,10))
602
select collation(hex(130)), coercibility(hex(130));
603
collation(hex(130)) coercibility(hex(130))
605
select collation(char(130)), coercibility(hex(130));
606
collation(char(130)) coercibility(hex(130))
608
select collation(format(130,10)), coercibility(format(130,10));
609
collation(format(130,10)) coercibility(format(130,10))
611
select collation(lcase(_latin2'a')), coercibility(lcase(_latin2'a'));
612
collation(lcase(_latin2'a')) coercibility(lcase(_latin2'a'))
614
select collation(ucase(_latin2'a')), coercibility(ucase(_latin2'a'));
615
collation(ucase(_latin2'a')) coercibility(ucase(_latin2'a'))
617
select collation(left(_latin2'a',1)), coercibility(left(_latin2'a',1));
618
collation(left(_latin2'a',1)) coercibility(left(_latin2'a',1))
620
select collation(right(_latin2'a',1)), coercibility(right(_latin2'a',1));
621
collation(right(_latin2'a',1)) coercibility(right(_latin2'a',1))
623
select collation(substring(_latin2'a',1,1)), coercibility(substring(_latin2'a',1,1));
624
collation(substring(_latin2'a',1,1)) coercibility(substring(_latin2'a',1,1))
626
select collation(concat(_latin2'a',_latin2'b')), coercibility(concat(_latin2'a',_latin2'b'));
627
collation(concat(_latin2'a',_latin2'b')) coercibility(concat(_latin2'a',_latin2'b'))
629
select collation(lpad(_latin2'a',4,_latin2'b')), coercibility(lpad(_latin2'a',4,_latin2'b'));
630
collation(lpad(_latin2'a',4,_latin2'b')) coercibility(lpad(_latin2'a',4,_latin2'b'))
632
select collation(rpad(_latin2'a',4,_latin2'b')), coercibility(rpad(_latin2'a',4,_latin2'b'));
633
collation(rpad(_latin2'a',4,_latin2'b')) coercibility(rpad(_latin2'a',4,_latin2'b'))
635
select collation(concat_ws(_latin2'a',_latin2'b')), coercibility(concat_ws(_latin2'a',_latin2'b'));
636
collation(concat_ws(_latin2'a',_latin2'b')) coercibility(concat_ws(_latin2'a',_latin2'b'))
638
select collation(make_set(255,_latin2'a',_latin2'b',_latin2'c')), coercibility(make_set(255,_latin2'a',_latin2'b',_latin2'c'));
639
collation(make_set(255,_latin2'a',_latin2'b',_latin2'c')) coercibility(make_set(255,_latin2'a',_latin2'b',_latin2'c'))
641
select collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')), coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' '));
642
collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')) coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' '))
644
select collation(trim(_latin2' a ')), coercibility(trim(_latin2' a '));
645
collation(trim(_latin2' a ')) coercibility(trim(_latin2' a '))
647
select collation(ltrim(_latin2' a ')), coercibility(ltrim(_latin2' a '));
648
collation(ltrim(_latin2' a ')) coercibility(ltrim(_latin2' a '))
650
select collation(rtrim(_latin2' a ')), coercibility(rtrim(_latin2' a '));
651
collation(rtrim(_latin2' a ')) coercibility(rtrim(_latin2' a '))
653
select collation(trim(LEADING _latin2' ' FROM _latin2'a')), coercibility(trim(LEADING _latin2'a' FROM _latin2'a'));
654
collation(trim(LEADING _latin2' ' FROM _latin2'a')) coercibility(trim(LEADING _latin2'a' FROM _latin2'a'))
656
select collation(trim(TRAILING _latin2' ' FROM _latin2'a')), coercibility(trim(TRAILING _latin2'a' FROM _latin2'a'));
657
collation(trim(TRAILING _latin2' ' FROM _latin2'a')) coercibility(trim(TRAILING _latin2'a' FROM _latin2'a'))
659
select collation(trim(BOTH _latin2' ' FROM _latin2'a')), coercibility(trim(BOTH _latin2'a' FROM _latin2'a'));
660
collation(trim(BOTH _latin2' ' FROM _latin2'a')) coercibility(trim(BOTH _latin2'a' FROM _latin2'a'))
662
select collation(repeat(_latin2'a',10)), coercibility(repeat(_latin2'a',10));
663
collation(repeat(_latin2'a',10)) coercibility(repeat(_latin2'a',10))
665
select collation(reverse(_latin2'ab')), coercibility(reverse(_latin2'ab'));
666
collation(reverse(_latin2'ab')) coercibility(reverse(_latin2'ab'))
668
select collation(quote(_latin2'ab')), coercibility(quote(_latin2'ab'));
669
collation(quote(_latin2'ab')) coercibility(quote(_latin2'ab'))
671
select collation(soundex(_latin2'ab')), coercibility(soundex(_latin2'ab'));
672
collation(soundex(_latin2'ab')) coercibility(soundex(_latin2'ab'))
674
select collation(substring(_latin2'ab',1)), coercibility(substring(_latin2'ab',1));
675
collation(substring(_latin2'ab',1)) coercibility(substring(_latin2'ab',1))
677
select collation(insert(_latin2'abcd',2,3,_latin2'ef')), coercibility(insert(_latin2'abcd',2,3,_latin2'ef'));
678
collation(insert(_latin2'abcd',2,3,_latin2'ef')) coercibility(insert(_latin2'abcd',2,3,_latin2'ef'))
680
select collation(replace(_latin2'abcd',_latin2'b',_latin2'B')), coercibility(replace(_latin2'abcd',_latin2'b',_latin2'B'));
681
collation(replace(_latin2'abcd',_latin2'b',_latin2'B')) coercibility(replace(_latin2'abcd',_latin2'b',_latin2'B'))
683
select collation(encode('abcd','ab')), coercibility(encode('abcd','ab'));
684
collation(encode('abcd','ab')) coercibility(encode('abcd','ab'))
698
substring(_latin2'a',1,1),
699
concat(_latin2'a',_latin2'b'),
700
lpad(_latin2'a',4,_latin2'b'),
701
rpad(_latin2'a',4,_latin2'b'),
702
concat_ws(_latin2'a',_latin2'b'),
703
make_set(255,_latin2'a',_latin2'b',_latin2'c'),
704
export_set(255,_latin2'y',_latin2'n',_latin2' '),
708
trim(LEADING _latin2' ' FROM _latin2' a '),
709
trim(TRAILING _latin2' ' FROM _latin2' a '),
710
trim(BOTH _latin2' ' FROM _latin2' a '),
711
repeat(_latin2'a',10),
712
reverse(_latin2'ab'),
714
soundex(_latin2'ab'),
715
substring(_latin2'ab',1),
716
insert(_latin2'abcd',2,3,_latin2'ef'),
717
replace(_latin2'abcd',_latin2'b',_latin2'B'),
721
Warning 1265 Data truncated for column 'format(130,10)' at row 1
722
show create table t1;
724
t1 CREATE TABLE `t1` (
725
`bin(130)` varchar(64) DEFAULT NULL,
726
`oct(130)` varchar(64) DEFAULT NULL,
727
`conv(130,16,10)` varchar(64) DEFAULT NULL,
728
`hex(130)` varchar(6) NOT NULL DEFAULT '',
729
`char(130)` varbinary(4) NOT NULL DEFAULT '',
730
`format(130,10)` varchar(4) NOT NULL DEFAULT '',
731
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
732
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
733
`lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
734
`ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
735
`substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
736
`concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '',
737
`lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
738
`rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
739
`concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 NOT NULL DEFAULT '',
740
`make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 NOT NULL DEFAULT '',
741
`export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 NOT NULL DEFAULT '',
742
`trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
743
`ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
744
`rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
745
`trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
746
`trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
747
`trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL DEFAULT '',
748
`repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 NOT NULL DEFAULT '',
749
`reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '',
750
`quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '',
751
`soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
752
`substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 NOT NULL DEFAULT '',
753
`insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 NOT NULL DEFAULT '',
754
`replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 NOT NULL DEFAULT '',
755
`encode('abcd','ab')` varbinary(4) NOT NULL DEFAULT ''
756
) ENGINE=MyISAM DEFAULT CHARSET=latin1
758
create table t1 (a char character set latin2);
759
insert into t1 values (null);
760
select charset(a), collation(a), coercibility(a) from t1;
761
charset(a) collation(a) coercibility(a)
762
latin2 latin2_general_ci 2
764
select charset(null), collation(null), coercibility(null);
765
charset(null) collation(null) coercibility(null)
767
CREATE TABLE t1 (a int, b int);
768
CREATE TABLE t2 (a int, b int);
769
INSERT INTO t1 VALUES (1,1),(2,2);
770
INSERT INTO t2 VALUES (2,2),(3,3);
771
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
772
where collation(t2.a) = _utf8'binary' order by t1.a,t2.a;
776
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
777
where charset(t2.a) = _utf8'binary' order by t1.a,t2.a;
781
select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b)
782
where coercibility(t2.a) = 2 order by t1.a,t2.a;
787
402
select SUBSTR('abcdefg',3,2);
788
403
SUBSTR('abcdefg',3,2)
790
405
select SUBSTRING('abcdefg',3,2);
791
406
SUBSTRING('abcdefg',3,2)
793
select SUBSTR('abcdefg',-3,2) FROM DUAL;
408
select SUBSTR('abcdefg',-3,2);
794
409
SUBSTR('abcdefg',-3,2)
796
select SUBSTR('abcdefg',-1,5) FROM DUAL;
411
select SUBSTR('abcdefg',-1,5);
797
412
SUBSTR('abcdefg',-1,5)
799
select SUBSTR('abcdefg',0,0) FROM DUAL;
414
select SUBSTR('abcdefg',0,0);
800
415
SUBSTR('abcdefg',0,0)
802
select SUBSTR('abcdefg',-1,-1) FROM DUAL;
417
select SUBSTR('abcdefg',-1,-1);
803
418
SUBSTR('abcdefg',-1,-1)
805
select SUBSTR('abcdefg',1,-1) FROM DUAL;
420
select SUBSTR('abcdefg',1,-1);
806
421
SUBSTR('abcdefg',1,-1)
808
create table t7 (s1 char);
810
where concat(s1 collate latin1_general_ci,s1 collate latin1_swedish_ci) = 'AA';
811
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation 'concat'
813
423
select substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2),substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2);
814
424
substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2) substring_index("1abcd;2abcd;3abcd;4abcd", ';', -2)
815
425
1abcd;2abcd 3abcd;4abcd
816
explain extended select md5('hello');
817
id select_type table type possible_keys key key_len ref rows filtered Extra
818
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
820
Note 1003 select md5('hello') AS `md5('hello')`
821
explain extended select sha('abc');
822
id select_type table type possible_keys key key_len ref rows filtered Extra
823
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
825
Note 1003 select sha('abc') AS `sha('abc')`
826
explain extended select sha1('abc');
827
id select_type table type possible_keys key key_len ref rows filtered Extra
828
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
830
Note 1003 select sha('abc') AS `sha1('abc')`
831
explain extended select soundex('');
832
id select_type table type possible_keys key key_len ref rows filtered Extra
833
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
835
Note 1003 select soundex('') AS `soundex('')`
836
explain extended select 'mood' sounds like 'mud';
837
id select_type table type possible_keys key key_len ref rows filtered Extra
838
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
840
Note 1003 select (soundex('mood') = soundex('mud')) AS `'mood' sounds like 'mud'`
841
explain extended select aes_decrypt(aes_encrypt('abc','1'),'1');
842
id select_type table type possible_keys key key_len ref rows filtered Extra
843
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
845
Note 1003 select aes_decrypt(aes_encrypt('abc','1'),'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`
846
426
explain extended select concat('*',space(5),'*');
847
427
id select_type table type possible_keys key key_len ref rows filtered Extra
848
428
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
1387
844
SELECT * FROM t1 INNER JOIN t2 ON code=id
1388
845
WHERE id='a12' AND (LENGTH(code)=5 OR code < 'a00');
1389
846
id select_type table type possible_keys key key_len ref rows filtered Extra
1390
1 SIMPLE t2 const PRIMARY PRIMARY 12 const 1 100.00 Using index
1391
1 SIMPLE t1 ref code code 13 const 3 100.00 Using where; Using index
847
1 SIMPLE t2 const PRIMARY PRIMARY 42 const 1 100.00 Using index
848
1 SIMPLE t1 ref code code 43 const 2 100.00 Using where; Using index
1393
Note 1003 select `test`.`t1`.`code` AS `code`,'a12' AS `id` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`code` = 'a12') and (length(`test`.`t1`.`code`) = 5))
850
Note 1003 select `test`.`t1`.`code` AS `code`,'a12' AS `id` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`code` = 'a12') and <cache>(('a12' = 'a12')) and ((length(`test`.`t1`.`code`) = 5) or <cache>(('a12' < 'a00'))))
1394
851
DROP TABLE t1,t2;
1395
select encode(NULL, NULL);
1398
select encode("data", NULL);
1399
encode("data", NULL)
1401
select encode(NULL, "password");
1402
encode(NULL, "password")
1404
select decode(NULL, NULL);
1407
select decode("data", NULL);
1408
decode("data", NULL)
1410
select decode(NULL, "password");
1411
decode(NULL, "password")
1413
select format(NULL, NULL);
1416
select format(pi(), NULL);
1419
select format(NULL, 2);
1422
select benchmark(NULL, NULL);
1423
benchmark(NULL, NULL)
1425
select benchmark(0, NULL);
1428
select benchmark(100, NULL);
1429
benchmark(100, NULL)
1431
select benchmark(NULL, 1+1);
1432
benchmark(NULL, 1+1)
1434
852
select benchmark(-1, 1);
1435
853
benchmark(-1, 1)
1438
856
Error 1411 Incorrect count value: '-1' for function benchmark
1439
set @password="password";
1440
set @my_data="clear text to encode";
1441
select md5(encode(@my_data, "password"));
1442
md5(encode(@my_data, "password"))
1443
44320fd2b4a0ec92faa2da2122def917
1444
select md5(encode(@my_data, _utf8 "password"));
1445
md5(encode(@my_data, _utf8 "password"))
1446
44320fd2b4a0ec92faa2da2122def917
1447
select md5(encode(@my_data, binary "password"));
1448
md5(encode(@my_data, binary "password"))
1449
44320fd2b4a0ec92faa2da2122def917
1450
select md5(encode(@my_data, _latin1 "password"));
1451
md5(encode(@my_data, _latin1 "password"))
1452
44320fd2b4a0ec92faa2da2122def917
1453
select md5(encode(@my_data, _koi8r "password"));
1454
md5(encode(@my_data, _koi8r "password"))
1455
44320fd2b4a0ec92faa2da2122def917
1456
select md5(encode(@my_data, (select "password" from dual)));
1457
md5(encode(@my_data, (select "password" from dual)))
1458
44320fd2b4a0ec92faa2da2122def917
1459
select md5(encode(@my_data, concat("pass", "word")));
1460
md5(encode(@my_data, concat("pass", "word")))
1461
44320fd2b4a0ec92faa2da2122def917
1462
select md5(encode(@my_data, @password));
1463
md5(encode(@my_data, @password))
1464
44320fd2b4a0ec92faa2da2122def917
1465
set @my_data="binary encoded data";
1466
select md5(decode(@my_data, "password"));
1467
md5(decode(@my_data, "password"))
1468
5bea8c394368dbc03b76684483b7756b
1469
select md5(decode(@my_data, _utf8 "password"));
1470
md5(decode(@my_data, _utf8 "password"))
1471
5bea8c394368dbc03b76684483b7756b
1472
select md5(decode(@my_data, binary "password"));
1473
md5(decode(@my_data, binary "password"))
1474
5bea8c394368dbc03b76684483b7756b
1475
select md5(decode(@my_data, _latin1 "password"));
1476
md5(decode(@my_data, _latin1 "password"))
1477
5bea8c394368dbc03b76684483b7756b
1478
select md5(decode(@my_data, _koi8r "password"));
1479
md5(decode(@my_data, _koi8r "password"))
1480
5bea8c394368dbc03b76684483b7756b
1481
select md5(decode(@my_data, (select "password" from dual)));
1482
md5(decode(@my_data, (select "password" from dual)))
1483
5bea8c394368dbc03b76684483b7756b
1484
select md5(decode(@my_data, concat("pass", "word")));
1485
md5(decode(@my_data, concat("pass", "word")))
1486
5bea8c394368dbc03b76684483b7756b
1487
select md5(decode(@my_data, @password));
1488
md5(decode(@my_data, @password))
1489
5bea8c394368dbc03b76684483b7756b
1491
858
select format(pi(), (1+1));
1492
859
format(pi(), (1+1))
1494
select format(pi(), (select 3 from dual));
1495
format(pi(), (select 3 from dual))
861
select format(pi(), (select 3));
862
format(pi(), (select 3))
1497
864
select format(pi(), @dec);
1498
865
format(pi(), @dec)