Commit Graph

560 Commits

Author SHA1 Message Date
Dmitry Stogov
cafae0dc4b Fixed test 2008-06-11 10:08:14 +00:00
Dmitry Stogov
337ea89883 Fixed test 2008-06-11 09:58:32 +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
46e3d3a4d8 Fix snapshot build 2008-04-08 07:45:49 +00:00
Nuno Lopes
25e6cd1a38 remove duplicated sections 2008-03-17 17:19:48 +00:00
Felipe Pena
84a8bb038a MFH: New way for check void parameters 2008-03-10 22:15:36 +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
a27e0c8818 - Fix a warning in php_mysql.c
- Fixed #44371 Extension compile failed
2008-03-10 09:18:43 +00:00
Johannes Schlüter
14496417d0 - MFH: Fix typo in skipif 2008-03-09 01:07:01 +00:00
Felipe Pena
a7dd2ad68c Fix test 2008-03-08 23:13:45 +00:00
Andrey Hristov
64aad3d210 Bug fixed in 5.0.46 2008-03-08 15:00:50 +00:00
Felipe Pena
c3b6ca3b8f MFB: Fixed bug #44333 (SEGFAULT when using mysql_pconnect() with client_flags) 2008-03-04 22:29:29 +00:00
Marcus Boerger
d3e5026564 - MFH Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus)
[DOC] Finally added deprecation messages
2008-02-23 17:06:22 +00:00
Johannes Schlüter
2c079e328b - MFH: Make clear what's going on and avoid overwriting parameters 2008-02-12 20:43:42 +00:00
Felipe Pena
ce197075b0 Fixed Bug #44094 (SEGFAULT when using mysql_connect()) 2008-02-12 10:11:55 +00:00
Andrey Hristov
c2a5e180c7 Fix a test 2008-02-06 15:34:35 +00:00
Andrey Hristov
2033c1b7f2 some config.w32 fixes
moved mysqlnd's block allocator to a separate file and also now
it's part of the connection, no MT problems.
2008-01-28 22:50:06 +00:00
Nuno Lopes
47e009d392 remove unused PHP_MYSQL_API macro 2008-01-28 11:16:00 +00:00
Hannes Magnusson
369bf690c4 MFH: Fixed bug#43875 (Two error messages returned for $new and $flag argument in mysql_connect()) 2008-01-20 14:10:44 +00:00
Andrey Hristov
89871ecc54 Fix compile issue 2008-01-19 18:21:44 +00:00
Antony Dovgal
92294297e5 MFH: fix test 2008-01-18 12:48:35 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Ilia Alshanetsky
a6e755d6aa Fixed bug #43635 (mysql extension ingores INI settings on NULL values passed
to mysql_connect())
2007-12-20 00:26:21 +00:00
Antony Dovgal
4a6b52dc01 MFH: plug leak on invalid result type 2007-11-08 13:29:06 +00:00
Jani Taskinen
5cfa9c6312 MFH: partial MFH before? 2007-11-06 10:00:39 +00:00
Ulf Wendel
f8156f1607 Trying to skip tests if they can't connect to the DB server.
Currently they have failed by default. Note also the environment
variable MYSQL_TEST_SKIP_CONNECT_FAILURE to control the default (skip or fail)
2007-10-12 11:57:18 +00:00
Ulf Wendel
db9cdc1b66 And the last set of new tests for ext/mysql. "new" does not really mean new.
We've checked them into HEAD/PHP6 before already.
2007-10-10 09:56:48 +00:00
Ulf Wendel
865d199df3 Second last set of new tests for ext/mysql 2007-10-10 09:55:28 +00:00
Ulf Wendel
f01e360850 Next set of new tests - more to follow. Trying to find reasonable commit size... 2007-10-10 09:53:34 +00:00
Ulf Wendel
dd9292e225 Adding new tests. 2007-10-10 09:51:45 +00:00
Ulf Wendel
15a201d6a7 New tests use more helper files. 2007-10-10 09:49:37 +00:00
Ulf Wendel
83911a1e5e Starting to merge the latest set of tests from the mysqlnd development
tree into the PHP 5_3 tree.
2007-10-10 09:47:21 +00:00
Andrey Hristov
dba6e473ca Move non-public code to non-public header file. This should also solve
#42890 "Constant "LIST" defined by mysqlclient and c-client"
2007-10-08 16:14:56 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Andrey Hristov
8b9b553aa2 Import mysqlnd
Patch ext/mysql and ext/mysqli to support mysqlnd
2007-10-05 21:23:56 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Scott MacVicar
734dfc8b75 MFH: Fixed bug 42549 (ext/mysql failed to compile with libmysql 3.23) 2007-09-09 16:08:17 +00:00
Scott MacVicar
99c875a03d Fixed bug #41350 (my_thread_global_end() error during request shutdown on Windows). 2007-06-25 16:01:30 +00:00
Stanislav Malyshev
b925a9248b Fix INFILE LOCAL option handling with MySQL - now not allowed when open_basedir
or safe_mode is active
2007-06-18 21:51:32 +00:00
Antony Dovgal
b1a0a4d3e4 MFH: reset active_result_id when fetching persistent connection
patch by Peter Christensen
2007-06-07 12:17:35 +00:00
Scott MacVicar
607467451d Prefix NEWS item so documentation team know of new function and typo from old parsing API spotted by bjori 2007-05-14 18:09:20 +00:00
Scott MacVicar
ac38b635cb Add mysql_set_charset() so that the connection encoding can be changed. This is similar to the SET NAMES statement but allows the mysql_real_escape_string to use the correct character set. 2007-05-14 17:10:47 +00:00
Antony Dovgal
5340a509f4 revert 2007-04-23 09:32:44 +00:00
Ilia Alshanetsky
0369b693b4 Fixed bug #41159 (mysql_pconnect() hash does not account for connect
flags).
2007-04-22 15:19:08 +00:00
Antony Dovgal
07435262b9 MFH: fix #41083 (mysql_ping() requires MYSQL_OPT_RECONNECT to be set since MySQL 5.0.13) 2007-04-14 10:19:19 +00:00
Marcus Boerger
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Antony Dovgal
e5635a81af init variable, eliminate compile warning 2006-08-02 10:04:11 +00:00
Hannes Magnusson
aaa1d62614 MFH: fix/add SKIPIF 2006-06-27 00:09:43 +00:00
Hannes Magnusson
223d122cae MFH: use the ZEND_ACC_DEPRECATED flag rather than custom warnings 2006-06-26 16:33:39 +00:00
Dmitry Stogov
1dbaae2795 Added automatic module globals management 2006-06-15 18:33:09 +00:00
Michael Wallner
6e2ff39e3e - Fix bug #37630: MySQL extensions should link against thread safe client libs if built with ZTS 2006-06-01 19:14:48 +00:00
Marcus Boerger
77c1b56cd7 - Update after api changes 2006-05-10 00:00:13 +00:00
Ilia Alshanetsky
a0d912490d Fixed test to work when TCP/IP access to MySQL is disabled or test server
is on a remote machine.
2006-02-06 14:25:07 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
3e669bc950 MFH: nuke php3 legacy 2005-12-06 02:28:41 +00:00
foobar
a3af52c11e MFH: list_entry -> zend_rsrc_list_entry 2005-12-05 23:38:04 +00:00
Antony Dovgal
ab34dafb69 fix #35536 (mysql_field_type() doesn't handle NEWDECIMAL)
add also SET, ENUM, NEWDATE and GEOMETRY to the switch
2005-12-05 13:16:48 +00:00
Wez Furlong
d1be6c8152 assign a version number 2005-09-04 17:10:56 +00:00
Wez Furlong
b6be0f9817 Allow ext/mysql to build against PHP 4 again; update package.xml ready for
release via PECL.
2005-09-04 04:51:23 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
foobar
07862d7218 consistent naming: prefix always with MYSQL_ 2005-06-30 14:15:51 +00:00
foobar
9f704ce6d1 This is not mysqli, where 5th parameter is port. 2005-06-20 00:16:31 +00:00
foobar
7a794caed0 Another netware fix 2005-06-11 23:32:46 +00:00
foobar
bf94716838 - Allow doing --with-mysql --with-mysqli (no mysql libs are bundled atm)
- Make sure MYSQL_DIR is empty.
2005-06-07 12:39:02 +00:00
Wez Furlong
e9d474dc01 fixes for #33251 2005-06-05 19:25:01 +00:00
foobar
a20383ba06 - Unify the "configure --help" texts 2005-05-29 23:17:16 +00:00
foobar
d57f08147d - Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX) 2005-04-07 22:23:15 +00:00
Ilia Alshanetsky
d97da3e222 Fixed bug #31288 (Possible crash in mysql_fetch_field(), if
mysql_list_fields() was not called previously).
2005-02-22 14:58:49 +00:00
foobar
69eec3f3b9 MFB_4_3: Quote macro names in AC_DEFUN() 2004-12-30 07:08:39 +00:00
Joe Orton
2685ca935f Update extensions to use /path/to/$PHP_LIBDIR rather than /path/to/lib
to support multi-ABI platforms.
2004-11-03 14:32:52 +00:00
Andi Gutmans
56f8195fe5 - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
  STR_FREE() and zval_dtor() always have to check for it and it slows down
  the general case. In addition, it seems that empty_string has been abused
  quite a lot, and was used not only for setting zval's but generally in
  PHP code instead of "", which wasn't the intention. Last but not least,
  nuking empty_string should improve stability as I doubt every place
  correctly checked if they are not mistakenly erealloc()'ing it or
  calling efree() on it.
  NOTE: Some code is probably broken. Each extension maintainer should
  check and see that my changes are OK. Also, I haven't had time to touch
  PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Ilia Alshanetsky
