PHP  
 PHP_5_6
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_mysql/tests/pdo_mysql_prepare_match_against.phpt ('Bug #41876 (bindParam() and bindValue() do not work with MySQL MATCH () AGAINST ())')

Script

1: <?php
2:     
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR 'mysql_pdo_test.inc');
3:     
$db MySQLPDOTest::factory();
4:
5:     try {
6:
7:         
$db->exec('DROP TABLE IF EXISTS test');
8:         
$db->exec('CREATE TABLE test(id INT, label CHAR(255)) ENGINE=MyISAM');
9:         
$db->exec('CREATE FULLTEXT INDEX idx1 ON test(label)');
10:
11:         
$stmt $db->prepare('SELECT id, label FROM test WHERE MATCH label AGAINST (:placeholder)');
12:         
$stmt->execute(array(':placeholder' => 'row'));
13:         
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
14:
15:         
$stmt $db->prepare('SELECT id, label FROM test WHERE MATCH label AGAINST (:placeholder)');
16:         
$stmt->execute(array('placeholder' => 'row'));
17:         
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
18:
19:         
$stmt $db->prepare('SELECT id, label FROM test WHERE MATCH label AGAINST (?)');
20:         
$stmt->execute(array('row'));
21:         
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
22:
23:     } catch (
PDOException $e) {
24:
25:         
printf("[001] %s, [%s} %s\n",
26:             
$e->getMessage(), $db->errorCode(), implode(' '$db->errorInfo()));
27:
28:     }
29:
30:     print 
"done!";
31:
?>
32:

Expected

array(0) {
}
array(0) {
}
array(0) {
}
done!

Output

Out of memory

Diff

001+ Out of memory
001- array(0) {
002- }
003- array(0) {
004- }
005- array(0) {
006- }
007- done!

 

Generated at Mon, 27 Nov 2017 05:04:32 +0000 (16 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.