I was always curious about what these comment enclosed preprocessor-like statements that mysqldump generates for me mean. Here's an example:
/*!40000 ALTER TABLE abc DISABLE KEYS */;
The general pattern seems to be
/*![some numeric code] [some statement] */;
Please point to proper documentation if exists. Otherwise explain. :)
It dumps one or more MySQL databases for backup or transfer to another SQL server. The mysqldump command can also generate output in CSV, other delimited text, or XML format.
Mysqldump with Transactions The --single-transaction flag will start a transaction before running. Rather than lock the entire database, this will let mysqldump read the database in the current state at the time of the transaction, making for a consistent data dump.
To dump/export a MySQL database, execute the following command in the Windows command prompt: mysqldump -u username -p dbname > filename. sql . After entering that command you will be prompted for your password.
http://dev.mysql.com/doc/refman/5.1/en/comments.html
Comments of the form /*! stuff */
are treated as comments by other RDBMSs, but MySQL will read what's inside the comment and execute it as SQL. You can use this to take advantage of MySQL-specific features even using code that might be run against other RDBMSs. For example you could use /*! ENGINE=INNODB */
in a CREATE TABLE
query.
The numbers are optional and if you use them then MySQL will ignore them if its version number is less than the number (with dots inserted in the appropriate places).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With