]> granicus.if.org Git - php/commitdiff
Primarily whitespace/CS - synching with mysqlnd SVN repository
authorUlf Wendel <uw@php.net>
Mon, 23 Jul 2007 12:04:19 +0000 (12:04 +0000)
committerUlf Wendel <uw@php.net>
Mon, 23 Jul 2007 12:04:19 +0000 (12:04 +0000)
17 files changed:
ext/mysqli/tests/001.phpt
ext/mysqli/tests/002.phpt
ext/mysqli/tests/009.phpt
ext/mysqli/tests/020.phpt
ext/mysqli/tests/023.phpt
ext/mysqli/tests/024.phpt
ext/mysqli/tests/025.phpt
ext/mysqli/tests/045.phpt
ext/mysqli/tests/048.phpt
ext/mysqli/tests/060.phpt
ext/mysqli/tests/065.phpt
ext/mysqli/tests/067.phpt
ext/mysqli/tests/connect.inc
ext/mysqli/tests/skipif.inc
ext/mysqli/tests/skipifemb.inc
ext/mysqli/tests/skipifnotemb.inc
ext/mysqli/tests/table.inc

index 51adb6a3deee61c56a3a490503cee0eb41343828..1e76695d4f68dded1397bd370559bb3964828ef1 100644 (file)
@@ -34,13 +34,13 @@ mysqli connect
 
        /* temporary addition for Kent's setup, Win32 box */
        for ($i = 0; $i < 10; $i++) {
-           if (!$link = mysqli_init())
-              printf("[001 + %d] mysqli_init() failed, [%d] %s\n", $i, mysqli_connect_errno(), mysqli_connect_error());
+               if (!$link = mysqli_init())
+                       printf("[001 + %d] mysqli_init() failed, [%d] %s\n", $i, mysqli_connect_errno(), mysqli_connect_error());
 
-           if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
-              printf("[002 + %d] mysqli_real_connect() failed, [%d] %s\n", $i, mysqli_connect_errno(), mysqli_connect_error());
+               if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))
+                       printf("[002 + %d] mysqli_real_connect() failed, [%d] %s\n", $i, mysqli_connect_errno(), mysqli_connect_error());
 
-           mysqli_close($link);
+               mysqli_close($link);
        }
 
        /*** test mysqli_real_connect compressed ***/
index 5a9630bc2f9d57bcfbb89139c2dec360d896d544..bfec8c7acadcf9316b401f5d782070b0a8e872d2 100644 (file)
@@ -1,35 +1,35 @@
 --TEST--
-mysqli bind_result 1 
+mysqli bind_result 1
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
        if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
-          printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());   
+          printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
 
        if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null"))
                printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
        $rc = mysqli_query($link,"CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
-                                                                                                               col3 int, col4 bigint, 
-                                                                                                               col5 float, col6 double,
-                                                                                                               col7 date, col8 time, 
-                                                                                                               col9 varbinary(10), 
-                                                                                                               col10 varchar(50),
-                                                                                                               col11 char(20)) ENGINE=" . $engine);
+               col3 int, col4 bigint,
+               col5 float, col6 double,
+               col7 date, col8 time,
+               col9 varbinary(10),
+               col10 varchar(50),
+               col11 char(20)) ENGINE=" . $engine);
 
        if (!$rc)
                printf("[003] Cannot create table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-  
+
        $rc = mysqli_query($link, "INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
        if (!$rc)
                printf("[004] Cannot insert records, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
        $stmt = mysqli_prepare($link, "SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from test_fetch_null ORDER BY col1");
-       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11); 
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11);
        mysqli_execute($stmt);
 
        mysqli_fetch($stmt);
index a7b285f3ef7c4eea9293f608dd1f68e759a8227b..f0b5ae2f010010217507864fc2dde9c73b00e67f 100644 (file)
@@ -27,17 +27,18 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
                                                                                                        c4 bigint unsigned,
                                                                                                        c5 bigint unsigned,
                                                                                                        c6 bigint unsigned,
-                                                                                                       c7 bigint unsigned) ENGINE=" . $engine);
+                                                                                                       c7 bigint unsigned,
+                                                                                                       c8 bigint unsigned) ENGINE=" . $engine);
        if (!$rc)
                printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
