• Resolved wildmice

    (@wildmice)


    I needed to use an UpdraftPlus backup to move a site, and discovered that there were SQL errors. Specifically, single quotes are escaped with backslashes, when the single quotes should be repeated. With backslashes i got MySQL errors. After editing \’ to ” the errors went away.

    Seems to me this would probably cause a restore with UpdraftPlus to also fail…

    https://www.ads-software.com/plugins/updraftplus/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Please can you be more specific about what you were doing, and how you encountered these errors?

    Note that a backslash is the correct escape character in MySQL, unless you’ve put your MySQL server in “no backslash escapes” mode – https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_backslash_escapes

    David

    Thread Starter wildmice

    (@wildmice)

    Hi David,

    Well it does look (from your link) like escaping with backslash is the MySQL default, and i was surprised that it didn’t work.

    I have made an inquiry with our hosting provider and will come back with their response.

    Perhaps there should be an option in your plugin to deal with this?

    The context here is that i backed up with UpdraftPlus, and then restored (to other hosting) by importing the SQL in Phpmyadmin, rather than restoring with the plugin.

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    Perhaps there should be an option in your plugin to deal with this?

    I’d need to have a much clearer idea of the problem first. You’re the only user, after 4 years + 5 million downloads of UD, to be reporting something in this area so it’s overwhelmingly likely to be being caused by something specific to your phpMyAdmin setup. Perhaps something in phpMyAdmin or the webserver is duplicating the quoting, if it’s not the option mentioned above.

    David

    Thread Starter wildmice

    (@wildmice)

    Our hosting provider is running MariaDB 5.5.44 with no specific SQL mode set, and it is defaulting to NO_BACKSLASH_ESCAPES.

    I’m sorry, i was unaware at the outset that there is not a very solid consensus on which mode is the best. Understanding this, i think the best action is no action, and i’ll live with editing SQL that has to be ported from one system to another where they are using different SQL modes.

    I do have a question though. When i do a backup on hosting that is using NO_BACKSLASH_ESCAPES, does UpdraftPlus respect that setting and escape by doubling single quotes? In other words, on such a system, will i be able to restore without any problems?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SQL errors’ is closed to new replies.