在Windows下连接的时候出错parse goleveldb://data%5Ctidb: invalid URL escape "%5C" #5

Closed
opened 2016-05-01 16:36:07 +00:00 by lunny · 7 comments
Owner

Author: @insionng

出错的代码行是这样:
···
return xorm.NewEngine("tidb", "goleveldb://./data/tidb/tidb")
···

Author: @insionng 出错的代码行是这样: ··· return xorm.NewEngine("tidb", "goleveldb://./data/tidb/tidb") ···
Author
Owner

Author: @insionng

在Linux下编译的版本没有问题,完全同一份源码,就在Windows下出现这情况~

Author: @insionng 在Linux下编译的版本没有问题,完全同一份源码,就在Windows下出现这情况~
Author
Owner

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: @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
Owner

Author: @insionng

@shenli

呃,请问这个bug修复了没有?

事实上我的项目是比较倾向于选择基于内嵌型的goleveldb,主要是为了替代sqlite,所以其他几个驱动类型不是很合适.

Author: @insionng @shenli 呃,请问这个bug修复了没有? 事实上我的项目是比较倾向于选择基于内嵌型的goleveldb,主要是为了替代sqlite,所以其他几个驱动类型不是很合适.
Author
Owner

Author: @lunny

这个是不支持windows的问题吗?

Author: @lunny 这个是不支持windows的问题吗?
Author
Owner

Author: @insionng

@lunny 不是,应该是不知是tidb还是xorm这边把“/”斜杆给转义了,这在windows下会触发,在linux下没问题。而这个转义的地方我没法知道是tidb还是xorm哪里,否则就自行修改掉了。

Author: @insionng @lunny 不是,应该是不知是tidb还是xorm这边把“/”斜杆给转义了,这在windows下会触发,在linux下没问题。而这个转义的地方我没法知道是tidb还是xorm哪里,否则就自行修改掉了。
Author
Owner

Author: @shenli

@lunny @insionng 我们正在将 tidb 相关的测试转成用 mysql 的driver,以后就会去掉tidb_driver.go 这个问题也就不存在了。
不过我们发现最新的xorm可能有bug,用tidb会有一些case挂掉,用mysql也遇到了同样的问题,我已经报了issue

Author: @shenli @lunny @insionng 我们正在将 tidb 相关的测试转成用 mysql 的driver,以后就会去掉tidb_driver.go 这个问题也就不存在了。 不过我们发现最新的xorm可能有bug,用tidb会有一些case挂掉,用mysql也遇到了同样的问题,我已经报了[issue](https://github.com/go-xorm/tests/issues/14)
Author
Owner

Author: @lunny

OK. 最新的PR应该会解决这个问题,我会尽快测试完毕并合并。

Author: @lunny OK. 最新的PR应该会解决这个问题,我会尽快测试完毕并合并。
lunny closed this issue 2019-12-02 07:38:18 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/tidb#5
No description provided.