-       $rc = mysqli_query($link, "INSERT INTO test_bind_fetch (c2,c3,c4,c5,c6,c7) ".
-                                                         "VALUES (-23,4.0,33333333333333,0,-333333333333,99.9)");
+       $rc = mysqli_query($link, "INSERT INTO test_bind_fetch (c2,c3,c4,c5,c6,c7,c8) ".
+                                                         "VALUES (-23,4.0,33333333333333,0,-333333333333,99.9,1234)");
        if (!$rc)
                printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
 
        $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch");
-       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7);
+       mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8);
        mysqli_execute($stmt);
        $rc = mysqli_fetch($stmt);
 
@@ -47,7 +48,8 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
                        $c6 = 0;
                }
        }
-       $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7);
+       $c8 = 4567;// change this to test how mysqli/mysqlnd handles is_ref changing
+       $test = array($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8);
 
        var_dump($test);
 
@@ -75,7 +77,7 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
 ?>
 
 --EXPECTF--
-array(7) {
+array(8) {
   [0]=>
   int(5)
   [1]=>
@@ -90,12 +92,14 @@ array(7) {
   int(0)
   [6]=>
   int(100)
+  [7]=>
+  int(4567)
 }
 20123456
 3123456789
 done!
 --UEXPECTF--
-array(7) {
+array(8) {
   [0]=>
   int(5)
   [1]=>
@@ -110,7 +114,9 @@ array(7) {
   int(0)
   [6]=>
   int(100)
+  [7]=>
+  int(4567)
 }
 20123456
 3123456789
-done!
\ No newline at end of file
+done!
index 65ac2a0e1643b5d777a98a53d5e3d63f0bca4162..cc33d2e4fd89a67ebbc321a27e9ed1751905fe7b 100644 (file)
@@ -18,11 +18,11 @@ mysqli bind_param/bind_result date
 
        mysqli_query($link,"DROP TABLE IF EXISTS test_bind_result");
        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))");
+               c3 timestamp(14),
+               c4 year,
+               c5 datetime,
+               c6 timestamp(4),
+               c7 timestamp(6))");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_result VALUES (?,?,?,?,?,?,?)");
        mysqli_bind_param($stmt, "sssssss", $d1, $d2, $d3, $d4, $d5, $d6, $d7);
index 97398001f890e9877cbea27fb566987a0563e1bf..d7bf23db723494bbed81f330aa700550292e60c3 100644 (file)
@@ -14,12 +14,12 @@ mysqli bind_param/bind_prepare fetch long values
 
        mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
        mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 int unsigned,
-                                                     c2 int unsigned,
-                                                     c3 int,
-                                                     c4 int,
-                                                     c5 int,
-                                                     c6 int unsigned,
-                                                     c7 int)");
+               c2 int unsigned,
+               c3 int,
+               c4 int,
+               c5 int,
+               c6 int unsigned,
+               c7 int)");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
        mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
index 58302b39d4fadc43daa02e21e1aacd3c1066b4b7..414a5a2b4b8e1e960032ad90f0eca10e95429b98 100644 (file)
@@ -14,12 +14,12 @@ mysqli bind_param/bind_result short values
 
        mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
        mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 smallint unsigned,
-                                                     c2 smallint unsigned,
-                                                     c3 smallint,
-                                                     c4 smallint,
-                                                     c5 smallint,
-                                                     c6 smallint unsigned,
-                                                     c7 smallint)");
+               c2 smallint unsigned,
+               c3 smallint,
+               c4 smallint,
+               c5 smallint,
+               c6 smallint unsigned,
+               c7 smallint)");
 
        $stmt = mysqli_prepare($link, "INSERT INTO test_bind_fetch VALUES (?,?,?,?,?,?,?)");
        mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
index 8d3e2388e1da46397f664eebf3c56c9c2e1f7da9..9cf0351ce3162f526df7d6d701119568ec74990b 100644 (file)
@@ -14,12 +14,12 @@ mysqli bind_param/bind_result tinyint values
 
        mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch");
        mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 tinyint,
-                                                     c2 tinyint unsigned,
-                                                     c3 tinyint not NULL,
-                                                     c4 tinyint,
-                                                     c5 tinyint,
-                                                     c6 tinyint unsigned,
-                                                     c7 tinyint)");
+               c2 tinyint unsigned,
+               c3 tinyint not NULL,
+               c4 tinyint,
+               c5 tinyint,
+               c6 tinyint unsigned,
+               c7 tinyint)");
 
        $stmt = mysqli_prepare ($link, "INSERT INTO test_bind_fetch VALUES(?,?,?,?,?,?,?)");
        mysqli_bind_param($stmt, "iiiiiii", $c1,$c2,$c3,$c4,$c5,$c6,$c7);
