Commit Graph

150 Commits

Author SHA1 Message Date
Andrey Hristov
87bac04bf1 Better fix for #51605 2010-05-13 11:05:09 +00:00
Andrey Hristov
6cefa510d6 Better fix for #51605 2010-05-13 11:05:09 +00:00
Andrey Hristov
78887ff757 Fix a segfault when using a mysqli object after unsuccesssful connect, the
handle should have been allocated with mysqli_init().
2010-03-24 15:17:57 +00:00
Andrey Hristov
293ba72451 Fix a segfault when using a mysqli object after unsuccesssful connect, the
handle should have been allocated with mysqli_init().
2010-03-24 15:17:57 +00:00
Andrey Hristov
6407250e70 Fix for bug#50772
mysqli constructor without parameters does not return a working mysqli object
2010-01-25 13:23:32 +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
01adfaee5f Unify. The typedef-ed structs in mysqlnd are always capitalized. 2009-12-23 11:58:45 +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
Rasmus Lerdorf
c6502213b4 Fix bug #49098 2009-11-12 01:09:16 +00:00
Ulf Wendel
d8dc47d58f Making mysqlnd emit no warnings when fetching pooled persistent connections that have timed out or are unusable for any other reason - bug #49761 2009-10-15 20:46:08 +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
Andrey Hristov
5d3152b181 Fix a crash in the rare case when a persistent connection
is found dead, after CHNG_USER. mysql->mysql will be NULL
and segfault will follow.
2009-09-25 11:38:19 +00:00
Johannes Schlüter
611c453598 MFH: Fix mysqli pconnects to properly reset connection status by default 2009-01-27 15:35:34 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +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
Andrey Hristov
ec20906b1b Fix that instance too - mysql_get_client_version() returns unsigned long 2008-10-28 15:59:42 +00:00
Andrey Hristov
34ca27a191 MFH: Fix an issue with mysqli.default_port not being used 2008-10-27 14:34:35 +00:00
Andrey Hristov
4df718a477 MFH:
Warning if the library API version differs from the headers used to compile.
Patch versions are not considered but major.minor
Fix build of ext/mysql with 4.0.x and pre.
2008-10-27 12:09:36 +00:00
Johannes Schlüter
f869bbfc1b MFH: Fix #45763 (mysqli::multi_query does not work with mysqlnd) 2008-08-11 12:33:56 +00:00
Andrey Hristov
8c56a23a26 MFH: Two less failing tests, one of which was definitely a leak in mysqli with mysqlnd
and pconn. ext/mysql is being fixed with a better fix for similar leak.
2008-07-22 23:44:23 +00:00
Andrey Hristov
e0f45cf7ae Fix possible bug with persistent connections and mysqlnd 2008-06-24 11:01:38 +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
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
5abe8c8d01 Small updates & a fix for
Bug #43832 mysqi_get_charset() doesn't expose charset comment
2008-03-25 18:27:17 +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
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
Andrey Hristov
1caa85a682 Pconnect working with mysqli_real_connect(). To less failing tests. 2008-02-06 11:34:44 +00:00
Andrey Hristov
7932ccba6d More optimizations - less MM calls
Clearly separated fetching (physical reading) from decoding phases (data
interpretation). Threaded fetching added but disabled as needs more work for
Windows. For Linux needs some touches to add pthreads if this is enabled,
probably with a compile-time switch.
The code reorganisation makes it easy to add also async API, similar to
cURL's one.
2008-01-28 18:25:50 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Andrey Hristov
660ba3b61b Fix build 2007-11-09 11:06:07 +00:00
Andrey Hristov
6f63004f1a Fix crash with pconnect 2007-11-09 10:56:28 +00:00
Andrey Hristov
8b9b553aa2 Import mysqlnd
Patch ext/mysql and ext/mysqli to support mysqlnd
2007-10-05 21:23:56 +00:00
Andrey Hristov
09fbf87a6c Fixed leaks with multiple connects using one mysqli object.
HEAD will be fixed during the next mysqlnd merge

Fixed failing test for bug38710, 5.0 version is bad, 5.1 is ok.
2007-09-06 10:07:42 +00:00
Antony Dovgal
a06d3b7bf3 revert 2007-04-23 09:27:07 +00:00
Antony Dovgal
85fe8e9663 MFH 2007-04-14 10:35:05 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Hannes Magnusson
3611a3de4a Fix protos 2006-10-02 07:44:34 +00:00
Georg Richter
b3a437fcc4 Fix for bug #36802 (server crashes with invalid/not opened connections)
Added status to mysqli_resource:
		MYSQLI_STATUS_UNKNOWN
		MYSQLI_STATUS_CLEARED (for future use)
		MYSQLI_STATUS_INITIALIZED (after mysqli_init and mysqli_stmt_init)
		MYSQLI_STATUS_VALID (for valid objects)
	removed valid flag
	changed MYSQLI_FETCH_RESOURCE
		added last parameter __check which specifies the status
2006-03-24 09:32:24 +00:00
Ilia Alshanetsky
d76e149f0e Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection). 2006-03-21 15:35:28 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Stefan Esser
f7c77f0f33 Beware of format strings... 2005-12-23 18:23:43 +00:00
Zeev Suraski
a034972797 Fix prototype 2005-12-22 14:55:55 +00:00
Antony Dovgal
062626d03e use proper macros and vars instead of strlen() 2005-10-10 20:06:35 +00:00
Antony Dovgal
410e106aae fix #34810 (mysqli::init() and others use wrong $this pointer without checks) 2005-10-10 12:57:55 +00:00
Andrey Hristov
f25c366a73 add a comment 2005-08-06 16:56:42 +00:00
Andrey Hristov
313ff9998e add error checking 2005-08-06 16:38:48 +00:00
Andrey Hristov
dcc18b6d6f fix problem on 64 bit - when asking for "l" supply long not int because
on 64 bit they differ and zend_parse_parameters makes a *(long*) cast
which means that if the variable is int 4 bytes of the variable(s)
declared before it (on the stack) will be overwritten. In this case
this is the length of the query -> made 0 and mysqli_query() returns
FALSE.
2005-08-06 16:15:53 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Georg Richter
9aabcf7016 changed version dependency for charset functions 2005-07-12 15:45:07 +00:00
Georg Richter
9caaee66bd removed charset structure. libmysql now provides a function
mysqli_get_character_set_info (Vers. 5.0.10)
2005-07-12 09:35:16 +00:00
Antony Dovgal
689f3488a5 fix couple of leaks in MySQLi 2005-06-27 17:33:56 +00:00
Georg Richter
01108f7879 fix for #33474 2005-06-26 04:44:03 +00:00
Georg Richter
d486da963e added new function mysqli_get_charset 2005-06-03 08:49:01 +00:00
Georg Richter
d72cd1d130 charsets_dir is no longer needed 2005-05-13 13:56:04 +00:00
Georg Richter
49e1484da8 - fixed compile error under windows. Functionality for changing the
character set was moved to libmysql (4.1 bk tree - will be merged into
5.0 within the next days).
- renamed mysql_set_character_set to mysqli_set_charset
2005-05-13 13:11:41 +00:00
Georg Richter
b654b20ef6 Added new function mysqli_set_character_set_name 2005-05-08 08:39:56 +00:00
Andrey Hristov
60c0c8e95c initialize values because the call to zend_parse_parameters may not do it 2005-05-06 10:09:42 +00:00
Andrey Hristov
f6b12b351e MFB (fixing bug 31668) 2005-04-27 12:12:58 +00:00
Ilia Alshanetsky
a3085602d0 Fixed bug #32081 (default socket value is not being used). 2005-02-24 23:58:59 +00:00
Georg Richter
0b4c108bd7 Added new classes:
mysqli_driver
	mysqli_warning
	mysqli_exception
	mysqli_sql_exception

Improved embedded server support
changed testsuite to work also with embedded server

Made statement and resultset classes extendable

