GithubHelp home page GithubHelp logo

Better explanation on errors about tidb HOT 9 CLOSED

pingcap avatar pingcap commented on August 15, 2024
Better explanation on errors

from tidb.

Comments (9)

shenli avatar shenli commented on August 15, 2024

Hello Unknwon,
"1:9" means there is an error near line 1 and column 9.
For your error log, there is a compile error in "use gogs.tidb" near the dot (the 9th character). I check parser/parser.y and find that use statement does not allow dbname with a dot. See: https://github.com/pingcap/tidb/blob/master/parser/parser.y#L3268

Thanks!

from tidb.

shenli avatar shenli commented on August 15, 2024

@unknwon please review this #33

Current error log looks like this:
tidb> use gogs.tidb;
2015/09/07 12:36:20 session.go:123: [error] Syntax error: use gogs.tidb;
2015/09/07 12:36:20 session.go:124: [error] Error occurs at line 1 column 9 near ".".

from tidb.

unknwon avatar unknwon commented on August 15, 2024

OK, thanks!

But please add this to docs.

from tidb.

unknwon avatar unknwon commented on August 15, 2024

Just tested again without dot in db name:

2015/09/07 05:32:52 session.go:123: [error] Compile sql error: use gogs-tidb - 1:9 expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]
[xorm] [info]  2015/09/07 05:32:52.159445 [sql] SELECT `TABLE_NAME`, `ENGINE`, `TABLE_ROWS`, `AUTO_INCREMENT` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB') [data/gogs-tidb]

Exactly same error... is it really about database name?

from tidb.

unknwon avatar unknwon commented on August 15, 2024

My bad.... - can't be used either. 😭

from tidb.

mathiasrw avatar mathiasrw commented on August 15, 2024

@unknwon try _

from tidb.

shenli avatar shenli commented on August 15, 2024

@unknwon we only support letters, numbers and '_' in dbname and it must starts with a letter. Try gogs_tidb please.
You got the old style error log? Have you pulled the latest code and rebuild TiDB?

from tidb.

unknwon avatar unknwon commented on August 15, 2024

Thank you both @mathiasrw @shenli

Please put that on docs... it is very confusing.

from tidb.

shenli avatar shenli commented on August 15, 2024

I will improve the docs. Thanks!

from tidb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.