index 36bb92a525a679eb4dd2d59dab5420d5c4922929..62c348bc75f4097ac5c23af73660abe25826221d 100644 (file)
@@ -31,6 +31,11 @@ mysqli_bind_result (SHOW)
        mysqli_bind_result($stmt, $c1, $c2);
        mysqli_fetch($stmt);
        mysqli_stmt_close($stmt);
+       if (ini_get("unicode.semantics") && mysqli_get_server_version($link) < 50000) {
+               /* variables are binary */
+               settype($c1, "unicode");
+               settype($c2, "unicode");
+       }
        $test = array ($c1,$c2);
 
        var_dump($test);
@@ -53,4 +58,4 @@ array(2) {
   [1]=>
   unicode(%d) "%s"
 }
-done!
\ No newline at end of file
+done!
index d713947763a4777609ce99f8e6524f166cd12ea7..8da3e4544d1a940577ce04a0f6217f2b37fe071b 100644 (file)
@@ -12,13 +12,13 @@ mysqli bind_result (OO-Style)
        $mysql->select_db($db);
        $mysql->query("DROP TABLE IF EXISTS test_fetch_null");
 
-       $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
-                                                       col3 int, col4 bigint,
-                                                       col5 float, col6 double,
-                                                       col7 date, col8 time,
-                                                       col9 varbinary(10),
-                                                       col10 varchar(50),
-                                                       col11 char(20))");
+       $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint,
+               col3 int, col4 bigint,
+               col5 float, col6 double,
+               col7 date, col8 time,
+               col9 varbinary(10),
+               col10 varchar(50),
+               col11 char(20))");
 
        $mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)");
 
index 805bf569cd878a89a08e42b7b7fca20856fe5c51..d77dca0342e2161b5fe0a63b7fbf3a1d174c19c1 100644 (file)
@@ -20,12 +20,12 @@ mysqli_fetch_object with classes
 
        mysqli_query($link,"DROP TABLE IF EXISTS test_fetch");
        mysqli_query($link,"CREATE TABLE test_fetch(c1 smallint unsigned,
-                                                     c2 smallint unsigned,
-                                                     c3 smallint,
-                                                     c4 smallint,
-                                                     c5 smallint,
-                                                     c6 smallint unsigned,
-                                                     c7 smallint)");
+               c2 smallint unsigned,
+               c3 smallint,
+               c4 smallint,
+               c5 smallint,
+               c6 smallint unsigned,
+               c7 smallint)");
 
        mysqli_query($link, "INSERT INTO test_fetch VALUES ( -23, 35999, NULL, -500, -9999999, -0, 0)");
 
index 80e3bbf92b0d82d79cb70df6c5b8b1664ca98069..8f24152cfe8eb19a25de0b5083f6e4f34dd8e390 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
-set character set 
+set character set
 --SKIPIF--
-<?php 
-require_once('skipif.inc'); 
+<?php
+require_once('skipif.inc');
 if (!function_exists('mysqli_set_charset')) {
        die('skip mysqli_set_charset() not available');
 }
@@ -15,10 +15,10 @@ if (unicode_semantics()) {
        include "connect.inc";
 
        if (!$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket))
-          printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
-          
+               printf("[001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+
        if (!mysqli_query($mysql, "SET sql_mode=''"))
-          printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql), mysqli_error($mysql));
+               printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql), mysqli_error($mysql));
 
        $esc_str = chr(0xbf) . chr(0x5c);
        $len = $charset = array();
