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

CONNECT engine table_type=JDBC causes mysqldump --all-databases to fail

Details

    Description

      When CONNECT is set up for use with JDBC table types it causes mysqldump with the option --all-databases to fail.

      It appears the reason is that CONNECT with JDBC creates a database called:

      #mysql50#.oracle_jre_usage
      

      The above shows up as a database but cannot be accessed via MySQL Workbench nor apparently backed up by mysqldump --all-databases

      Attachments

        1. 2016-11-06 (4).png
          228 kB
          Robert Dyas
        2. bogusdb.jpg
          187 kB
          Robert Dyas
        3. Workbench.PNG
          174 kB
          Olivier Bertrand

        Activity

          rdyas Robert Dyas added a comment -

          Yes, exactly.
          People complained and they moved the folder on osx and Windows but not Linux apparently.
          It appears to create the folder even when disabled. This behavior apparently started around java 1.8u60. It persists in 1.8u112.

          rdyas Robert Dyas added a comment - Yes, exactly. People complained and they moved the folder on osx and Windows but not Linux apparently. It appears to create the folder even when disabled. This behavior apparently started around java 1.8u60. It persists in 1.8u112.

          Because this folder is recognizable by its funny name, another solution would be to post a request to MariaDB to ignore it, in particular when doing a mysqldump.

          bertrandop Olivier Bertrand added a comment - Because this folder is recognizable by its funny name, another solution would be to post a request to MariaDB to ignore it, in particular when doing a mysqldump.
          rdyas Robert Dyas added a comment -

          It shows up in show databases as well.
          You might try passing the parameter that specifies the property file on jni startup with a blank parameter. Specifics are listed in the file itself. This may, or may not, prevent the folder from being created.

          rdyas Robert Dyas added a comment - It shows up in show databases as well. You might try passing the parameter that specifies the property file on jni startup with a blank parameter. Specifics are listed in the file itself. This may, or may not, prevent the folder from being created.
          bertrandop Olivier Bertrand added a comment - - edited

          Possible but as the Oracle documentation says that usage tracker is disabled by default this is probably because on Linux it creates the folder unconditionally.

          However, I still think that it is a flow in MariaDB to regard any sub folder of the data directory as a database. There should be a way to eliminate not real ones, for instance by adding a specific file in the folder when the CREATE DATABASE is executed.

          Meanwhile, if it is possible to manually remove this folder, a workaround could be to do it before executing a mysqldump, which by the way is probably not executed so frequently.

          bertrandop Olivier Bertrand added a comment - - edited Possible but as the Oracle documentation says that usage tracker is disabled by default this is probably because on Linux it creates the folder unconditionally. However, I still think that it is a flow in MariaDB to regard any sub folder of the data directory as a database. There should be a way to eliminate not real ones, for instance by adding a specific file in the folder when the CREATE DATABASE is executed. Meanwhile, if it is possible to manually remove this folder, a workaround could be to do it before executing a mysqldump , which by the way is probably not executed so frequently.
          rdyas Robert Dyas added a comment - - edited

          Sort of agree on " I still think that it is a flaw in MariaDB to regard any sub folder of the data directory as a database." but also think that it would not be an issue if MariaDB default install didn't use the Linux home folder as its data directory. It could use a subdir of its home dir like ~/data or ~/mysqldata or maybe use /var/lib/mysqldata ... not sure. But using the home directory itself seems like a bad default install practice.

          So far, the work around that seems to be not a kludge for me is simply to change the location of the mysql data dir.

          rdyas Robert Dyas added a comment - - edited Sort of agree on " I still think that it is a flaw in MariaDB to regard any sub folder of the data directory as a database." but also think that it would not be an issue if MariaDB default install didn't use the Linux home folder as its data directory. It could use a subdir of its home dir like ~/data or ~/mysqldata or maybe use /var/lib/mysqldata ... not sure. But using the home directory itself seems like a bad default install practice. So far, the work around that seems to be not a kludge for me is simply to change the location of the mysql data dir.

          People

            bertrandop Olivier Bertrand
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.