mirror of
https://github.com/php/php-src.git
synced 2024-11-26 03:16:33 +08:00
Do not mangle column names.
This commit is contained in:
parent
097ed939a6
commit
bebaa5b00f
@ -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) {
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user