Skip to content

Better explanation on errors #25

@unknwon

Description

@unknwon

Hi,

I'm using https://github.com/go-xorm/tidb as driver for xorm, and when xorm executes following command:

SELECT `TABLE_NAME`, `ENGINE`, `TABLE_ROWS`, `AUTO_INCREMENT` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB') [data/gogs.tidb]

TiDB gives me error:

[error] Compile sql error: use gogs.tidb - 1:9 expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]

So, which exactly this 1:9 points to? Maybe error message can be more clear like how MySQL does:

xxx near "my statement"

Or

expect xx but found yy 

can be very helpful, too!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions