Bug #28631 [Com]: mysql load data query

From: Date: Fri, 24 Sep 2021 07:13:26 +0000
Subject: Bug #28631 [Com]: mysql load data query
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236805@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=28631&edit=1 ID: 28631 Comment by: a at hi5job dot com Reported by: g dot m dot seed at hw dot ac dot uk Summary: mysql load data query Status: No Feedback Type: Bug Package: MySQL related Operating System: Windows98 PHP Version: 4.3.4 Block user comment: N Private report: N New Comment: https://hi5job.com https://hi5job.com/blog https://hi5job.com/jobs Apply latest Jobs Previous Comments: ------------------------------------------------------------------------ [2021-09-14 09:43:17] darwinmcguire22042132 at gmail dot com Another dead soldier. David Hollis dropped his long neck bottle into the pile in the garbage can. He looked at the clock. It was 2:00 a.m. Laurie's curfew was midnight, and here it was two hours later. Senior prom or not, eighteen years old or not, when he gave his daughter a curfew, he damn well expected her to hold to it. He was providing the house, her bed, her car, her food. Ungrateful little brat https://indianporn.love . ------------------------------------------------------------------------ [2004-06-13 01:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2004-06-04 17:27:42] iliaa@php.net Do you have safe_mode or open_basedir enabled? ------------------------------------------------------------------------ [2004-06-04 15:59:36] g dot m dot seed at hw dot ac dot uk Description: ------------ The "load data" with "local infile" is supported in MySQL4, and has been since version 3.22. However, when an SQL query is submitted using mysql_query() the error returned by mysql_error() states "The used command is not allowed with this MySQL version"? I have read through the php manual, mysql manual, php's bug search facilities and checked a mailing group and can't find any reference that states the "load data" command is not supported when using php4 and mysql4? Incidentally, the query executes as expected if run at the mysql> command line prompt. Comments on rebported bug #7244 state: "LOAD DATA INFILE (without LOCAL) seems to be ok." and it appears that the use of "local" is the problem. If so, then this is contrary to the MySQL manual which clearly states the use of "local". Furthermore, if you don't consider the omission of "local" to be a bug then it should be documented since it is extremely difficult to pin this one down. Reproduce code: --------------- $sqlQuery = "load data local infile 'filename.csv' into table exams fields terminated by ',' enclosed by '\"' lines terminated by '\\r\\n'"; $result = mysql_query($sqlQuery) or die("query failed, error=" . mysql_error() . "\n"); Expected result: ---------------- To insert the data from filename.csv Actual result: -------------- query failed, error=The used command is not allowed with this MySQL version ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=28631&edit=1

« previous php.bugs (#236805) next »