From 4ba70f548cfcffcf9fd78b5bbb0726e00d614a35 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Fri, 28 Dec 2007 18:19:17 +0000 Subject: [PATCH] Merge from 5_3 - MySQL 6.0 SQL fixes --- ext/mysqli/tests/003.phpt | 58 +++++++++++++++++++++++++++------------ ext/mysqli/tests/020.phpt | 21 +++++++++++--- 2 files changed, 57 insertions(+), 22 deletions(-) diff --git a/ext/mysqli/tests/003.phpt b/ext/mysqli/tests/003.phpt index d80ed417ec..be8444da8a 100644 --- a/ext/mysqli/tests/003.phpt +++ b/ext/mysqli/tests/003.phpt @@ -1,42 +1,64 @@ --TEST-- mysqli connect --SKIPIF-- - --FILE-- --FILE-- @@ -20,13 +20,26 @@ require_once('skipifconnectfailure.inc'); mysqli_query($link, "SET sql_mode=''"); mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result"); - mysqli_query($link,"CREATE TABLE test_bind_result(c1 date, c2 time, + + $rc = @mysqli_query($link,"CREATE TABLE test_bind_result( + c1 date, + c2 time, c3 timestamp(14), c4 year, c5 datetime, c6 timestamp(4), c7 timestamp(6))"); + if (!$rc) + $rc = mysqli_query($link,"CREATE TABLE test_bind_result( + c1 date, + c2 time, + c3 timestamp, + c4 year, + c5 datetime, + c6 timestamp, + c7 timestamp)"); + $stmt = mysqli_prepare($link, "INSERT INTO test_bind_result VALUES (?,?,?,?,?,?,?)"); mysqli_bind_param($stmt, "sssssss", $d1, $d2, $d3, $d4, $d5, $d6, $d7); @@ -41,7 +54,7 @@ require_once('skipifconnectfailure.inc'); mysqli_execute($stmt); mysqli_stmt_close($stmt); - $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_result"); + $stmt = mysqli_prepare($link, "SELECT c1, c2, c3, c4, c5, c6, c7 FROM test_bind_result"); mysqli_bind_result($stmt,$c1, $c2, $c3, $c4, $c5, $c6, $c7); -- 2.50.1