Commit Graph

993 Commits

Author SHA1 Message Date
Nikita Popov
16e8c1af68 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #79872 by improving error message
2020-12-10 11:48:49 +01:00
Nikita Popov
288581fade Fixed bug #79872 by improving error message
The actual behavior here is correct, but the previous error
message was misleading, as neither fetchAll() nor buffered queries
would help in this situation. Instead it is necessary to consume
all rowsets, which can be done by either unsetting the statement
or calling closeCursor().
2020-12-10 11:46:29 +01:00
Nikita Popov
207fcb0523 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #76815
2020-12-10 11:24:27 +01:00
Nikita Popov
d63aedd173 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #76815
2020-12-10 11:24:19 +01:00
Nikita Popov
e450621f5e Fixed bug #76815
When we receive an error while reading a result set, we should
assume that no more result sets are available. libmysqlclient
implements the same behavior.
2020-12-10 11:23:41 +01:00
Nikita Popov
030845eb68 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #71145
2020-12-10 10:31:43 +01:00
Nikita Popov
9b678bc4d5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #71145
2020-12-10 10:31:36 +01:00
Nikita Popov
4922049213 Fixed bug #71145
Consume any additional result sets when running INIT_COMMAND.
2020-12-10 10:28:10 +01:00
Nikita Popov
f3d5877845 Backport fix for bug #70066
Given the number of duplicates this bug report had, it seems
worthwhile to fix this on PHP-7.4 as well.

Cherry-pick of 106e7e4bca.
2020-12-10 09:58:47 +01:00
Nikita Popov
e268709400 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #70066
2020-12-09 17:25:18 +01:00
Nikita Popov
106e7e4bca Fixed bug #70066
If we fall back to emulated prepared statements, destroy S->stmt,
so the code doesn't get confused about which mode we're in.
2020-12-09 17:24:30 +01:00
Nikita Popov
6b2d28b034 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #66878
2020-12-09 16:38:35 +01:00
Nikita Popov
fcfa7fd06b Fixed bug #66878
Keep track of whether we have fully consumed all result sets,
either using nextRowset() calls or closeCursor() and skip the
attempt to consume remaining results sets during destruction in
that case.

Especiall if closeCursor() has been used, we really shouldn't
have this sort of cross-statement inference.
2020-12-09 16:38:22 +01:00
Nikita Popov
77a06ccadd Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove unnecessary more_results() checks
  Add ifdef for mysqlnd only function
2020-12-09 16:19:58 +01:00
Nikita Popov
ef342b0730 Remove unnecessary more_results() checks
Just calling next_result() is sufficient.
2020-12-09 16:16:17 +01:00
Nikita Popov
a073b0218c Add ifdef for mysqlnd only function 2020-12-09 16:16:17 +01:00
Nikita Popov
f6b22da490 Merge branch 'PHP-8.0'
* PHP-8.0:
  PDO MySQL: Extract common code for handling PS results
  PDO MySQL: Use set_row_count() helper
2020-12-09 15:29:03 +01:00
Nikita Popov
b9ea8d6b96 PDO MySQL: Extract common code for handling PS results 2020-12-09 15:28:16 +01:00
Nikita Popov
fb69c7752d PDO MySQL: Use set_row_count() helper 2020-12-09 15:21:12 +01:00
Nikita Popov
bd096f33b8 Merge branch 'PHP-8.0'
* PHP-8.0:
  PDO MySQL: Make sure nextRowset() works with partially consumed result
2020-12-09 14:51:11 +01:00
Nikita Popov
186b766368 PDO MySQL: Make sure nextRowset() works with partially consumed result
This was already working in all cases apart from native prepared
statements with unbuffered queries. In that case invoking
stmt_free_result() addresses the issue.
2020-12-09 14:46:49 +01:00
Nikita Popov
39d20b474d Merge branch 'PHP-8.0'
* PHP-8.0:
  PDO MySQL: Handle error during closeCursor()
