Inexplicable mysqldump result

Why are these lines present in mysqldump output?

/*!40101 SET @ OLD_CHARACTER_SET_CLIENT=@ @CHARACTER_SET_CLIENT */; /*!40101 SET @ OLD_CHARACTER_SET_RESULTS=@ @CHARACTER_SET_RESULTS */; /*!40101 SET @ OLD_COLLATION_CONNECTION=@ @COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @ OLD_TIME_ZONE=@ @TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @ OLD_UNIQUE_CHECKS=@ @UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @ OLD_FOREIGN_KEY_CHECKS=@ @FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 

They are commented and begin with ![some number] . What does it mean?

+5
source share
1 answer

it

 /*!40014 

just ensures that the following command is only executed if the version of MySQL is at least 4.00.14 .

it

 SET @ OLD_CHARACTER_SET_CLIENT=@ @CHARACTER_SET_CLIENT 

stores current MySQL settings. Variables starting with @@ are system variables; variables starting with @ are user-defined variables.

After data import is complete, MySQL will restore to its original state using the operators in the reverse order, for example

 /*!40101 SET @@ CHARACTER_SET_CLIENT=@OLD _CHARACTER_SET_CLIENT */; 
+10
source

Source: https://habr.com/ru/post/1203994/


All Articles