Christoph M. Becker
606829f31f
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #74544 : Integer overflow in mysqli_real_escape_string()
2021-08-10 00:06:58 +02:00
Christoph M. Becker
5977610de1
Fix #74544 : Integer overflow in mysqli_real_escape_string()
...
The patch has been provided by @johannes.
Closes GH-7353.
2021-08-10 00:05:39 +02:00
Nikita Popov
39c6aaa9cc
Make mysqli_ssl_set() arguments nullable
...
This function internally converts zero length arguments to NULL
argument -- but we should also accept them in the first place.
Null arguments being accepted was actually documented, before
bug #78399 adjusted the docs to match current behavior.
2021-02-10 15:31:27 +01:00
Dharman
44a311dbbe
Fix/improve mysqli stubs
...
* mysqli_commit $flags default value is 0, not -1.
* A number of functions cannot actually return null.
* mysqli_poll parameter names were incorrect, as this function
has a different signature from select.
* fetch functions apart from fetch_all can return false on failure.
2021-01-06 11:28:45 +01:00
Nikita Popov
d776c31a34
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Handle errors during next_result()
2020-11-11 16:03:10 +01:00
Nikita Popov
eda7492604
Handle errors during next_result()
2020-11-11 16:02:52 +01:00
Nikita Popov
d928c58281
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Handle mysqli errors in more cases
Sync test with master
2020-10-28 11:37:37 +01:00
Dharman
990bb34891
Handle mysqli errors in more cases
...
Report errors autocommit, commit, rollback and mysqli_stmt_attr_set.
Additionally, copy the error from conn to stmt when preparing fails,
so these errors are also handled by mysqli_stmt_prepare.
Closes GH-6157.
2020-10-28 11:33:50 +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
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
...
Closes GH-6335
2020-10-16 10:56:33 +02:00
Máté Kocsis
41b096b392
Promote a few forgotten warnings to exceptions
...
Closes GH-6211
2020-09-25 12:08:15 +02:00
Máté Kocsis
e950ca13ea
Consolidate the usage of "either" and "one of" in error messages
...
Closes GH-6173
2020-09-20 19:41:47 +02:00
Nikita Popov
9d1c7f8b13
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix mysqli build with mysqlnd and without PDO
2020-09-20 10:02:32 +02:00
Bob Weinand
a7544411df
Fix mysqli build with mysqlnd and without PDO
2020-09-20 10:02:09 +02:00
Bob Weinand
0741858ca7
Fix mysqli build with mysqlnd and without PDO
2020-09-20 02:57:39 +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
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
5cb8b04646
Drop support for libmysqlclient < 5.5
...
Given how little maintenance the libmysqlclient driver sees, be
more aggressive in dropping old version support here.
2020-09-17 12:05:30 +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
202a0697f3
mysqli: use native api
...
Tested with:
* mysql-5.6.49-linux-glibc2.12-x86_64
* mysql-5.7.31-linux-glibc2.12-x86_64
* mysql-8.0.21-linux-glibc2.17-x86_64
* mariadb-10.5.6
configure --with-mysqli=/usr/local/$version/bin/mysql_config --with-pdo-mysql=/usr/local/$version
MySQL-8.0 removed my_bool
Some options where deprecated in mysql-8.0
MY_CHARSET_INFO used with exposed api mysql_get_character_set_info
rather than internal structures.
2020-09-17 11:27:31 +02:00
Dharman
8f56b7a755
mysqli: Promote warning in field_seek
...
Aligning the behaviour of fetch_field and field_seek.
2020-09-17 09:42:42 +02:00
Dharman
0d99a5618f
Changed the wording of the error message
...
"cannot be used in MYSQLI_USE_RESULT mode" sounds more correct than "cannot be used with MYSQLI_USE_RESULT"
Closes GH-6137.
2020-09-16 11:10:11 +02:00
George Peter Banyard
7a95e943d6
Promote warnings to Error in MySQLi extension
...
Closes GH-5803
2020-09-15 19:12:02 +02:00
Nikita Popov
4a98b64413
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove bogus REGISTER_LONG_CONSTANT
2020-08-25 12:36:06 +02:00
Nikita Popov
86e7aa20ad
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Remove bogus REGISTER_LONG_CONSTANT
2020-08-25 12:35:54 +02:00
Nikita Popov
063082043a
Remove bogus REGISTER_LONG_CONSTANT
...
This shouldn't be in this function, probably a copy/paste mistake...
2020-08-25 12:35:38 +02:00
Nikita Popov
196671a2b2
Simplify mysqli_stmt_bind_param() implementation
...
By using zpp.
2020-08-14 11:45:08 +02:00
Nikita Popov
f7f557926e
Fix arg/func info
...
* mysqli_get_server_info() cannot return null. The underlying API
is infallible.
* mysqli_select_db() func info is redundant.
* mb_detect_order() can only return array|true, not array|false.
Also make the func_info.phpt test that is supposed to catch these
kinds of issues actually work.
2020-07-21 15:00:33 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
...
Closes GH-5758
2020-07-06 21:13:34 +02:00
Máté Kocsis
596561009c
Fix some UNKNOWN default values
...
In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
2020-06-09 09:46:51 +02:00
George Peter Banyard
82afcf4401
Fix [-Wundef] warning in MySQLi extension
2020-05-18 00:37:19 +02:00
Máté Kocsis
3ebce8e9fc
Fix UNKNOWN default values in various extensions
...
Closes GH-5514
2020-05-05 19:08:20 +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
Nikita Popov
d4471c6aae
Remove int6store()
...
The implementation is broken (syntactically). As it's not used
anyway, I'm just dropping it instead.
2020-04-14 10:37:37 +02:00
Tom Van Looy
fabe6a310c
Add ext/mysqli stubs
...
Closes GH-4913.
2020-02-25 11:06:46 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880 : Final spelling fixes
2020-01-16 19:14:31 +01:00
Máté Kocsis
7b4a4d2ace
Use RETURN_THROWS() after try_convert_to_string()
2020-01-03 17:04:06 +01:00
Máté Kocsis
1b93cfee0c
Use RETURN_THROWS() after zend_parse_method_parameters()
2020-01-02 23:01:37 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
...
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Christoph M. Becker
55fd97c576
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.
2019-12-30 17:40:16 +01:00
Christoph M. Becker
b0391c3e26
Revert "Fix #78790 : mysqli_get_client_info() expects exactly 0 parameters"
...
This reverts commit 87fad8cdf0
, since,
apparently, `mysqli_get_client_info()` is also supposed to be called
without argument.
2019-11-11 10:06:21 +01:00
Christoph M. Becker
87fad8cdf0
Fix #78790 : mysqli_get_client_info() expects exactly 0 parameters
...
`mysqli_get_client_info()` and `mysqli_thread_safe()` can also be
called as methods, so we have to cater to this when parsing the
arguments.
2019-11-11 10:01:17 +01:00