Skip to content
Snippets Groups Projects

Changed sql_mode to be set with an array of options rather than a string (10.4.x)

Changed sql_mode to be set with an array of options rather than a string. Backport of 2939760 from 11.x branch.

Closes #2939760

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
2
3 namespace Drupal\mysql\Driver\Database\mysql;
4
5 /**
6 * @addtogroup database
7 * @{
8 */
9
10 /**
11 * SQL Mode Settings that are relevant to Drupal's operation.
12 *
13 * @link https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html
14 * @link https://mariadb.com/kb/en/sql-mode/
15 */
16 class SqlMode {
17 /**
  • 11 * SQL Mode Settings that are relevant to Drupal's operation.
    12 *
    13 * @link https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html
    14 * @link https://mariadb.com/kb/en/sql-mode/
    15 */
    16 class SqlMode {
    17 /**
    18 * ANSI changes the SQL syntax to be closer to ANSI SQL.
    19 *
    20 * This is a meta-mode that sets a certain set of other SQL modes
    21 * When selected. Drupal enables ANSI mode by default. The
    22 * following modes are set when ANSI is selected:
    23 *
    24 * ANSI_QUOTES
    25 * IGNORE_SPACE
    26 * ONLY_FULL_GROUP_BY (Mysql only)
  • 18 * ANSI changes the SQL syntax to be closer to ANSI SQL.
    19 *
    20 * This is a meta-mode that sets a certain set of other SQL modes
    21 * When selected. Drupal enables ANSI mode by default. The
    22 * following modes are set when ANSI is selected:
    23 *
    24 * ANSI_QUOTES
    25 * IGNORE_SPACE
    26 * ONLY_FULL_GROUP_BY (Mysql only)
    27 * PIPES_AS_CONCAT
    28 * REAL_AS_FLOAT
    29 */
    30 const ANSI = "ANSI";
    31
    32 /**
    33 * TRADITIONAL make MySQL behave like a “traditional” SQL database system.
  • 5 /**
    6 * @addtogroup database
    7 * @{
    8 */
    9
    10 /**
    11 * SQL Mode Settings that are relevant to Drupal's operation.
    12 *
    13 * @link https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html
    14 * @link https://mariadb.com/kb/en/sql-mode/
    15 */
    16 class SqlMode {
    17 /**
    18 * ANSI changes the SQL syntax to be closer to ANSI SQL.
    19 *
    20 * This is a meta-mode that sets a certain set of other SQL modes
  • 1 <?php
    2
    3 namespace Drupal\mysql\Driver\Database\mysql;
    4
    5 /**
    6 * @addtogroup database
    7 * @{
    8 */
    9
    10 /**
    11 * SQL Mode Settings that are relevant to Drupal's operation.
    12 *
    13 * @link https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html
  • Greg Anderson added 1 commit

    added 1 commit

    Compare with previous version

  • Greg Anderson added 8 commits

    added 8 commits

    • ff2fd012...2311b8bf - 2 commits from branch project:10.4.x
    • 39b099fe - Changed sql_mode to be set with an array of options rather than a string....
    • 19bb5b33 - Code style
    • 51da1a2d - Use "non-polluting" version of sql_mode command
    • 6da12247 - Fix extraneous brace problem and a couple code style issues.
    • b97e6a6a - Use SqlMode class with mode constants
    • 8d21c98a - Touch up SqlMode comments.

    Compare with previous version

  • Greg Anderson added 7 commits

    added 7 commits

    • c71e641e - 1 commit from branch project:10.4.x
    • 3f1ff7a0 - Changed sql_mode to be set with an array of options rather than a string....
    • 81e55570 - Code style
    • 6a06da37 - Use "non-polluting" version of sql_mode command
    • b6411ca8 - Fix extraneous brace problem and a couple code style issues.
    • 20fe4c52 - Use SqlMode class with mode constants
    • ab9de7a8 - Touch up SqlMode comments.

    Compare with previous version

  • Greg Anderson added 11 commits

    added 11 commits

    • ab9de7a8...42ffad69 - 4 commits from branch project:10.4.x
    • 9b271967 - Changed sql_mode to be set with an array of options rather than a string....
    • 636d66ca - Code style
    • 163b783e - Use "non-polluting" version of sql_mode command
    • f7220634 - Fix extraneous brace problem and a couple code style issues.
    • 34403516 - Use SqlMode class with mode constants
    • 397cf0e6 - Touch up SqlMode comments.
    • c59b9ffa - Add a few more Sql Mode docs, and reference them from default.settings.php.

    Compare with previous version

  • Greg Anderson added 10 commits

    added 10 commits

    • c59b9ffa...6e78beed - 2 commits from branch project:10.4.x
    • 433811ea - Changed sql_mode to be set with an array of options rather than a string....
    • 109df211 - Code style
    • 96aaf27a - Use "non-polluting" version of sql_mode command
    • 0fb538d5 - Fix extraneous brace problem and a couple code style issues.
    • 1de6d334 - Use SqlMode class with mode constants
    • e24354cb - Touch up SqlMode comments.
    • 03e7fc31 - Add a few more Sql Mode docs, and reference them from default.settings.php.
    • d069d834 - Add SqlModeSelectionTest

    Compare with previous version

  • Greg Anderson added 1 commit

    added 1 commit

    • 824156f5 - Improve comments in SqlModeSelectionTest, and also illustrate that it is not...

    Compare with previous version

  • Please register or sign in to reply
    Loading