]> granicus.if.org Git - php/commit
Fix #64937: Firebird PDO preprocessing sql
authorSimonov Denis <sim-mail@list.ru>
Wed, 18 Dec 2019 19:42:07 +0000 (20:42 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 24 Sep 2020 22:07:57 +0000 (00:07 +0200)
commit17a789e27c31ca13ba4bab6fcfc265d2dd0589a2
tree2437b43a9b5cebbc130c2b063a26bd936a4c9e0d
parent3277cb694131cc614dc1fd8a7db08c796ab38d2c
Fix #64937: Firebird PDO preprocessing sql

This patch fixes some problems with preprocessing SQL queries.

* The new algorithm takes into account single-line and multi-line
  comments and ignores the ":" and "?" Parameter markers in them.

* The algorithm allows the EXECUTE BLOCK statement to be processed
  correctly. For this statement, it is necessary to search for
  parameter markers between EXECUTE BLOCK and AS, the rest should be
  left as is.

The SQL preprocessing code has been ported from Firebird to handle
EXECUTE STATEMENT.

Closes GH-4920.
NEWS
ext/pdo_firebird/firebird_driver.c
ext/pdo_firebird/tests/execute_block.phpt [new file with mode: 0644]
ext/pdo_firebird/tests/ignore_parammarks.phpt [new file with mode: 0644]