-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ibd2sql解析表结构DDL问题 #8
Comments
感谢您提供下的BUG.
如下为修复后的测试例子: SHELL> python3 main.py /data/mysql_3314/mysqldata/ibd2sql/t20240126.ibd
CREATE TABLE IF NOT EXISTS `ibd2sql`.`t20240126`(
`id` int NOT NULL,
`aa` varchar(200) NULL,
`bb` blob NULL,
`cc` timestamp DEFAULT (now()),
`dd` datetime DEFAULT (now()),
`ee` int NULL,
PRIMARY KEY (`id`),
KEY `aa` (`aa`,`bb`(10)),
KEY `bb` (`bb`(10),`aa`(10)),
KEY `bb_2` (`bb`(20),`ee`),
KEY `bb_3` (`bb`(30),`aa`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ; |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
解析表结果时,如果列类型 timestamp且有默认值是,建表语句
xx timestamp default 'current_timestamp' ,不需要''
如果blob/text字段,在key里面,会丢失,长度
key(xx,text) ---> key(xx,text(11))
The text was updated successfully, but these errors were encountered: