Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 928895

Summary: emerge --config =dev-db/mariadb-10.11.7 fails due to invalid plugin path
Product: Gentoo Linux Reporter: tomas charvat <tc>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: tc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description tomas charvat 2024-04-07 16:14:29 UTC
emerge --config =dev-db/mariadb-10.11.7
finish with error:
2024-04-07 17:53:00 0 [ERROR] mariadbd: Can't open shared library '/usr/provider_snappy.so' (errno: 2, cannot open shared object file: No such file or directory)

File does exist in /usr/lib64/mariadb/plugin/provider_snappy.so

Reproducible: Always

Steps to Reproduce:
1.
insert following lines into /etc/mysql/mariadb.d/20-snappy.cnf
[server]
plugin_load_add=provider_snappy
provider_snappy=force_plus_permanent
[mariadb]
innodb_compression_algorithm		= snappy

2.
run
emerge --config =dev-db/mariadb-10.11.7

3.
Actual Results:  
2024-04-07 17:53:00 0 [ERROR] mariadbd: Can't open shared library '/usr/provider_snappy.so' (errno: 2, cannot open shared object file: No such file or directory)

Expected Results:  
Initial setup of fresh mariadb.

In my opinion real problem is, that you in fact expect /etc/mysql/* to be without configuration. If I leave my galera setup in /etc/mysql/mariadb/99_custom.cnf config script attempt to start mariadb with all those configs.
Config break also with simple Timezone definition in config file, it doesnt have to be Galera setup.

Proper solution to this would be not to use /etc/mysql/* for emerge --config=... 
Please consider using --defaults-file=/tmp/empty_dir/empty_file
More information's about possibilities are https://mariadb.com/kb/en/configuring-mariadb-with-option-files/

Workaround at this point is to remove your custom /etc/mysql/mariadb/ which is not quite clear to people if they see non-existing shared library error.
Comment 1 tomas charvat 2024-04-07 16:40:21 UTC
emerge --config =dev-db/mariadb-10.11.7
It try to find root password and apply it. It could also try to get datadir and other vars and just run mariadb with them without access to /etc/mysql/.

If timezone is present in config file, timezone list is not uploaded and it seems to fail saliently.

and then mysqld.err:
2024-04-07 18:26:24 0 [ERROR] Fatal error: Illegal or unknown default time zone 'Europe/Prague'
2024-04-07 18:26:24 0 [ERROR] Aborting

and then recovery from this state 
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

It yet again try to start mariadb with all those /etc/mysql/... 


I understand that we need datadr and root password (still needed if we have unix socket?) from /etc/mysql/ to initiate mariadb in $datadir, but I dont think, that we should execute mariadb with all those configs.