Andrey Hristov
bf7e6f930c
add some safe casts
2010-10-05 11:08:21 +00:00
Andrey Hristov
c4e145b0bc
fixing more types
2010-10-05 10:30:00 +00:00
Andrey Hristov
df2261df2a
fix types
2010-10-05 08:56:21 +00:00
Ulf Wendel
234181f690
Fix warnings
...
ext\mysqlnd\mysqlnd_result_meta.c(57) : warning C4090: 'initializing' : different 'const' qualifiers
ext\mysqlnd\mysqlnd_result_meta.c(64) : warning C4090: 'initializing' : different 'const' qualifiers
ext\mysqli\mysqli_report.c(50) : warning C4013: 'php_mysqli_throw_sql_exception' undefined; assuming extern returning int
2010-10-05 08:29:54 +00:00
Andrey Hristov
4c88033aa2
fix recent TSRM build break, with --enable-debug
2010-10-05 08:17:33 +00:00
Kalle Sommer Nielsen
54624f9902
We do not need this TSRMLS_FETCH() call as we do not use any TSRM stuff in here, so we can get
...
a minor boost here in ZTS mode.
2010-10-04 21:04:25 +00:00
Andrey Hristov
a4ad111454
fix two more warnings
2010-10-04 14:52:14 +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
4c63a2232d
Fix const-ness
2010-10-04 13:54:30 +00:00
Andrey Hristov
159ed311cc
Even better patch
2010-10-04 12:59:29 +00:00
Andrey Hristov
cacd5ad924
don't define twice the macro on some platforms
2010-10-04 12:41:12 +00:00
Ulf Wendel
1f9a7fd758
Fixing compiler warning.
2010-10-04 10:58:05 +00:00
Ulf Wendel
ee2a82e327
Fixing "ext/mysqlnd/mysqlnd.h", line 287: warning: syntax error: empty declaration"
2010-10-04 10:51:44 +00:00
Andrey Hristov
3113744c57
Fix a problem that leads to leaks in plugins that
...
use stmt local data - no free is called for statements
that are over-prepared
2010-09-29 13:18:07 +00:00
Andrey Hristov
22d73027d0
add another hook, maybe the last one, for MYSQLND_STMT, which
...
was missed before
2010-09-28 14:36:18 +00:00
Andrey Hristov
b080cfcc71
Fix the value, it was bumped
2010-09-27 11:23:01 +00:00
Andrey Hristov
216effe4f5
WS fixes
2010-09-23 16:03:22 +00:00
Andrey Hristov
ff27146950
small macro fix
2010-09-22 14:54:43 +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
17ae7c1659
remove unneeded proxy function _mysqlnd_restart_psessoin
2010-09-15 12:23:45 +00:00
Andrey Hristov
d99ee78503
Remove unneeded proxy function _mysqlnd_end_psession
2010-09-15 12:11:33 +00:00
Andrey Hristov
292785ed61
fix build on windows, seems this macro is not defined
2010-09-01 16:54:20 +00:00
Andrey Hristov
8220c2e4ce
OPT_COMPRESS support for mysqlnd_conn::set_client_option
...
To be used by mysqli_options
2010-09-01 14:47:36 +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
d9f50d95e3
Add proper magic_quotes_runtime support for mysqlnd, but
...
in mysqli, so we don't need to tamper myslqnd.
magic_quotes_runtime are deprecated and not existant in 5.4, thus
only fixing in the branch.
2010-08-26 14:51:58 +00:00
Andrey Hristov
ab778e7414
Fix for bug #52221 Misbehaviour of magic_quotes_runtime (get/set))
2010-08-25 15:06:47 +00:00
Andrey Hristov
2a926ec6ec
Fix for Bug #52613 crash in mysqlnd
2010-08-17 18:08:25 +00:00
Andrey Hristov
c204922c7f
Added utf16 and utf32 support, as in MySQL 5.5, in mysqlnd.
...
Fixed tests, so they don't try to use SET NAMES utf16|utf32,
as character_set_client can't be set to those (the lexer can't
read ucs2, utf16 and utf32).
Added support for 4-byte utf8, as found in MySQL 5.5
2010-08-16 17:44:50 +00:00
Andrey Hristov
2f2cdc6a51
Sync with trunk, fixes build failure on MacOSX.
...
Fix for Bug #52417 MySQLi build failure with mysqlnd
2010-08-16 09:44:13 +00:00
Andrey Hristov
8409cb44b2
Make this function static, as it is used only in this file.
...
Add additional comment about how it works.
2010-08-12 14:17:31 +00:00
Andrey Hristov
6fc06f265e
Allocate memory in a burst mode, and later use it. Increases
...
locality of the data.
Also use MYSQLND_INC_CONN_STATISTIC in one place, instead of
two, thus removing code duplication from macro expansion - less
code to fit in the instruction cache.
2010-08-12 13:23:16 +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
8bf7114691
ws + cs
2010-08-12 11:38:08 +00:00
Andrey Hristov
0d3d292633
Fix Request #52302 mysqli_fetch_all does not work with MYSQLI_USE_RESULT
2010-08-09 17:29:30 +00:00
Andrey Hristov
f8c2680509
Lay foundations for named pipe support in mysqlnd
2010-08-09 17:01:57 +00:00
David Soria Parra
9d02d50df2
make ssl_set return value in mysqlnd compatible with libmysqli return value
2010-08-06 19:47:03 +00:00
Andrey Hristov
a30113b617
Fix for Bug #51583 Bus error due to wrong alignment in mysqlnd
2010-07-15 16:57:14 +00:00
Andrey Hristov
e6dc3a5cbc
Give an error when USE_RESULT is used with fetch_all
2010-07-13 13:02:00 +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
698539fa79
fix valgrind warnings on 64bit, thread_is is strictly 32bit
2010-06-21 14:49:45 +00:00
Andrey Hristov
5a4a66cdd5
Fix for bug #52115 mysqli_result::fetch_all returns null, not an empty array
2010-06-18 17:25:41 +00:00
Andrey Hristov
6b730a04ae
missed this one in the last commit, the real type
2010-06-18 12:00:57 +00:00
Andrey Hristov
7f79e86886
fix type mismatch, this is fresh misunderstanding
2010-06-18 11:56:25 +00:00
Pierre Joye
a46cb6b513
- fix build
2010-06-17 16:56:48 +00:00
Andrey Hristov
ae4ae5a313
split mysqlnd_connect() in two parts, one doing the authorization
2010-06-17 11:37:49 +00:00
Andrey Hristov
d47e50a9ff
no more needed because of the charset fix in the previous changeset
2010-06-16 19:01:13 +00:00
Andrey Hristov
1d9c49bb3c
Fixed bug #52082 (character_set_client & character_set_connection reset after
...
mysqli_change_user())
libmysql >= 5.1.23 will PASS, older library versions will fail
2010-06-14 17:16:20 +00:00
Andrey Hristov
7aaef918a6
export mysqlnd_globals_id, per Johannes
2010-06-10 12:24:03 +00:00
Andrey Hristov
e692080fc5
void functions return nothing
2010-06-10 09:37:58 +00:00
Andrey Hristov
4a0b4494d4
defensive programming, check before using a resource
2010-06-01 14:16:27 +00:00
Andrey Hristov
41406516b6
Perform later initialization
2010-06-01 09:47:46 +00:00
Andrey Hristov
2a043ed2d3
More check for valid MYSQLND_STMT before using it
2010-05-31 18:26:19 +00:00
Andrey Hristov
38f6c131e5
Don't reference row_packet before checking if dereferencing is possible
2010-05-31 18:18:37 +00:00
Andrey Hristov
b472636375
Check if data is correct and initialize in a safe manner
2010-05-31 18:10:25 +00:00
Andrey Hristov
047d6f2855
Handle problems in the row_decoder, return type used to be void,
...
now it can return on problems.
2010-05-31 17:57:03 +00:00
Andrey Hristov
b61d7501c9
Bail if allocation fails
2010-05-31 17:09:13 +00:00
Andrey Hristov
cf140b3bf7
try to workaround problems with non-c99 on HPUX
2010-05-31 16:51:03 +00:00
Ulf Wendel
c0a8ce2f61
Updating test to reflect the latest and more verbose mysqlnd error messages, updating mysqlnd error message as well.
2010-05-31 13:56:42 +00:00
Andrey Hristov
6ebe80be5d
Don't use NULL pointer, always check before use
2010-05-27 12:39:12 +00:00
Andrey Hristov
ce2fbe1931
Fix possible crashes, in case of OOM, due to half-baken
...
objects.
2010-05-27 12:05:02 +00:00
Andrey Hristov
5efee3d587
Fix crashes in the allocator in case of OOM.
2010-05-27 12:00:48 +00:00
Andrey Hristov
b7385f02fd
Fix deallocation which can crash if the object is half-baken.
...
Happens during OOM.
2010-05-27 08:51:46 +00:00
Andrey Hristov
ce136a825c
Don't use conn->net without checking if it is NULL, because
...
it can be NULL in OOM conditions. This would cause a crash.
2010-05-26 13:47:43 +00:00
Andrey Hristov
58f13c3c9f
Handle the situation when MYSQLND_PROTOCOL's methods return NULL.
...
mysqlnd should not crash but gracefully return with an error.
2010-05-25 23:18:13 +00:00
Andrey Hristov
c5ff0eb5b8
Gracefully handle OOM in mysqlnd_stmt_init. Release the handle
...
and return NULL.
2010-05-25 22:42:25 +00:00
Andrey Hristov
bcdc3b30f7
Init should return status value because initialization can fail.
...
In this case mysqlnd_init() should return NULL to the end-user.
2010-05-25 22:40:47 +00:00
Andrey Hristov
621cdd9019
Use the specialized macro for this case
2010-05-25 22:38:11 +00:00
Andrey Hristov
c389adb96a
Use only memory that has been allocated
2010-05-25 22:36:33 +00:00
Andrey Hristov
4abc7a1e69
Access memory which was really allocated
2010-05-25 22:34:47 +00:00
Andrey Hristov
348880ce66
Fix shared build
2010-05-25 21:54:21 +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
ed4ce335d8
Fix metadata duplicatin which wasn't crash-safe in case of OOM.
2010-05-25 18:14:37 +00:00
Andrey Hristov
29c99daa0f
Check set->data for validity before using it.
...
Prevents crashes after OOM.
2010-05-21 13:37:18 +00:00
Andrey Hristov
ef1eeff882
When OOM hits the wire, don't crash.
2010-05-21 13:06:52 +00:00
Andrey Hristov
e3be1e0bea
result_meta local storage
2010-05-14 16:42:17 +00:00
Andrey Hristov
c881ee30ea
Allow overloading of mysqlnd_result_meta_init().
...
Add free space for future hooks.
2010-05-14 15:11:56 +00:00
Andrey Hristov
34ffc8a6c4
Export MYSQLND_PROTOCOL methods
2010-05-14 13:32:27 +00:00
Andrey Hristov
b86ebe46cb
- Give possibility to overload mysqlnd_result_init().
...
- Always use conn->m->stmt_init instead of mysqlnd_stmt_init()
2010-05-14 13:18:39 +00:00
Andrey Hristov
ce0ea97850
OOM fixes
2010-05-14 13:04:33 +00:00
Andrey Hristov
a78fa3fcaf
- initialize some variables
...
- initialize the methods in a shorter way, use the compiler.
= on structures copies them. Allows also exportability of
the methods.
2010-05-13 15:29:08 +00:00
Andrey Hristov
90f16527af
Export the methods of MYSQLND_NET
2010-05-13 14:15:23 +00:00
Andrey Hristov
aad53cbdec
Export the result_metadata methods to external modules.
2010-05-13 11:16:11 +00:00
Andrey Hristov
ebae62d7c4
OOM stability fixes
2010-05-04 14:02:42 +00:00
Andrey Hristov
04d24bde20
Add possibility to control the allocator in when PHP is compiled
...
with debug
2010-05-04 13:49:43 +00:00
Andrey Hristov
6202b46f2a
Handle OOM in mysqlnd_res::store_result_fetch_data
2010-05-03 19:32:07 +00:00
Andrey Hristov
cac3520882
Handle OOM in mysqlnd_fetch_row_buffered_c()
2010-05-03 19:09:45 +00:00
Andrey Hristov
4a8d751cff
Handle OOM in mysqlnd_fetch_row_unbuffered_c()
2010-05-03 19:02:48 +00:00
Andrey Hristov
d0cef550a3
Handle OOM stemming from mysqlnd_result_init in the same
...
function and up the stack.
2010-05-03 18:50:47 +00:00
Andrey Hristov
6dff9e55be
Handle gracefully OOM in mysqlnd_mempool_create and up the stack
2010-05-03 17:07:18 +00:00
Andrey Hristov
f9fe805abe
Handle OOM in block_alloc_get_chunk, and also in the caller
...
in mysqlnd_wireprotocol.c
2010-05-03 16:20:46 +00:00
Andrey Hristov
864f2da733
Remove unused parameter
2010-05-03 16:09:05 +00:00
Andrey Hristov
88bf630798
One more case to handle in case of OOM, in block_alloc_resize_chunk
2010-05-03 14:26:08 +00:00
Andrey Hristov
de4a5156e6
Handle OOM when resizing blocks during data fetch
2010-05-03 14:16:04 +00:00
Andrey Hristov
8fd0407b3a
Fix compiler warnings - unused functions
2010-05-03 13:51:30 +00:00
Andrey Hristov
d0abd9510e
Better handing of OOM in mysqlnd::set_client_option
2010-05-03 13:45:58 +00:00
Andrey Hristov
a3168a398c
Handle OOM cases, in case of persistent connections this is real
...
and the Zend MM won't help.
2010-04-29 15:49:51 +00:00
Andrey Hristov
2c38266536
Fix valgrind warning, usage of nirvana memory
2010-04-29 15:17:44 +00:00
Andrey Hristov
fa40847263
Fix possible crashes in case of OOM, as well as a leak.
2010-04-29 13:13:41 +00:00