xref: /PHP-8.2/ext/mysqli/tests/gh15432.phpt (revision b1211c1e)
1--TEST--
2Bug GH-15432 (Heap corruption when querying a vector)
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require 'connect.inc';
8$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
9if ($link === false) {
10    die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
11}
12if ($link->server_version < 90000 || $link->server_version >= 10_00_00) {
13    die("skip MySQL 9.0.0+ needed");
14}
15?>
16--FILE--
17<?php
18require 'connect.inc';
19$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
20var_dump($link->query('SELECT STRING_TO_VECTOR("[1.05, -17.8, 32]")'));
21?>
22--EXPECTF--
23Warning: mysqli::query(): Unknown type 242 sent by the server. Please send a report to the developers in %s on line %d
24bool(false)
25