diff options
author | unknown <serg@serg.mysql.com> | 2000-12-11 14:30:57 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2000-12-11 14:30:57 +0100 |
commit | 5d6b2d0d3515d1ffc293ddaf83b875742e4cca09 (patch) | |
tree | 5d79883e89e8673e28eddc1e9063b4b7a48bb5de | |
parent | 011f8d0a7d1ce5ec3497a3d9e61a4825e040ebc4 (diff) | |
parent | c369c427729eaaeff7b83427a2a6f2b923e46197 (diff) | |
download | mariadb-git-5d6b2d0d3515d1ffc293ddaf83b875742e4cca09.tar.gz |
Merge
41 files changed, 454 insertions, 32 deletions
diff --git a/mysql-test/r/ft0000001.a.result b/mysql-test/r/ft0000001.a.result new file mode 100644 index 00000000000..2b9a1515532 --- /dev/null +++ b/mysql-test/r/ft0000001.a.result @@ -0,0 +1,3 @@ +a MATCH (message) AGAINST ('steve') +4 0.90587321329654 +7 0.89568988462614 diff --git a/mysql-test/r/ft0000001.b.result b/mysql-test/r/ft0000001.b.result new file mode 100644 index 00000000000..2b9a1515532 --- /dev/null +++ b/mysql-test/r/ft0000001.b.result @@ -0,0 +1,3 @@ +a MATCH (message) AGAINST ('steve') +4 0.90587321329654 +7 0.89568988462614 diff --git a/mysql-test/r/ft0000001.c.result b/mysql-test/r/ft0000001.c.result new file mode 100644 index 00000000000..a88e4b25f2e --- /dev/null +++ b/mysql-test/r/ft0000001.c.result @@ -0,0 +1,3 @@ +a MATCH (message) AGAINST ('steve') +7 0.89568988462614 +4 0.90587321329654 diff --git a/mysql-test/r/ft0000001.d.result b/mysql-test/r/ft0000001.d.result new file mode 100644 index 00000000000..f9ffb78d49d --- /dev/null +++ b/mysql-test/r/ft0000001.d.result @@ -0,0 +1,2 @@ +a MATCH (message) AGAINST ('steve') +7 0.89568988462614 diff --git a/mysql-test/r/sel000004.result b/mysql-test/r/sel000004.result index 26f5563f3df..7ef0cdabb96 100644 --- a/mysql-test/r/sel000004.result +++ b/mysql-test/r/sel000004.result @@ -1,4 +1,2 @@ -id elt(two.val,'one','two') -1 one -2 one -4 two +1+1 1-1 1+1*2 8/5 8%5 MOD(8,5) MOD(8,5)|0 -(1+1)*-2 SIGN(-5) +2 0 3 1.60 3 3 3 4 -1 diff --git a/mysql-test/r/sel000005.result b/mysql-test/r/sel000005.result index 26f5563f3df..b213d603c4e 100644 --- a/mysql-test/r/sel000005.result +++ b/mysql-test/r/sel000005.result @@ -1,4 +1,2 @@ -id elt(two.val,'one','two') -1 one -2 one -4 two +FLOOR(5.5) FLOOR(-5.5) CEILING(5.5) CEILING(-5.5) ROUND(5.5) ROUND(-5.5) +5 -6 6 -5 6 -6 diff --git a/mysql-test/r/sel000014.result b/mysql-test/r/sel000014.result index c9c359068ca..bd8b967d300 100644 --- a/mysql-test/r/sel000014.result +++ b/mysql-test/r/sel000014.result @@ -1,2 +1,2 @@ 0 256 00000000000000065536 2147483647 -2147483648 2147483648 +4294967296 -0 256 65536 2147483647 -2147483648 2147483648 0 +0 256 65536 2147483647 -2147483648 2147483648 4294967296 diff --git a/mysql-test/r/sel000031.result b/mysql-test/r/sel000031.result new file mode 100644 index 00000000000..26f5563f3df --- /dev/null +++ b/mysql-test/r/sel000031.result @@ -0,0 +1,4 @@ +id elt(two.val,'one','two') +1 one +2 one +4 two diff --git a/mysql-test/r/sel000032.result b/mysql-test/r/sel000032.result new file mode 100644 index 00000000000..26f5563f3df --- /dev/null +++ b/mysql-test/r/sel000032.result @@ -0,0 +1,4 @@ +id elt(two.val,'one','two') +1 one +2 one +4 two diff --git a/mysql-test/r/sel000033.result b/mysql-test/r/sel000033.result new file mode 100644 index 00000000000..201d8bc9e0e --- /dev/null +++ b/mysql-test/r/sel000033.result @@ -0,0 +1,4 @@ +id +2 +5 +9 diff --git a/mysql-test/t/ft0000001.test b/mysql-test/t/ft0000001.test new file mode 100644 index 00000000000..6c11cd06bac --- /dev/null +++ b/mysql-test/t/ft0000001.test @@ -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/ft0000001.a.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve'); +@r/ft0000001.b.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE MATCH (message) AGAINST ('steve') ORDER BY a; +@r/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/ft0000001.d.result SELECT a, MATCH (message) AGAINST ('steve') FROM test WHERE a=7 and MATCH (message) AGAINST ('steve') ORDER BY 1; diff --git a/mysql-test/t/sel000004.test b/mysql-test/t/sel000004.test index d7b59a9f99e..e6adc549163 100644 --- a/mysql-test/t/sel000004.test +++ b/mysql-test/t/sel000004.test @@ -7,15 +7,8 @@ # # 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; +# Simple arithmetic. +# Testing MOD(), SIGN(), and arithmetic grouping. +# +@r/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); diff --git a/mysql-test/t/sel000005.test b/mysql-test/t/sel000005.test index d6dbb381654..3a7856b6256 100644 --- a/mysql-test/t/sel000005.test +++ b/mysql-test/t/sel000005.test @@ -1,4 +1,4 @@ -# sel000004 +# sel000005 # # Versions # -------- @@ -7,15 +7,8 @@ # # 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 ; +# Numeric functions. +# Testing FLOOR(), CEILING(), ROUND(). +# +@r/sel000005.result SELECT FLOOR(5.5),FLOOR(-5.5),CEILING(5.5),CEILING(-5.5),ROUND(5.5),ROUND(-5.5); diff --git a/mysql-test/t/sel000006.test b/mysql-test/t/sel000006.test new file mode 100644 index 00000000000..4f3d20f0c6d --- /dev/null +++ b/mysql-test/t/sel000006.test @@ -0,0 +1,14 @@ +# sel000006 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric functions. +# Testing ROUND(); hundreths precision. +# + +@r/sel000006.result SELECT ROUND(5.64,1),ROUND(5.64,2),ROUND(5.64,-1),ROUND(5.64,-2); diff --git a/mysql-test/t/sel000007.test b/mysql-test/t/sel000007.test new file mode 100644 index 00000000000..494ba902f90 --- /dev/null +++ b/mysql-test/t/sel000007.test @@ -0,0 +1,14 @@ +# sel000007 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric functions. +# Testing TRUNCATE(). +# + +@r/sel000007.result SELECT TRUNCATE(52.64,1),TRUNCATE(52.64,2),TRUNCATE(52.64,-1),TRUNCATE(52.64,-2); diff --git a/mysql-test/t/sel000008.test b/mysql-test/t/sel000008.test new file mode 100644 index 00000000000..b7d46fed8a1 --- /dev/null +++ b/mysql-test/t/sel000008.test @@ -0,0 +1,14 @@ +# sel000008 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric functions. +# Testing ABS(), LOG(), LOG10(), EXP(), SQRT(), POW(), RAND(), POWER(). +# + +@r/sel000008.result SELECT ABS(-10),LOG(EXP(10)),EXP(LOG(SQRT(10))*2),POW(10,LOG10(10)),RAND(999999),RAND(),POWER(2,4); diff --git a/mysql-test/t/sel000009.test b/mysql-test/t/sel000009.test new file mode 100644 index 00000000000..347f671fadc --- /dev/null +++ b/mysql-test/t/sel000009.test @@ -0,0 +1,14 @@ +# sel000009 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric functions. +# Testing PI(), SIN(), COS(), TAN(), COT(), ASIN(), ACOS(), ATAN(). +# + +@r/sel000009.result SELECT PI(),SIN(PI()/2),COS(PI()/2),TAN(PI()),COT(1),ASIN(1),ACOS(0),ATAN(1); diff --git a/mysql-test/t/sel000010.test b/mysql-test/t/sel000010.test new file mode 100644 index 00000000000..ae142c92c32 --- /dev/null +++ b/mysql-test/t/sel000010.test @@ -0,0 +1,14 @@ +# sel000010 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric bitwise comparisons. +# Testing |, &, BIT_COUNT(). +# + +@r/sel000010.result SELECT 1 | (1+1),5 & 3,BIT_COUNT(7); diff --git a/mysql-test/t/sel000011.test b/mysql-test/t/sel000011.test new file mode 100644 index 00000000000..73d022c74e9 --- /dev/null +++ b/mysql-test/t/sel000011.test @@ -0,0 +1,14 @@ +# sel000011 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric bitmoving comparisons. +# Testing <<, >>. +# + +@r/sel000011.result SELECT 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60; diff --git a/mysql-test/t/sel000012.test b/mysql-test/t/sel000012.test new file mode 100644 index 00000000000..e7f497dcd51 --- /dev/null +++ b/mysql-test/t/sel000012.test @@ -0,0 +1,13 @@ +# sel000012 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric floating point. +# + +@r/sel000012.result SELECT 10,10.0,10.,.1e+2,100.0e-1; diff --git a/mysql-test/t/sel000013.test b/mysql-test/t/sel000013.test new file mode 100644 index 00000000000..7d22c3645e3 --- /dev/null +++ b/mysql-test/t/sel000013.test @@ -0,0 +1,13 @@ +# sel000013 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numeric floating point. +# + +@r/sel000013.result SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000; diff --git a/mysql-test/t/sel000014.test b/mysql-test/t/sel000014.test new file mode 100644 index 00000000000..b29aaf0e28f --- /dev/null +++ b/mysql-test/t/sel000014.test @@ -0,0 +1,14 @@ +# sel000014 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numerics. +# Testing pos/neg and zero padding. +# + +@r/sel000014.result SELECT 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296; diff --git a/mysql-test/t/sel000015.test b/mysql-test/t/sel000015.test new file mode 100644 index 00000000000..44d6dc3afec --- /dev/null +++ b/mysql-test/t/sel000015.test @@ -0,0 +1,14 @@ +# sel000015 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numerics. +# Testing big numbers. +# + +@r/sel000015.result SELECT 922337203685477580,92233720368547758000; diff --git a/mysql-test/t/sel000016.test b/mysql-test/t/sel000016.test new file mode 100644 index 00000000000..10f9cad9bc9 --- /dev/null +++ b/mysql-test/t/sel000016.test @@ -0,0 +1,14 @@ +# sel000016 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numerics. +# Testing big negative numbers. +# + +@r/sel000016.result SELECT -922337203685477580,-92233720368547758000; diff --git a/mysql-test/t/sel000017.test b/mysql-test/t/sel000017.test new file mode 100644 index 00000000000..01395e1b6c5 --- /dev/null +++ b/mysql-test/t/sel000017.test @@ -0,0 +1,14 @@ +# sel000017 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numerics. +# Testing big pos/neg numbers. +# + +@r/sel000017.result SELECT 9223372036854775807,-009223372036854775808; diff --git a/mysql-test/t/sel000018.test b/mysql-test/t/sel000018.test new file mode 100644 index 00000000000..48525ac52c5 --- /dev/null +++ b/mysql-test/t/sel000018.test @@ -0,0 +1,14 @@ +# sel000018 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numerics. +# Testing big pos/neg numbers. +# + +@r/sel000018.result SELECT +9999999999999999999,-9999999999999999999; diff --git a/mysql-test/t/sel000019.test b/mysql-test/t/sel000019.test new file mode 100644 index 00000000000..0c7857a11f5 --- /dev/null +++ b/mysql-test/t/sel000019.test @@ -0,0 +1,14 @@ +# sel000019 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Numerics. +# Testing DEGREES(), RADIANS(). +# + +@r/sel000019.result SELECT DEGREES(PI()),RADIANS(360); diff --git a/mysql-test/t/sel000020.test b/mysql-test/t/sel000020.test new file mode 100644 index 00000000000..f3835ac3c2b --- /dev/null +++ b/mysql-test/t/sel000020.test @@ -0,0 +1,14 @@ +# sel000020 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; STRCMP(), =, >, >=, <=, !=. +# + +@r/sel000020.result SELECT 0=0,1>0,1>=1,1<0,1<=0,1!=0,STRCMP("abc","abcd"),STRCMP("b","a"),STRCMP("a","a"); diff --git a/mysql-test/t/sel000021.test b/mysql-test/t/sel000021.test new file mode 100644 index 00000000000..d4d87845415 --- /dev/null +++ b/mysql-test/t/sel000021.test @@ -0,0 +1,14 @@ +# sel000021 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; =, >, >=, <=, <>. +# + +@r/sel000021.result SELECT "a"<"b","a"<="b","b">="a","b">"a","a"="A","a"<>"b"; diff --git a/mysql-test/t/sel000022.test b/mysql-test/t/sel000022.test new file mode 100644 index 00000000000..68a713d4baa --- /dev/null +++ b/mysql-test/t/sel000022.test @@ -0,0 +1,14 @@ +# sel000022 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; =, >, <=. +# + +@r/sel000022.result SELECT "a "="A", "A "="a", "a " <= "A b"; diff --git a/mysql-test/t/sel000023.test b/mysql-test/t/sel000023.test new file mode 100644 index 00000000000..d4b62603c4a --- /dev/null +++ b/mysql-test/t/sel000023.test @@ -0,0 +1,14 @@ +# sel000023 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; LIKE, NOT LIKE, '%'. +# + +@r/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%"; diff --git a/mysql-test/t/sel000024.test b/mysql-test/t/sel000024.test new file mode 100644 index 00000000000..bc60fcf0074 --- /dev/null +++ b/mysql-test/t/sel000024.test @@ -0,0 +1,14 @@ +# sel000024 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; LIKE, '%'. +# + +@r/sel000024.result SELECT "a" LIKE "%%b","a" LIKE "%%ab","ab" LIKE "a\%", "ab" LIKE "_", "ab" LIKE "ab_", "abc" LIKE "%_d", "abc" LIKE "abc%d"; diff --git a/mysql-test/t/sel000025.test b/mysql-test/t/sel000025.test new file mode 100644 index 00000000000..4a8e380f1b8 --- /dev/null +++ b/mysql-test/t/sel000025.test @@ -0,0 +1,14 @@ +# sel000025 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; LIKE, ESCAPE, '%'. +# + +@r/sel000025.result SELECT '?' LIKE '|%', '?' LIKE '|%' ESCAPE '|', '%' LIKE '|%', '%' LIKE '|%' ESCAPE '|', '%' LIKE '%'; diff --git a/mysql-test/t/sel000026.test b/mysql-test/t/sel000026.test new file mode 100644 index 00000000000..dde3a18bfb5 --- /dev/null +++ b/mysql-test/t/sel000026.test @@ -0,0 +1,14 @@ +# sel000026 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; LIKE, '%'. +# + +@r/sel000026.result SELECT 'abc' LIKE '%c','abcabc' LIKE '%c', "ab" LIKE "", "ab" LIKE "a", "ab" LIKE "ab"; diff --git a/mysql-test/t/sel000027.test b/mysql-test/t/sel000027.test new file mode 100644 index 00000000000..b0dc139f3ff --- /dev/null +++ b/mysql-test/t/sel000027.test @@ -0,0 +1,14 @@ +# sel000027 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; REGEXP. +# + +@r/sel000027.result SELECT "Det här är svenska" REGEXP "h[[:alpha:]]+r", "aba" REGEXP "^(a|b)*$"; diff --git a/mysql-test/t/sel000028.test b/mysql-test/t/sel000028.test new file mode 100644 index 00000000000..58aa1b28953 --- /dev/null +++ b/mysql-test/t/sel000028.test @@ -0,0 +1,14 @@ +# sel000028 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; REGEXP, CONCAT(). +# + +@r/sel000028.result SELECT "aba" REGEXP CONCAT("^","a"); diff --git a/mysql-test/t/sel000029.test b/mysql-test/t/sel000029.test new file mode 100644 index 00000000000..015b15de1a3 --- /dev/null +++ b/mysql-test/t/sel000029.test @@ -0,0 +1,14 @@ +# sel000029 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Strings. +# Testing string comparisons; NOT, AND, OR, !, &&, ||. +# + +@r/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; diff --git a/mysql-test/t/sel000030.test b/mysql-test/t/sel000030.test new file mode 100644 index 00000000000..57e5454023c --- /dev/null +++ b/mysql-test/t/sel000030.test @@ -0,0 +1,14 @@ +# sel000030 +# +# Versions +# -------- +# 3.22 +# 3.23 +# +# Description +# ----------- +# Control flow. +# Testing control flow; IF() +# + +@r/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; diff --git a/mysql-test/t/sel000031.test b/mysql-test/t/sel000031.test new file mode 100644 index 00000000000..6024bd3b757 --- /dev/null +++ b/mysql-test/t/sel000031.test @@ -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/sel000031.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; + diff --git a/mysql-test/t/sel000032.test b/mysql-test/t/sel000032.test new file mode 100644 index 00000000000..6130f0cd415 --- /dev/null +++ b/mysql-test/t/sel000032.test @@ -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/sel000032.result select one.id, elt(two.val,'one','two') from elt_ck1 one, elt_ck2 two where two.id=one.id; diff --git a/mysql-test/t/sel000033.test b/mysql-test/t/sel000033.test new file mode 100644 index 00000000000..62ac90e8b87 --- /dev/null +++ b/mysql-test/t/sel000033.test @@ -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/sel000033.result select id from t where id in (2,5,9) ; +@r/sel000033.result select id from t where id=2 or id=5 or id=9 ; |