f9cec029c8 Fixed bug #28632 (Prevent open_basedir bypass in MySQL's LOAD DATA LOCAL). 2004-06-04 15:26:54 +00:00
Ilia Alshanetsky
0e443166e0 Fixed bug #28627 (When multiple MySQL links are used default link is
leaked).
Patch by: gavin at ipalsoftware dot com
2004-06-04 13:49:31 +00:00
Ilia Alshanetsky
7a11fe48b6 Fixed bug #28087 (Do not force mysql.trace_mode to 0 on every request). 2004-04-23 17:03:52 +00:00
Hartmut Holzgraefe
eeb172b29f "The Visa to Sibiria" (work in progress)
Adding a package.xml to a bundled extension does not only
ease the transition to PECL whereever suitable but also
allows to build and install an extension as "shared" using
the PEAR installer without having to deal with phpize and
friends by hand
2004-03-23 19:46:10 +00:00
Jan Lehnardt
bf807f6d69 - fix typo 2004-02-16 14:41:38 +00:00
Zeev Suraski
30171a7590 zend_default_classes.h -> zend_exceptions.h 2004-02-12 10:43:27 +00:00
Andrey Hristov
463f510796 message about that mysql_list_tables() is deprecated 2004-01-27 23:14:42 +00:00
foobar
f4983c0d3f - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
Ilia Alshanetsky
1d86ea8851 Added missing skip condition. 2004-01-16 15:16:26 +00:00
Marcus Boerger
3fb99f62e0 Synch mysql_fetch_object with mysqli, sqlite and pgsql 2004-01-12 02:34:55 +00:00
Marcus Boerger
d129242ad5 Add some tests 2004-01-12 02:31:08 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Derick Rethans
0cfadb914c - Fixed bug #26751 (PHP can't find the MySQL socket on a case sensitive file
system).
2003-12-31 11:27:52 +00:00
Marcus Boerger
b88ad57b73 Revert this part, too 2003-12-07 15:39:56 +00:00
Marcus Boerger
d57004274b Revert, not needed here 2003-12-07 15:26:09 +00:00
Sebastian Bergmann
dea716a4e1 Support for new Win32 build bliss. 2003-12-05 06:09:29 +00:00
Ilia Alshanetsky
d9bf51b17c 10-18% optimization of fetch_array(), when both number & string indexes are
created.

