Annotation of embedaddon/php/ext/mysqli/tests/bug36745.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #36745 (LOAD DATA LOCAL INFILE doesn't return correct error message)
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: require_once("connect.inc");
! 11:
! 12: /*** test mysqli_connect 127.0.0.1 ***/
! 13: $mysql = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
! 14:
! 15: $mysql->query("DROP TABLE IF EXISTS litest");
! 16: $mysql->query("CREATE TABLE litest (a VARCHAR(20))");
! 17:
! 18: $mysql->query("LOAD DATA LOCAL INFILE 'filenotfound' INTO TABLE litest");
! 19: var_dump($mysql->error);
! 20:
! 21: $mysql->close();
! 22: printf("Done");
! 23: ?>
! 24: --CLEAN--
! 25: <?php
! 26: require_once("connect.inc");
! 27: if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
! 28: printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
! 29:
! 30: if (!mysqli_query($link, "DROP TABLE IF EXISTS litest"))
! 31: printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
! 32:
! 33: mysqli_close($link);
! 34: ?>
! 35: --EXPECTF--
! 36: %s(%d) "%s"
! 37: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>