minor fixes
2005-01-07 14:59:59 +00:00
Georg Richter
b557bdb665 added multi resultset support in mysql_connect 2004-11-01 09:53:16 +00:00
Georg Richter
b8863135a2 Fixed tests for empty dates (see http://bugs.mysql.com/?id=6058)
Fixed memleak in mysqli_stmt_bind_result
Fixed error handling for mysqli_multi_query
2004-11-01 07:19:26 +00:00
Georg Richter
f4f84ac9ab Minor fix for mysqli_connect: checking socket_len for NULL Values
(Thx to Paul DuBois)
2004-10-19 05:14:09 +00:00
Georg Richter
c8572b0bba changed local_infile_handler:
mysql client lib now uses php_local_infile functions by default, which allows
  to use php_fopen_wrapper: e.g. LOAD DATA LOCAL INFILE 'http://foo.com/bar.csv' ...

  mysql_set_local_infile_handler now only supports a callback function for read.
2004-08-25 13:57:35 +00:00
Georg Richter
93bf6517df Major changes for 4.1.2-alpha/4.1.3-beta:
- added container for mysql structure
- added load data infile callback functions (currently disabled under win)
Bug fixes:
- fixed property changes (4.1.1 -> 4.1.2)
- fixed memleak in mysqli_connect
- fixed bug #28100
- fixed bug #28205
- fixed bug #28430
2004-06-05 18:31:56 +00:00
Georg Richter
8e52a1a8a3 added MySQLI ini entries
added ini parameter for mysql->reconnect
2004-02-26 11:40:35 +00:00
Ard Biesheuvel
81f05c18f5 Wordsize fixes 2004-02-25 20:16:27 +00:00
Georg Richter
c65d7997c3 fixed prototypes for mysqli_connect_err* functions
(thx to Mehdi Achour)
2004-02-23 16:49:18 +00:00
Georg Richter
b3979e76ba fixed report message
Disabled reconnect option
2004-02-23 06:35:18 +00:00
Georg Richter
7782a4b425 removed experimental status
fixed bug in mysqli_data_seek (thx to Andrey "Effendi" Hristov)
various prototype fixes
moved some methods to properties which are part of mysql struct
added function mysqli_get_server_version
2004-01-28 22:51:54 +00:00
Georg Richter
85510ff3a1 more prototype fixes.
fixed a bug in mysqli_send_long_data
2004-01-26 07:39:57 +00:00
Marcus Boerger
635e3b1980 Proto fix 2004-01-12 00:34:37 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Georg Richter
c10072d067 fixed memleak and segfault when constructor call failed 2003-12-31 08:34:02 +00:00
Georg Richter
ec5b38fae9 minor fixes for embedded 2003-12-13 16:08:13 +00:00
Marcus Boerger
04d0d99b11 ZTS fixes 2003-12-13 13:44:56 +00:00
Georg Richter
ec7ddff5c7 removed old profiler stuff for embedded server 2003-12-13 10:15:45 +00:00
Georg Richter
8b3b1c192b removed profiler
added mysqli_report
	- better support for errors
	- support for no_index_used and bad_index_used
typos and prototype fixes
2003-12-13 00:28:21 +00:00
Georg Richter
fee99f6b29 fixed mem leak in constructor 2003-11-23 07:50:04 +00:00
Georg Richter
230b207849 - Added multiquery support:
mysqli_multi_query
	mysqli_more_results
	mysqli_next_results

- added read-only properties (and removed methods)
	object mysql
		affected_rows
		client_flags
		client_version
		errno, error,
		host, host_info, info
		server_capabilities, server_version
		sqlstate, port, protocol_version,
		server_language
		thread_id, user, warning_count

	object result
		current_field, field_count,
		lengths, num_rows, type

	object stmt
		query, param_count, field_count,
		id, errno, error, sqlstate


- added constructor

- minor fixes, prototypes
2003-11-22 21:20:07 +00:00
Georg Richter
8caae993a3 added support for embedded MySQL Server
some prototype fixes
2003-10-29 20:48:47 +00:00
Hartmut Holzgraefe
92b237f4c3 proto fix 2003-09-16 19:45:22 +00:00
Marcus Boerger
1ae13e543a Modify mysqli_fetch_object() to be able to instantiate a selected class and
pass parameters to the constructor.
2003-09-06 19:34:48 +00:00
Marcus Boerger
14ffad71d6 Fix warnings 2003-09-05 19:27:26 +00:00
foobar
4babf66753 ws fix 2003-07-28 10:23:36 +00:00
Georg Richter
13966fdf3e added new functions:
mysqli_connect_error
  mysqli_connect_errno

  which return possible errors for the last connect
2003-07-18 06:17:39 +00:00
Georg Richter
bb37c9c335 fixed prototypes 2003-06-22 06:16:47 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Georg Richter
5a7257f6e2 fixed return value 2003-06-06 08:57:51 +00:00
Hartmut Holzgraefe
e6633a9611 lots of proto stuff 2003-03-15 22:51:49 +00:00
Georg Richter
7cf921a56f profiler:
moved profiler stuff from php_mysql.h to separate include file
added port communication
added xml support for file and port output
2003-03-11 01:19:21 +00:00
Georg Richter
15f648c8f9 various changes for profiler 2003-03-08 23:33:12 +00:00
Georg Richter
281960ee78 added profiler support 2003-03-03 22:36:47 +00:00
Georg Richter
6997d50ff0 added new function mysqli_stmt_affected_rows
added bigint support for mysqli_affected_rows
fixed memleak in mysqli_prepare (stmt->is_null)
fixed return type for mysqli_connect
2003-02-16 12:03:37 +00:00
Ilia Alshanetsky
410dd6abaf Fixed a typo. 2003-02-14 18:27:20 +00:00
Georg Richter
2841d94f02 fixed compiler warning 2003-02-14 18:18:12 +00:00
Ilia Alshanetsky
031dd997fb Missing portion of the previous patch. 2003-02-14 16:49:09 +00:00
Georg Richter
7d7c07a77c initial upload 2003-02-12 00:45:53 +00:00