From 03f5df22351dfcd727db7b112d9b2e53a4cf6471 Mon Sep 17 00:00:00 2001 From: wisehead Date: Tue, 4 Apr 2023 17:09:07 +0800 Subject: [PATCH 1/2] fix(core): fix bug: The instance occasionally crashes if both fields specified for an equi-join are of the string data types (#1476) --- mysql-test/suite/tianmu/r/hash_join.result | 21 ++++++++++++++++ mysql-test/suite/tianmu/t/hash_join.test | 29 ++++++++++++++++++++++ storage/tianmu/core/parallel_hash_join.cpp | 5 +++- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/tianmu/r/hash_join.result create mode 100644 mysql-test/suite/tianmu/t/hash_join.test diff --git a/mysql-test/suite/tianmu/r/hash_join.result b/mysql-test/suite/tianmu/r/hash_join.result new file mode 100644 index 000000000..47d73612e --- /dev/null +++ b/mysql-test/suite/tianmu/r/hash_join.result @@ -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; diff --git a/mysql-test/suite/tianmu/t/hash_join.test b/mysql-test/suite/tianmu/t/hash_join.test new file mode 100644 index 000000000..654c0d9b1 --- /dev/null +++ b/mysql-test/suite/tianmu/t/hash_join.test @@ -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; diff --git a/storage/tianmu/core/parallel_hash_join.cpp b/storage/tianmu/core/parallel_hash_join.cpp index 684e051c5..ffd71d3be 100644 --- a/storage/tianmu/core/parallel_hash_join.cpp +++ b/storage/tianmu/core/parallel_hash_join.cpp @@ -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; From 65e7c25dca0bfb806916d2313a643331cb15acce Mon Sep 17 00:00:00 2001 From: Agility6 Date: Fri, 7 Apr 2023 12:17:01 +0800 Subject: [PATCH 2/2] fix: page hover font style --- website/src/css/custom.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/css/custom.less b/website/src/css/custom.less index 84251e050..e9f0c8da9 100644 --- a/website/src/css/custom.less +++ b/website/src/css/custom.less @@ -58,7 +58,7 @@ } .navbar__link:hover, .navbar__link--active{ - font-weight: bold; + text-shadow: 1px 0 0 currentColor; } @media (max-width: 996px){