Skip to content
forked from tarqd/mysqlpop

MySQL Parser based on SQLPop (SQLite Parser).

Notifications You must be signed in to change notification settings

Qtrain/mysqlpop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQLPop

screenshot

MySQL parser (based on SQLPop, a SQLite query parser)

Goal

Provide enough support for MySQL-flavored SQL to provide a base for higher level tooling (query fingerprints, read write splitting proxies, intrusion detection, etc).

MySQL Flavor

  • Set Variable statements (set @foo = 1)
  • MySQL-style variables (@@global.read_only)
  • Variable assignment in expressions (select @id := @id +1)
  • MySQL-style backslash escapes in strings ('foo\'bar')
  • Removed SQLite specific variable syntax
  • Parameters/Placeholders (select foo from bar where baz > ?)
  • Prepared statements
  • Procedures
  • Transactions
  • XA Transactions
  • SHOW statements
  • Change autoincrement keyword
  • MySQL style create table (UNIQUE/FOREIGN key etc)
  • SELECT into variables/dumpfiles/procedures
  • DO statements
  • CALL statements
  • CHECK statements
  • FLUSH statements
  • GRANT/REVOKE statements
  • HANDLER statements
  • LOAD DATA statements
  • LOCK/UNLOCK statements
  • RENAME statement
  • USE statement
  • TRUNCATE statement

And maybe some other differences we'll run into after we've knocked out this list.

Currenly, only the lexer is complete and tested. The parser is almost complete (see LARLPOP issues).

About

MySQL Parser based on SQLPop (SQLite Parser).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%