hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

Mysqli:multi_query() doesn't set $mysqli->error and $mysqli->errno on error

Open woxxy opened this issue 11 years ago • 3 comments

When using Mysqli:multi_query, $mysqli->error and $mysqli->errno aren't set on error.

Follows a script to reproduce the issue.

$ hhvm --version
HipHop VM 3.8.0-dev (rel)
Compiler: heads/master-0-g02c69da032606ce8fe3ec1a83632afdb2844c7d3
Repo schema: b8e12fe565e6fa6c246c48b7e54cd8db045f7003
<?php

$mysqli = new Mysqli('127.0.0.1', 'root', null, null, 3306, null);

if (!$mysqli->multi_query('weiuhfuiwehfiuw')) {
    echo "Multi query failed: (" . $mysqli->errno . ") " . $mysqli->error;
}
$ php testing.php
Multi query failed: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'weiuhfuiwehfiuw' at line 1                                                                                                                                                                         
$ hhvm testing.php
Multi query failed: (0)

woxxy avatar Jul 07 '15 10:07 woxxy

cc @wizkid

fredemmott avatar Jul 07 '15 20:07 fredemmott

I just used mysql_multi_query that already existed. Can you check if that function work?

WizKid avatar Jul 07 '15 21:07 WizKid

This issue has been waiting for more info for more than 2 weeks. I'm closing it for now, but feel free to re-open it if you can provide more info. https://github.com/facebook/hhvm/wiki/Human-Timeouts

Orvid avatar Sep 30 '16 19:09 Orvid