forked from stoneatom/stonedb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): fix bug: The instance occasionally crashes if both fields …
…specified for an equi-join are of the string data types (stoneatom#1476)
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
DROP DATABASE IF EXISTS hash_join_test; | ||
CREATE DATABASE hash_join_test; | ||
USE hash_join_test; | ||
CREATE TABLE `test1` ( | ||
`id` varchar(64) NOT NULL COMMENT 'ID' | ||
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4; | ||
CREATE TABLE `test2` ( | ||
`user_id` varchar(32) NOT NULL COMMENT '用户ID' | ||
) ENGINE=TIANMU DEFAULT CHARSET=utf8; | ||
insert test1 values('aaa'); | ||
insert test1 values('bbb'); | ||
insert test1 values('ccc'); | ||
insert test2 values('aaa'); | ||
insert test2 values('bbb'); | ||
insert test2 values('ccc'); | ||
select test1.id,test2.user_id from test2,test1 where test2.user_id = test1.id ; | ||
id user_id | ||
aaa aaa | ||
bbb bbb | ||
ccc ccc | ||
DROP DATABASE hash_join_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--source include/have_tianmu.inc | ||
|
||
--disable_warnings | ||
DROP DATABASE IF EXISTS hash_join_test; | ||
--enable_warnings | ||
|
||
CREATE DATABASE hash_join_test; | ||
|
||
USE hash_join_test; | ||
|
||
CREATE TABLE `test1` ( | ||
`id` varchar(64) NOT NULL COMMENT 'ID' | ||
) ENGINE=TIANMU DEFAULT CHARSET=utf8mb4; | ||
|
||
CREATE TABLE `test2` ( | ||
`user_id` varchar(32) NOT NULL COMMENT '用户ID' | ||
) ENGINE=TIANMU DEFAULT CHARSET=utf8; | ||
|
||
insert test1 values('aaa'); | ||
insert test1 values('bbb'); | ||
insert test1 values('ccc'); | ||
|
||
insert test2 values('aaa'); | ||
insert test2 values('bbb'); | ||
insert test2 values('ccc'); | ||
|
||
select test1.id,test2.user_id from test2,test1 where test2.user_id = test1.id ; | ||
|
||
DROP DATABASE hash_join_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters