summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-12-14 18:45:37 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-12-14 18:45:37 +0000
commitbebaa5b00f5cbe4837bbd34e6af2850213a58821 (patch)
tree6098e3276337fc2f6e50386728e1d1cb075bee67 /ext
parent097ed939a67ab24318f4fc9874ed102134537578 (diff)
downloadphp-git-bebaa5b00f5cbe4837bbd34e6af2850213a58821.tar.gz
Do not mangle column names.
Diffstat (limited to 'ext')
-rw-r--r--ext/sqlite/sqlite.c6
-rwxr-xr-xext/sqlite/tests/sqlite_011.phpt14
-rwxr-xr-xext/sqlite/tests/sqlite_oo_011.phpt14
3 files changed, 22 insertions, 12 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index 6099e6665e..030dabc52c 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -1376,10 +1376,8 @@ next_row:
/* 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) {
diff --git a/ext/sqlite/tests/sqlite_011.phpt b/ext/sqlite/tests/sqlite_011.phpt
index e47d031405..9c1bf3990f 100755
--- a/ext/sqlite/tests/sqlite_011.phpt
+++ b/ext/sqlite/tests/sqlite_011.phpt
@@ -18,11 +18,17 @@ var_dump(sqlite_fetch_array($r));
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"
}
diff --git a/ext/sqlite/tests/sqlite_oo_011.phpt b/ext/sqlite/tests/sqlite_oo_011.phpt
index c8fdfd1200..ae6c445a4f 100755
--- a/ext/sqlite/tests/sqlite_oo_011.phpt
+++ b/ext/sqlite/tests/sqlite_oo_011.phpt
@@ -17,11 +17,17 @@ $r = $db->query("SELECT * from foo, bar", SQLITE_ASSOC);
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"
}