Commit graph

2211 commits

Author SHA1 Message Date
Ilija Tovilo
f39b5c4c25
Close PHP tags in tests
Closes GH-12422
2023-10-18 17:34:10 +02:00
George Peter Banyard
6a4031b8c4
ext/mysqli: Work on making tests parallizable (#11814)
Batch 1 of amending tests, so they can run in parallel.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2023-09-29 18:57:30 +01:00
Kamil Tekiela
83738fc9a4
Remove MySQL 4.1 checks 2023-09-19 15:40:59 +01:00
Kamil Tekiela
5f6bf3edd6
Improve mysqli_character_set_name tests 2023-09-19 13:48:11 +01:00
Kamil Tekiela
ee82c94208
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix failing test on nightly
2023-08-17 18:46:28 +01:00
Kamil Tekiela
6d039d282a
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix failing test on nightly
2023-08-17 18:45:49 +01:00
Kamil Tekiela
ffd398b4fe
Fix failing test on nightly 2023-08-17 18:45:10 +01:00
Kamil Tekiela
7e4ca2e8d9
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix implicit/explicit port in mysqlnd

Closes GH-11990
2023-08-16 20:34:48 +01:00
Kamil Tekiela
06bda99280
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix implicit/explicit port in mysqlnd
2023-08-16 20:33:52 +01:00
Kamil Tekiela
c1103a9772
Fix implicit/explicit port in mysqlnd 2023-08-16 18:59:07 +01:00
Kamil Tekiela
0b887042ae
mysqli_field_seek return type changed to true (#11948) 2023-08-14 19:04:34 +01:00
Ilija Tovilo
fc9266a5fc
Move ASAN built to GitHub actions
Cirrus will no longer offer unlimited free builds starting next month. We don't
have an alternative for FreeBSD and ARM, so move what we can for now.

Closes GH-11898
2023-08-09 14:06:36 +02:00
Kamil Tekiela
82934746b7
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix MySQL Statement has a empty query result when the response field has changed, also Segmentation fault
2023-08-04 22:54:30 +01:00
Kamil Tekiela
4db701c049
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix MySQL Statement has a empty query result when the response field has changed, also Segmentation fault
2023-08-04 22:31:18 +01:00
Yurun
ca5d48213a
Fix MySQL Statement has a empty query result when the response field has changed, also Segmentation fault
Closes GH-11551.
2023-08-04 22:25:01 +01:00
Niels Dossche
babe247827 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix missing link variable in test
2023-08-03 21:12:09 +02:00
Niels Dossche
77417f81cb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix missing link variable in test
2023-08-03 21:12:04 +02:00
Niels Dossche
162bd2a58a Fix missing link variable in test 2023-08-03 21:11:55 +02:00
Niels Dossche
50bb380594 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10964: Improve `man` page about the built-in server
  Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters
2023-08-03 20:33:07 +02:00
Niels Dossche
75441d71d8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10964: Improve `man` page about the built-in server
  Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters
2023-08-03 20:32:30 +02:00
Niels Dossche
509906b2a5 Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters
https://dev.mysql.com/doc/dev/mysql-server/latest/page_caching_sha2_authentication_exchanges.html
tells us that the nonce used in this authentication method is 20 bytes
long. However, we might receive additional scramble data in
php_mysqlnd_greet_read not used in this method.
On my test setup, I received 21 bytes (20 bytes + '\0'). This resulted
in the xor computation to incorrectly include the NUL byte. Every
password of at least 20 characters therefore failed to authenticate
using this method.

Looking at mysql-server source code also seems to reveal that it always
uses a fixed number of scramble bytes [1].

[1] ea7087d885/sql/auth/sha2_password.cc (L1078-L1079)

Closes GH-11445.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2023-08-03 20:28:11 +02:00
Kamil Tekiela
66b359e4de
Add DROP TABLE to clean up after the test 2023-08-01 22:28:18 +01:00
Kamil Tekiela
ab46d2012c
Remove unused CLEAN section 2023-08-01 22:20:18 +01:00
Kamil Tekiela
0c288c4098
Revert changes to mysqli_get_connection_stats.phpt 2023-08-01 22:07:37 +01:00
Kamil Tekiela
aab36a774a
Tidy up new my_mysqli in tests 2023-08-01 18:30:46 +01:00
Kamil Tekiela
1451b9e6f2
Improve test for mysqli_result constructor 2023-08-01 18:03:00 +01:00
Kamil Tekiela
af4eabd8c9
Remove unnecessary requires in mysqli tests 2023-08-01 17:43:27 +01:00
Kamil Tekiela
548fc6a818
As of 8.2 this SKIP is no longer possible 2023-08-01 00:53:47 +01:00
Kamil Tekiela
73d6869337
Remove unnecessary parentheses around language constructs in mysqli 2023-08-01 00:40:55 +01:00
Kamil Tekiela
a21edc52aa
Remove unnecessary parentheses around language constructs in mysqli 2023-07-31 23:46:45 +01:00
Kamil Tekiela
c1a085290a
Convert CRLF to LF 2023-07-31 23:26:49 +01:00
George Peter Banyard
b389846d05
ext/mysqli: Remove catchable fatal error handler
Recoverable fatal error haven't been a thing for a while, and proper fatal error have never been catchable
2023-07-29 06:17:20 +01:00
George Peter Banyard
8582d97b8c
ext/mysqli: Stop using global variable in connection test helper 2023-07-29 06:17:20 +01:00
George Peter Banyard
0c21715935
ext/mysqli: Remove conditional function declaration 2023-07-29 06:17:20 +01:00
George Peter Banyard
17a80eb08b
ext/mysqli: Remove custom sys_get_temp_dir() function
It has existed since PHP 5.2.1...
2023-07-29 06:17:19 +01:00
Ilija Tovilo
4af95b7c58
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix mysql tests with non-standard server port
2023-04-20 08:46:01 +02:00
Ilija Tovilo
72fc8b51a4
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix mysql tests with non-standard server port
2023-04-20 08:45:52 +02:00
Michael Voříšek
0ab51a9561
Fix mysql tests with non-standard server port
Closes GH-9744
2023-04-20 08:45:14 +02:00
Ilija Tovilo
11fbf3da35
Merge branch 'PHP-8.2'
* PHP-8.2:
  Unparallelize IO heavy tests
2023-03-27 16:34:19 +02:00
Ilija Tovilo
9b15537e9a
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Unparallelize IO heavy tests
2023-03-27 16:34:11 +02:00
Ilija Tovilo
e1ec67acd6
Unparallelize IO heavy tests
Alternative to GH-10892. This is somewhat unfortunate since these are also the
slow tests. I'm also not sure if this actually helps.

Closes GH-10953
2023-03-27 16:33:36 +02:00
David Carlier
90a39fd52c ext/mysqi: mysqli_poll raises a ValueError on absent 1st and 2ng arguments. 2023-03-15 17:49:31 +00:00
David Carlier
974a3d8441 ext/mysqli/pgsql: mysqli_fetch_object/pgsql_fetch_object raises ValueError on constructor args error.
Closes GH-10832.
2023-03-13 19:54:49 +00:00
Ilija Tovilo
47f80ffc77
Remove unnecessary type punnign from mysqli_api.c
value is a long. On big-endian architectures mysql_stmt_attr_get() will write to
the most significant byte. Type punning was used to move that byte to the least
significant one, which is UB. We can avoid this by simply casting to my_bool
(alias of bool). Previously, a comparison against 0 should've been done.
2023-03-10 17:15:46 +01:00
George Peter Banyard
f13d541ca6
Fix GCC 12 compiler warnings (#10713)
* Fix -Wunused-but-set-variable compiler warning in ext/mysqli

* Fix -Wstrict-prototypes compiler warning in ext/mysqlnd

* Fix -Wstrict-prototypes compiler warning in ext/soap

* Fix -Wunused-but-set-variable compiler warning in ext/exif

However, this code looks really sketchy...

* Fix -Wstrict-prototypes compiler warning in ext/openssl

* Fix -Wstrict-prototypes compiler warning in ext/dba

Add void to our bundled libraries

* Refactor bundled BCMath library

Fix -Wdeprecated-non-prototype compiler warnings
Use bool instead of char/int
Cleanup some useless header includes
2023-02-28 14:21:01 +00:00
Max Kellermann
d5c649b36b
zend_compiler, ...: use uint8_t instead of zend_uchar (#10621)
`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers.  This is misleading, so let's use a
C99 integer instead.

On all architectures currently supported by PHP, `zend_uchar` and
`uint8_t` are identical.  This change is only about code readability.
2023-02-23 14:56:54 +00:00
Máté Kocsis
7936c8085e
Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385) 2023-01-23 10:52:14 +01:00
Kamil Tekiela
38dfd20526
Remove main() from mysqli warning (#10321) 2023-01-16 13:10:27 +00:00
Christoph M. Becker
1b503a1f52
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix mysqli test wrt. MariaDB
2022-12-09 16:10:36 +01:00
Daniel Black
b77edf82ac
Fix mysqli test wrt. MariaDB
The test results under MariaDB, except they report "MariaDB" instead
of MySQL.

Closes GH-10029.
2022-12-09 16:09:23 +01:00