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

Mysqldump --wildcards=ON without --database option accepts wildcards in database names

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • N/A
    • Scripts & Clients
    • None
    • Unexpected results
    • Hide
      Fixed documentation.
      The behaviour left as it is.
      Show
      Fixed documentation. The behaviour left as it is.
    • Q3/2025 Maintenance

    Description

      mysqldump help says " -L, --wildcards Usage of wildcards in the table/database name. Without option "databases" wildcards can be used only in tables names, with option - in databases names."
      but dump is done for the databases with wildcards, even without --database option.

      Also please reformulate to ~ "wildcards are only recognized in table names" or "wildcards only apply to table names"

       
      CREATE DATABASE db1;
      CREATE TABLE db1.t1(a int);
      CREATE DATABASE db2;
      CREATE TABLE db2.t1(b int);
       
      --exec $MYSQL_DUMP --skip-comments --compact --wildcards=ON db%
       
      DROP DATABASE db1;
      DROP DATABASE db2;
      

      CREATE DATABASE db1;
      CREATE TABLE db1.t1(a int);
      CREATE DATABASE db2;
      CREATE TABLE db2.t1(b int);
      /*M!999999\- enable the sandbox mode */ 
      /*!40101 SET @saved_cs_client     = @@character_set_client */;
      /*!40101 SET character_set_client = utf8mb4 */;
      CREATE TABLE `t1` (
        `a` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
      /*!40101 SET character_set_client = @saved_cs_client */;
      set autocommit=0;
      commit;
      /*!40101 SET @saved_cs_client     = @@character_set_client */;
      /*!40101 SET character_set_client = utf8mb4 */;
      CREATE TABLE `t1` (
        `b` int(11) DEFAULT NULL
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
      /*!40101 SET character_set_client = @saved_cs_client */;
      set autocommit=0;
      commit;
      DROP DATABASE db1;
      DROP DATABASE db2;
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.