MyBB Community Forums

Full Version: Merge Incompatible with MariaDB 10.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I don't have a github account nor access to the merge forums because I'm not a contributor. However MariaDB 10 is having issues with MyBB as shown in these threads: 
http://community.mybb.com/thread-162865.html
http://community.mybb.com/thread-163750.html

One thing I quickly figured out was we both used MariaDB so I went to do a test in an offline mode without MariaDB and the upgrade went smoothly. I used a second host with a fresh 100% fresh installation of MyBB 1.6.16. Everything worked fine. Upgraded the blank forum to MyBB 1.8 and got the error: 
SQL Error:
1300 - Invalid utf8 character string: 'AE86B4'
Query:
SELECT * FROM mybb_sessions WHERE sid='b5223716007c2c29e88eca64751e54e2' AND ip=X'ae86b4ac'
I continued this test with a populated forum at 1.6.15 with Devel and same issue with a similar error to above. 
I installed MyBB 1.8.2 and tried to upgrade to MyBB 1.8.3 and got a similar error. But, the biggest issue for me personally is I cannot upgrade MyBB series 1.6.x to MyBB 1.8.x because MariaDB is not supported.
I believe this is a bug on MyBB's end. 
We never supported MariaDB so I can't see where the bug is...
No bug Smile
MariaDB is a drop in replacement for MySQL and there shouldn't be any differences in the syntax AFAIK. If there's a bug it's something which MariaDB is doing differently.

In any case, as stated, MySQL forks aren't officially supported and therefore there's nothing to be fixed on MyBB's end.
Alright. Thank you.

I did do some research. This is also a known MySQL bug too. The errors been known since 2005 and it's still unknown what causes it: http://bugs.mysql.com/bug.php?id=9163

It strangely is only happening on MariaDB hosts with different php versions. I thought it was odd because it is a drop in replacement.

I'm going to have a discussion with the others of our forums since we choose MyBB and now are going to debate to stay at where we're at (1.6) or do a manual upgrade on another server and swap back or something.

Thanks. Smile
I managed to upgrade my test forum by downloading the DB and doing it offline on a desktop with xampp with MySQL 5.6. Reuploading it to MariaDB server seems to be behaving just fine. But, it seems even the 1.6 merge series you cannot upgrade using mariadb as it has issues with something in the sessions code and I don't know what. I tried PostgreSQL as well and it spat back the same errors as MariaDB did.

But seems to be working spiffy on MariaDB now that I did it manually offline and uploaded it. It was just an annoying thing that's affecting people. Sad Friend of mine tried on his Oracle server and said he got an error using the installer as well.

At least MySQL 5.6 worked fine with it. Smile. Just an annoying extra step but glad I got it working.
If I recall correctly, it's mariaDB 5.x that is the drop in replacement, and 10.x that breaks compatibility. Then again, it's been a while since I've really messed with mariaDB, so I could be mistaken.
MyBB is perfectly compatible with MariaDB.

The problem is that during the upgrade process, you get sort of an "out of charset" error by MariaDB because myBB is atempting to search for BINARY ip in a VARCHAR column.

Why ?
- The new version uses Binary IP and when you upgrade, the new files use the new db scheme
- The old version uses String IP, and since you didn't yet finish upgrading, well, the IP are still Strings in your DB

Who to blame ?

This is a little more complicated since this is also an error in standard MySQL. The difference is that MariaDB outputs it as ERROR and mysql as WARNING. Hence the error message.

How to fix: You need to set the IP field in mybb_sessions as a VARBINARY(16) which is supposed to be done during the upgrade process, but is needed by the very upgrade script before the upgrade has actually taken place.

ALTER TABLE mybb_sessions CHANGE ip ip VARBINARY(16) NOT NULL DEFAULT '';

I would like to add that the dev who answered was being an substantial a*s here. There IS something wrong with the way the upgrade is handled which is tolerated in standard MySQL and not in other DB engines, and therefore responsibility falls also to the dev team. You could have at least tried to locate the source of the error instead of simply stating 'no support, no bug', especially when there is something dirty like that in the update process....

Seriously, why do we need sessions for upgrading anyway ?

Anyway I hope this helps you.
Thanks Shujaa! I'll give that a shot! Smile.

Hey! Shujaa! That worked perfectly! Big Grin
Thanks a lot Shujaa! This solution worked Smile

i will mark the thread I started as solved linking to this one.

Thanks again for looking into it!

PS:
At the end of the install process I get:
Upgrade Complete
Fatal error: Call to a member function run_hooks() on a non-object in /home/reden/public_html/mybb/inc/class_parser.php on line 116
But this is not only another error, it is also unrelated to the sql issues.
Pages: 1 2