php / pecl-database-pdo_ibm

PDO driver for IBM databases
http://pecl.php.net/package/pdo_ibm
Apache License 2.0
17 stars 14 forks source link

empty string used with concatenation terminates string in SQL early #22

Open NattyNarwhal opened 1 year ago

NattyNarwhal commented 1 year ago

In a3c9fe96549884a30dce4b87e4779bfc0627d36d, some code like values('%' || ? || '%') with a bound empty string will return '%' instead of the expected '%' (in i.e. ibm_db2). Are we doing the right thing with null termination here? What are we doing differently?