在Windows下连接的时候出错parse goleveldb://data%5Ctidb: invalid URL escape "%5C" #5
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/tidb#5
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?
Author: @insionng
出错的代码行是这样:
···
return xorm.NewEngine("tidb", "goleveldb://./data/tidb/tidb")
···
Author: @insionng
在Linux下编译的版本没有问题,完全同一份源码,就在Windows下出现这情况~
Author: @shenli
@insionng Thanks for your feedback!
TiDB supports unix socket now. You can use MySQL driver to connect to TiDB. I will update this repo soon.
Author: @insionng
@shenli
呃,请问这个bug修复了没有?
事实上我的项目是比较倾向于选择基于内嵌型的goleveldb,主要是为了替代sqlite,所以其他几个驱动类型不是很合适.
Author: @lunny
这个是不支持windows的问题吗?
Author: @insionng
@lunny 不是,应该是不知是tidb还是xorm这边把“/”斜杆给转义了,这在windows下会触发,在linux下没问题。而这个转义的地方我没法知道是tidb还是xorm哪里,否则就自行修改掉了。
Author: @shenli
@lunny @insionng 我们正在将 tidb 相关的测试转成用 mysql 的driver,以后就会去掉tidb_driver.go 这个问题也就不存在了。
不过我们发现最新的xorm可能有bug,用tidb会有一些case挂掉,用mysql也遇到了同样的问题,我已经报了issue
Author: @lunny
OK. 最新的PR应该会解决这个问题,我会尽快测试完毕并合并。