Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-33492: mysql_install_db fails when baseurl is set #3074

Merged

Conversation

grooverdan
Copy link
Member

@grooverdan grooverdan commented Feb 20, 2024

  • The Jira issue number for this PR is: MDEV-33492

Description

auth_map.so isn't guaranteed to be available. Fedora packages it separately.

The --base-dir path of mysql_install_db.sh seems to contain historicial heuristics that have been replaced on other branches of the script.

We attempt to do the same here placing the basedir original paths so that all components are absolute.

Release Notes

TODO: What should the release notes say about this change?
Include any changed system variables, status variables or behaviour. Optionally list any https://mariadb.com/kb/ pages that need changing.

How can this PR be tested?

$ cmake --install . --prefix /tmp/m10.11
$ rm -rf /tmp/dd-10.11/
$ mkdir /tmp/dd-10.11
$ /tmp/m10.11/scripts/mariadb-install-db --no-defaults --basedir=/tmp/m10.11 --datadir=/tmp/dd-10.11 --verbose
Installing MariaDB/MySQL system tables in '/tmp/dd-10.11' ...
2024-02-21 17:16:54 0 [Note] Starting MariaDB 10.11.8-MariaDB source revision 32f535d45c7cf1ef5e445e7814dbedc67b23b7b7 as process 164589
2024-02-21 17:16:54 0 [Note] InnoDB: The first data file './ibdata1' did not exist. A new tablespace will be created!
2024-02-21 17:16:54 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-02-21 17:16:54 0 [Note] InnoDB: Number of transaction pools: 1
2024-02-21 17:16:54 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-02-21 17:16:54 0 [Note] InnoDB: Using liburing
2024-02-21 17:16:54 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2024-02-21 17:16:54 0 [Note] InnoDB: Initialized memory pressure event listener
2024-02-21 17:16:54 0 [Note] InnoDB: Completed initialization of buffer pool
2024-02-21 17:16:54 0 [Note] InnoDB: Setting file './ibdata1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-02-21 17:16:54 0 [Note] InnoDB: File './ibdata1' size is now 12.000MiB.
2024-02-21 17:16:54 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-02-21 17:16:55 0 [Note] InnoDB: Doublewrite buffer not found: creating new
2024-02-21 17:16:55 0 [Note] InnoDB: 128 rollback segments are active.
2024-02-21 17:16:55 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-02-21 17:16:55 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-02-21 17:16:55 0 [Note] InnoDB: log sequence number 0; transaction id 3
OK

To start mariadbd at boot time you have to copy
support-files/mariadb.service to the right place for your system


Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is dan@localhost, it has no password either, but
you need to be the system 'dan' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at https://mariadb.com/kb

You can start the MariaDB daemon with:
cd '/tmp/m10.11' ; /tmp/m10.11/bin/mariadbd-safe --datadir='/tmp/dd-10.11'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/tmp/m10.11/mysql-test' ; perl mariadb-test-run.pl

Please report any problems at https://mariadb.org/jira

The latest information about MariaDB is available at https://mariadb.org/.

Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended.
Consult the documentation on "Writing good test cases".

If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

Basing the PR against the correct MariaDB version

  • This is a new feature and the PR is based against the latest MariaDB development branch.
  • This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

auth_map.so isn't guaranteed to be available. Fedora packages it
separately.

The --base-dir path of mysql_install_db.sh seems to contain
historicial heuristics that have been replaced on other branches
of the script.

We attempt to do the same here placing the basedir original paths
so that all components are absolute.
@grooverdan grooverdan force-pushed the 10.11-MDEV-33492-mysql_install_db_basedir branch from 32f535d to 130d5ea Compare February 21, 2024 06:15
@grooverdan grooverdan added the MariaDB Foundation Pull requests created by MariaDB Foundation label Feb 21, 2024
Copy link
Contributor

@LinuxJedi LinuxJedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see a reason not to do this, makes things much simpler whilst also resolving the issue at hand.

@grooverdan grooverdan enabled auto-merge (rebase) April 23, 2024 02:06
@grooverdan grooverdan merged commit 0271517 into MariaDB:10.11 Apr 23, 2024
11 of 15 checks passed
@grooverdan grooverdan deleted the 10.11-MDEV-33492-mysql_install_db_basedir branch April 23, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MariaDB Foundation Pull requests created by MariaDB Foundation
2 participants