source: src/router/php7/ext/mysqli/tests/bug73800.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 733 bytes
Line 
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)
Note: See TracBrowser for help on using the repository browser.