uw                                       Mon, 19 Oct 2009 12:55:11 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=289746

Log:
MySQL server and metadata - a sad story... trying to make the test pass with a 
few more server versions

Changed paths:
    U   
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
    U   php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_flags.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_flags.phpt 
2009-10-19 12:48:01 UTC (rev 289745)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_fetch_field_flags.phpt 
2009-10-19 12:55:11 UTC (rev 289746)
@@ -144,7 +144,7 @@
                        case 'TIMESTAMP NOT NULL':
                                // http://bugs.mysql.com/bug.php?id=30081 - new 
flag introduced in 5.1.24/6.0.4
                                $version = mysqli_get_server_version($link);
-                               if ((($version >  50122) && ($version < 60000)) 
||
+                               if ((($version >  50122) && ($version < 60000) 
&& ($version != 50200)) ||
                                                ($version >= 60004)) {
                                        // new flag ON_UPDATE_NOW_FLAG (8192)
                                        $expected_flags .= ' ON_UPDATE_NOW';
@@ -165,7 +165,7 @@

                        case 'BIT':
                                $version = mysqli_get_server_version($link);
-                               if ($version <= 50105) {
+                               if (($version <= 50114 && $version > 50100) || 
($version == 50200)) {
                                        // TODO - check exact version!
                                        $expected_flags = 
trim(str_replace('UNSIGNED', '', $expected_flags));
                                }
@@ -176,8 +176,8 @@

                list($missing_flags, $unexpected_flags, $flags_found) = 
checkFlags($field->flags, $expected_flags, $flags);
                if ($unexpected_flags) {
-                       printf("[006] Found unexpected flags '%s' for %s, found 
'%s'\n",
-                               $unexpected_flags, $column_def, $flags_found);
+                       printf("[006] Found unexpected flags '%s' for %s, found 
'%s' with MySQL %s'\n",
+                               $unexpected_flags, $column_def, $flags_found, 
mysqli_get_server_version($link));
                }
                if ($missing_flags) {
                        printf("[007] The flags '%s' have not been reported for 
%s, found '%s'\n",

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_flags.phpt
===================================================================
--- php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_flags.phpt    
2009-10-19 12:48:01 UTC (rev 289745)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_fetch_field_flags.phpt    
2009-10-19 12:55:11 UTC (rev 289746)
@@ -144,7 +144,7 @@
                        case 'TIMESTAMP NOT NULL':
                                // http://bugs.mysql.com/bug.php?id=30081 - new 
flag introduced in 5.1.24/6.0.4
                                $version = mysqli_get_server_version($link);
-                               if ((($version >  50122) && ($version < 60000)) 
||
+                               if ((($version >  50122) && ($version < 60000) 
&& ($version != 50200)) ||
                                                ($version >= 60004)) {
                                        // new flag ON_UPDATE_NOW_FLAG (8192)
                                        $expected_flags .= ' ON_UPDATE_NOW';
@@ -165,7 +165,7 @@

                        case 'BIT':
                                $version = mysqli_get_server_version($link);
-                               if ($version <= 50105) {
+                               if (($version <= 50114 && $version > 50100) || 
($version == 50200)) {
                                        // TODO - check exact version!
                                        $expected_flags = 
trim(str_replace('UNSIGNED', '', $expected_flags));
                                }
@@ -176,8 +176,8 @@

                list($missing_flags, $unexpected_flags, $flags_found) = 
checkFlags($field->flags, $expected_flags, $flags);
                if ($unexpected_flags) {
-                       printf("[006] Found unexpected flags '%s' for %s, found 
'%s'\n",
-                               $unexpected_flags, $column_def, $flags_found);
+                       printf("[006] Found unexpected flags '%s' for %s, found 
'%s' with MySQL %s'\n",
+                               $unexpected_flags, $column_def, $flags_found, 
mysqli_get_server_version($link));
                }
                if ($missing_flags) {
                        printf("[007] The flags '%s' have not been reported for 
%s, found '%s'\n",

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to