You are here

function backup_migrate_destination_db_mysql::_get_sql_file_header in Backup and Migrate 8.2

Same name and namespace in other branches
  1. 8.3 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_get_sql_file_header()
  2. 6.2 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_get_sql_file_header()
  3. 7.3 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_get_sql_file_header()
  4. 7.2 includes/destinations.db.mysql.inc \backup_migrate_destination_db_mysql::_get_sql_file_header()

The header for the top of the sql dump file. These commands set the connection character encoding to help prevent encoding conversion issues.

1 call to backup_migrate_destination_db_mysql::_get_sql_file_header()
backup_migrate_destination_db_mysql::_backup_db_to_file in includes/destinations.db.mysql.inc
Backup the databases to a file.

File

includes/destinations.db.mysql.inc, line 387
Functions to handle the direct to database destination.

Class

backup_migrate_destination_db_mysql
A destination type for saving to a database server.

Code

function _get_sql_file_header() {
  return "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;\n\nSET NAMES utf8;\n\n";
}