• Resolved doowdle

    (@doowdle)


    MariaDB does not have this method RANDOM_BYTES. Can you update the plugin to support MariaDB? It is the default database for many hosts and the only one in for example cloudways.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Seconded. Just ran into this on Kinsta.

    I’ve also run into this. Am on Cloudways.

    Yes. Was just looking for answers on this error. Hoping there’s a quick update to fix it.

    I am having this same issue on namehero server with Event Manager plugin.

    Events Manager is trying to update your database, but the following error occured:
    
    FUNCTION broomfie_wp92.RANDOM_BYTES does not exist
    
    It might be that reloading this page one or more times may complete the process, if you have a large number of bookings in your database. Alternatively, you can run one of these two queries directly into your WP database:
    
    UPDATE wph1_em_bookings SET booking_uuid= LOWER(CONCAT( HEX(RANDOM_BYTES(4)), '', HEX(RANDOM_BYTES(2)), '4', SUBSTR(HEX(RANDOM_BYTES(2)), 2, 3), '', HEX(FLOOR(ASCII(RANDOM_BYTES(1)) / 64) + 8), SUBSTR(HEX(RANDOM_BYTES(2)), 2, 3), '', hex(RANDOM_BYTES(6)) ))
    
    OR
    UPDATE wph1_em_tickets_bookings SET ticket_uuid= UUID()

    And the 1st SQL update fails since the function does not exist and the 2nd SQL update gives 0 records updated.

    Please help!

    Also having this problem. Tried running both scripts in mySQL – no bueno.

    I am *not* using bookings.

    • This reply was modified 2 years, 3 months ago by cdgweb.

    Same here.

    Server version: 10.3.20-MariaDB-1:10.3.20+maria~bionic – mariadb.org binary distribution

    Same error message here.
    Tried adding the two queries in phpmyadmin/mysql, but no luck.

    I do have the same error.

    The function RANDOM_BYTES will only be introduced in MariaDB version 10.10.0 which is currently in alpha status. The latest version is currently 10.8.3
    https://mariadb.com/kb/en/random_bytes/

    Therefore RANDOM_BYTES should not yet be used in the plugin if a MariaDB is used which is quite often used together with WordPress.

    For a MariaDB there should be used instead of for example RANDOM_BYTES(4) then SUBSTR(MD5(RAND()), 1, 4)

    But running the changed sql statement UPDATE wp_20170105_114905_em_bookings SET booking_uuid= LOWER(CONCAT( HEX(SUBSTR(MD5(RAND()), 1, 4)), '', HEX(SUBSTR(MD5(RAND()), 1, 2)), '4', SUBSTR(HEX(SUBSTR(MD5(RAND()), 1, 2)), 2, 3), '', HEX(FLOOR(ASCII(SUBSTR(MD5(RAND()), 1, 1)) / 64) + 8), SUBSTR(HEX(SUBSTR(MD5(RAND()), 1, 2)), 2, 3), '', hex(SUBSTR(MD5(RAND()), 1, 6)) )) directly on the MariaDB database will not help since the plugin will still always try to update with the RANDOM_BYTES function and will always create the error.

    Therefore the plugin itself needs to be corrected.

    • This reply was modified 2 years, 3 months ago by Guido.

    Yes, the first query threw an error in the database, about RANDOM_BYTES does not exist. I’ll leave it alone for now until there’s a proper fix.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    For anyone with this issue, we’ve updated a dev version 6.1.0.1 which fixes this specific issue (tested and confirmed). We’ll release a regular update within the next day or sooner.

    To upgrade to a dev version, visit Dashboard > Events > Settings > Admin Tools and click the Check Dev Updates button. You’ll see the update appear on your plugins/updates page. You can also manually update by downloading the dev versions from our downloads page. For more detailed instructions, see our documentation for upgrading to dev versions.

    The issue was mainly related to the adding of UUID for old bookings and ticket bookings, in theory this shouldn’t have affected your installation as the main use of UUIDs are currently for the recent Pro features like QR tickets and checkins.

    It looks like the error is limited to those using MariaDB (correctly identified by @guidodr) instead of mySQL, that RANDOM_BYTES function in the SQL statement is available in MariaDB 10.10 and I believe we misread the min WP version with 10.1 (the trailing 0 made all the difference!). Whilst we usually keep relatively straightforward SQL statements, we’ll be more mindful of our MariaDB users moving forward, should we ever need to add with more complex queries.

    6.1.0.1 update did not fix for us, running 10.3.35-MariaDB – MariaDB Server .. will keep looking for another update and hope it fixes. Glad this is a known issue.

    Server: Localhost via UNIX socket
    Server type: MariaDB
    Server version: 10.3.35-MariaDB – MariaDB Server
    Protocol version: 10
    Server charset: cp1252 West European (latin1)
    cpsrvd 11.104.0.7
    Database client version: libmysql – mysqlnd 7.4.30
    PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
    PHP version: 7.4.30

    @richieboo are you sure that 6.1.0.1 did not fix it for you?
    The old error message you will have to delete first. That old error message will not disappear automatically.
    At least on my side with MariaDB 10.8.3 it did fix it. The message did not reappear after the installation for 6.1.0.1

    My host currently uses MariaDB 10.5 and the 6.1.0.1 EM Dev update fixed the problem.

    RE: The old error message you will have to delete first. That old error message will not disappear automatically.

    That was it, I was expecting it to go away. ??
    It has not re-appeared, thanks!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Thanks for pointing that out @richieboo that can be confusing ??

    That error message should have gone away, but the id used to identify that error message changed with the dev update. We’ll update that before we release, but you can just click the X on the right and it’ll disappear and not reappear, same result.

    We’ll update in a few hours.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘RANDOM_BYTES does not exist’ is closed to new replies.