WordPress database error You have an error in your SQL syntax check the manual that corresponds to your MariaDB server version for the right syntax to use near Rows >= 0 at line 1 for query SHOW TABLE STATUS WHERE Rows >= 0

Home Forums BulletProof Security Pro WordPress database error You have an error in your SQL syntax check the manual that corresponds to your MariaDB server version for the right syntax to use near Rows >= 0 at line 1 for query SHOW TABLE STATUS WHERE Rows >= 0

This topic contains 4 replies, has 2 voices, and was last updated by  AITpro Admin 3 days, 3 hours ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35661

    Jaiji
    Participant

    Hi, one of my sites has just been migrated to a new server by the new hosting company. Sadly I wasn’t informed beforehand so I had to go in and sort out BPS Pro before anything would work. Took a while but all is now good except this error:

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Rows >= 0' at line 1 for query SHOW TABLE STATUS WHERE Rows >= 0 made by do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, bpsPro_DB_Monitor_check

    I’ve no idea, is it something I need to take up with the host?

    #35663

    AITpro Admin
    Keymaster

    We are aware of this issue with MariaDB version 10.2+ and are looking for the cause of this issue.  For now just turn off the DB Monitor until we can figure out what is causing this error.  The problem is there is not a problem.  The code that is generating this php error is used in several places throughout BPS Pro, but for some strange reason this php error only occurs with the one instance of the exact same code used on the main DB Monitor page.

    1. Go to the BPS Pro > DB Monitor page.
    2. Change the Turn On|Off DB Monitor option setting to DB Monitor Off.

    Reference link: https://wordpress.org/support/topic/wordpress-database-error-you-have-an-error-in-your-sql-syntax-right-syntax-to-u/

    #35669

    Jaiji
    Participant

    Thanks for this.

    #35901

    AITpro Admin
    Keymaster

    Status Update:  https://wordpress.org/support/topic/wordpress-database-error-you-have-an-error-in-your-sql-syntax-right-syntax-to-u/#post-10401688

    I have tried several different code modifications and none of them have worked. So it looks like I will need to create entirely new code in BPS that does not use the “SHOW” DB Query command. At least that is where I believe the bugs in MariaDB 10.2+ are causing the BPS code that has worked for many years to now fail. Unfortunately, MariaDB does not offer support for their product. So you have to locate one of their listed partners and pay to get help. I’m not interested in going that route.

    So anyway this is going to take significant time to recode several areas in BPS and BPS Pro so this has been pushed back to the next BPS and BPS Pro version releases due to the extensive time involved in creating new code to get around the bugs in MariaDB 10.2+ versions.

    #35903

    AITpro Admin
    Keymaster

    Status Update:  https://wordpress.org/support/topic/wordpress-database-error-you-have-an-error-in-your-sql-syntax-right-syntax-to-u/#post-10401916

    Wow! All good. I upgraded MariaDB on my Local Dev server and found a very quick and simple solution. MariaDB 10.2+ has a problem with the SHOW command when you use WHERE > Rows. That is some sort of odd bug with MariaDB 10.2+ versions. So anyway I just changed the expression to use Variable Name instead of Variable Rows and everything works fine. I will be releasing a BPS free version with this fix on Monday June 18th. A BPS Pro version with this fix will be released tomorrow June 15th.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.