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

LP:978146 - my.ini with PBXT=OFF has to be placed in DATADIR to be effective

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Not a Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      According to the documentation on
      http://dev.mysql.com/doc/refman/5.5/en/option-files.html
      Windows versions of MySQL/MariaDB searches for:

      On Windows, MySQL programs read startup options from the following files, in the specified order (top items are used first).
      File Name Purpose
      WINDIR\my.ini, WINDIR\my.cnf Global options
      C:\my.ini, C:\my.cnf Global options
      INSTALLDIR\my.ini, INSTALLDIR\my.cnf Global options

      Instead, only when my.ini is placed in DATADIR, the PBXT engine is really OFF, and no more PBXT files are created.

      Testcase:
      =========
      Windows XP 32 bit
      INSTALLDIR = C:\MariaDB
      DATADIR = C:\MariaDB\data

      Place my.ini with the following lines in MariaDB INSTALLDIR:
      — BEGIN —
      [mysqld]
      pbxt=OFF
      skip-innodb
      skip-name-resolve
      — END —

      The line 'skip-innodb' can be replaced with 'innodb=OFF', the result is the same.

      Start the server.

      Expected behavior would be:
      120410 16:04:45 [Note] Plugin 'PBXT' is disabled.
      120410 16:04:45 [Note] Plugin 'InnoDB' is disabled.
      120410 16:04:45 [Note] Plugin 'FEEDBACK' is disabled.

      But instead, InnoDB/PBXT database and log files are created:
      120410 16:01:49 [Note] PrimeBase XT (PBXT) Engine 1.0.11-7 Pre-GA loaded...
      120410 16:01:49 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://www.primebase.org
      InnoDB: The InnoDB memory heap is disabled
      InnoDB: Mutexes and rw_locks use Windows interlocked functions
      InnoDB: Compressed tables use zlib 1.2.3
      120410 16:01:49 InnoDB: Initializing buffer pool, size = 128.0M
      120410 16:01:49 InnoDB: Completed initialization of buffer pool
      InnoDB: The first specified data file .\ibdata1 did not exist:
      InnoDB: a new database to be created!
      120410 16:01:49 InnoDB: Setting file .\ibdata1 size to 10 MB
      InnoDB: Database physically writes the file full: wait...
      120410 16:01:49 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
      InnoDB: Setting log file .\ib_logfile0 size to 5 MB
      InnoDB: Database physically writes the file full: wait...
      120410 16:01:50 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
      InnoDB: Setting log file .\ib_logfile1 size to 5 MB
      InnoDB: Database physically writes the file full: wait...
      InnoDB: Doublewrite buffer not found: creating new
      InnoDB: Doublewrite buffer created
      InnoDB: Creating foreign key constraint system tables
      InnoDB: Foreign key constraint system tables created

      Stop server.

      Copy my.ini from INSTALLDIR to DATADIR.
      Delete created ib_logfile0, ib_logfile1, ibdata1, pbxt-lock in DATADIR.

      Restart server.

      No more ib* and pbxt* files are created.

      Checked this behavior on 5.2.12 and 5.3.6. Couldn't check on 5.5.22 due to https://mariadb.atlassian.net/browse/MDEV-208

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
            Hi,

            If you are running the server as a service, it makes the difference.
            Did you configure the service manually, or got it while using MSI?
            If you got it automatically, or followed instructions on configuring it, in all likelihood it is run with --defaults-file=<file name> as a single command-line parameter. Providing explicit defaults-file on the command line means that options are to be read from this file only.
            Please check your service properties.

            Show
            elenst Elena Stepanova added a comment - Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective Hi, If you are running the server as a service, it makes the difference. Did you configure the service manually, or got it while using MSI? If you got it automatically, or followed instructions on configuring it, in all likelihood it is run with --defaults-file=<file name> as a single command-line parameter. Providing explicit defaults-file on the command line means that options are to be read from this file only . Please check your service properties.
            Hide
            nbrnhardt nbrnhardt added a comment -

            Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
            WMIC shows there is a --defaults-file parameter indeed:

            mysqld.exe "C:\mariadb\bin\mysqld.exe" "--defaults-file=C:\mariadb\data\my.ini" "MySQL"

            Yes, I used the installer when I installed MySQL/MariaDB for the first time.

            The only documentation of this parameter I found is in the MySQL Reference at

            http://dev.mysql.com/doc/refman/5.5/en/option-files.html#option_general_defaults-file

            which states:
            --defaults-file=file_name

            Use only the given option file. If the file does not exist or is otherwise inaccessible, the program exits with an error. Before MySQL 5.5.8, file_name must be the full path name to the file. As of MySQL 5.5.8, the name is interpreted relative to the current directory if given as a relative path name.

            But then, contary to the documentation, MariaDB 5.2/5.3 does not exit when the file is missing.

            Show
            nbrnhardt nbrnhardt added a comment - Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective WMIC shows there is a --defaults-file parameter indeed: mysqld.exe "C:\mariadb\bin\mysqld.exe" "--defaults-file=C:\mariadb\data\my.ini" "MySQL" Yes, I used the installer when I installed MySQL/MariaDB for the first time. The only documentation of this parameter I found is in the MySQL Reference at http://dev.mysql.com/doc/refman/5.5/en/option-files.html#option_general_defaults-file which states: --defaults-file=file_name Use only the given option file. If the file does not exist or is otherwise inaccessible, the program exits with an error. Before MySQL 5.5.8, file_name must be the full path name to the file. As of MySQL 5.5.8, the name is interpreted relative to the current directory if given as a relative path name. But then, contary to the documentation, MariaDB 5.2/5.3 does not exit when the file is missing.
            Hide
            elenst Elena Stepanova added a comment -

            Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
            >> contary to the documentation, MariaDB 5.2/5.3 does not exit when the file is missing.

            This is true, we have a bug report about this: bug #916922. It equally concerns MySQL 5.1 and MariaDB versions based on it (5.1, 5.2, 5.3), but not MySQL 5.5 or MariaDB 5.5 (at least it wasn't observed on 5.5 when the bug was reported).

            Show
            elenst Elena Stepanova added a comment - Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective >> contary to the documentation, MariaDB 5.2/5.3 does not exit when the file is missing. This is true, we have a bug report about this: bug #916922. It equally concerns MySQL 5.1 and MariaDB versions based on it (5.1, 5.2, 5.3), but not MySQL 5.5 or MariaDB 5.5 (at least it wasn't observed on 5.5 when the bug was reported).
            Hide
            elenst Elena Stepanova added a comment -

            Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
            Set to 'Invalid' since the initial problem turned out to be a configuration issue.
            The second reported problem (comment #8) is real, but it's a duplicate of bug #916922.

            Show
            elenst Elena Stepanova added a comment - Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective Set to 'Invalid' since the initial problem turned out to be a configuration issue. The second reported problem (comment #8) is real, but it's a duplicate of bug #916922.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 978146

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 978146

              People

              • Assignee:
                Unassigned
                Reporter:
                nbrnhardt nbrnhardt
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: