MySQL errors has started to show up for any large returned results

Pawtucket2 - past and current (1.7.11)

When I try to return a large result - i.e. search with a large result, or browse objects, etc. I keep getting the following error:

The MySQL server is running with the --secure-file-priv option so it cannot execute this statement in

I don't know if my host has changed something in mysql or what may have started this error showing up. I do not have access to change mysql.ini files, etc.

Might it have something to do with caching?

Comments

  • some additional info:

    SHOW VARIABLES LIKE "secure_file_priv";
    

    Variable_name Value

    secure_file_priv /var/lib/mysql-files/

  • Might have solved this myself... LOAD DATA LOCAL INFILE 

  • edited February 27

    In the current release and develop code LOAD DATA INFILE is used for sorting of very large result sets. If MySQL is started with --secure-file-priv LOAD DATA INFILE may fail if the directory used to write the data (usually whatever is returned by sys_get_temp_dir()) is not configured as "safe" in MySQL. It's not to do with caching or any changes in CA. It sounds like something has changed in your MySQL configuration. Are you on a shared server?

    Sorting is being completely refactored and will no longer use LOAD DATA INFILE in any case. That work is in the dev/perf branch and generally works well (and is much much faster when sorting large result sets), but it still requires additional testing. To resolve this now, without resorting to using that new sorting code, you have a few options:

    • Change your MySQL configuration to not use --secure-file-priv
    • Avoid using LOAD DATA INFILE while sorting. To do this either (a) make sure the database login you use for CA does not have the FILE privilege, or (b) change app/lib/BaseFindEngine.php at line 125 (in v1.7.11 at least) to never trigger the LOAD DATA INFILE code.
    • Set secure_file_priv to include the sys tmp directory.
Sign In or Register to comment.