Commit Graph

37 Commits

Author SHA1 Message Date
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Andrey Hristov
8b33e6fae0 fix buffer overflow - overwriting with 0x0, due to
unchecked buffer size. This can be easily workarouned on 
existing unpatched systems by increasing
mysqlnd.net_cmd_buffer_size ini variable to more than 8k
2011-03-24 16:12:18 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Andrey Hristov
062ddaa700 fix shadowing of parameters 2010-10-06 06:08:55 +00:00
Andrey Hristov
9f73a4e045 add some safe casts - lower the number of warnings by 2 2010-10-04 14:12:31 +00:00
Andrey Hristov
216effe4f5 WS fixes 2010-09-23 16:03:22 +00:00
Andrey Hristov
86c1364695 fix for bug 52891 - optimize a bit 2010-09-22 14:26:43 +00:00
Andrey Hristov
1de4cfb791 Fix for
Bug #52891 Wrong data inserted with mysqli/mysqlnd when using bind_param,value>LONG_MAX
2010-09-22 11:38:49 +00:00
Andrey Hristov
72bef34918 Fix for MySQL Bug #49406
Binding params doesn't work when selecting a date inside a CASE-WHEN
(http://bugs.mysql.com/bug.php?id=49406)
The MySQL server sends MYSQL_TYPE_NEWDATE values as clear text, even
when PS are used and thus the binary protocol are used. Changing the
handler for the type.
2010-08-30 18:10:23 +00:00
Andrey Hristov
92ef63a07b Switch from using PHP_MAJOR_VERSION to separate define for
unicode. Unicode is no more, but these are "bookmarks" where
to change mysqlnd, if Unicode becomes trendy again.
2010-08-12 12:02:02 +00:00
Andrey Hristov
89bd3af6b9 Two functions, which should be methods so one can catch
their output, for example
2010-06-24 19:52:13 +00:00
Andrey Hristov
53324e8830 Fix sprintf modifiers all around the place. In most cases
%u should be used. Where size_t is used then MYSQLND_SZ_T_SPEC should be
the modifier
2010-06-21 15:32:26 +00:00
Andrey Hristov
621cdd9019 Use the specialized macro for this case 2010-05-25 22:38:11 +00:00
Andrey Hristov
337513ffa0 Handle OOM in the code that generates PS Execute requests
to the server. Fixes crashes in case of OOM.
2010-05-25 19:19:29 +00:00
Andrey Hristov
3d900d4cad Fixed very rare memory leak in mysqlnd, when binding thousands of columns 2010-04-27 12:32:34 +00:00
Felipe Pena
a175419f84 - Fix copyrights 2010-04-20 13:50:34 +00:00
Andrey Hristov
6aa682f564 CS + WS changes 2010-04-15 12:55:04 +00:00
Andrey Hristov
aa8f43fad9 Recommit with an Windows build fix:
Fix inconsistencies
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
  by it.
- add a mode to track memory usage (malloc/free)
2010-04-06 13:28:23 +00:00
Pierre Joye
96e2651fa2 - revert revision 297277, break the builds (declaration must go 1st, size of void * and other known situations). Also Johannes, can you check that commit pls? Thought we were in bugs fixing only for 5.3 2010-04-01 20:21:50 +00:00
Andrey Hristov
f534df710e Fix inconsistencies
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
  by it.
- add a mode to track memory usage (malloc/free)
2010-04-01 13:26:41 +00:00
Andrey Hristov
7496cc761e decouple the methods in MYSQLND_STMT from the data,
needed to move to a new structure MYSQLND_STMT. Makes
the code cleaner and less error-prone.
Also fix PDO/MySQL which directly touch mysqlnd internals
instead of using API calls.
2010-03-16 12:36:57 +00:00
Andrey Hristov
2f81bcd44b Fix ZTS build 2009-09-30 23:34:56 +00:00
Andrey Hristov
ba5c40b2ad Use mnd_ wrappers wherever possible. Needed for
statistics.
2009-09-30 23:13:43 +00:00
Andrey Hristov
76d091d5f5 MFH:Fix a problem with cursors, which did not happen with unbuffered PS for
some reason. Double free of the data, which led to valgrind warnigns.
The fix actually optimizes the code in this cases because the old code
used copy_ctor while the new one skips it because it is not needed.
Transferring data ownership and nulling works best, for PS where we
always copy the string from the result set, unlike the text protocol.
2009-05-28 16:35:41 +00:00
Felipe Pena
dcd86aebd2 - MFH: Removed UG(unicode) checks 2009-03-30 16:52:33 +00:00
Johannes Schlüter
ebef020ecc - MFH: Improve mysqlnd's internal method registration 2009-02-16 17:26:43 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Andrey Hristov
9186528994 MFH:
Get rid of many defines (which simplifies the code a lot),
as well as uint->unsigned int
2008-11-06 10:37:47 +00:00
Andrey Hristov
77c1e145e1 MFB:
64bit fixes:
- fixes to sprintf modifiers, cleaning warnings
- use _t types, like uint64_t instead of uint64, thus skipping series of
typedefs.
2008-10-31 20:32:17 +00:00
Andrey Hristov
2c54b3abb5 More debugging info for the trace log 2008-07-22 16:06:08 +00:00
Andrey Hristov
f4e659d2af Update ext/mysql's and ext/mysqli's tests
Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in
mysqlnd builds as libmysql doesn't support this feature.
2008-04-24 14:22:19 +00:00
Andrey Hristov
de560f3161 MFB: Update CVS from the development tree 2008-04-16 12:57:38 +00:00
Andrey Hristov
85cd8525c9 Small fix and a test case to prove it's right 2008-03-20 15:29:14 +00:00
Andrey Hristov
6867385d75 - Don't modify the variables which are passed for parameter binding.
We need to clone them, if there will be a transformation (convert_to_xxx)
  which will change the origin
  (bug#44390 bind_param / bind_result and Object member variables)
- Make mysqlnd more compatible to libmysql, in this case if the execute of
  a statement fails set the state of the statement back to PREPARED
- A test case to check the case of a failing statement.
2008-03-20 14:03:30 +00:00
Andrey Hristov
fdf20a8287 - Fix problems with double definitions
- Clean up a bit a type mess - 4 types less. No need to have aliases
  for the same thing (unification is the name).
- New macro for Johannes mysqlnd_stmt_ro_result_metadata
2008-01-02 21:14:35 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Andrey Hristov
8b9b553aa2 Import mysqlnd
Patch ext/mysql and ext/mysqli to support mysqlnd
2007-10-05 21:23:56 +00:00