When I run db->query("select columna,columnb from table") on SQLite, the query() code calls master_sql->query() and I get array of two-element mappings:
({ ([columna: valuea1, columnb: valueb1)], ([columna: valuea2, columnb: valueb2)], ([columna: valuea3, columnb: valueb3)] }).
When I call the same Sql.Sql()->query() on MySQL, the query() code sees there's no master_sql->query() and it calls res_obj_to_array(master_sql->big_query()). This in turn returns array of four-element mappings:
({ ([columna: valuea1, table.columna: valuea1, columnb: valueb1, table.columnb: valueb1)], ([columna: valuea2, table.columna: valuea2, columnb: valueb2, table.columnb: valueb2)], ([columna: valuea3, table.columna: valuea3, columnb: valueb3, table.columnb: valueb3)] }).
That's because of 19 year old https://github.com/pikelang/Pike/commit/1e1a5b4a89bad32c3be7d0554d7727b60e1c... commit (the code is intact in Pike 8.1 version, although moved to https://github.com/pikelang/Pike/blob/8.1/lib/modules/__builtin.pmod/Sql.pmo...).
The same res_obj_to_array() is called for example in Sql.Sql()->list_tables(), but then the extra values are filtered out.
That's quite unexpected to have double values when changing SQL backends. What's the rationale behind the commit?
pike-devel@lists.lysator.liu.se