Commit Graph

45 Commits

Author SHA1 Message Date
Felipe Pena
1f54af9245 MFH:
- Fixed bug #44251 (Question mark and an escaped singel quote lead to an exception)
- Fixed bug #41125 (PDO mysql + quote() + prepare() can result in seg fault)
  Patch by: tsteiner at nerdclub dot net
2008-10-10 12:10:41 +00:00
Sebastian Bergmann
f8a8196d63 MFH: Bump copyright year, 1 of 2. 2007-12-31 07:15:43 +00:00
Ilia Alshanetsky
0c0456d275 Revert addition of - char support for bound param names 2007-11-26 21:09:50 +00:00
Ilia Alshanetsky
c27a8a41c2 Fixed bug #43130 (Bound parameters cannot have - in their name) 2007-10-29 22:36:26 +00:00
Ilia Alshanetsky
c084d1c829 Fixed bug #41596 (Fixed a crash inside pdo_pgsql on some non-well-formed
SQL queries).
2007-06-05 22:55:27 +00:00
Ilia Alshanetsky
ff3e825083 Fixed bug #40417 (Allow multiple instances of the same named PDO token in
prepared statement emulation code).
2007-03-06 00:52:55 +00:00
Ilia Alshanetsky
c219c6f4a8 Fixed bug #40285 (The PDO prepare parser goes into an infinite loop in
some instances).
2007-02-01 00:12:39 +00:00
Nuno Lopes
b6dff166bf MFH: fix infinite cycle
#this was the infinite cycle that was bugging me in the gcov machine...
2007-01-03 22:05:24 +00:00
Ilia Alshanetsky
e5ad7bf299 Fixed bug #36798 (Error parsing named parameters with queries containing
high-ascii chars).
2006-12-05 18:04:59 +00:00
Ilia Alshanetsky
4356aad0ae Fixed bug #39483 (Problem with handling of \ char in prepared statements). 2006-12-04 00:38:46 +00:00
Ilia Alshanetsky
44baca5aed Added missing check for mismatching number of tokens & bound params in
prepared statement emulation.
2006-12-03 23:27:44 +00:00
Ilia Alshanetsky
af16066603 Fixed a possible crash 2006-11-23 14:41:35 +00:00
Ilia Alshanetsky
c32ed59e4e Fixed a memory leak when named & positional params are being used in the
same query.
2006-11-12 17:49:19 +00:00
Ilia Alshanetsky
8fde2249c3 Properly rewrite queries where a bound parameter appears more then once. 2006-01-25 16:35:23 +00:00
foobar
e3fd31503b bump the year and license version 2006-01-01 12:26:08 +00:00
Wez Furlong
e9c81e4983 actually register PDO_PARAM_BOOL as a constant (doh!).
When emulating bound parameters, pass booleans via the driver's quoter
method, so that is has an opportunity to tweak it.
Refs #33876: PDO misquotes/miscasts bool(false)
2005-09-10 20:58:19 +00:00
Edin Kadribasic
4e1b287b82 Fix for #34233 2005-09-04 00:47:59 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Wez Furlong
7f053e062c avoid :: when looking for named parameters.
Refs Bug #33736.
2005-07-18 14:44:14 +00:00
Wez Furlong
9240c5f521 remember ? -> :pdox mapping so that binds by position can be mapped to names if required. 2005-07-12 03:19:44 +00:00
Marcus Boerger
8d743e70e0 - std not needed -> avoid warning 2005-07-08 20:35:41 +00:00
Wez Furlong
38a02b6244 For named-parameter-to-named-parameter rewrites, we need to map the original
names to the new names.
2005-07-08 17:00:28 +00:00
Wez Furlong
ab1ba644db add a bit of a hack to cater for pgsql prepared statements.
These are effectively named statements with strong constraints on the naming
format.  We cater for this in a fairly generic way: allow a driver to replace
the format string we use to generate names from positional parameters.  In
addition, if that format is set, we always force a rewrite from regular names
to the strongly enforced names.
2005-07-08 15:24:21 +00:00
Ilia Alshanetsky
e546162f2c Added missing header. 2005-04-14 14:00:39 +00:00
Wez Furlong
31239f2130 *cough* 2005-02-26 16:03:55 +00:00
Wez Furlong
b4ad599df2 fix for PECL #3545 2005-02-26 15:44:38 +00:00
Wez Furlong
0da6a84edf implement mapping of :name to ? parameters for drivers that only support ?
placeholders.
The current restriction is that you may not use the same named parameter
more than one in a given query, as there is a danger of scary things happen
with the zval if it gets bound multiple times.
2005-02-13 06:29:35 +00:00
Wez Furlong
fc51fd11b6 it's only an error in emulation mode; rewrite happens in prepare, which
happens before bindParam
2005-02-13 04:00:22 +00:00
Ilia Alshanetsky
2196c4335b kill unused var 2005-02-09 16:14:50 +00:00
Wez Furlong
2bd3536041 handle input LOBs (which are passed as streams) in bound parameter emulation.
Update error handling.
2005-02-07 00:26:22 +00:00
Edin Kadribasic
0d9b0606b9 Don't segault when we have placeholders but no bound params 2005-02-06 00:46:17 +00:00
Wez Furlong
15e754201f pass param type to quoter functions 2005-02-05 21:29:42 +00:00
Wez Furlong
6ddbfa0733 Revise query parser so that it can rewrite from one bind syntax to another.
Expose it as PDO_API.  No drivers utilize this feature yet.
2005-01-21 03:57:06 +00:00
George Schlossnagle
4d01a5c2d1 ok, apprently we _don't_ want to count the nulls. 2004-05-21 22:24:20 +00:00
George Schlossnagle
1ee89e1bea remove debugging 2004-05-21 22:20:25 +00:00
George Schlossnagle
518cf77f32 fix fubar'd emulated bindings 2004-05-21 22:19:33 +00:00
George Schlossnagle
c22cb0477c off by one error 2004-05-20 18:44:12 +00:00
George Schlossnagle
3366916203 set active_query_string to null in case of failure 2004-05-20 18:29:59 +00:00
George Schlossnagle
d16625b803 Support ? as a bind in emulated prepares
Throw informative error when pdo_parse_param fails
2004-05-20 17:56:09 +00:00
George Schlossnagle
e3e2370490 keys need to be null-terminated (how did this not get committed before???)
bind-by-name includes the leading : in the name
2004-05-20 17:34:52 +00:00
George Schlossnagle
76b7b5d1e2 iactually support :\w+ as binds 2004-05-20 17:04:57 +00:00
George Schlossnagle
2e4c3ea35f forgotten off the last commit 2004-05-18 19:30:43 +00:00
Wez Furlong
2a9fa24458 Tweaks for win32 2004-05-18 15:57:46 +00:00
George Schlossnagle
70f06be16a license/copyright block 2004-05-18 15:22:58 +00:00
George Schlossnagle
a97e1a6646 handle binding/quoting of queries for drivers with emulated prepares 2004-05-18 15:19:31 +00:00