From 43d788ed0ab5d3a37737854ad069fc95ba69131b Mon Sep 17 00:00:00 2001 From: dbsid Date: Mon, 5 Dec 2022 01:10:26 +0800 Subject: [PATCH] make sure clustered index is enabled for tidb/mysql driver by default --- db/mysql/db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/mysql/db.go b/db/mysql/db.go index bb34e2a6..4c488766 100644 --- a/db/mysql/db.go +++ b/db/mysql/db.go @@ -165,8 +165,8 @@ func (db *mysqlDB) createTable(driverName string) error { s := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s (YCSB_KEY VARCHAR(64) PRIMARY KEY", tableName) buf.WriteString(s) - if driverName == "tidb" && db.p.GetBool(tidbClusterIndex, true) { - buf.WriteString(" CLUSTERED") + if (driverName == "tidb" || driverName == "mysql") && db.p.GetBool(tidbClusterIndex, true) { + buf.WriteString(" /*T![clustered_index] CLUSTERED */") } for i := int64(0); i < fieldCount; i++ {