iliaa           Sun Dec 14 13:45:38 2003 EDT

  Modified files:              
    /php-src/ext/sqlite sqlite.c 
    /php-src/ext/sqlite/tests   sqlite_011.phpt sqlite_oo_011.phpt 
  Log:
  Do not mangle column names.
  
  
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.103 php-src/ext/sqlite/sqlite.c:1.104
--- php-src/ext/sqlite/sqlite.c:1.103   Wed Dec 10 13:56:04 2003
+++ php-src/ext/sqlite/sqlite.c Sun Dec 14 13:45:36 2003
@@ -17,7 +17,7 @@
    |          Marcus Boerger <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
 
-   $Id: sqlite.c,v 1.103 2003/12/10 18:56:04 iliaa Exp $ 
+   $Id: sqlite.c,v 1.104 2003/12/14 18:45:36 iliaa Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1071,7 +1071,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "SQLite support", "enabled");
-       php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.103 2003/12/10 18:56:04 iliaa Exp $");
+       php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.104 2003/12/14 18:45:36 iliaa Exp $");
        php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
        php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
        php_info_print_table_end();
@@ -1376,10 +1376,8 @@
                /* first row - lets copy the column names */
                rres->col_names = safe_emalloc(rres->ncolumns, sizeof(char *), 0);
                for (i = 0; i < rres->ncolumns; i++) {
-                       colname = strchr(colnames[i], '.');
-                       if (!colname++) {
-                               colname = (char*)colnames[i];
-                       }
+                       colname = (char*)colnames[i];
+
                        if (SQLITE_G(assoc_case) == 1) {
                                php_sqlite_strtoupper(colname);
                        } else if (SQLITE_G(assoc_case) == 2) {
Index: php-src/ext/sqlite/tests/sqlite_011.phpt
diff -u php-src/ext/sqlite/tests/sqlite_011.phpt:1.2 
php-src/ext/sqlite/tests/sqlite_011.phpt:1.3
--- php-src/ext/sqlite/tests/sqlite_011.phpt:1.2        Thu Dec  4 21:12:21 2003
+++ php-src/ext/sqlite/tests/sqlite_011.phpt    Sun Dec 14 13:45:37 2003
@@ -18,11 +18,17 @@
 sqlite_close($db);
 ?>
 --EXPECT--
-array(3) {
-  ["c1"]=>
+array(6) {
+  ["foo.c1"]=>
+  string(1) "1"
+  ["foo.c2"]=>
+  string(1) "2"
+  ["foo.c3"]=>
+  string(1) "3"
+  ["bar.c1"]=>
   string(1) "4"
-  ["c2"]=>
+  ["bar.c2"]=>
   string(1) "5"
-  ["c3"]=>
+  ["bar.c3"]=>
   string(1) "6"
 }
Index: php-src/ext/sqlite/tests/sqlite_oo_011.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_011.phpt:1.1 
php-src/ext/sqlite/tests/sqlite_oo_011.phpt:1.2
--- php-src/ext/sqlite/tests/sqlite_oo_011.phpt:1.1     Sun Jun 22 13:19:46 2003
+++ php-src/ext/sqlite/tests/sqlite_oo_011.phpt Sun Dec 14 13:45:37 2003
@@ -17,11 +17,17 @@
 var_dump($r->fetch_array());
 ?>
 --EXPECT--
-array(3) {
-  ["c1"]=>
+array(6) {
+  ["foo.c1"]=>
+  string(1) "1"
+  ["foo.c2"]=>
+  string(1) "2"
+  ["foo.c3"]=>
+  string(1) "3"
+  ["bar.c1"]=>
   string(1) "4"
-  ["c2"]=>
+  ["bar.c2"]=>
   string(1) "5"
-  ["c3"]=>
+  ["bar.c3"]=>
   string(1) "6"
 }

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

Reply via email to