无法使用 engine.ImportFile 导入长 SQL 文件 #1876
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1876
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
数据库是 Percona Server,该 SQL 文件一共 279 行,使用 engine.ImportFile 直接导入时大约会在 113 行出错,报错部分的提示为:
Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE IF NOT EXISTS
announcement
(id
int(11) NOT NULL AUTO_INCREME' at line 13这段附近的 SQL 源代码如下:
单独在 SQL 控制台中导入,测试通过。
将问题 SQL 单独抽出为文件,使用 engine.ImportFile 进行导入,测试通过。
使用 engine.Import 通过 bufio 导入,测试通过。
SQL 文件导入失败to 无法使用 engine.ImportFile 导入长 SQL 文件Which line is 279?
当事 SQL 文件已经上传。