Advertisement:

Author Topic: Handle MySQL "version_comment" bug a little better...  (Read 1201 times)

Offline shawnb61

  • Support Specialist
  • Full Member
  • *
  • Posts: 508
    • sbulen on GitHub
Handle MySQL "version_comment" bug a little better...
« on: November 24, 2017, 02:33:14 PM »
This is more a MySQL bug, but since it is an SMF supported version of MySQL, we might want to at the very least handle it more gracefully. 

Certain versions of MySQL 5.0.x have a bug where they will return a hard error when certain system variables are SELECTed. 

More info on the MySQL bug here:
https://bugs.mysql.com/bug.php?id=15684

We query version_comments, one of the impacted variables, in smf_db_get_engine().

Two SMF 2.0.15+ support cases here:
https://www.simplemachines.org/community/index.php?topic=557279.0
https://www.simplemachines.org/community/index.php?topic=557246.0

We may want to consider handling this error more gracefully.   

Note that I believe the ONLY functions impacted are the 'Administration Center' and 'Support and Credits'.  Which don't really do anything, so users can work around this pretty easily. 

Hope this makes sense.  Any questions, let me know.
« Last Edit: November 24, 2017, 07:35:10 PM by shawnb61 »
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,051
    • Arantor on GitHub
Re: Handle MySQL bugs a little better...
« Reply #1 on: November 24, 2017, 02:33:56 PM »
There's even precedent for this - look for the MySQL 5.0.51-52 patch.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 174
Re: Handle MySQL "version_comment" bug a little better...
« Reply #2 on: November 25, 2017, 09:24:56 AM »
Possible fix for smf 2.1(would work in 2.0.x also) is in place: https://github.com/SimpleMachines/SMF2.1/pull/4391

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,051
    • Arantor on GitHub
Re: Handle MySQL "version_comment" bug a little better...
« Reply #3 on: November 25, 2017, 10:11:41 AM »
Looks like it should do it, yes.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.