No Code Attached Yet
avatar BrainforgeUK
BrainforgeUK
2 Dec 2021

Steps to reproduce the issue

New component works fine on dev machine with MySQL.

Install same component on another machine with MariaDB.

Expected result

Work the same on both MySQL and MariaDB.

Actual result

On MariaDB get a 'Prepared statement needs to be re-prepared' error from one of the view models.

System information (as much as possible)

Looks like there is a history of this with MariaDB - see Google search results.

Additional comments

Looks like the problem caused by a SQL VIEW being accessing by the Joomla view model.

Restructured the Joomla view model to avoid using the SQL VIEW and works fine on MariaDB.

This is information maybe helpful if others encounter this.

avatar BrainforgeUK BrainforgeUK - open - 2 Dec 2021
avatar BrainforgeUK BrainforgeUK - change - 2 Dec 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 Dec 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Dec 2021
avatar UkaniVedant
UkaniVedant - comment - 2 Dec 2021

[https://mariadb.com/kb/en/library/server-system-variables/#table_definition_cache]
SET GLOBAL table_definition_cache = 1024
I think running this in the MariaDB solved the problem.

avatar rjharishabh rjharishabh - change - 2 Dec 2021
Title
[4.0] MaruaDB issue when same code works fine on MySQL
[4.0] MariaDB issue when same code works fine on MySQL
avatar joomla-cms-bot joomla-cms-bot - edited - 2 Dec 2021
avatar richard67
richard67 - comment - 2 Dec 2021

New component works fine on dev machine with MySQL.

Install same component on another machine with MariaDB.

So it's not a problem with the CMS core but with a 3rd party component?

avatar alikon
alikon - comment - 2 Dec 2021

i'm really curious to know what SQL standard statements fails on MariaDB and succed on MySQL

avatar richard67
richard67 - comment - 2 Dec 2021

i'm really curious to know what SQL standard statements fails on MariaDB and succed on MySQL

@alikon Does that mean we would collect non core issues here?

avatar alikon
alikon - comment - 2 Dec 2021

No... my curiosity was about what SQL standard query is not managed by core
only that

avatar alikon
alikon - comment - 2 Dec 2021

anyway we need start to think about MariaDB in a more "professional" way

avatar ghazal
ghazal - comment - 3 Dec 2021

If I use MariaDB, I always modify these settings:
Global Configuration/System/Session Handler -> Session = Filesystem instead of Database


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36183.

avatar BrainforgeUK
BrainforgeUK - comment - 3 Dec 2021

The problem in my case encountered with component model using the getListQuery() method and building the query with the standard Joomla database query building methods.

The problem appeared to be with a join to SQL view which included a group by. The tables contained no data so at that point do not expect to have to MariaDB configuration / tuning.

Good point though that the table_definition_cache might be different between the systems - not checked!

avatar Hackwar
Hackwar - comment - 2 Feb 2022

As was stated before, I don't see how this is a core issue or what we could do here. Can we close this?

avatar richard67 richard67 - change - 2 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-02 23:11:01
Closed_By richard67
avatar richard67 richard67 - close - 2 Feb 2022
avatar richard67
richard67 - comment - 2 Feb 2022

Closing as not an issue with the CMS core. See previous comments.

avatar BrainforgeUK
BrainforgeUK - comment - 2 Feb 2022

Ok to close.

Add a Comment

Login with GitHub to post a comment