Design Principles and Implementation of Inception – A MySQL SQL Review and Automation Tool
The article explains the design motivations, architectural choices, and implementation details of Inception, a MySQL‑compatible SQL review and execution platform that follows programmers' habits, prevents common human errors, fully supports MySQL syntax, and integrates audit, backup, and rollback capabilities.
Zhou Yanwei, database director at Qunar.com and chair of the China MySQL Users Group (ACMUG), introduces his responsibilities in managing MySQL, Redis, and HBase platforms, and lists the major projects he led, including the Qunar MySQL development standards, backup platform, Redis high‑availability design, PXC architecture, client middleware, QMHA design, and the Inception tool, which has been open‑sourced.
In a recent GiTC2016 talk, Zhou and colleague Zhu Feng presented Inception, outlining five key design directions:
Align with programmers' habits
Shield users from common manual mistakes
Maintain full compatibility with MySQL syntax
Achieve the most perfect programming implementation
Support audit, execution, backup, and rollback
To meet programmers' expectations, Inception adopts the same MySQL connection protocol and SQL syntax, allowing users to interact with it using standard MySQL clients or custom applications without learning a new language.
By fully supporting MySQL's syntax through direct use of MySQL's source code, Inception ensures 100% compatibility and leverages existing MySQL parsing, binlog handling, and execution mechanisms.
The tool also provides a seamless audit‑execute workflow: it connects to the live database, obtains real‑time EXPLAIN information, evaluates the impact of each statement, and can execute approved SQL directly, reducing DBA manual steps.
During execution, Inception automatically backs up affected rows using MySQL's flashback capability based on binlog, enabling automatic rollback when needed.
Inception's SQL review component is open‑source; the project repository and documentation are available at https://github.com/mysql-inception/inception.git and http://mysql-inception.github.io/inception-document . Interested readers can join the discussion group (QQ 185803996) for further collaboration.
Qunar Tech Salon
Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.