当我尝试更改表时,得到以下响应:
Timeout trying to lock table ; SQL statement:
ALTER TABLE FOO ADD COLUMN NAME VARCHAR(200) [50200-169] HYT00/50200 (Help)
H2网址:jdbc:h2:file:C:\h2\test;WRITE_DELAY=300;MVCC=TRUE;LOCK_MODE=0;FILE_LOCK=SOCKET
运行以下命令:
CREATE TABLE FOO (ID BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, CODE INTEGER NOT NULL)
@LOOP 6000 INSERT INTO FOO (CODE) VALUES (1)
ALTER TABLE FOO ADD COLUMN NAME VARCHAR(200) <== Here the problem happens
我的 H2 版本是 H2 1.3.169 (2012-09-09)。