xref: /PHP-7.3/ext/mysqli/tests/bug73800.phpt (revision 01c1afa7)
1--TEST--
2Bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE)
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7if (PHP_INT_SIZE != 8) die('skip requires 64-bit');
8?>
9--FILE--
10<?php
11
12require_once("connect.inc");
13$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
14
15$link->query('SET @@global.max_allowed_packet = 67108864');
16$link->close();
17
18$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
19$link->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 1);
20
21$res = $link->query("SELECT RPAD('1',9000000,'1') as a,RPAD('1',9000000,'1') as b, 9223372036854775807 as c");
22$r = $res->fetch_array();
23
24var_dump($r['c']);
25?>
26--EXPECT--
27int(9223372036854775807)
28