• Resolved Bogdan.S

    (@steelk)


    Hi,

    I am using MariaDB 10.2.13 , with plugin version:
    # head wp-content/plugins/bulletproof-security/readme.txt | grep Version
    Version: 13.4.1

    In log file I see a lot of:
    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 suppose bps is not fully supporting MariaDB 10.2, am I right? Is it possible to have a fix for it?

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author AITpro

    (@aitpro)

    Our Local Development server that BPS is created on uses MariaDB version 10.1.30. We have thousands of Users that use MariaDB without any problems or errors. So either there is a bug in this version of MariaDB or there is some other conflict that is unknown at this point. I will do some Googling to see if I can find any relevant information regarding this problem/issue.

    Plugin Author AITpro

    (@aitpro)

    Which web host do you have? I have one other person who has also come across this issue.

    Plugin Author AITpro

    (@aitpro)

    The other person who was running into this issue found a solution. See below.

    Hi,

    We did some more research:

    Actually, the core of the issue is in mariadb 10.2 default sql_mode:
    MariaDB [(none)]> show variables like ‘sql_mode’;
    +—————+——————————————————————————————-+
    | Variable_name | Value |
    +—————+——————————————————————————————-+
    | sql_mode |
    STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    |
    +—————+——————————————————————————————-+

    It could be ‘fixed’ cleaning strict policies from mariadb 10.2 . Todo:
    edit /etc/my.cnf and add a line (blank value):
    sql_mode=

    restart mysql.

    This has been completed:
    MariaDB [(none)]> show variables like ‘sql_mode’;
    +—————+——-+
    | Variable_name | Value |
    +—————+——-+
    | sql_mode | |
    +—————+——-+
    1 row in set (0.00 sec)

    Looks like this fixed it.

    Best Regards,

    Trip

    Plugin Author AITpro

    (@aitpro)

    This solution above did not work. Still looking around to see what might be the cause of the issue.

    Plugin Author AITpro

    (@aitpro)

    Still having no luck finding any info regarding this issue/problem. Still looking around.

    Plugin Author AITpro

    (@aitpro)

    Still trying to figure this out. 1 important clue is that the particular DB Query that is generating the php error is used in several different places throughout the BPS plugin. So the clue is why is the php error only being generated for this 1 particular DB Monitor Query and not all the code that uses this same DB Query??? There is some other factor here that is not obvious yet.

    • This reply was modified 8 years, 1 month ago by AITpro.
    Plugin Author AITpro

    (@aitpro)

    Still looking for the cause of this. For now turn off DB Monitor to stop the PHP error messages.

    Plugin Author AITpro

    (@aitpro)

    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.

    Plugin Author AITpro

    (@aitpro)

    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.

    • This reply was modified 7 years, 12 months ago by AITpro.
    • This reply was modified 7 years, 12 months ago by AITpro.
    • This reply was modified 7 years, 12 months ago by AITpro.
    Plugin Author AITpro

    (@aitpro)

    BPS Pro 13.6 has been released and BPS free 3.1 will be released in around 3-4 hours. So far so good. I have received confirmation from 5 different people that have upgraded to BPS Pro 13.6 and everything is working fine now. Yeah!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘WordPress database error You have an error in your SQL syntax. right syntax to u’ is closed to new replies.