@@ -27,27 +27,27 @@ if (unicode_semantics()) {
        if ($mysql->set_charset("latin1")) {
                /* 5C should be escaped */
                if (3 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
-                 printf("[003] Expecting 3/int got %s/%s\n", gettype($tmp), $tmp);
-                 
+                       printf("[003] Expecting 3/int got %s/%s\n", gettype($tmp), $tmp);
+
                if ('latin1' !== ($tmp = $mysql->client_encoding()))
-                 printf("[004] Expecting latin1/string got %s/%s\n", gettype($tmp), $tmp);
+                       printf("[004] Expecting latin1/string got %s/%s\n", gettype($tmp), $tmp);
        }
 
        if ($res = $mysql->query("SHOW CHARACTER SET LIKE 'gbk'")) {
-          $res->free_result();
-          if ($mysql->set_charset("gbk")) {
-                 /* nothing should be escaped, it's a valid gbk character */
-               
-                 if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
-                     printf("[005] Expecting 2/int got %s/%s\n", gettype($tmp), $tmp);
-                 
-                 if ('gbk' !== ($tmp = $mysql->client_encoding()))
-                     printf("[005] Expecting gbk/string got %s/%s\n", gettype($tmp), $tmp);;
-          }
+               $res->free_result();
+               if ($mysql->set_charset("gbk")) {
+                       /* nothing should be escaped, it's a valid gbk character */
+
+                       if (2 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
+                                       printf("[005] Expecting 2/int got %s/%s\n", gettype($tmp), $tmp);
+
+                       if ('gbk' !== ($tmp = $mysql->client_encoding()))
+                                       printf("[005] Expecting gbk/string got %s/%s\n", gettype($tmp), $tmp);;
+               }
        }
        $mysql->close();
-       
-       print "done!";  
+
+       print "done!";
 ?>
 --EXPECT--
 done!
\ No newline at end of file
index fd6016bd59fdcd8acea8434fc8dc4fa9405ef1ca..b7e457f2984f7504bb3eca252d3fec39d47ce631 100644 (file)
@@ -10,9 +10,9 @@ function test: nested selects (cursors)
 
        /* skip cursor test for versions < 50004 */
        if ((!$IS_MYSQLND && mysqli_get_client_version() < 50009) ||
-            (mysqli_get_server_version($link) < 50009)) {
-                 die(sprintf("skip Client library doesn't support cursors (%s/%s)",
-                     mysqli_get_client_version(), mysqli_get_server_version($link));
+                       (mysqli_get_server_version($link) < 50009)) {
+                       die(sprintf("skip Client library doesn't support cursors (%s/%s)",
+                                       mysqli_get_client_version(), mysqli_get_server_version($link));
        }
        mysqli_close($link);
 ?>
@@ -21,8 +21,8 @@ function test: nested selects (cursors)
 
        function open_cursor($mysql, $query) {
                if (!is_object($stmt = $mysql->prepare($query))) {
-                 printf("[001] Cannot create statement object for '%s', [%d] %s\n",
-                     $query, $mysql->errno, $mysql->error);
+                       printf("[001] Cannot create statement object for '%s', [%d] %s\n",
+                                       $query, $mysql->errno, $mysql->error);
                }
 
                $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY);
@@ -30,11 +30,16 @@ function test: nested selects (cursors)
        }
 
        include "connect.inc";
-       $a = array();
-
-       /*** test mysqli_connect 127.0.0.1 ***/
        $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
+       if ((!$IS_MYSQLND && mysqli_get_client_version() < 50009) ||
+               (mysqli_get_server_version($mysql) < 50009)) {
+               /* we really want to skip it... */
+               die(var_dump(63));
+       }
+
+       $a = array();
+
        for ($i=0;$i < 3; $i++) {
                $mysql->query("DROP TABLE IF EXISTS cursor$i");
                $mysql->query("CREATE TABLE cursor$i (a int not null) ENGINE=" . $engine);
index 8b8635556496148c79f8bbbf533cb3d73ab797ba..5db701d93ba98efca0fec3b5f5aacfda8b11e9d3 100644 (file)
@@ -1,11 +1,11 @@
 <?php
-    /* 
-    Default values are "localhost", "root", 
-    database "phptest" and empty password.     
-    Change the MYSQL_TEST environment values 
-    if you want to use another configuration   
-    */
-     
+       /*
+       Default values are "localhost", "root",
+       database "phptest" and empty password.
+       Change the MYSQL_TEST environment values
+       if you want to use another configuration
+       */
+
        $driver    = new mysqli_driver;
 
        $host      = getenv("MYSQL_TEST_HOST")     ? getenv("MYSQL_TEST_HOST") : "localhost";
        $db        = getenv("MYSQL_TEST_DB")       ? getenv("MYSQL_TEST_DB") : "phptest";
        $engine    = getenv("MYSQL_TEST_ENGINE")   ? getenv("MYSQL_TEST_ENGINE") : "MyISAM";
        $socket    = getenv("MYSQL_TEST_SOCKET")   ? getenv("MYSQL_TEST_SOCKET") : null;
-       
+
        /* Development setting: test experimal features and/or feature requests that never worked before? */
-       $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? 
-                            ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) : 
-                             false;
+       $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ?
+                               ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) :
+                               false;
 
        $IS_MYSQLND = stristr(mysqli_get_client_info(), "mysqlnd");
        if (!$IS_MYSQLND) {
-           $MYSQLND_VERSION = NULL;
+               $MYSQLND_VERSION = NULL;
        } else {
-           if (preg_match('@Revision:\s+(\d+)\s*\$@ism', mysqli_get_client_info(), $matches)) {
-               $MYSQLND_VERSION = (int)$matches[1];            
-           } else {
-               $MYSQLND_VERSION = -1;
-           }
+               if (preg_match('@Revision:\s+(\d+)\s*\$@ism', mysqli_get_client_info(), $matches)) {
+                       $MYSQLND_VERSION = (int)$matches[1];
+               } else {
+                       $MYSQLND_VERSION = -1;
+               }
        }
 
-       if (!function_exists('sys_get_temp_dir')) {    
-        function sys_get_temp_dir() {
-        
-            if (!empty($_ENV['TMP']))
-                return realpath( $_ENV['TMP'] );
-            if (!empty($_ENV['TMPDIR']))        
-                return realpath( $_ENV['TMPDIR'] );        
-            if (!empty($_ENV['TEMP']))        
-                return realpath( $_ENV['TEMP'] );
-                        
-            $temp_file = tempnam(md5(uniqid(rand(), TRUE)), '');
-            if ($temp_file) {
-                $temp_dir = realpath(dirname($temp_file));
-                unlink($temp_file);
-                return $temp_dir;
-            }
-            return FALSE;            
-        }
-    }
+       if (!function_exists('sys_get_temp_dir')) {
+               function sys_get_temp_dir() {
+
+                       if (!empty($_ENV['TMP']))
+                               return realpath( $_ENV['TMP'] );
+                       if (!empty($_ENV['TMPDIR']))
+                               return realpath( $_ENV['TMPDIR'] );
+                       if (!empty($_ENV['TEMP']))
+                               return realpath( $_ENV['TEMP'] );
+
+                       $temp_file = tempnam(md5(uniqid(rand(), TRUE)), '');
+                       if ($temp_file) {
+                               $temp_dir = realpath(dirname($temp_file));
+                               unlink($temp_file);
+                               return $temp_dir;
+                       }
+                       return FALSE;
+               }
+       }
 ?>
\ No newline at end of file
index 5562aab84ba0624b71c689c7bb7c4b52011a35d4..a7581fb4806478fd252583698771979a4e3d87ed 100644 (file)
@@ -2,4 +2,4 @@
 if (!extension_loaded('mysqli')){
        die('skip mysqli extension not available');
 }
-?>
+?>
\ No newline at end of file
index 298c7219a6216a5112d548a8a965fa6de4d54a26..254a4ccece778564fdf9071a67ddd857ed451c75 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-  $driver = new mysqli_driver();
-  if ($driver->embedded) 
-    die("skip test doesn't run with embedded server");
-?>
+       $driver = new mysqli_driver();
+       if ($driver->embedded)
+               die("skip test doesn't run with embedded server");
+?>
\ No newline at end of file
index 8639130cbe38df8e2ec8adf67065a48d7db5e74c..d73d185bc4c9356e1bdaf42f57c2dd26311a22c4 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-  $driver = new mysqli_driver();
-  if (!$driver->embedded) 
-    die("skip test for with embedded server only");
-?>
+       $driver = new mysqli_driver();
+       if (!$driver->embedded)
+               die("skip test for with embedded server only");
+?>
\ No newline at end of file
index 142053cbed4f7736cc43e12b8e59a2cf13295ea4..bfbbed7102ef0d5996363682795e47d001ca1bd4 100644 (file)
@@ -2,22 +2,22 @@
 require_once('connect.inc');
 
 if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
-    printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
-        $host, $user, $db, $port, $socket);
-    exit(1);
-}   
-        
+       printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+               $host, $user, $db, $port, $socket);
+       exit(1);
+}
+
 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) {
-    printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    exit(1);
-}        
-        
+       printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+       exit(1);
+}
+
 if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=' . $engine)) {
-    printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
-    exit(1);
+       printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+       exit(1);
 }
 
 if (!mysqli_query($link, 'INSERT INTO test(id, label) VALUES (1, "a"), (2, "b"), (3, "c"), (4, "d"), (5, "e"), (6, "f")')) {
-    printf("[%d] %s\n",  mysqli_errno($link), mysqli_error($link));        
+       printf("[%d] %s\n",  mysqli_errno($link), mysqli_error($link));
 }
 ?>
\ No newline at end of file