Skip to content

Division by Zero Error w/ MariaDB #830

@lancedockins

Description

@lancedockins

MySQLTuner stopped working with MariaDB at some point recently. It throws this error:

Uncaught exception from user code:
	Illegal division by zero at /usr/local/bin/mysqltuner line 6568.
	main::mysql_innodb() called at /usr/local/bin/mysqltuner line 7435

These lines both seem to refer to int( $myvar{'innodb_buffer_pool_chunk_size'} )

In MariaDB's more recent releases, innodb_buffer_pool_chunk_size set to autosize by default. Autosizing uses a value of zero in MariaDB 10.8.0 and up for this variable. That's why it returns as zero.
https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_chunk_size

As a workaround, if I edit mysqltuner and replace those references with a hardcoded int value of 1, mysqltuner starts working again.

It appears that MySQLTuner will need an update (perhaps one that branches differently if MariaDB 10.8.0+ is detected if it intends to continue supporting MariaDB

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions