Commit Graph

167 Commits

Author SHA1 Message Date
Kalle Sommer Nielsen
cc1eaba454 Fixed compiler warnings in mysqli
- mysqli.c: Fix unused variables, they are only used in non-mysqlnd mode
 - mysqli_api.c (PHP_5_3 only): Fix constness, add_property_string expects a char *, not a const char *
 - mysqli_prop.c: Cast to long, as its below the LONG_MAX and therefore safe
 - mysqli_result_iterator.c: Cast to ulong as the iterator member expects that rather than a my_longlong

# In trunk only warnings regarding the zend_property_info 
# structure is present and PHP_5_3 is warning free now
2010-10-05 09:40:36 +00:00
Ulf Wendel
926ba0d9c7 Trying to fix compiler warnings (on Windows). 2010-10-04 13:36:23 +00:00
Ulf Wendel
e20c62d3be Sorry for the commit but compiler warnings are annoying and so are white spaces at the end of a line, if one uses an editor which removes them on save and diff's get blown
up by white space changes...

Changes: 
- remove end of line white space
- fix compiler warning "ext/mysqli/mysqli_priv.h:156:27: warning: no newline at end of file"
- fix compiler warning "ext/mysqli/mysqli_fe.h:135:25: warning: no newline at end of file"
- fix compiler warning "ext/mysqli/mysqli.c:896:11: warning: extra tokens at end of #ifdef directive"
2010-10-04 10:02:58 +00:00
Andrey Hristov
77d73b814b Plug a leak in mysqli when in the same script
a pconn is reused.
Call end_psession earlier - so will mysqlnd and
the plugins free data earlier.
2010-09-30 18:10:03 +00:00
Andrey Hristov
6a43b14849 Fixed bug #45921 (Can't initialize character set hebrew)
sorry for committing it separated
2010-09-27 12:37:23 +00:00
Ulf Wendel
42fea46887 Adding MYSQLI_OPT_SSL_VERIFY_SERVER_CERT for use with mysqli_options(). 2010-08-30 16:59:10 +00:00
Andrey Hristov
67ef72018f Fix for bug #52654 mysqli doesn't install headers with structures it uses 2010-08-20 12:25:17 +00:00
Kalle Sommer Nielsen
9806c21259 Changed mysqli_report() to be per-request specific rather than per-process specific (Fixes #52390) 2010-08-13 10:43:15 +00:00
Andrey Hristov
ce682f1b26 Add checks to check the underlying pointer in the resource.
It can happen that the underlying pointer is freed (like in
the case of connection reconnect), and then it cannot be allocated
anymore, which means that NULL will be used consequently by the
functions that fetch the resource and the crash is immediate.
2010-05-26 07:28:43 +00:00
Dmitry Stogov
c5237d82bf Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties 2010-05-24 14:11:39 +00:00
Andrey Hristov
7dd13d56cc Add iterator to mysqli_result. Works both for :
- USE_RESULT, can be iterated only once, kind of forward iterator
- STORE_RESULT, can be iterated multiple times
2010-05-18 10:39:26 +00:00
Andrey Hristov
6cefa510d6 Better fix for #51605 2010-05-13 11:05:09 +00:00
Dmitry Stogov
94dd83722b Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table 2010-04-20 10:57:45 +00:00
Johannes Schlüter
eb0de2af90 revert 293939 Fixed bug #50636 (MySQLi_Result sets values before calling
constructor)
2010-02-11 21:42:48 +00:00
Andrey Hristov
36a037d236 Fix build of mysqli when libmysql is used, mysqlnd_portability.h
might not be available for some weird reasons. Added the macros
that we need, in that case

Code by Jess Portnoy
2010-01-14 09:47:57 +00:00
Pierrick Charron
614fd65795 Fixed bug #50636 (MySQLi_Result sets values before calling constructor) 2010-01-03 16:59:33 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Andrey Hristov
06a417b6a9 Remove stub code which never actually was used for anything.
Things like this can be built on top of the core.
2009-12-09 20:38:11 +00:00
Andrey Hristov
6f598e62ff Remove the zval caching from mysqlnd. It was disabled versions ago
due to problems on windows, which were not debugged. Better have 
code that is disabled not in the core.
2009-12-09 20:21:05 +00:00
Andrey Hristov
4d2735007d Remove disabled code - threaded fetching. This can be implemented
on a upper level and by offloading it we reduce the complexity of
the core.
2009-12-09 16:57:03 +00:00
Ulf Wendel
ab4670ee53 Fixing problems when calling connect (again and again) on a valid connection handle. Most of the patch comes from Andrey. 2009-10-15 15:49:40 +00:00
Ilia Alshanetsky
7eeff10cc0 Fixed unused var 2009-09-23 23:14:17 +00:00
Andrey Hristov
ac93b60f68 MFH:Fix handling of BIT fields for non-PS. We need
macros from mysqlnd to be able to convert a bit
stream to a number.
2009-09-22 15:08:11 +00:00
Andrey Hristov
43d33e8a99 Fix for bug#46614 Extended MySQLi class gives incorrect empty() result 2009-08-27 12:41:14 +00:00
Johannes Schlüter
074b084852 MFH: export mysql_refresh
[DOC] This makes mysql_refresh() as described in
      http://dev.mysql.com/doc/refman/6.0/en/mysql-refresh.html
      available as mysqli_Refresh() and mysqli->refresh()
      MYSQLI_REFRESH_BACKUP_LOG is only available when linking libmysql 6.0
      or mysqlnd
2009-01-22 21:01:58 +00:00
Johannes Schlüter
74cfc5f3d7 MFH Fix #45940 MySQLI OO does not populate connect_error property on failed
connect
2009-01-12 12:56:01 +00:00
Johannes Schlüter
1e3e6cdf29 MFH: Proper ctor usage (Fix #46044) 2009-01-07 16:32:08 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Ilia Alshanetsky
c9f030f576 Fixed bug #46887 (Invalid calls to php_error_docref())
# Patch by oeriksson at mandriva dot com and crrodriguez at opensuse dot org
2008-12-18 20:02:20 +00:00
Dmitry Stogov
7d4fd3fd38 Fixed bug #46409 (__invoke method called outside of object context when using array_map) 2008-11-27 19:01:23 +00:00
Andrey Hristov
825034cea5 MFH:
Asynchronous queries for mysqli, when mysqlnd is enabled.
Includes 4 tests for mysqli_poll
2008-11-18 17:02:18 +00:00
Pierre Joye
86a352afda - Declarations MUST BE done in the beginning of a context 2008-10-03 16:19:49 +00:00
Andrey Hristov
8bb2465a51 MFH:
Add float conversions too. Float users should understand how float works!!!
2008-09-15 18:09:20 +00:00
Dmitry Stogov
691d4a6999 Fixed uninitialised data 2008-07-25 08:23:07 +00:00
Andrey Hristov
5e79f2c476 Fix for bug#45179 --with-mysql-sock fails to compile & work
Now --with-mysql-sock controls all mysql extensions. If provided it will be
the default value as it was set in php.ini . php.ini will override it for
ext/mysql and ext/mysqli but not for pdo_mysql
2008-07-21 12:58:51 +00:00
Andrey Hristov
136a55fcd9 Sync with bzr 2008-07-15 13:11:09 +00:00
Andrey Hristov
827b772c9f Fix remaining valgrind problems with pconn and zval cache
HEAD merge will follow tomorrow.
2008-06-24 22:22:48 +00:00
Andrey Hristov
943e9a577b Fix double-free, introduced lately 2008-06-24 13:19:29 +00:00
Andrey Hristov
259b652b2e Make mysqli compilable in a 5_2 environment. Some want to use mysqlnd+mysqli
with 5_2. This won't hurt 5_2 in any way. Won't be MFB-ed because HEAD is
completely different.
2008-05-06 17:05:14 +00:00
Andrey Hristov
98680c0c8f Fix the build 2008-03-18 17:30:55 +00:00
Andrey Hristov
caf3e9c3f1 Fixed a bunch of bugs reported in
Bug #44352 mysqli_connect_error() false negative for host errors
From now on the mysqli object doesn't have that magic properties, like
error, which were readable but not visible through isset(), property_exists()
and var_dump(). All other ext/mysqli classes were fixed too.
Now it will be easier to debug mysqli based applications.
2008-03-18 16:57:31 +00:00
Andrey Hristov
725b31fc6c Update mysqlnd, ext/mysql and ext/mysqli - now possible to compile with different
configurations one or the another extension to use libmysql or mysqlnd mixed in
one binary
2008-03-10 20:15:38 +00:00
Johannes Schlüter
445a24e400 Fix typo 2008-03-10 13:39:53 +00:00
Andrey Hristov
64aad3d210 Bug fixed in 5.0.46 2008-03-08 15:00:50 +00:00
Andrey Hristov
ff8a310468 Fix a problem with $mysqi->connect() not working with default values.
Fix a leak, bug#39457
2008-03-08 14:55:52 +00:00
Ilia Alshanetsky
fe9f641658 Fixed a possible crash 2008-02-18 13:28:48 +00:00
Andrey Hristov
49172e3c4b Fix windows build - VC doesn't like nested macros 2008-02-12 22:05:34 +00:00
Johannes Schlüter
d211430aa7 MFH: - Fix build with TSRM and mysqlnd 2008-02-12 20:19:21 +00:00
Antony Dovgal
a47e15d8b5 MFH 2008-02-12 10:54:54 +00:00
Andrey Hristov
c95c7c7d3f Fix typo 2008-02-12 10:51:39 +00:00