cvs: pecl(PECL_4_3) /sqlite sqlite.c /sqlite/tests sqlite_011.phpt
| From: | Ilia Alshanetsky | Date: | Sun, 14 Dec 2003 18:47:14 +0000 |
| Subject: | cvs: pecl(PECL_4_3) /sqlite sqlite.c /sqlite/tests sqlite_011.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-584@lists.php.net to get a copy of this message | ||
iliaa Sun Dec 14 13:47:14 2003 EDT
Modified files: (Branch: PECL_4_3)
/pecl/sqlite sqlite.c
/pecl/sqlite/tests sqlite_011.phpt
Log:
MFH: do not mangle column names.
Index: pecl/sqlite/sqlite.c
diff -u pecl/sqlite/sqlite.c:1.62.2.11 pecl/sqlite/sqlite.c:1.62.2.12
--- pecl/sqlite/sqlite.c:1.62.2.11 Tue Aug 12 17:29:57 2003
+++ pecl/sqlite/sqlite.c Sun Dec 14 13:47:13 2003
@@ -17,7 +17,7 @@
| Marcus Boerger <helly@php.net> |
+----------------------------------------------------------------------+
- $Id: sqlite.c,v 1.62.2.11 2003/08/12 21:29:57 helly Exp $
+ $Id: sqlite.c,v 1.62.2.12 2003/12/14 18:47:13 iliaa Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -669,7 +669,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.62.2.11 2003/08/12 21:29:57 helly Exp $");
+ php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id:
sqlite.c,v 1.62.2.12 2003/12/14 18:47:13 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();
@@ -904,10 +904,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: pecl/sqlite/tests/sqlite_011.phpt
diff -u pecl/sqlite/tests/sqlite_011.phpt:1.1 pecl/sqlite/tests/sqlite_011.phpt:1.1.6.1
--- pecl/sqlite/tests/sqlite_011.phpt:1.1 Thu May 1 09:18:56 2003
+++ pecl/sqlite/tests/sqlite_011.phpt Sun Dec 14 13:47:14 2003
@@ -17,11 +17,17 @@
var_dump(sqlite_fetch_array($r));
?>
--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"
}