Skip to content

Commit b3b8335

Browse files
dveedenmbellade
authored andcommitted
HHH-20058: Use shared lock promotion in TiDB
1 parent 5449ab1 commit b3b8335

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

docker_db.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,15 @@ tidb_8_5() {
14171417
databases+=("hibernate_orm_test_${n}")
14181418
done
14191419
create_cmd=
1420+
1421+
# Since v7.2
1422+
# https://docs.pingcap.com/tidb/stable/system-variables/#tidb_enable_check_constraint-new-in-v720
14201423
create_cmd+="SET GLOBAL tidb_enable_check_constraint=ON;"
1424+
1425+
# Since v8.3
1426+
# https://docs.pingcap.com/tidb/stable/system-variables/#tidb_enable_shared_lock_promotion-new-in-v830
1427+
create_cmd+="SET GLOBAL tidb_enable_shared_lock_promotion=ON;"
1428+
14211429
create_cmd+="CREATE DATABASE IF NOT EXISTS hibernate_orm_test;"
14221430
create_cmd+="CREATE USER IF NOT EXISTS 'hibernate_orm_test'@'%' IDENTIFIED BY 'hibernate_orm_test';"
14231431
create_cmd+="GRANT ALL ON hibernate_orm_test.* TO 'hibernate_orm_test'@'%';"

hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/TiDBDialect.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ public LockingSupport getLockingSupport() {
139139
return TIDB_LOCKING_SUPPORT;
140140
}
141141

142-
@Override
143-
protected boolean supportsForShare() {
144-
return false;
145-
}
146-
147142
@Override
148143
protected boolean supportsAliasLocks() {
149144
return false;

0 commit comments

Comments
 (0)