Skip to content

Commit

Permalink
fix create index when val is text
Browse files Browse the repository at this point in the history
Signed-off-by: zyguan <[email protected]>
  • Loading branch information
zyguan committed Apr 2, 2024
1 parent fae499b commit a2c9a0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tidb/src/tidb/txn.clj
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
sk int not null,
val " val-type ")")])
(when (:use-index test)
(c/create-index! conn [(str "create index " (table-name i) "_sk_val"
" on " (table-name i) " (sk, val)")]))
(c/create-index! conn [(str "create index " (table-name i) "_sk_val on " (table-name i)
" (sk, val" (if (= val-type "text") "(256)" "") ")")]))
(when (:table-cache test)
(c/execute! conn [(str "alter table " (table-name i) " cache")])))))

Expand Down

0 comments on commit a2c9a0f

Please sign in to comment.