Looking at a mySQL Dump, I have come across something and like to know what they are.
I see:
/*!50001 DROP TABLE IF EXISTS `xxx` */;
What is the flag 50001, is there a list of what they mean?
It is discussed on the MySQL's forums/mailing lists 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.
The 500001 is regarding the MySQL version that generated the file.
This would be 5.00.01 or 5.0.01
50001 is a value that indicate your 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.
It's a way making a SQL script compatible with different versions of MySQL, and allows new features to be included.
YYY
/*!40100 DEFAULT CHARACTER SET latin1 */;
Commented
Feb 18, 2014 at 13:58