mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Tests backpropagated from mysql-4.0 bk tree
mysql-test/t/sel000004.test: backpropagated from mysql-4.0 mysql-test/t/sel000005.test: backpropagated from mysql-4.0 mysql-test/r/sel000004.result: backpropagated from mysql-4.0 mysql-test/r/sel000005.result: backpropagated from mysql-4.0
This commit is contained in:
3
mysql-test/r/ft0000001.a.result
Normal file
3
mysql-test/r/ft0000001.a.result
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
a MATCH (message) AGAINST ('steve')
|
||||||
|
4 0.90587321329654
|
||||||
|
7 0.89568988462614
|
3
mysql-test/r/ft0000001.b.result
Normal file
3
mysql-test/r/ft0000001.b.result
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
a MATCH (message) AGAINST ('steve')
|
||||||
|
4 0.90587321329654
|
||||||
|
7 0.89568988462614
|
3
mysql-test/r/ft0000001.c.result
Normal file
3
mysql-test/r/ft0000001.c.result
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
a MATCH (message) AGAINST ('steve')
|
||||||
|
7 0.89568988462614
|
||||||
|
4 0.90587321329654
|
2
mysql-test/r/ft0000001.d.result
Normal file
2
mysql-test/r/ft0000001.d.result
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
a MATCH (message) AGAINST ('steve')
|
||||||
|
7 0.89568988462614
|
@ -1,4 +1,2 @@
|
|||||||
id elt(two.val,'one','two')
|
1+1 1-1 1+1*2 8/5 8%5 MOD(8,5) MOD(8,5)|0 -(1+1)*-2 SIGN(-5)
|
||||||
1 one
|
2 0 3 1.60 3 3 3 4 -1
|
||||||
2 one
|
|
||||||
4 two
|
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
id elt(two.val,'one','two')
|
FLOOR(5.5) FLOOR(-5.5) CEILING(5.5) CEILING(-5.5) ROUND(5.5) ROUND(-5.5)
|
||||||
1 one
|
5 -6 6 -5 6 -6
|
||||||
2 one
|
|
||||||
4 two
|
|
||||||
|
4
mysql-test/r/sel000031.result
Normal file
4
mysql-test/r/sel000031.result
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
id elt(two.val,'one','two')
|
||||||
|
1 one
|
||||||
|
2 one
|
||||||
|
4 two
|
4
mysql-test/r/sel000032.result
Normal file
4
mysql-test/r/sel000032.result
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
id elt(two.val,'one','two')
|
||||||
|
1 one
|
||||||
|
2 one
|
||||||
|
4 two
|
4
mysql-test/r/sel000033.result
Normal file
4
mysql-test/r/sel000033.result
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
id
|
||||||
|
2
|
||||||
|
5
|
||||||
|
9
|
13
mysql-test/t/ft0000001.test
Normal file
13
mysql-test/t/ft0000001.test
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
use test;
|
||||||
|
DROP TABLE IF EXISTS test;
|
||||||
|
CREATE TABLE test (
|
||||||
|
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
message CHAR(20),
|
||||||
|
FULLTEXT(message)
|
||||||
|
) comment = 'testcase by sroussey@network54.com';
|
||||||
|
INSERT INTO test (message) VALUES ("Testing"),("table"),("testbug"),
|
||||||
|
("steve"),("is"),("cool"),("steve is cool");
|
||||||
|
@r/3.23/ft0000001.a.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve');
|
||||||
|
@r/3.23/ft0000001.b.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve') ORDER BY a;
|
||||||
|
@r/3.23/ft0000001.c.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve') ORDER BY a DESC;
|
||||||
|
@r/3.23/ft0000001.d.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE a=7 and MATCH (message) AGAINST ('steve') ORDER BY 1;
|
@ -7,15 +7,8 @@
|
|||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
# test for a bug with elt() and order by
|
# Simple arithmetic.
|
||||||
|
# Testing MOD(), SIGN(), and arithmetic grouping.
|
||||||
drop table if exists elt_ck1,elt_ck2;
|
#
|
||||||
create table elt_ck1 (id int(10) not null unique);
|
|
||||||
create table elt_ck2 (id int(10) not null primary key,
|
|
||||||
val int(10) not null);
|
|
||||||
insert into elt_ck1 values (1),(2),(4);
|
|
||||||
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
|
|
||||||
|
|
||||||
@r/sel000004.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
|
|
||||||
where two.id=one.id order by one.id;
|
|
||||||
|
|
||||||
|
@r/3.23/sel000004.result SELECT 1+1,1-1,1+1*2,8/5,8%5,MOD(8,5),MOD(8,5)|0,-(1+1)*-2,SIGN(-5);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# sel000004
|
# sel000005
|
||||||
#
|
#
|
||||||
# Versions
|
# Versions
|
||||||
# --------
|
# --------
|
||||||
@ -7,15 +7,8 @@
|
|||||||
#
|
#
|
||||||
# Description
|
# Description
|
||||||
# -----------
|
# -----------
|
||||||
# test for a bug with elt()
|
# Numeric functions.
|
||||||
|
# Testing FLOOR(), CEILING(), ROUND().
|
||||||
drop table if exists elt_ck1,elt_ck2;
|
#
|
||||||
create table elt_ck1 (id int(10) not null unique);
|
|
||||||
create table elt_ck2 (id int(10) not null primary key,
|
|
||||||
val int(10) not null);
|
|
||||||
insert into elt_ck1 values (1),(2),(4);
|
|
||||||
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
|
|
||||||
|
|
||||||
@r/sel000005.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two
|
|
||||||
where two.id=one.id ;
|
|
||||||
|
|
||||||
|
@r/3.23/sel000005.result SELECT FLOOR(5.5),FLOOR(-5.5),CEILING(5.5),CEILING(-5.5),ROUND(5.5),ROUND(-5.5);
|
||||||
|
14
mysql-test/t/sel000006.test
Normal file
14
mysql-test/t/sel000006.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000006
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric functions.
|
||||||
|
# Testing ROUND(); hundreths precision.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000006.result SELECT ROUND(5.64,1),ROUND(5.64,2),ROUND(5.64,-1),ROUND(5.64,-2);
|
14
mysql-test/t/sel000007.test
Normal file
14
mysql-test/t/sel000007.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000007
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric functions.
|
||||||
|
# Testing TRUNCATE().
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000007.result SELECT TRUNCATE(52.64,1),TRUNCATE(52.64,2),TRUNCATE(52.64,-1),TRUNCATE(52.64,-2);
|
14
mysql-test/t/sel000008.test
Normal file
14
mysql-test/t/sel000008.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000008
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric functions.
|
||||||
|
# Testing ABS(), LOG(), LOG10(), EXP(), SQRT(), POW(), RAND(), POWER().
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000008.result SELECT ABS(-10),LOG(EXP(10)),EXP(LOG(SQRT(10))*2),POW(10,LOG10(10)),RAND(999999),RAND(),POWER(2,4);
|
14
mysql-test/t/sel000009.test
Normal file
14
mysql-test/t/sel000009.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000009
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric functions.
|
||||||
|
# Testing PI(), SIN(), COS(), TAN(), COT(), ASIN(), ACOS(), ATAN().
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000009.result SELECT PI(),SIN(PI()/2),COS(PI()/2),TAN(PI()),COT(1),ASIN(1),ACOS(0),ATAN(1);
|
14
mysql-test/t/sel000010.test
Normal file
14
mysql-test/t/sel000010.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000010
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric bitwise comparisons.
|
||||||
|
# Testing |, &, BIT_COUNT().
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000010.result SELECT 1 | (1+1),5 & 3,BIT_COUNT(7);
|
14
mysql-test/t/sel000011.test
Normal file
14
mysql-test/t/sel000011.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000011
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric bitmoving comparisons.
|
||||||
|
# Testing <<, >>.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000011.result SELECT 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60;
|
13
mysql-test/t/sel000012.test
Normal file
13
mysql-test/t/sel000012.test
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# sel000012
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric floating point.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000012.result SELECT 10,10.0,10.,.1e+2,100.0e-1;
|
13
mysql-test/t/sel000013.test
Normal file
13
mysql-test/t/sel000013.test
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# sel000013
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numeric floating point.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000013.result SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000;
|
14
mysql-test/t/sel000014.test
Normal file
14
mysql-test/t/sel000014.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000014
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numerics.
|
||||||
|
# Testing pos/neg and zero padding.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000014.result SELECT 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296;
|
14
mysql-test/t/sel000015.test
Normal file
14
mysql-test/t/sel000015.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000015
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numerics.
|
||||||
|
# Testing big numbers.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000015.result SELECT 922337203685477580,92233720368547758000;
|
14
mysql-test/t/sel000016.test
Normal file
14
mysql-test/t/sel000016.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000016
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numerics.
|
||||||
|
# Testing big negative numbers.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000016.result SELECT -922337203685477580,-92233720368547758000;
|
14
mysql-test/t/sel000017.test
Normal file
14
mysql-test/t/sel000017.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000017
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numerics.
|
||||||
|
# Testing big pos/neg numbers.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000017.result SELECT 9223372036854775807,-009223372036854775808;
|
14
mysql-test/t/sel000018.test
Normal file
14
mysql-test/t/sel000018.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000018
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numerics.
|
||||||
|
# Testing big pos/neg numbers.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000018.result SELECT +9999999999999999999,-9999999999999999999;
|
14
mysql-test/t/sel000019.test
Normal file
14
mysql-test/t/sel000019.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000019
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Numerics.
|
||||||
|
# Testing DEGREES(), RADIANS().
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000019.result SELECT DEGREES(PI()),RADIANS(360);
|
14
mysql-test/t/sel000020.test
Normal file
14
mysql-test/t/sel000020.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000020
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; STRCMP(), =, >, >=, <=, !=.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000020.result SELECT 0=0,1>0,1>=1,1<0,1<=0,1!=0,STRCMP("abc","abcd"),STRCMP("b","a"),STRCMP("a","a");
|
14
mysql-test/t/sel000021.test
Normal file
14
mysql-test/t/sel000021.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000021
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; =, >, >=, <=, <>.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000021.result SELECT "a"<"b","a"<="b","b">="a","b">"a","a"="A","a"<>"b";
|
14
mysql-test/t/sel000022.test
Normal file
14
mysql-test/t/sel000022.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000022
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; =, >, <=.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000022.result SELECT "a "="A", "A "="a", "a " <= "A b";
|
14
mysql-test/t/sel000023.test
Normal file
14
mysql-test/t/sel000023.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000023
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; LIKE, NOT LIKE, '%'.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000023.result SELECT "abc" LIKE "a%", "abc" NOT LIKE "%d%", "a%" LIKE "a\%","abc%" LIKE "a%\%","abcd" LIKE "a%b_%d", "a" LIKE "%%a","abcde" LIKE "a%_e","abc" LIKE "abc%";
|
14
mysql-test/t/sel000024.test
Normal file
14
mysql-test/t/sel000024.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000024
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; LIKE, '%'.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000024.result SELECT "a" LIKE "%%b","a" LIKE "%%ab","ab" LIKE "a\%", "ab" LIKE "_", "ab" LIKE "ab_", "abc" LIKE "%_d", "abc" LIKE "abc%d";
|
14
mysql-test/t/sel000025.test
Normal file
14
mysql-test/t/sel000025.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000025
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; LIKE, ESCAPE, '%'.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000025.result SELECT '?' LIKE '|%', '?' LIKE '|%' ESCAPE '|', '%' LIKE '|%', '%' LIKE '|%' ESCAPE '|', '%' LIKE '%';
|
14
mysql-test/t/sel000026.test
Normal file
14
mysql-test/t/sel000026.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000026
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; LIKE, '%'.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000026.result SELECT 'abc' LIKE '%c','abcabc' LIKE '%c', "ab" LIKE "", "ab" LIKE "a", "ab" LIKE "ab";
|
14
mysql-test/t/sel000027.test
Normal file
14
mysql-test/t/sel000027.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000027
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; REGEXP.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000027.result SELECT "Det h<>r <20>r svenska" REGEXP "h[[:alpha:]]+r", "aba" REGEXP "^(a|b)*$";
|
14
mysql-test/t/sel000028.test
Normal file
14
mysql-test/t/sel000028.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000028
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; REGEXP, CONCAT().
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000028.result SELECT "aba" REGEXP CONCAT("^","a");
|
14
mysql-test/t/sel000029.test
Normal file
14
mysql-test/t/sel000029.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000029
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Strings.
|
||||||
|
# Testing string comparisons; NOT, AND, OR, !, &&, ||.
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000029.result SELECT !0,NOT 0=1,!(0=0),1 AND 1,1 && 0,0 OR 1,1 || NULL, 1=1 OR 1=1 AND 1=0;
|
14
mysql-test/t/sel000030.test
Normal file
14
mysql-test/t/sel000030.test
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# sel000030
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# Control flow.
|
||||||
|
# Testing control flow; IF()
|
||||||
|
#
|
||||||
|
|
||||||
|
@r/3.23/sel000030.result SELECT IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0;
|
20
mysql-test/t/sel000031.test
Normal file
20
mysql-test/t/sel000031.test
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# sel000031
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# test for a bug with elt() and order by
|
||||||
|
|
||||||
|
drop table if exists elt_ck1,elt_ck2;
|
||||||
|
create table elt_ck1 (id int(10) not null unique);
|
||||||
|
create table elt_ck2 (id int(10) not null primary key,
|
||||||
|
val int(10) not null);
|
||||||
|
insert into elt_ck1 values (1),(2),(4);
|
||||||
|
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
|
||||||
|
|
||||||
|
@r/sel000004.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two where two.id=one.id order by one.id;
|
||||||
|
|
19
mysql-test/t/sel000032.test
Normal file
19
mysql-test/t/sel000032.test
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# sel000032
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# test for a bug with elt()
|
||||||
|
|
||||||
|
drop table if exists elt_ck1,elt_ck2;
|
||||||
|
create table elt_ck1 (id int(10) not null unique);
|
||||||
|
create table elt_ck2 (id int(10) not null primary key,
|
||||||
|
val int(10) not null);
|
||||||
|
insert into elt_ck1 values (1),(2),(4);
|
||||||
|
insert into elt_ck2 values (1,1),(2,1),(3,1),(4,2);
|
||||||
|
|
||||||
|
@r/sel000005.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two where two.id=one.id;
|
17
mysql-test/t/sel000033.test
Normal file
17
mysql-test/t/sel000033.test
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# sel000033
|
||||||
|
#
|
||||||
|
# Versions
|
||||||
|
# --------
|
||||||
|
# 3.22
|
||||||
|
# 3.23
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
# test for a bug with in() and unique key
|
||||||
|
|
||||||
|
drop table if exists t;
|
||||||
|
create table t (id int(10) primary key);
|
||||||
|
insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
|
||||||
|
@r/3.23/sel000033.result select id from t where id in (2,5,9) ;
|
||||||
|
@r/3.23/sel000033.result select id from t where id=2 or id=5 or id=9 ;
|
Reference in New Issue
Block a user