Skip to content

Commit

Permalink
Merge branch 'stonedb-5.7-dev' into 1481-hard-code-def
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Apr 9, 2023
2 parents 3553730 + 65e7c25 commit 41e4250
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
21 changes: 21 additions & 0 deletions mysql-test/suite/tianmu/r/hash_join.result
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;
29 changes: 29 additions & 0 deletions mysql-test/suite/tianmu/t/hash_join.test
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;
5 changes: 4 additions & 1 deletion storage/tianmu/core/parallel_hash_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ namespace Tianmu {
namespace core {
namespace {
const int kJoinSplittedMinPacks = 5;
const int kTraversedPacksPerFragment = 30;
// bug 1476: change this threhold from 30 to INT_MAX32 to disable the parallel hash join
// because the result is sometimes wrong if parallel hash join is enabled.
// we'll re-enable the hash join later if the bug is fixed in near future.
const int kTraversedPacksPerFragment = INT_MAX32 / 2;

int EvaluateTraversedFragments(int packs_count) {
const int kMaxTraversedFragmentCount = 8;
Expand Down
2 changes: 1 addition & 1 deletion website/src/css/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}

.navbar__link:hover, .navbar__link--active{
font-weight: bold;
text-shadow: 1px 0 0 currentColor;
}

@media (max-width: 996px){
Expand Down

0 comments on commit 41e4250

Please sign in to comment.