diff options
author | Darek Slusarczyk <dariusz.slusarczyk@oracle.com> | 2021-02-22 11:03:24 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-02-23 09:30:46 +0100 |
commit | da011a312a6c6cd7ff12fe1aa0de1e33fba2f167 (patch) | |
tree | c3e37dadfa5ea7aec39ca3695779fe30c7bd96f6 /ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt | |
parent | 7f8ea83ef438fbcfa1cbc636d701491d4e773245 (diff) | |
download | php-git-da011a312a6c6cd7ff12fe1aa0de1e33fba2f167.tar.gz |
Fix #80329: Add option to specify LOAD DATA LOCAL white list folder
* allow the user to specify a folder where files that can be sent
via LOAD DATA LOCAL can exist
* add mysqli.local_infile_directory for mysqli
(ignored if mysqli.allow_local_infile is enabled)
* add PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY for pdo_mysql
(ignored if PDO::MYSQL_ATTR_LOCAL_INFILE is enabled)
* add related tests
* fixes for building with libmysql 8.x
* small improvement in existing tests
* update php.ini-[development|production] files
Closes GH-6448.
Co-authored-by: Nikita Popov <nikic@php.net>
Diffstat (limited to 'ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt')
-rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt index efbf3c51c8..76db58dff2 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt @@ -156,6 +156,11 @@ MySQLPDOTest::skip(); set_option_and_check(33, PDO::MYSQL_ATTR_DIRECT_QUERY, 1, 'PDO::MYSQL_ATTR_DIRECT_QUERY'); set_option_and_check(34, PDO::MYSQL_ATTR_DIRECT_QUERY, 0, 'PDO::MYSQL_ATTR_DIRECT_QUERY'); + if (defined('PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY')) { + set_option_and_check(35, PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY, null, 'PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY'); + // libmysqlclient returns the directory with a trailing slash. + // set_option_and_check(36, PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY, __DIR__, 'PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY'); + } } catch (PDOException $e) { printf("[001] %s, [%s] %s Line: %s\n", $e->getMessage(), |