Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16471

mysqldump throws "Variable 'sql_mode' can't be set to the value of 'NULL' (1231)"

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 10.3.7
    • 10.3.8
    • Backup
    • CentOS Linux release 7.3.1611 (3.10.0-514.26.2.el7.x86_64)

    Description

      After upgrading to MariaDB 10.3.7 am not able to take backup using mysqldump;

      Steps to reproduce:

      MariaDB [(none)]> create database testdb;
      Query OK, 1 row affected (0.001 sec)
       
      MariaDB [(none)]> use testdb;
      Database changed
       
      MariaDB [testdb]> create table test123 (c1 varchar(10));
      Query OK, 0 rows affected (0.004 sec)
       
      #mysqldump -uroot -pxxxxxxxx --port=3306 --databases testdb  >  testdb.sql
       
      mysqldump: Couldn't execute '/*!40100 SET @@SQL_MODE='' */': Variable 'sql_mode' can't be set to the value of 'NULL' (1231)
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa added a comment - - edited

            Reproduced on MariaDB 10.3 with SET global sql_mode='ORACLE,EMPTY_STRING_IS_NULL';

            alice Alice Sherepa added a comment - - edited Reproduced on MariaDB 10.3 with SET global sql_mode='ORACLE,EMPTY_STRING_IS_NULL';
            deepakp DP (Inactive) added a comment -

            Yes, we have EMPTY_STRING_IS_NULL sql_mode enabled.

            deepakp DP (Inactive) added a comment - Yes, we have EMPTY_STRING_IS_NULL sql_mode enabled.

            A simple SQL script demonstrating the problem:

            SET sql_mode='ORACLE,EMPTY_STRING_IS_NULL';
            SET sql_mode='';
            

            ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NULL'
            

            bar Alexander Barkov added a comment - A simple SQL script demonstrating the problem: SET sql_mode= 'ORACLE,EMPTY_STRING_IS_NULL' ; SET sql_mode= '' ; ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NULL'

            People

              bar Alexander Barkov
              deepakp DP (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.