gpt4 book ai didi

转储中的 MySQL 标志

转载 作者:可可西里 更新时间:2023-11-01 07:03:29 26 4
gpt4 key购买 nike

查看 mySQL 转储时,我遇到了一些东西,想知道它们是什么。

我明白了:

/*!50001 DROP TABLE IF EXISTS `xxx` */;

flag 50001是什么意思,有什么意思的列表吗?

最佳答案

它在 MySQL 的论坛/邮件列表上进行了讨论 here .

/*!50001 DROP TABLE `category_count_view`*/; 

This is a "feature" of MySQL. Any other RDBMS will treat this as a comment.

But, MySQL looks at 50001 and checks that as a MySQL version. This is Version 5.00.01, or 5.0.1 in the real world, but leaves room for the the sub-version and release to be greater than 9.

MySQL will treat the line as a comment if MySQL is below 5.0.1, and will process the line if MySQL is greater than or equal to 5.0.1.

It's a way making a SQL script compatible with different versions of MySQL, and allows new features to be included.

关于转储中的 MySQL 标志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21855862/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com