]> granicus.if.org Git - php/log
php
5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 3 Jan 2020 15:45:23 +0000 (16:45 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Try to fix intermittently failing test case

5 years agoTry to fix intermittently failing test case
Christoph M. Becker [Fri, 3 Jan 2020 15:44:53 +0000 (16:44 +0100)]
Try to fix intermittently failing test case

This test fails intermittently due to taskill reporting failure to kill
the process (because it already has been terminated).  We increase the
sleep time, to hopefully prevent that from happening again.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 3 Jan 2020 13:32:56 +0000 (14:32 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79015: undefined-behavior in php_date.c

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 3 Jan 2020 13:32:04 +0000 (14:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79015: undefined-behavior in php_date.c

5 years agoFix #79015: undefined-behavior in php_date.c
Christoph M. Becker [Mon, 23 Dec 2019 13:42:54 +0000 (14:42 +0100)]
Fix #79015: undefined-behavior in php_date.c

We check that the given microsecond fraction is in the valid range
[0, 1000000[, and otherwise mark it as invalid.  We also drop the
useless do loop; a plain block is sufficient here.

5 years agoDon't enable sanitizer by default for Windows snapshot builds
Christoph M. Becker [Fri, 27 Dec 2019 13:04:31 +0000 (14:04 +0100)]
Don't enable sanitizer by default for Windows snapshot builds

Snapshot builds are release builds, and therefore enabling sanitizers
is undesireable.

5 years agoConvert zend_parse_parameters_none() to fast ZPP
Máté Kocsis [Fri, 3 Jan 2020 11:11:45 +0000 (12:11 +0100)]
Convert zend_parse_parameters_none() to fast ZPP

I've done the conversion in those extensions where fast ZPP is predominant.

5 years agoUse zend_parse_parameters_none() instead of zend_parse_parameters_none_throw()
Máté Kocsis [Fri, 3 Jan 2020 12:22:16 +0000 (13:22 +0100)]
Use zend_parse_parameters_none() instead of zend_parse_parameters_none_throw()

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 3 Jan 2020 11:03:31 +0000 (12:03 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove unnecessary strncpy in zip

5 years agoRemove unnecessary strncpy in zip
Nikita Popov [Fri, 3 Jan 2020 10:51:46 +0000 (11:51 +0100)]
Remove unnecessary strncpy in zip

This causes a warning on GCC 9 and is unnecessary to boot: We
only use "cwd" for the open_basedir check, so we can just as well
pass in the original string.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 3 Jan 2020 10:27:27 +0000 (11:27 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add test for bug #73816

5 years agoAdd test for bug #73816
Nikita Popov [Fri, 3 Jan 2020 10:26:31 +0000 (11:26 +0100)]
Add test for bug #73816

This has been fixed by 0f2cdbf214efd98b4bdaf5ca41728faf00e7c037,
add the test case.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 3 Jan 2020 10:16:25 +0000 (11:16 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #71876

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 3 Jan 2020 10:16:14 +0000 (11:16 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #71876

5 years agoFixed bug #71876
Nikita Popov [Fri, 3 Jan 2020 10:14:45 +0000 (11:14 +0100)]
Fixed bug #71876

This is a backport of fcdc0a6db0ae63fbed9e3828137b899b844623ce
to the PHP-7.3 branch. We need to make sure that OnUpdateString
is also called for a NULL value, otherwise the reset of the encoding
at the end of the request will not work.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 3 Jan 2020 10:09:06 +0000 (11:09 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79056

5 years agoFixed bug #79056
Nikita Popov [Fri, 3 Jan 2020 09:40:51 +0000 (10:40 +0100)]
Fixed bug #79056

5 years agoImplement WeakMap
Nikita Popov [Thu, 31 Oct 2019 11:13:18 +0000 (12:13 +0100)]
Implement WeakMap

RFC: https://wiki.php.net/rfc/weak_maps

5 years agoUse RETURN_THROWS() after zend_throw_exception() in reflection extension
Máté Kocsis [Fri, 3 Jan 2020 09:18:34 +0000 (10:18 +0100)]
Use RETURN_THROWS() after zend_throw_exception() in reflection extension

5 years agoUse RETURN_THROWS() after zend_parse_method_parameters()
Máté Kocsis [Thu, 2 Jan 2020 21:56:45 +0000 (22:56 +0100)]
Use RETURN_THROWS() after zend_parse_method_parameters()

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Thu, 2 Jan 2020 18:28:45 +0000 (19:28 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add test case for bug #78883

5 years agoAdd test case for bug #78883
Christoph M. Becker [Thu, 2 Jan 2020 18:25:31 +0000 (19:25 +0100)]
Add test case for bug #78883

The original test has been provided by divinity76.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 2 Jan 2020 14:55:01 +0000 (15:55 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79055
  Extract functions for file cache type serialization

5 years agoFixed bug #79055
Nikita Popov [Thu, 2 Jan 2020 14:50:44 +0000 (15:50 +0100)]
Fixed bug #79055

Fix file cache serialization of property types. I'm changing the
overall type serialization format to perform additional adjustments
in order to yield a plausible pointer for zend_type, rather than
using an entirely separate serialization format, as was previously
done. That would have been annoying to extend to the case of CE
pointers.

5 years agoExtract functions for file cache type serialization
Nikita Popov [Thu, 2 Jan 2020 14:16:24 +0000 (15:16 +0100)]
Extract functions for file cache type serialization

This is already done in master.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 2 Jan 2020 14:01:56 +0000 (15:01 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix file cache run_time_cache unserialization
  Update ZCSG(map_ptr_last) only if for_shm

5 years agoFix file cache run_time_cache unserialization
Nikita Popov [Thu, 2 Jan 2020 13:56:39 +0000 (14:56 +0100)]
Fix file cache run_time_cache unserialization

If the script was serialized as file_cache_only (thus non-immutable)
and then gets unserialized into SHM, we need to allocate a new
run_time_cache slot and can't use the serialized arena pointer.

5 years agoUpdate ZCSG(map_ptr_last) only if for_shm
Nikita Popov [Thu, 2 Jan 2020 10:59:36 +0000 (11:59 +0100)]
Update ZCSG(map_ptr_last) only if for_shm

Otherwise we may get a memory protection fault here. Updating of
ZCSG(map_ptr_last) is handled when loading from file cache to SHM.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 2 Jan 2020 10:14:16 +0000 (11:14 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Populate hashtable of __sleep() properties
  Deref names returned by __sleep()
  Extract php_var_serialize_nested_data() function

5 years agoPopulate hashtable of __sleep() properties
Nikita Popov [Thu, 2 Jan 2020 10:11:01 +0000 (11:11 +0100)]
Populate hashtable of __sleep() properties

Instead of populating a hashtable of property names and then
directly serializing.

This has the advantage of a) detecting duplicate properties more
precisely and b) gives us the ability to discard values without
rewriting the serialization string after the fact for GH-5027.

5 years agoDeref names returned by __sleep()
Nikita Popov [Thu, 2 Jan 2020 09:52:50 +0000 (10:52 +0100)]
Deref names returned by __sleep()

5 years agoExtract php_var_serialize_nested_data() function
Nikita Popov [Thu, 2 Jan 2020 09:43:01 +0000 (10:43 +0100)]
Extract php_var_serialize_nested_data() function

And split code-paths for arrays and objects based on it.

5 years agoUse RETURN_THROWS() after zend_throw_exception() in most of the extensions
Máté Kocsis [Thu, 2 Jan 2020 09:35:31 +0000 (10:35 +0100)]
Use RETURN_THROWS() after zend_throw_exception() in most of the extensions

5 years agoSwitch hash() function to use fastzpp
Nikita Popov [Mon, 30 Dec 2019 17:04:07 +0000 (18:04 +0100)]
Switch hash() function to use fastzpp

For short inputs ZPP can be a large fraction of the hash()
execution time.

5 years agoSwitch php_hash_fetch_ops() to use zend_string
Nikita Popov [Mon, 30 Dec 2019 17:01:55 +0000 (18:01 +0100)]
Switch php_hash_fetch_ops() to use zend_string

This has two advantages: If the string is already lowercase, we
do not need to copy it, and it will hopefully match the interned
string name of the hash, making the comparison more efficient.

5 years agoAlways delete tempfile created by ftruncate test.
Tyson Andre [Mon, 30 Dec 2019 16:15:22 +0000 (11:15 -0500)]
Always delete tempfile created by ftruncate test.

The ftruncate() test will fill up the disk when the disk has less than
2GB of space left, on some systems.
I think it expands the file to less than 2GB, then returns an error code,
and the file remains at the larger size.

Because the disk is full, the `--CLEAN--` script can't be saved to
`ftruncate_bug76422.clean.php` to be executed, and the cleanup can't be run.
Subsequent tests also fail to run.

Closes GH-5043

5 years agoUse RETURN_THROWS() after zend_throw_error()
Máté Kocsis [Wed, 1 Jan 2020 15:42:30 +0000 (16:42 +0100)]
Use RETURN_THROWS() after zend_throw_error()

5 years agoUse RETURN_THROWS() after zend_type_error()
Máté Kocsis [Wed, 1 Jan 2020 13:23:21 +0000 (14:23 +0100)]
Use RETURN_THROWS() after zend_type_error()

5 years agoUse RETURN_THROWS() after zend_value_error()
Máté Kocsis [Tue, 31 Dec 2019 15:58:15 +0000 (16:58 +0100)]
Use RETURN_THROWS() after zend_value_error()

5 years agoUse RETURN_THROWS() during ZPP in the remaining extensions
Máté Kocsis [Tue, 31 Dec 2019 15:33:02 +0000 (16:33 +0100)]
Use RETURN_THROWS() during ZPP in the remaining extensions

In reflection, sodium, and SPL

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Dec 2019 13:27:45 +0000 (14:27 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  [ci skip] Revert "Add test case for bug #78883"

5 years ago[ci skip] Revert "Add test case for bug #78883"
Christoph M. Becker [Tue, 31 Dec 2019 13:26:52 +0000 (14:26 +0100)]
[ci skip] Revert "Add test case for bug #78883"

This reverts commit 09e76cbe6d73399f3476942e7502de0bdbf65fa2, because
the test fails reliably on AppVeyor.  This needs closer investigation.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Dec 2019 12:09:57 +0000 (13:09 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add test case for bug #78883

5 years agoAdd test case for bug #78883
Christoph M. Becker [Tue, 31 Dec 2019 12:02:05 +0000 (13:02 +0100)]
Add test case for bug #78883

The actual test has been provided by divinity76.

5 years agoFix erroneous change
Christoph M. Becker [Tue, 31 Dec 2019 11:22:43 +0000 (12:22 +0100)]
Fix erroneous change

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Tue, 31 Dec 2019 11:00:48 +0000 (12:00 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Remove superfluous compiler option

5 years agoRemove superfluous compiler option
Christoph M. Becker [Tue, 31 Dec 2019 10:50:24 +0000 (11:50 +0100)]
Remove superfluous compiler option

`-fsanitize-address-use-after-scope` is the default as of clang 5.0.0,
and we don't allow to enable ASan for older versions anyway.

5 years agoUse RETURN_THROWS() during ZPP in most of the extensions
Máté Kocsis [Tue, 31 Dec 2019 10:27:02 +0000 (11:27 +0100)]
Use RETURN_THROWS() during ZPP in most of the extensions

Except for some bigger ones: reflection, sodium, spl

5 years agoUse ZEND_THROWS() during ZPP in the GD, gettext, GMP, and hash extensions
Máté Kocsis [Mon, 30 Dec 2019 17:20:30 +0000 (18:20 +0100)]
Use ZEND_THROWS() during ZPP in the GD, gettext, GMP, and hash extensions

5 years agoUse ZEND_THROWS() during ZPP in enchant, exif, fileinfo, filter, and FTP extensions
Máté Kocsis [Mon, 30 Dec 2019 17:15:44 +0000 (18:15 +0100)]
Use ZEND_THROWS() during ZPP in enchant, exif, fileinfo, filter, and FTP extensions

5 years agoUse RETURN_THROWS() during ZPP in the date, dba and dom extensions
Máté Kocsis [Mon, 30 Dec 2019 17:14:29 +0000 (18:14 +0100)]
Use RETURN_THROWS() during ZPP in the date, dba and dom extensions

5 years agoUse RETURN_THROWS() during ZPP in bz2, calendar, com_dotnet extensions
Máté Kocsis [Mon, 30 Dec 2019 17:09:40 +0000 (18:09 +0100)]
Use RETURN_THROWS() during ZPP in bz2, calendar, com_dotnet extensions

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 30 Dec 2019 22:22:39 +0000 (23:22 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Also propagate include exceptions in opcache
  Make url_stats in resolve_path quiet

5 years agoAlso propagate include exceptions in opcache
Nikita Popov [Mon, 30 Dec 2019 22:21:32 +0000 (23:21 +0100)]
Also propagate include exceptions in opcache

5 years agoMake url_stats in resolve_path quiet
Nikita Popov [Mon, 30 Dec 2019 22:06:12 +0000 (23:06 +0100)]
Make url_stats in resolve_path quiet

These stats are used to check whether the file exists -- they
should not generate errors. Having the flag set is particularly
important for custom stream wrappers.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 30 Dec 2019 22:18:34 +0000 (23:18 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Avoid undefined behavior

5 years agoAvoid undefined behavior
Christoph M. Becker [Mon, 30 Dec 2019 22:13:39 +0000 (23:13 +0100)]
Avoid undefined behavior

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 30 Dec 2019 21:57:07 +0000 (22:57 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Properly propagate url_stat exceptions during include

5 years agoProperly propagate url_stat exceptions during include
Nikita Popov [Mon, 30 Dec 2019 21:47:38 +0000 (22:47 +0100)]
Properly propagate url_stat exceptions during include

Make sure we abort operations early, and that we don't emit
additional warnings or errors if an exception has been thrown.

5 years agoFix typo
Christoph M. Becker [Mon, 30 Dec 2019 17:32:52 +0000 (18:32 +0100)]
Fix typo

5 years agoFix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 given
Christoph M. Becker [Mon, 30 Dec 2019 15:18:46 +0000 (16:18 +0100)]
Fix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 given

Although the `mysqli` parameter is unused, it had been accepted so far,
and the documentation even claims that parameter would be required.  To
not break BC, we allow it again.

5 years agoUse RETURN_THROWS() during ZPP in main, sapi, win32, and Zend
Máté Kocsis [Mon, 30 Dec 2019 16:35:46 +0000 (17:35 +0100)]
Use RETURN_THROWS() during ZPP in main, sapi, win32, and Zend

5 years agoUse RETURN_THROWS() when an exception is thrown
Máté Kocsis [Sun, 29 Dec 2019 19:54:57 +0000 (20:54 +0100)]
Use RETURN_THROWS() when an exception is thrown

Closes GH-5036

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 30 Dec 2019 16:24:16 +0000 (17:24 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79046

5 years agoFixed bug #79046
Nikita Popov [Mon, 30 Dec 2019 16:22:50 +0000 (17:22 +0100)]
Fixed bug #79046

5 years agoFix typo
Christoph M. Becker [Mon, 30 Dec 2019 16:21:50 +0000 (17:21 +0100)]
Fix typo

5 years agoConvert zend_parse_parameters_none() to fast ZPP in standard lib
Máté Kocsis [Sun, 29 Dec 2019 20:14:36 +0000 (21:14 +0100)]
Convert zend_parse_parameters_none() to fast ZPP in standard lib

Closes GH-5037

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Mon, 30 Dec 2019 14:18:25 +0000 (15:18 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79040: Warning Opcode handlers are unusable due to ASLR

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 30 Dec 2019 14:17:03 +0000 (15:17 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79040: Warning Opcode handlers are unusable due to ASLR

5 years agoFix #79040: Warning Opcode handlers are unusable due to ASLR
Christoph M. Becker [Mon, 30 Dec 2019 11:20:31 +0000 (12:20 +0100)]
Fix #79040: Warning Opcode handlers are unusable due to ASLR

We must not use the same shared memory OPcache instance for different
SAPIs, since their memory layout is different.  To avoid this, we add
the SAPI name (truncated to at most 20 characters) to the names of the
memory base file, the mutex and the file mapping.

5 years agoAdd FILTER_VALIDATE_BOOL as alias for FILTER_VALIDATE_BOOLEAN
Wouter Wijsman [Tue, 17 Dec 2019 08:13:41 +0000 (09:13 +0100)]
Add FILTER_VALIDATE_BOOL as alias for FILTER_VALIDATE_BOOLEAN

Both filters are equivalent, but FILTER_VALIDATE_BOOL uses our
canonical name for the type (the only one permitted in type
declarations for example), so the new name is preferred long
term.

The old name may be deprecated in the future, but no specific
timeline is planned.

5 years agoFix SSA construction for ADD_ARRAY_ELEMENT in RC_INFERENCE mode
Nikita Popov [Mon, 30 Dec 2019 12:29:32 +0000 (13:29 +0100)]
Fix SSA construction for ADD_ARRAY_ELEMENT in RC_INFERENCE mode

This was broken in cc29cbe80c0944097f8980384f883907d46512ce.

5 years agoRegenerate stubs
Nikita Popov [Mon, 30 Dec 2019 11:27:31 +0000 (12:27 +0100)]
Regenerate stubs

Looks like these GD changes got lost along the way...

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 30 Dec 2019 10:31:56 +0000 (11:31 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add test for bug #79031
  Revert "Increase serialize_lock while decoding session"

5 years agoAdd test for bug #79031
Nikita Popov [Mon, 30 Dec 2019 10:31:27 +0000 (11:31 +0100)]
Add test for bug #79031

Fixed by preceding revert.

5 years agoRevert "Increase serialize_lock while decoding session"
Nikita Popov [Mon, 30 Dec 2019 10:27:13 +0000 (11:27 +0100)]
Revert "Increase serialize_lock while decoding session"

This reverts commit b8ef7c35abd31666d9fb317db4b09a9eef0ede6c.

See bug #79031. The semantics of serialize locking aren't quite
correct right now, and the use of the lock in this particular
place makes us hit the issue in a common case. I'm reverting this
commit for PHP 7.4 and will try to fix this properly for PHP 8,
as I believe it will require ABI breakage.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Sat, 28 Dec 2019 10:02:03 +0000 (11:02 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Add missing skipif clause

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 28 Dec 2019 10:01:22 +0000 (11:01 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Add missing skipif clause

5 years agoAdd missing skipif clause
Christoph M. Becker [Sat, 28 Dec 2019 10:00:37 +0000 (11:00 +0100)]
Add missing skipif clause

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Sat, 28 Dec 2019 09:49:56 +0000 (10:49 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79033: Curl timeout error with specific url and post

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 28 Dec 2019 09:47:52 +0000 (10:47 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79033: Curl timeout error with specific url and post

5 years agoFix #79033: Curl timeout error with specific url and post
Christoph M. Becker [Sat, 28 Dec 2019 09:47:03 +0000 (10:47 +0100)]
Fix #79033: Curl timeout error with specific url and post

We must not set an empty mime structure as `CURLOPT_MIMEPOST`; instead
we set it to `NULL` if `CURLOPT_POSTFIELDS` has been set to an empty
array.

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 27 Dec 2019 16:31:27 +0000 (17:31 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Handle empty password fast path in caching_sha2_password
  Handle error response during caching_sha2_password auth
  Add support for caching_sha2_password in change user authentication
  Fix unix socket check during caching_sha2_password
  Support auth switch request during caching sha2 auth

5 years agoHandle empty password fast path in caching_sha2_password
Nikita Popov [Fri, 27 Dec 2019 15:17:10 +0000 (16:17 +0100)]
Handle empty password fast path in caching_sha2_password

If an empty password is used, no additional packets are exchanged
during caching_sha2_password auth. We're only looking for an
OK/ERR response.

5 years agoHandle error response during caching_sha2_password auth
Nikita Popov [Fri, 27 Dec 2019 15:07:28 +0000 (16:07 +0100)]
Handle error response during caching_sha2_password auth

In particular, this fixes handling of expired passwords.

5 years agoAdd support for caching_sha2_password in change user authentication
Nikita Popov [Fri, 27 Dec 2019 13:40:54 +0000 (14:40 +0100)]
Add support for caching_sha2_password in change user authentication

Same as for connection handshakes.

5 years agoFix unix socket check during caching_sha2_password
Nikita Popov [Fri, 27 Dec 2019 12:27:10 +0000 (13:27 +0100)]
Fix unix socket check during caching_sha2_password

The fact that conn->unix_socket is set does not mean that a Unix
socket is actually in use -- this member is set in a default
configuration.

Instead check whether a unix_socket stream ops is used.

5 years agoSupport auth switch request during caching sha2 auth
Nikita Popov [Fri, 27 Dec 2019 11:37:51 +0000 (12:37 +0100)]
Support auth switch request during caching sha2 auth

5 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 27 Dec 2019 16:26:42 +0000 (17:26 +0100)]
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

5 years agoDon't use PASSWORD() function in test
Nikita Popov [Fri, 27 Dec 2019 15:21:21 +0000 (16:21 +0100)]
Don't use PASSWORD() function in test

Doesn't exist anymore in MySQL 8.

5 years agoSpecify explicit row order in PDO MySQL test
Nikita Popov [Fri, 27 Dec 2019 15:39:46 +0000 (16:39 +0100)]
Specify explicit row order in PDO MySQL test

5 years agoSkip bug77956.phpt if local_infile disabled on server
Nikita Popov [Fri, 27 Dec 2019 15:31:34 +0000 (16:31 +0100)]
Skip bug77956.phpt if local_infile disabled on server

5 years agoDon't check TIMESTAMP NOT NULL in fetch_field_flags test
Nikita Popov [Fri, 27 Dec 2019 13:02:18 +0000 (14:02 +0100)]
Don't check TIMESTAMP NOT NULL in fetch_field_flags test

The behavior of this is very dependent on the MySQL vendor, MySQL
version and MySQL configuration, in particular the
explicit_defaults_for_timestamp variable.

I don't think it's worthwhile to try and model this exactly, so
drop the test.

5 years agoDon't test the RENAME DATABASE query
Nikita Popov [Fri, 27 Dec 2019 12:45:00 +0000 (13:45 +0100)]
Don't test the RENAME DATABASE query

Apparently this only existed for a short time, because it was
found to be insecure. Don't try to test it.

5 years agoMake GeomFromText tests compatible with MySQL 8
Nikita Popov [Fri, 27 Dec 2019 12:38:14 +0000 (13:38 +0100)]
Make GeomFromText tests compatible with MySQL 8

The function has been renamed to ST_GeomFromText.

5 years agoMerge branch 'PHP-7.4'
Christoph M. Becker [Fri, 27 Dec 2019 14:11:51 +0000 (15:11 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Skip test for clang builds

5 years agoSkip test for clang builds
Christoph M. Becker [Fri, 27 Dec 2019 14:01:09 +0000 (15:01 +0100)]
Skip test for clang builds

On Windows, clang builds don't use __vectorcall, so executing this test
does not make sense.

5 years agoClarify usage of max_fd in php_poll2() on Windows
Christoph M. Becker [Fri, 27 Dec 2019 09:11:01 +0000 (10:11 +0100)]
Clarify usage of max_fd in php_poll2() on Windows

Actually, `max_fd` is not used on Windows, since `PHP_SAFE_MAX_FD` and
`select` ignore it; so it makes no sense to calculate it in the loop.
Even worse, since `php_socket_t` is unsigned on Windows, it will never
be modified during the loop, because `SOCK_ERR` is already the largest
representable value of that type.

Therefore we skip the loop on Windows, and add a clarifying comment.

5 years agoFixed type_info for new array element (it may be only NULL)
Dmitry Stogov [Thu, 26 Dec 2019 13:32:45 +0000 (16:32 +0300)]
Fixed type_info for new array element (it may be only NULL)

5 years agocleanup
Dmitry Stogov [Thu, 26 Dec 2019 08:54:05 +0000 (11:54 +0300)]
cleanup