2020-12-09 14:05:54 +01:00
Nikita Popov
23193e89e4 PDO MySQL: Handle error during closeCursor() 2020-12-09 14:04:30 +01:00
Nikita Popov
7eae14690f Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #78154
2020-12-09 12:47:48 +01:00
Nikita Popov
71b5f1446e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #78154
2020-12-09 12:47:34 +01:00
Nikita Popov
44b234a9bc Fixed bug #78154
Handle errors during next_result in exec.
2020-12-09 12:46:47 +01:00
Nikita Popov
de22980ac8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix stmt_free_result implementation and usage
  Make XFAILED test less broken
2020-12-09 11:24:48 +01:00
Nikita Popov
18517e7a63 Fix stmt_free_result implementation and usage
Two bugs both affecting the bug_pecl_7976.phpt test ("works with
mysqlnd" haha):

 * We should not change the connection state in stmt_free_result.
   This makes mysql_stmt_free_result usable under mysqlnd and
   not just libmysqlclient.
 * If we call mysql_stmt_free_result, we still need to consume
   any outstanding result sets.
2020-12-09 11:13:48 +01:00
Nikita Popov
c77bf40ad9 Merge branch 'PHP-8.0'
* PHP-8.0:
  Handle changing column count in mysqlnd result binding
2020-12-09 10:30:36 +01:00
Nikita Popov
311a77d08e Handle changing column count in mysqlnd result binding
If the count changes from prepare to execute and result_bind is
alreadly allocated, reallocate it there.

This is something of a hack. It would be cleaner to require that
result bindings are registered only after execute, when the final
result set fields are known. But mysqli at least directly exposes
this to the user, so we have no guarantee.
2020-12-09 10:30:23 +01:00
Nikita Popov
dc58a1e6d7 Merge branch 'PHP-8.0'
* PHP-8.0:
  PDO MySQL: Normalize handling of empty stored procedure result set
2020-12-08 17:02:13 +01:00
Nikita Popov
2df09b9b64 PDO MySQL: Normalize handling of empty stored procedure result set
MySQL always returns a trailing empty result set for stored
procedure calls, which is used to convey status information.
The PDO MySQL implementation is presently confused about what to
do with it: If mysqlnd is used and native prepared statements are
used, this result set is skipped. In all other cases it is not
skipped. We also have quite a few XFAILed tests relating to this.

This patch normalizes (for PHP-8.0 only) the behavior towards
always retaining the empty result set. This is simply how MySQL
stored procedures work (some expletives omitted here) and we can't
distinguish this "useless" result set from an empty result of a
multi query. Multi queries are not a concern for native prepared
statements, as PDO does not allow them in that case, but they are
a concern for emulated prepared statements.

Closes GH-6497.
2020-12-08 17:01:56 +01:00
Nikita Popov
0ac8518d76 Merge branch 'PHP-8.0'
* PHP-8.0:
  Handle column count change in PDO MySQL
2020-12-08 16:42:54 +01:00
Nikita Popov
bfa69d27bc Handle column count change in PDO MySQL
This has been fixed for PDO SQlite by GH-4313, however the same
issue also applied to PDO MySQL.

Move the column count setting function into the main PDO layer
(and export it) and then use it in both PDO SQLite and PDO MySQL.
2020-12-08 16:41:35 +01:00
Nikita Popov
f531b84b13 Merge branch 'PHP-8.0'
* PHP-8.0:
  Enable XFAILed test
2020-12-08 16:04:08 +01:00
Nikita Popov
713ef8511b Enable XFAILed test
This one had a rather scary XFAIL message, but seems to work just
fine...
2020-12-08 16:03:50 +01:00
Nikita Popov
c22f1d4551 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #63185
2020-12-08 11:36:03 +01:00
Nikita Popov
bd72e4aa44 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #63185
2020-12-08 11:35:57 +01:00
Nikita Popov
bd093ad861 Fixed bug #63185 2020-12-08 11:30:54 +01:00
Nikita Popov
89bbaf505a Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80458
2020-12-04 17:01:19 +01:00
Nikita Popov
9dc42b4114 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #80458
2020-12-04 17:00:51 +01:00
Dharman
a83cc03c13 Fixed bug #80458
If there is no result set (e.g. for upsert queries), still allow
fetching to occur without error, i.e. treat it the same way as
an empty result set.

This normalizes behavior between native and emulated prepared
statements and addresses a regression in PHP 7.4.13.
2020-12-04 16:59:47 +01:00
Nikita Popov
14458ec7e9 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80312: change default engine from MyISAM to InnoDB in tests
2020-11-17 13:16:32 +01:00
Nikita Popov
f4a600be04 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80312: change default engine from MyISAM to InnoDB in tests
2020-11-17 13:16:17 +01:00
Darek Slusarczyk
79a606bd95 Fix #80312: change default engine from MyISAM to InnoDB in tests
Change mysqli and pdo_mysql tests configuration to use by default
InnoDB instead of MyISAM.

Closes GH-6405.
2020-11-17 13:15:15 +01:00
Nikita Popov
be29853353 Merge branch 'PHP-8.0'
* PHP-8.0:
  Don't assume libmysqlclient library name
2020-11-12 15:12:57 +01:00
Nikita Popov
34dd032e4e Don't assume libmysqlclient library name
By simply dropping the additional checks, in line with the general
guideline of trusting the output of config scripts (this should
be migrated to pkg-config though).

Also drop the code for manually adding -z if mysql_config does not
-- that's not our problem.
2020-11-12 15:11:56 +01:00
Nikita Popov
bcdb54d476 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix tests for MariaDB
2020-11-02 09:59:45 +01:00
Dharman
cf38a6f51f Fix tests for MariaDB
Closes GH-6390.
2020-11-02 09:58:46 +01:00
Nikita Popov
39532f9c52 Merge branch 'PHP-8.0'
* PHP-8.0:
  Handle errors during PDO row fetch
2020-10-29 14:18:22 +01:00
Nikita Popov
1a7bcd9892 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Handle errors during PDO row fetch
2020-10-29 14:18:04 +01:00
Nikita Popov
0044a81fbb Handle errors during PDO row fetch
The EOF flag also gets set on error, so we always end up ignoring
errors here.

However, we should only check errors for unbuffered results. For
buffered results, this function is guaranteed not to error, and
querying the errno may return an unrelated error.
2020-10-29 14:17:29 +01:00
Nikita Popov
bd555b6cca Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #66528
2020-10-28 12:18:26 +01:00
Nikita Popov
39be0df2ed Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #66528
2020-10-28 12:18:17 +01:00
Nikita Popov
68dcaa29d8 Fixed bug #66528
Report errors in commit, rollback and autocommit handlers.
2020-10-28 12:18:02 +01:00
Nikita Popov
dc03e621b8 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix bug #79375
2020-10-28 11:04:41 +01:00
Nikita Popov
793bf12f8c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix bug #79375
2020-10-28 11:04:32 +01:00
Dharman
b03776adb5 Fix bug #79375
Make sure deadlock errors are properly propagated and reports in
a number of places in mysqli and PDO MySQL.

This also fixes a memory and a segfault that can occur under these
conditions.
2020-10-28 11:01:47 +01:00
Nikita Popov
18d373e8c3 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix inconsistency in PDO transaction state
2020-10-26 17:01:25 +01:00
Nikita Popov
7b9519a792 Fix inconsistency in PDO transaction state
This addresses an issue introduced by #4996 and reported in
https://bugs.php.net/bug.php?id=80260.

Now that PDO::inTransaction() reports the real transaction state
of the connection, there may be a mismatch with PDOs internal
transaction state (in_tcx). This is compounded by the fact that
MySQL performs implicit commits for DDL queries.

This patch fixes the issue by making beginTransaction/commit/rollBack
work on the real transaction state provided by the driver as well
(or falling back to in_tcx if the driver does not support it).

This does mean that writing something like

    $pdo->beginTransaction();
    $pdo->exec('CREATE DATABASE ...');
    $pdo->rollBack(); // <- illegal

will now result in an error, because the CREATE DATABASE already
committed the transaction. I believe this behavior is both correct
and desired -- otherwise, there is no indication that the code did
not behave correctly and the rollBack() was effectively ignored.
However, this is also a BC break.

Closes GH-6355.
2020-10-26 17:01:18 +01:00
Nikita Popov
e735de6eae Add GC support for PDO driver data
Add a get_gc method that can be implemented by drivers, which can
be used to add additional zvals to the GC buffer.

Implement GC support for PDO SQLite callbacks in particular.

Closes GH-6262.
2020-10-12 13:00:41 +02:00
Nikita Popov
0f3698173e Update PDO parameter names
Followup to previous changes:
 * Use camel case, as PDO uses a camel case OO API.
 * Use &$var instead of &$bind_var or &$param.
 * Use $column instead of $index. We have cases (both inside PDO
   and in other DB exts) where columns can also be represented as
   strings, so $column is the safer generic name.

Closes GH-6272.
2020-10-05 15:51:36 +02:00
Larry Garfield
ea03cbebbc Update PDO parameters for named arguments.
Closes GH-6220
2020-09-28 23:02:05 +01:00
George Peter Banyard
7553c696c3 Another pass making some failure states unconditional erros in PDO
Also make internal function return type more accurate to inform usage
2020-09-28 19:35:31 +01:00
George Peter Banyard
a5cf82802d Make various failure conditions in PDO unconditional errors
This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation

Closes GH-6212
2020-09-28 18:51:36 +01:00
George Peter Banyard
9fab1b90ab Drop ZPP check in PDO MySQLi test
This test is marked as XFAIL so it doesn't get looked at.

It checks that the method is called without arguments which is a ZPP concern
2020-09-28 18:51:35 +01:00
twosee
6a4eeb1c47 Improve PDO::inTransaction() support for MySQL
Closes GH-4996.
2020-09-23 11:50:06 +02:00
Nikita Popov
19314ff887 Fix some tests for libmysql 2020-09-18 18:01:04 +02:00
Nikita Popov
9962ad6444 Merge branch 'PHP-7.4'
* PHP-7.4:
  Support NO_BACKSLASH_ESCAPES with newer libmysqlclient
2020-09-18 15:26:04 +02:00
Nikita Popov
e6dc9abdb7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Support NO_BACKSLASH_ESCAPES with newer libmysqlclient
2020-09-18 15:25:35 +02:00
Nikita Popov
70cba36fc9 Support NO_BACKSLASH_ESCAPES with newer libmysqlclient
Requires the use of mysql_real_escape_string_quote().
2020-09-18 15:24:57 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Nikita Popov
86e002729f Fix some tests for libmysql 2020-09-17 15:27:02 +02:00
Nikita Popov
b0661a9667 Fix warnings when building against libmysqlclient
At least for version 8.0 this is warning free now.
2020-09-17 15:02:35 +02:00
Nikita Popov
3ad57f9f31 Merge branch 'PHP-7.4'
* PHP-7.4:
  pdo_mysql/mysqli (native) libmysqlclient_r no-longer used
  mysql: native mysql-8.0 uses _Bool
  mysqli: use native api
2020-09-17 11:35:03 +02:00
Nikita Popov
d591e1c4f5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  pdo_mysql/mysqli (native) libmysqlclient_r no-longer used
  mysql: native mysql-8.0 uses _Bool
  mysqli: use native api
2020-09-17 11:32:01 +02:00
Daniel Black
1aab7db6c8 pdo_mysql/mysqli (native) libmysqlclient_r no-longer used
The mysqlclient_r library exists in mysql-5.6 for compatibility only.

Later versions have it removed.
2020-09-17 11:27:31 +02:00
Daniel Black
c9abb0c0ac mysql: native mysql-8.0 uses _Bool
MySQL-8.0 removes option MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
2020-09-17 11:27:31 +02:00
George Peter Banyard
4fc7026630 Convert warning to assetion in MySQL PDO driver
Closes GH-6120
2020-09-15 12:49:59 +02:00
Máté Kocsis
9975986b7e
Improve error messages mentioning parameters instead of arguments
Closes GH-5999
2020-09-09 10:47:43 +02:00
Matteo Beccati
42b6b8a3ae Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters
2020-08-31 11:08:26 +02:00
Matteo Beccati
44ade0e875 Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters
Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
2020-08-31 11:03:03 +02:00
Matteo Beccati
ee2506cc02 Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters
Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
2020-08-31 11:02:34 +02:00
Nikita Popov
cfaa270da5 Use variadic signature for PDOStatement::fetchAll()
The current signature is incorrect, because the $ctor_args parameter
is not required to be an array (it can at least also be null, and
isn't enforced by an exception anyway).

I'm going for the variadic signature here, because we already use
the same variadic signature in PDO::query() and
PDOStatement::setFetchMode(), all of them accepting essentially the
same arguments.
2020-08-14 15:19:18 +02:00
Nikita Popov
670036e2a9 Use Z_PARAM_CLASS in PDOStatement::fetchObject()
Instead of implementing custom logic.
2020-08-13 16:20:29 +02:00
Máté Kocsis
2803c8fb8d
Add all the missing parameter types to stubs
Closes GH-5955
2020-08-13 14:47:18 +02:00
Nikita Popov
33028bf014 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
2020-08-11 17:16:38 +02:00
Nikita Popov
981af26d7b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
2020-08-11 17:13:28 +02:00
Ahmed Abdou
2fe2e5b48f Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.
2020-08-11 17:12:48 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Máté Kocsis
ec22e5aa38
Get rid of empty function entries
Closes GH-5917
2020-08-01 10:07:05 +02:00
Nikita Popov
9ee16a3c12 Update method signature in test 2020-07-20 16:16:37 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
George Peter Banyard
c932cc841a Fix [-Wundef] warning in PDO MySQL extension 2020-05-20 16:29:52 +02:00
Máté Kocsis
1179686f62
Improve error messages for invalid property access
Closes GH-5446
Co-authored-by:  Nikita Popov <nikita.ppv@gmail.com>
2020-05-18 08:27:00 +02:00
Christoph M. Becker
2393692937 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79596: MySQL FLOAT truncates to int some locales
2020-05-15 09:13:22 +02:00
Christoph M. Becker
844a1245ef Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79596: MySQL FLOAT truncates to int some locales
2020-05-15 09:11:44 +02:00
Christoph M. Becker
d1cd489a53 Fix #79596: MySQL FLOAT truncates to int some locales
We must not do locale aware float to string conversion here; instead
we using our `snprintf()` implementation with the `F` specifier.
2020-05-15 09:09:41 +02:00
AllenJB
50752401a7 Change the default PDO error mode to exceptions
According to <https://www.php.net/manual/en/pdo.error-handling.php>.
2020-05-04 22:51:47 +02:00
Nikita Popov
8597ec00d4 Remove support for libmysqlclient 5.0
Closes GH-5391.
2020-04-23 10:38:20 +02:00
Nikita Popov
a866ef88ed Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix MySQL local infile / attr handling on big endian systems
2020-04-16 11:23:11 +02:00
Nikita Popov
f684553c2c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix MySQL local infile / attr handling on big endian systems
2020-04-16 11:22:43 +02:00
guirish
a1c1736bfb Fix MySQL local infile / attr handling on big endian systems
Make sure pointer types match what is used by libmysql everywhere.

Closes GH-5380.
2020-04-16 11:22:17 +02:00
Máté Kocsis
01b266aac4
Improve error messages of various extensions
Closes GH-5278
2020-03-23 18:59:04 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Nikita Popov
169805777c Merge branch 'PHP-7.4'
* PHP-7.4:
  Apply tidy formatting
2020-02-03 13:42:08 +01:00
Nikita Popov
58b17906f5 Apply tidy formatting
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round 2020-01-19 18:28:43 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
0b4778c377
Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Christoph M. Becker
7232779fca Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79106: PDO may fetch wrong column indexes with PDO::FETCH_BOTH
2020-01-13 18:49:38 +01:00
Christoph M. Becker
ed78c6dbae Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79106: PDO may fetch wrong column indexes with PDO::FETCH_BOTH
2020-01-13 18:48:55 +01:00
Christoph M. Becker
30ce242435 Fix #79106: PDO may fetch wrong column indexes with PDO::FETCH_BOTH
Column names can be numeric strings, so we have to make sure to insert
the column values with the appropriate numeric keys, instead of adding
them.
2020-01-13 18:47:54 +01:00
Nikita Popov
7e130df249 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't use PASSWORD() function in test
  Specify explicit row order in PDO MySQL test
  Skip bug77956.phpt if local_infile disabled on server
  Don't check TIMESTAMP NOT NULL in fetch_field_flags test
  Don't test the RENAME DATABASE query
  Make GeomFromText tests compatible with MySQL 8
2019-12-27 17:26:42 +01:00
Nikita Popov
248c783e7d Specify explicit row order in PDO MySQL test 2019-12-27 17:25:58 +01:00
Christoph M. Becker
dabc28d182 Fix #78880: Spelling error report
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
2019-12-21 11:58:00 +01:00
Nikita Popov
8f62151ec8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix intermittent error in pdo_mysql___construct_options.phpt
2019-12-06 07:40:01 +01:00
Nikita Popov
8753975418 Fix intermittent error in pdo_mysql___construct_options.phpt
For the love of god, don't write tests based on mt_rand!
2019-12-06 07:39:54 +01:00
Máté Kocsis
100552d4b5 Add stubs for PDO 2019-11-18 12:38:10 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
31f1254182 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make test more robust
2019-11-04 12:23:00 +01:00
Christoph M. Becker
00c9c480eb Make test more robust
Time flies, so obviously the reported uptime may differ a bit (as
already occasionally noticed on CI); we cater to that by allowing a
delay of up to one second.
2019-11-04 12:22:04 +01:00
Christoph M. Becker
2ff42076ff Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:19:08 +02:00
Christoph M. Becker
b142e8a4b3 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:18:46 +02:00
Christoph M. Becker
3322c78a88 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78623: Regression caused by "SP call yields additional empty result set"
2019-10-07 09:17:29 +02:00
Christoph M. Becker
114c03b9a6 Fix #78623: Regression caused by "SP call yields additional empty result set"
This reverts commit 41a4379cb4.
2019-10-07 09:15:51 +02:00
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
7b0eb5b9be Merge branch 'PHP-7.4' 2019-09-09 10:11:54 +02:00
Nikita Popov
645b0372e3 Fix double free of DSN credentials 2019-09-09 10:10:41 +02:00
Christoph M. Becker
714561d0ee Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #41997: SP call yields additional empty result set
2019-09-03 13:33:52 +02:00
Christoph M. Becker
fd7309d194 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #41997: SP call yields additional empty result set
2019-09-03 13:33:15 +02:00
Christoph M. Becker
b90cd91eba Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #41997: SP call yields additional empty result set
2019-09-03 13:31:24 +02:00
Christoph M. Becker
41a4379cb4 Fix #41997: SP call yields additional empty result set
When stored procedures are called, the "final result set is a status
result that includes no result set".  Calling `::nextRowset()` on the
actual last result set should return FALSE, since there is actually no
further result set to be processed.
2019-09-03 13:29:30 +02:00
Christoph M. Becker
64c577abc5 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:35:53 +02:00
Christoph M. Becker
a18f53ec2c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:35:17 +02:00
Christoph M. Becker
3771d66142 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:33:45 +02:00
Qianqian Bu
cdf16c010a fix the problem for connect_attr, set db condition, and add a new attribute _server_host 2019-08-20 13:31:58 +02:00
Nikita Popov
d37d418927 Merge branch 'PHP-7.4' 2019-07-23 11:28:10 +02:00
George Peter Banyard
6d6d954d0d Cleanup of remaining E_STRICT in tests 2019-07-23 11:27:23 +02:00
Peter Kokot
567b602bcf Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_MYSQL variable
2019-07-14 13:49:18 +02:00
Peter Kokot
7a6d737de7 Remove PHP_MYSQL variable
PHP_MYSQL variable was once defined by the ext/mysql (--with-mysql).

Closes GH-4399
2019-07-14 13:48:44 +02:00
Peter Kokot
4f5c6bc15e Merge branch 'PHP-7.4'
* PHP-7.4:
  Simplify PHP_CHECK_PDO_INCLUDES calls
2019-07-08 10:26:08 +02:00
Peter Kokot
a39ea91753 Simplify PHP_CHECK_PDO_INCLUDES calls
Conditional checks were once used for backwards compatibility with
phpize from PHP versions that didn't have this macro call yet.

Closes GH-4376
2019-07-08 10:24:41 +02:00
Nikita Popov
cef59ad77b Merge branch 'PHP-7.4' 2019-07-02 12:10:32 +02:00
Sjon Hortensius
a7881df281 PDO: support username & password specified in DSN 2019-07-02 12:09:38 +02:00
Nikita Popov
9faf10bbe9 Merge branch 'PHP-7.4' 2019-06-07 10:58:06 +02:00