# Do we want to MFH the change (for ext/mysql) into 4.3.X?
2003-11-07 17:20:49 +00:00
Ilia Alshanetsky
763b39cc1d Fixed compile warnings. 2003-10-03 01:07:35 +00:00
Ilia Alshanetsky
4aaa2becbe String format stuff. 2003-09-22 23:27:51 +00:00
Ilia Alshanetsky
9d9727aac5 Fixed compiler warnings. 2003-08-28 19:17:34 +00:00
Ilia Alshanetsky
93bcd55eaf emalloc -> safe_emalloc 2003-08-12 00:58:52 +00:00
Ilia Alshanetsky
5c6ee17a9e Fixed bug #24977 (Revert mysql_select_db optimization) 2003-08-08 13:36:28 +00:00
Ilia Alshanetsky
5fcff2d872 * Fixed bug #24535 (Crash when retrieving data from unbuffered result after
the original connection has been changed).
* Fixed a crash when trying to fetch an unbuffered result after
mysql_close() has been called.
* Added a check to make sure no unbuffered results are inside the buffer
when calling functions that internally execute a query. Affected functions
are: mysql_select_db(), mysql_list_dbs(), mysql_list_tables(),
mysql_list_processes(), mysql_list_fields(), mysql_stat() and mysql_ping().
* Do not re-select a database if the database to be selected is the same.
2003-07-22 16:05:32 +00:00
Sascha Schumann
94756ffb8b Add short notice regarding unbundled client lib 2003-07-18 09:53:04 +00:00
Sebastian Bergmann
81543d043e COMPILE_DL_MYSQL_MYSQL -> COMPILE_DL_MYSQL 2003-07-06 20:38:56 +00:00
Edin Kadribasic
dda902d56d Fix shared win32 build 2003-07-01 09:44:14 +00:00
Shane Caraveo
082a1489d2 fix building mysql as a loadable extension 2003-06-28 22:28:44 +00:00
foobar
a6a321c1ac clean up a bit. 2003-06-25 03:53:17 +00:00
Sterling Hughes
d4cd1ef084 remove the bundled libmysql, and update the config.m4 file as necessary.
this works locally, but everyone, *please* test
2003-06-23 01:10:58 +00:00
Ilia Alshanetsky
d860759db9 Make the default mysql connection timeout 60 seconds rather then unlimited. 2003-06-18 15:19:16 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Andrey Hristov
3ae8d27176 proto fixes 2003-06-10 14:06:20 +00:00
Georg Richter
0a2968a75f fixed mysql bug #564 (http://bugs.mysql.com/bug.php?id=564) 2003-06-07 16:15:22 +00:00
Sterling Hughes
287d5f277e don't do this on startup, lazy initialize it. This takes up > 17% of load
time in CGI mode
2003-06-01 02:29:28 +00:00
Ilia Alshanetsky
209bba391b Fixed bug #23888 (Missing input validation for flags parameter) 2003-05-30 14:08:14 +00:00
Rasmus Lerdorf
8effacb144 MFB 2003-05-28 16:19:08 +00:00
Derick Rethans
0596442eef - MFB: Fixed bug #23661: mysql_fetch_array gives no warning on an invalid
result_type
2003-05-16 19:09:19 +00:00
foobar
b83fc1a802 - Fixed some AIX/HPUX compile issues.
# Just a modified diff of the same file found in mysql 4.0.12 :)
2003-04-25 21:31:23 +00:00
Derick Rethans
a802e0d6b3 - Fixed protos 2003-04-11 09:53:01 +00:00
Ilia Alshanetsky
8a9ff734a0 Fixed a crash in the query tracer output due to buffer overflow.
Fixed a crash in notice message for unbuffered query.
2003-04-10 04:35:39 +00:00
Edin Kadribasic
688c24bcaa MFB 2003-03-27 13:30:40 +00:00
Ilia Alshanetsky
5c159052bf Added missing header that prevents successful compilation. 2003-03-24 15:21:53 +00:00
foobar
3c9155e0cb Renamed OnUpdateInt -> OnUpdateLong to prevent further misunderstandings.
# Intentionally left out any 'alias' for it, this way 3rd party extension
# maintainers will really NOTICE the change.
2003-03-07 05:15:28 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Ilia Alshanetsky
453368afdf Removed pointless checks. 2003-01-30 02:33:16 +00:00
Ilia Alshanetsky
e2868b5788 Removed pointless memory allocation checks. 2003-01-18 19:41:56 +00:00
Georg Richter
5312594a27 fixed bug #21498 2003-01-08 11:00:06 +00:00
Sascha Schumann
e180f20e63 tell user which header files could not be found 2003-01-07 09:49:08 +00:00
Georg Richter
8aeb7f35bc fixed missing & (Thx to Sebastian Bergmann) 2003-01-06 14:13:47 +00:00
Anantha Kesari H Y
303f888a09 Changes for NetWare makefile. 2003-01-06 09:05:59 +00:00
Georg Richter
2fbb9a5247 fixed bug #21435 2003-01-05 20:53:06 +00:00
Anantha Kesari H Y
32ef849171 Modified for NetWare. 2003-01-03 14:31:31 +00:00
Anantha Kesari H Y
90ba724072 Modified for NetWare. 2003-01-03 14:24:07 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Georg Richter
d5f02c553b fixed some warning when using external 4.x libs 2002-12-20 18:52:27 +00:00
Georg Richter
230f4ebb06 Security fix (merged from 3.23.54) 2002-12-11 08:28:41 +00:00
Marcus Boerger
47b0e79b1a -fix a warning that was an error
-php_error -> php_error_docref
2002-12-05 20:01:31 +00:00
foobar
f8c050395c ws fix (bug: #20808) 2002-12-05 15:44:27 +00:00
Georg Richter
208a3a3717 forgot to decrement result_allocated :( 2002-11-16 16:07:54 +00:00
Georg Richter
d46bd1cd63 removed restore_connection_defaults for pconnects (discussed on php-dev@)
bug #19529 closed
bug #12513 reopened
2002-11-15 10:35:10 +00:00
Derick Rethans
801c698992 - Reset globals for each request 2002-11-13 08:54:34 +00:00
foobar
aab64595fa Using // is not very good idea.. 2002-11-12 23:34:06 +00:00
Derick Rethans
28d3be43a3 - Fix warning 2002-11-12 08:11:23 +00:00
Zak Greant
c29f1aa468 Modified php_mysql_do_connect() as suggested by Nick Gaugler - using
mysql_ping() as a more efficient alternative to using mysql_stat() to
check if the server is alive and then calling mysql_(real_)?connect() to
reconnect.

Simple tests of opening pconnects indicate that only about 10k of data per
ping needs to be returned to the client per connection check, rather than
about 110k per status check.
2002-11-12 01:41:16 +00:00
Ilia Alshanetsky
aec6258a17 Fixed compile warnings. 2002-11-11 16:54:26 +00:00
Georg Richter
f328f3ea51 Added new functionality:
Warnings for table/index scans
	Warnings for SQL-Errors
	Warnings for non free result sets

It can be activated via ini.setting "mysql.trace_mode"
2002-11-11 12:54:06 +00:00
Marcus Boerger
15b2e277a4 fix compiler warning 2002-10-24 19:15:40 +00:00
Sascha Schumann
2909e5c9c9 centralize #include "build-defs.h" and drop (sometimes inconsistent) other
instances
2002-10-24 13:15:49 +00:00
foobar
3be17e3f26 - Prevent resetting the PHP_*_DIR variables if already set. 2002-10-21 02:46:13 +00:00
Yasuo Ohgaki
29d16f67f4 Remove mysql_result_seek() alias. 2002-10-17 07:24:04 +00:00
Zak Greant
70e49320f1 Removed spurious code. Thanks Derick 2002-10-09 13:46:18 +00:00
Zak Greant
6a590082ca Minor tweak - using memcpy(), instead of strcpy() for static strings. Gives better performance. Thanks Zeev. 2002-10-09 13:05:42 +00:00
Zak Greant
0ecf32f750 Possible fix for bug #19529 (thanks Rasmus, Arjen and Monty)
Major changes to _restore_connection_defaults
 - added code block to finds and releases the active mysql result (if any)
 - this should prevent the 'Commands out of sync' error that would be
   raised when a query is made when unfreed results exist

Minor changes to _restore_connection_defaults
 - replaced calls to mysql_real_query with mysql_query
   - we probably should not be using mysql_real_query without checking to
     see if we have a version that supports the function.
   - given that we control the query strings here and do not need to
     worry about binary safety, I am using mysql_query instead
   - see the bug report for further discussion
2002-10-09 12:33:40 +00:00
Zak Greant
dbf1d82afa Set default value for mysql.connect_timeout to -1. This setting matches the setting in php.ini-dist and ensures that the default behavior is to leave connect_timeout alone. 2002-10-09 07:34:48 +00:00
Markus Fischer
945ccfa76a - Remove superfluous E_WARNING if mysql_connect() fails; there's already
an E_WARNING a few lines above.
2002-10-05 00:54:31 +00:00
Yasuo Ohgaki
1b675aa690 Rename pg_data_seek() to pg_result_seek().
Added mysql_result_seek() which is alias of mysql_data_seek().
2002-10-03 02:32:09 +00:00