Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tianmu): merge to Stonedb 5.7 stable #1915

Merged
merged 124 commits into from
Jun 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
0a2f9be
docs(downlaod):update the docs of download(#1453)
Nliver Mar 20, 2023
dd8247b
fix(mtr):Resolve the nightly run error problem(#1458)
konghaiya Mar 21, 2023
e06793e
fix(workflow): fix can not run lcov in workflow
RingsC Mar 16, 2023
4193cf6
feat(tianmu):New configuration parameters: "tianmu_mandatory" and "ti…
konghaiya Mar 22, 2023
3dcc3fd
feat(tianmu):Discard "MANDATORY_TIANMU" and "NO_KEY_ERROR" in (sql_mode)
konghaiya Mar 22, 2023
ef58f6c
feat(tianmu):Resolve the issue of warning messages when setting new p…
konghaiya Mar 22, 2023
05db04d
fix(tianmu):(Primary/Secondary)Error 1032 occasionally occurs during …
konghaiya Mar 22, 2023
1fa5661
test(mtr): add integer/unsigned/in subquery/create temporary testcase…
davidshiz Mar 23, 2023
fd653e1
docs(v1.0.3): update the docs for v1.0.3
Nliver Mar 30, 2023
37beb82
fix(dcoker): FixDocker deployment commands(#1499)
Nliver Mar 30, 2023
45874be
feat: add Baidu statistics script(#1498)
Nliver Mar 30, 2023
d29544b
fix(website): fix Baidu statistics script(#1502)
Nliver Mar 30, 2023
9c87c73
test(mtr): Optimize parallel scheduling to execute more innodb engine…
davidshiz Mar 30, 2023
4bd09ac
fix crash when the aggregated element was decimal (#1402)
adofsauron Mar 31, 2023
ee41be0
build(deps): bump nth-check and unist-util-select in /website
dependabot[bot] Mar 31, 2023
b90030f
docs(deploy): Update the document and fix the link
Nliver Mar 31, 2023
3ac5796
update the copyright
Nliver Mar 31, 2023
e7de186
update the readme(#1324)
Nliver Mar 31, 2023
a4c5f7c
Create FUNDING.yml
stoneatomadmin Apr 3, 2023
7484c58
Update FUNDING.yml
stoneatomadmin Apr 3, 2023
e7bbe88
remove dup lines in git workflow
zzzz-vincent Apr 5, 2023
82b249a
feat(tianmu): mv func from public to protected(#1501)
zzzz-vincent Apr 4, 2023
7b03c28
style change
zzzz-vincent Apr 4, 2023
e049e3b
strip spaces
zzzz-vincent Apr 4, 2023
1675216
remove dup lines
zzzz-vincent Apr 4, 2023
59e9174
change to uint
zzzz-vincent Apr 4, 2023
d49df15
fix(tianmu):Resolve DDL and insert inot select Possible space inflati…
konghaiya Mar 20, 2023
1de9a91
feat(tianmu):Reconstruct direct insert into parallel execution, impro…
konghaiya Mar 28, 2023
bcc42ad
feat(tianmu):Add code comments for easy understanding
konghaiya Mar 28, 2023
9d45726
fix(tianmu):The myloader cann't work if the autocommit is closed. (#1…
konghaiya Apr 4, 2023
03f5df2
fix(core): fix bug: The instance occasionally crashes if both fields …
wisehead Apr 4, 2023
65e7c25
fix: page hover font style
Agility6 Apr 7, 2023
166f87a
feat(mtr): To fix the mtr usage
RingsC Apr 10, 2023
56cd1f3
fix(tianmu):The mysqld is crashed when you are starting replication.(…
konghaiya Apr 4, 2023
44d6ff8
feat(tianmu):Add delta layer mtr
konghaiya Apr 11, 2023
758bce8
bug 1538:The instance occasionally crashes when the parallel degree i…
wisehead Apr 10, 2023
8146e9b
feat(tianmu): To support vocalno framwork
RingsC Apr 10, 2023
16d2c01
docs(quickstart): add stonedb-8.0 compiling guide #1449
Double0101 Apr 3, 2023
8a4b65b
fix(website): fix website error #1449
Double0101 Apr 11, 2023
d0665f9
feat(tianmu): support volcano framewrok (#1546)
RingsC Apr 12, 2023
8e197ae
fix(tianmu): revert code, mv ret value from try block back to catch b…
Dysprosium0626 Apr 13, 2023
45e75ee
feat(tiamnu): hard code in defs.h (#1481)
zzzz-vincent Apr 6, 2023
f8cf62b
docs:update the compile guides #1562
Apr 14, 2023
09f0e40
test(mtr): add more innodb testcases and tianmu range testcase(#1196)
davidshiz Apr 16, 2023
99c5e80
fix(tianmu):Remove excess log printing and add some code comments(#1545)
konghaiya Apr 11, 2023
4b7c64b
fix(tianmu): fix mysqld crash when exec query with AggregateRough, as…
adofsauron Apr 19, 2023
e510ad3
fix(website): fix the download link of 5.7(#1518)
Nliver Apr 19, 2023
f79002e
feat(website): update the latest content(#1587)
Nliver Apr 19, 2023
6e56cef
feat(tianmu): support volcano framework (#1554)
RingsC Apr 19, 2023
875be6f
fix: max-width navbar search style
Agility6 Apr 20, 2023
c8c37fd
feat(website): upgrade the docusaurus version(#1604)
Nliver Apr 20, 2023
6b56366
fix(website): fix Roadmap module location(#1597)
Nliver Apr 20, 2023
2f6ae10
website(community): update the content
Nliver Apr 20, 2023
ba8cead
feat(website): update the logo of XinChuang(#1590)
Nliver Apr 20, 2023
0b1c15a
fix(tianmu):The instance occasionally crashes when the memory leak. (…
konghaiya Apr 17, 2023
feb4b53
fix(tianmu):Modify merge_ The assignment method of ID, delaying the a…
konghaiya Apr 18, 2023
6703037
fix(tianmu):Fix bug in delta layer initialization
konghaiya Apr 18, 2023
2e4dbdc
fix(tianmu):Resolve the issue of assertion failure caused by memory a…
konghaiya Apr 19, 2023
31919be
fix(tianmu):Code format adjustment
konghaiya Apr 20, 2023
561f653
fix(website): fix the wrong QR code(#1624)
Nliver Apr 26, 2023
29000c9
feat(tianmu):Add delta layer information output and table name output
konghaiya Apr 26, 2023
32cb03c
fix(tianmu):Perfect atomic operations for delta_table
konghaiya Apr 26, 2023
cc8a96b
feat(tianmu):Optimize delta layer merge operations to remove useless …
konghaiya Apr 26, 2023
f1a7259
fix(tianmu):assert failed on ptr == buff.get() + data_.sum_len at pac…
konghaiya Apr 26, 2023
4a41514
fix(tianmu):assert failed on oldv <= dpn_->max_i at pack_int.cpp:337 …
konghaiya Apr 26, 2023
70f15f1
feat(tianmu):Increase assertion printing information and optimize cod…
konghaiya Apr 26, 2023
587d276
fix(tianmu): fix mysqld crash when query where JOIN::propagate_de…
adofsauron Apr 27, 2023
4a35d96
fix(tianmu): fix MySQL server has gone away when exec query (#164…
adofsauron Apr 28, 2023
57e3497
fix(tianmu):Support insert ignore syntax (#1637)
konghaiya Apr 28, 2023
1ba5663
fix(tianmu): fix query input variables wrong result (#1647)
adofsauron May 5, 2023
70bdb91
fix(tianmu): fix result of the query using the subquery derived t…
adofsauron May 6, 2023
b728610
fix(tianmu): fix results of two queries using a derived table and…
adofsauron May 6, 2023
c95d263
feat(tianmu): Test cases that supplement custom variables (#1703)
adofsauron May 6, 2023
2daac7c
fix(tianmu): fix mysqld crash when assigning return values using …
adofsauron May 8, 2023
74b5b05
fix(tianmu): Insert ignore can insert duplicate values.(#1699)
konghaiya May 8, 2023
a33ba87
fix(tianmu): fix error occurred in the union all query result (#1…
adofsauron May 8, 2023
6ed8fb1
remove unused code block
zzzz-vincent May 1, 2023
8d438e1
fix bug and change test case exptected result
zzzz-vincent May 7, 2023
b16bfaa
add stonedb-8.0 compiling guide for CentOS 7.x
Xinqiangxu May 9, 2023
c4d2d2f
docs(quickstart): add stonedb-8.0 compiling guide(Chinese) for CentOS…
Xinqiangxu May 10, 2023
304df8e
fix(tianmu):Even if a primary key is defined, duplicate data may be i…
konghaiya May 10, 2023
2c96b13
add delete/drop into tianmu log stat
duanjr May 8, 2023
d9b4126
open log for all cmds
duanjr May 9, 2023
141918d
fit format
duanjr May 10, 2023
c3931fe
fix(tianmu): fix Error result set of the IN subquery with semi jo…
adofsauron May 11, 2023
65585be
doc(develop-guide): modify method for complie stonedb using docker
Dysprosium0626 May 10, 2023
20abfc7
docs:add docker compile guide of stonedb8.0.(#1780)
May 16, 2023
9b50843
feature: remove DBUG_OFF and repalce DEBUG_ASSERT with assert
duanjr May 8, 2023
72a160c
automatically formatting
duanjr May 9, 2023
9805e07
fix: fix storage of DT type
duanjr May 9, 2023
6c11356
fix incorrect result of TIME type by distinguishing the processing of…
duanjr May 11, 2023
69a49bd
fix(tinmu): fix tianmu crash when set varchar to num when order by
May 19, 2023
d99c9d5
docs(website): update the documentation for Compile StoneDB 8.0 in Do…
davidshiz May 25, 2023
2579bd4
fix(tianmu): fix up the incompatible type
RingsC May 25, 2023
0b853cd
fix(tianmu): Fix up the unknown exception after instance killed rando…
RingsC May 31, 2023
e28183b
fix(tianmu): fix up the incorrect meta-info leads unexpected behavior…
RingsC May 31, 2023
988cf1d
fix(workflow): nightly build failed #1830
hustjieke May 29, 2023
6cba6d7
feat(tianmu): revert assert() --> debug_assert() #1551
hustjieke May 31, 2023
1f43e44
feat(tianmu): fixup the default delimeter for load data (#1843)
RingsC May 31, 2023
12fa952
fix(tianmu): revert PR #1841. (#1850)
RingsC Jun 3, 2023
1b51907
fix(tianmu): fix up mtr test case for delim of load data command (#1854)
RingsC Jun 5, 2023
bde212a
fix(tianmu): fix up the `group_concat` function in tianmu (#1852)
RingsC Jun 6, 2023
1a7fe0f
fix(tianmu): To fixup the instance crashed if the result of aggregate…
RingsC Jun 6, 2023
9404338
docs(developer-guide): update the compiling guide of stonedb 8.0 for …
Xinqiangxu May 26, 2023
6b369e5
fix(tianmu): Fixup the mem leakage of aggregation function
RingsC Jun 8, 2023
f180323
fix(tianmu): fix UNION of non-matching columns (column no 0)
adofsauron Jun 14, 2023
798ca7a
test(tianmu): add order by sentence in the mtr case various_join.test
Xinqiangxu Jun 15, 2023
288262f
test(mtr): add more test cases for tianmu(#1196)
davidshiz Jun 15, 2023
c990b5f
test(mtr): add order by sentence in the mtr case various_join.test
Xinqiangxu Jun 16, 2023
9939611
ci(codecov): update the config
Nliver Jun 20, 2023
d7584f1
fix(tianmu): To suuport ignore option for update statement
RingsC Jun 14, 2023
5606c87
ci(codecov): update the codecov congfig
Nliver Jun 20, 2023
105b730
docs(intro): update the support for 8.0
Nliver Jun 20, 2023
186f694
wokflow(codecov): Filter out excess code files
Nliver Jun 25, 2023
7d03695
workflow(coverage): Update the lcov running logic
Nliver Jun 26, 2023
73dcfec
fix(tianmu): default value of the field take unaffect in load #1865
Double0101 Jun 19, 2023
a4600c4
fix(tianmu): To support union(all) the statement which is without fro…
RingsC Jun 15, 2023
6a560a0
fix(tianmu): To remove unnessary optimization in tianmu
RingsC Jun 27, 2023
60a8cf7
fix(tianmu): hotfix corruption in ValueOrNull under multi-thread
RingsC Jun 9, 2023
6349898
fix(tianmu): incorrect result when using where expr and args > bigint…
hustjieke Jun 9, 2023
34b73a1
fix(tianmu): add TIME_to_ulonglong_time_round process and fix up prec…
Xinqiangxu Jun 19, 2023
deb0600
fix(tianmu): fix format using clang-format #792
hustjieke Oct 24, 2022
25b767b
feat: rm files after rebase leftover #1217
hustjieke Jan 14, 2023
422bd73
Merge branch 'stonedb-5.7-stable' of github.com:RingsC/stonedb into HEAD
RingsC Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(mtr): add more test cases for tianmu(#1196)
[summary]
case_when.test
drop_restric.test
empty_string_not_null.test
left_right_func.test
like_not_like.test
multi_join.test
order_by.test
ssb_small.test
union_case.test
  • Loading branch information
davidshiz authored and mergify[bot] committed Jun 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 288262fde6572784c0c6e6beba96f054e2de5f66
192 changes: 192 additions & 0 deletions mysql-test/suite/tianmu/r/case_when.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
#
# test case when
#
DROP DATABASE IF EXISTS case_when_test;
CREATE DATABASE case_when_test;
USE case_when_test;
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
select CASE "b" when "a" then 1 when "b" then 2 END;
CASE "b" when "a" then 1 when "b" then 2 END
2
select CASE "c" when "a" then 1 when "b" then 2 END;
CASE "c" when "a" then 1 when "b" then 2 END
NULL
select CASE "c" when "a" then 1 when "b" then 2 ELSE 3 END;
CASE "c" when "a" then 1 when "b" then 2 ELSE 3 END
3
select CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END;
CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END
ok
select CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END;
CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END
ok
select CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end;
CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end
a
select CASE when 1=0 then "true" else "false" END;
CASE when 1=0 then "true" else "false" END
false
select CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END;
CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END
one
select CASE 2.0 when 1 then "one" WHEN 2.0 then "two" ELSE "more" END;
CASE 2.0 when 1 then "one" WHEN 2.0 then "two" ELSE "more" END
two
select (CASE "two" when "one" then "1" WHEN "two" then "2" END) | 0;
(CASE "two" when "one" then "1" WHEN "two" then "2" END) | 0
2
select (CASE "two" when "one" then 1.00 WHEN "two" then 2.00 END) +0.0;
(CASE "two" when "one" then 1.00 WHEN "two" then 2.00 END) +0.0
2.00
select case 1/0 when "a" then "true" else "false" END;
case 1/0 when "a" then "true" else "false" END
false
select case 1/0 when "a" then "true" END;
case 1/0 when "a" then "true" END
NULL
select (case 1/0 when "a" then "true" END) | 0;
(case 1/0 when "a" then "true" END) | 0
NULL
select (case 1/0 when "a" then "true" END) + 0.0;
(case 1/0 when "a" then "true" END) + 0.0
NULL
select case when 1>0 then "TRUE" else "FALSE" END;
case when 1>0 then "TRUE" else "FALSE" END
TRUE
select case when 1<0 then "TRUE" else "FALSE" END;
case when 1<0 then "TRUE" else "FALSE" END
FALSE
create table t1 (a int);
insert into t1 values(1),(2),(3),(4);
select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase order by fcase;
fcase count(*)
0 2
2 1
3 1
select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase order by fcase;
fcase count(*)
nothing 2
one 1
two 1
drop table t1;
create table t1 (row int not null, col int not null, val varchar(255) not null);
insert into t1 values (1,1,'orange'),(1,2,'large'),(2,1,'yellow'),(2,2,'medium'),(3,1,'green'),(3,2,'small');
select max(case col when 1 then val else null end) as color from t1 group by row;
color
orange
yellow
green
drop table t1;
SET NAMES latin1;
CREATE TABLE t1 SELECT
CASE WHEN 1 THEN _latin1'a' COLLATE latin1_danish_ci ELSE _latin1'a' END AS c1,
CASE WHEN 1 THEN _latin1'a' ELSE _latin1'a' COLLATE latin1_danish_ci END AS c2,
CASE WHEN 1 THEN 'a' ELSE 1 END AS c3,
CASE WHEN 1 THEN 1 ELSE 'a' END AS c4,
CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5,
CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6,
CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7,
CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8,
CASE WHEN 1 THEN 1.0 END AS c9,
CASE WHEN 1 THEN 0.1e1 else 0.1 END AS c10,
CASE WHEN 1 THEN 0.1e1 else 1 END AS c11,
CASE WHEN 1 THEN 0.1e1 else '1' END AS c12
;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
`c3` varchar(1) NOT NULL DEFAULT '',
`c4` varchar(1) NOT NULL DEFAULT '',
`c5` varchar(4) NOT NULL DEFAULT '',
`c6` varchar(4) NOT NULL DEFAULT '',
`c7` decimal(2,1) NOT NULL DEFAULT '0.0',
`c8` decimal(2,1) NOT NULL DEFAULT '0.0',
`c9` decimal(2,1) DEFAULT NULL,
`c10` double NOT NULL DEFAULT '0',
`c11` double NOT NULL DEFAULT '0',
`c12` varchar(5) NOT NULL DEFAULT ''
) ENGINE=TIANMU DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT CASE
WHEN 1
THEN _latin1'a' COLLATE latin1_danish_ci
ELSE _latin1'a' COLLATE latin1_swedish_ci
END;
ERROR HY000: Illegal mix of collations (latin1_danish_ci,EXPLICIT) and (latin1_swedish_ci,EXPLICIT) for operation 'case'
SELECT CASE _latin1'a' COLLATE latin1_general_ci
WHEN _latin1'a' COLLATE latin1_danish_ci THEN 1
WHEN _latin1'a' COLLATE latin1_swedish_ci THEN 2
END;
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT), (latin1_danish_ci,EXPLICIT), (latin1_swedish_ci,EXPLICIT) for operation 'case'
SELECT
CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END,
CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END,
CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END,
CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END;
CASE _latin1'a' COLLATE latin1_general_ci WHEN _latin1'A' THEN '1' ELSE 2 END CASE _latin1'a' COLLATE latin1_bin WHEN _latin1'A' THEN '1' ELSE 2 END CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_swedish_ci THEN '1' ELSE 2 END CASE _latin1'a' WHEN _latin1'A' COLLATE latin1_bin THEN '1' ELSE 2 END
1 2 1 2
CREATE TABLE t1 SELECT IFNULL('a' COLLATE latin1_swedish_ci, 'b' COLLATE latin1_bin);
ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'ifnull'
SELECT 'case+union+test'
UNION
SELECT CASE LOWER('1') WHEN LOWER('2') THEN 'BUG' ELSE 'nobug' END;
case+union+test
case+union+test
nobug
SELECT CASE LOWER('1') WHEN LOWER('2') THEN 'BUG' ELSE 'nobug' END;
CASE LOWER('1') WHEN LOWER('2') THEN 'BUG' ELSE 'nobug' END
nobug
SELECT 'case+union+test'
UNION
SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END;
case+union+test
case+union+test
nobug
create table t1(a float, b int default 3);
insert into t1 (a) values (2), (11), (8);
select min(a), min(case when 1=1 then a else NULL end),
min(case when 1!=1 then NULL else a end)
from t1 where b=3 group by b;
min(a) min(case when 1=1 then a else NULL end) min(case when 1!=1 then NULL else a end)
2 2 2
drop table t1;
CREATE TABLE t1 (EMPNUM INT);
INSERT INTO t1 VALUES (0), (2);
CREATE TABLE t2 (EMPNUM DECIMAL (4, 2));
INSERT INTO t2 VALUES (0.0), (9.0);
SELECT COALESCE(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM,
t1.EMPNUM AS EMPMUM1, t2.EMPNUM AS EMPNUM2
FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM;
CEMPNUM EMPMUM1 EMPNUM2
0.00 0 0.00
2.00 2 NULL
SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM,
t1.EMPNUM AS EMPMUM1, t2.EMPNUM AS EMPNUM2
FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM;
CEMPNUM EMPMUM1 EMPNUM2
0.00 0 0.00
2.00 2 NULL
DROP TABLE t1,t2;
create table t1 (a int, b bigint unsigned);
create table t2 (c int);
insert into t1 (a, b) values (1,457279462277), (2,1819694241997),
(3,1114190595086);
insert into t2 (c) values (1), (2), (3);
select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
join t2 on t1.a=t2.c order by d;
a d
1 457279462277
3 1114190595086
2 1819694241997
select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1
join t2 on t1.a=t2.c where b=1114190595086 order by d;
a d
3 1114190595086
drop table t1, t2;
CREATE TABLE t1(a YEAR);
SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END;
1
DROP TABLE t1;
drop database case_when_test;
25 changes: 25 additions & 0 deletions mysql-test/suite/tianmu/r/drop_restric.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# DROP TABLE RESTRICT
# The RESTRICT clause limits the table to being dropped in the front end only.
# This could be useful when the table has been dropped on one user module,
# and needs to be synced to others.
#
DROP DATABASE IF EXISTS drop_restric_test;
CREATE DATABASE drop_restric_test;
USE drop_restric_test;
CREATE TABLE t1 (id INT, name CHAR(25));
INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'), (4, 'four'), (5, 'five');
SELECT * FROM t1 ORDER BY id;
id name
1 one
2 two
3 three
4 four
5 five
SELECT COUNT(*) FROM t1;
COUNT(*)
5
DROP TABLE IF EXISTS t1 RESTRICT;
DROP TABLE t1;
ERROR 42S02: Unknown table 'drop_restric_test.t1'
DROP DATABASE IF EXISTS drop_restric_test;
80 changes: 80 additions & 0 deletions mysql-test/suite/tianmu/r/empty_string_not_null.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#
# tests updates that sets invalid range when we set value at max boundary that is less than max.
#
DROP DATABASE IF EXISTS empty_string_not_null;
CREATE DATABASE empty_string_not_null;
USE empty_string_not_null;
CREATE TABLE t(s text);
INSERT INTO t(s) VALUES (''), (NULL);
SELECT COUNT(*) FROM t WHERE s IS NULL;
COUNT(*)
1
SELECT COUNT(*) FROM t WHERE s IS NOT NULL;
COUNT(*)
1
SELECT * FROM t;
s

NULL
DROP TABLE t;
CREATE TABLE t(s text);
INSERT INTO t(s) VALUES ('');
INSERT INTO t(s) VALUES (NULL);
SELECT * FROM t;
s

NULL
SELECT COUNT(*) FROM t WHERE s IS NULL;
COUNT(*)
1
DROP TABLE t;
CREATE TABLE t(s text) ;
INSERT INTO t(s) VALUES ('_CpNuLl_'),(''), (NULL);
SELECT * FROM t;
s
_CpNuLl_

NULL
SELECT COUNT(*) FROM t WHERE s IS NULL;
COUNT(*)
1
DROP TABLE t;
CREATE TABLE t(c6 CHAR(6)) ;
INSERT INTO t(c6) VALUES ('a'), ('b'), ('c');
SELECT 2, COUNT(*) FROM t WHERE (c6 <= 'b' OR c6 <= '');
2 COUNT(*)
2 2
SELECT 2, COUNT(*) FROM t WHERE (c6 <= 'b');
2 COUNT(*)
2 2
SELECT 0, COUNT(*) FROM t WHERE (c6 <= '');
0 COUNT(*)
0 0
SELECT 0, COUNT(*) FROM t WHERE (c6 <= ' ');
0 COUNT(*)
0 0
SELECT 2, COUNT(*) FROM t WHERE (c6 <= 'b' OR c6 <= ' ');
2 COUNT(*)
2 2
SELECT 0, COUNT(*) FROM t WHERE (c6 < '');
0 COUNT(*)
0 0
SELECT 0, COUNT(*) FROM t WHERE (c6 < ' ');
0 COUNT(*)
0 0
DROP TABLE IF EXISTS t;
CREATE TABLE t(a CHAR(10));
INSERT INTO t(a) VALUES (''), (NULL), (' '), (' a ');
SELECT LTRIM(a) FROM t;
LTRIM(a)

NULL

a
SELECT RTRIM(a) FROM t;
RTRIM(a)

NULL

a
DROP DATABASE empty_string_not_null;
36 changes: 36 additions & 0 deletions mysql-test/suite/tianmu/r/left_right_func.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# left and right func test
#
DROP DATABASE IF EXISTS left_right_func_test;
CREATE DATABASE left_right_func_test;
USE left_right_func_test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (`time_tk` INT(11) UNSIGNED NOT NULL) DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES
(2013113023),
(1900010100),
(2199123100),
(2199123100),
(2147483646),
(2147483647),
(2147483648);
SELECT LEFT(time_tk,6) AS time_tk_left FROM t1;
time_tk_left
201311
190001
219912
219912
214748
214748
214748
SELECT RIGHT(time_tk,6) AS time_tk_right FROM t1;
time_tk_right
113023
010100
123100
123100
483646
483647
483648
DROP TABLE IF EXISTS t1;
DROP DATABASE left_right_func_test;
17 changes: 17 additions & 0 deletions mysql-test/suite/tianmu/r/like_not_like.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# This test tests the (NOT) LIKE test in filters that is added
# to a FilterCommand in primproc.
# This is a very rare situation, yet somehow I managed to trigger it.
#
DROP DATABASE IF EXISTS like_not_like;
CREATE DATABASE like_not_like;
USE like_not_like;
CREATE TABLE tcs(d1 CHAR(6), d2 CHAR(6));
INSERT INTO tcs(d1, d2) VALUES ('a','a'), ('a', 'b');
SELECT 'stonedb like', d1, d2 FROM tcs WHERE (d1 LIKE d2);
stonedb like d1 d2
stonedb like a a
SELECT 'stonedb not like', d1, d2 FROM tcs WHERE (d1 NOT LIKE d2);
stonedb not like d1 d2
stonedb not like a b
DROP DATABASE like_not_like;
29 changes: 29 additions & 0 deletions mysql-test/suite/tianmu/r/multi_join.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# right join/left join/inner join /full join
#
DROP DATABASE IF EXISTS multi_join_test;
CREATE DATABASE multi_join_test;
USE multi_join_test;
drop table if exists all_datatype_table;
Warnings:
Note 1051 Unknown table 'multi_join_test.all_datatype_table'
create table all_datatype_table(id int not null,c_intger integer,c_char char(10));
insert into all_datatype_table values(1,1000,1000);
insert into all_datatype_table values(2,2000,1000);
insert into all_datatype_table values(3,2001,null);
insert into all_datatype_table values(4,2002,'a');
select count(*) from all_datatype_table t1 right join all_datatype_table t2 on t1.id=t2.id
inner join all_datatype_table t3 on t1.id=t3.id
right join all_datatype_table t4 on t1.id=t4.id
left join all_datatype_table t5 on t1.id=t5.id
inner join all_datatype_table t6 on t1.id=t6.id
left join all_datatype_table t7 on t1.id=t7.id
right join all_datatype_table t8 on t1.id=t8.id
right join all_datatype_table t10 on t1.id=t10.id
right join all_datatype_table t11 on t1.id=t11.id
right join all_datatype_table t13 on t1.id=t13.id
right join all_datatype_table t15 on t1.id=t15.id
right join all_datatype_table t16 on t1.id=t16.id;
count(*)
4
drop DATABASE multi_join_test;
Loading