Commit Graph

547 Commits

Author SHA1 Message Date
Ulf Wendel
fbfd13310b Allow setting of default connection flags through the environment variable MYSQL_TEST_CONNECT_FLAGS 2009-09-28 10:39:42 +00:00
Ulf Wendel
26b4248799 Fixing test 2009-09-22 11:58:46 +00:00
Andrey Hristov
8aae3baa45 MFH:Fix for bug#48754 mysql_close() crash php when no handle specified 2009-09-18 10:49:31 +00:00
Ulf Wendel
20005db2a0 Fix and tests for bug #49511 . mysqlnd and the MySQL Client Library (libmysql) use different networking APIs. mysqlnd does use PHP streams whereas libmysql uses its own wrapper of the operating level network calls. PHP sets by default a read timeout of 60s for streams - php.ini, default_socket_timeout. This default applies to all streams that set no other timeout value. mysqlnd has not set any other value and therefore it connections of long running queries can have been cut off after default_socket_timeout seconds resulting in a 2006 - MySQL Server has gone away error message. The MySQL Client Library sets a default timeout of 365 * 24 * 3600 seconds (1year) and waits for other timeouts to happen, e.g. TCP/IP timeouts. mysqlnd now uses the same very long timeout. The value is configurable through a new php.ini setting: mysqlnd.net_read_timeout. mysqlnd.net_read_timeout gets used by any extension (ext/mysql, ext/mysqli, PDO_MySQL) that uses mysqlnd. mysqlnd tells PHP Streams to use mysqlnd.net_read_timeout. Please note that there may be subtle differences between MYSQL_OPT_READ_TIMEOUT from the MySQL Client Library and PHP Streams. E.g. MYSQL_OPT_READ_TIMEOUT is documented to work only for TCP/IP connections and, prior to MySQL 5.1.2, only for Windows. PHP streams may not have this limitation. Please check the streams documentation, if in doubt. 2009-09-16 15:00:54 +00:00
Ulf Wendel
31573498d8 Some extra test coverage for http://bugs.php.net/bug.php?id=48754 . 2009-09-09 17:16:24 +00:00
Ulf Wendel
5f260e14b2 Next attempt to fix http://bugs.php.net/bug.php?id=48745. Patch by Andrey. 2009-09-09 17:03:03 +00:00
Antony Dovgal
f97132fe1a fix tests 2009-08-29 19:18:27 +00:00
Rasmus Lerdorf
12bad6796f Fix a few more tests 2009-08-03 05:17:53 +00:00
Rasmus Lerdorf
f42081c6a2 Given that we have a DB connection by the time we get here,
mysql_affected_rows() cannot return false.
2009-08-03 04:57:31 +00:00
Ulf Wendel
759cc732cf MFH. Fixing tests to run with SQL_MODE=ANSI_QUOTES as well. 2009-07-07 11:32:17 +00:00
Ulf Wendel
f31fc6df21 MFH. Global s/ini_get('unicode.semantics')/version check/ . Early PHP 6 times are gone. I hope unicode logic will not change any more 2009-07-03 08:42:46 +00:00
Ulf Wendel
5147f6cf8d MFH. Adding CLEAN sections, fixing some SKIPIF sections. Cool new run-tests.php, Zoe (and other) - its a great help to detect stinky SKIPIF and CLEAN 2009-07-02 10:05:37 +00:00
Ulf Wendel
ed05c54d2e MFH - Test for bug #48754 2009-07-02 07:42:48 +00:00
Ulf Wendel
b6bd0f6806 MFH - Changing tests to run with both PHP 6 and PHP 5.3 to make future MFH easier. Basically three changes over all files: a) s/unicode(/%unicode|string% b) s/[u/[%u|b% c) s/unicode.semantics/version_compare 2009-07-01 15:33:31 +00:00
Kalle Sommer Nielsen
f02ebe4a08 MFH: Fix compiler warnings in ext/mysql, ext/mysqli and ext/pdo_mysql 2009-05-20 08:30:12 +00:00
Johannes Schlüter
b42f9a7f7d MFH: mysql_db_query() is always deprecated 2009-03-25 10:27:38 +00:00
Antony Dovgal
a59180232e fix test 2009-02-19 12:13:50 +00:00
Johannes Schlüter
b489d3a69f MFH: Fix #47438 mysql_fetch_field ignores zero offse 2009-02-18 16:34:47 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Johannes Schlüter
1ece804688 MFH: Fix mysql_fetch_* and tests after param parsing changes 2008-12-01 21:20:47 +00:00
Johannes Schlüter
cfc3bfdabb MFH: New param parsing for ext/mysql 2008-11-28 20:23:49 +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
Ilia Alshanetsky
a509ac3510 Fixed compiler warning 2008-10-27 23:27:21 +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
Arnaud Le Blanc
d69dfa4b9f MFH: initialize optional vars 2008-10-21 22:08:38 +00:00
Johannes Schlüter
3540da5344 MFH: No mysqli stuff in ext/mysql 2008-09-29 21:18:31 +00:00
Andrey Hristov
2c841008f0 Re-add mysql_set_charset. Missed during introduction of mysqlnd. Exists in
HEAD, thus no merge
2008-08-06 19:25:03 +00:00
Dmitry Stogov
691d4a6999 Fixed uninitialised data 2008-07-25 08:23:07 +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
529d73f9d4 MFH: Fix a leak with pconn and mysqlnd 2008-07-22 17:41:15 +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
Antony Dovgal
805f552cd3 fix skipif sections 2008-07-13 21:40:49 +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
e0f45cf7ae Fix possible bug with persistent connections and mysqlnd 2008-06-24 11:01:38 +00:00
Pierre Joye
41976c7ab6 - do not enable an ext when a lib/header fails
- use MESSAGE in mysql*
- use correct CFLAGS for ext/libxml headers
2008-06-23 18:40:29 +00:00
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