Commit Graph

402 Commits

Author SHA1 Message Date
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
Derick Rethans
c57b3c6533 - Un-deprecating mysql_escape_string
#- This will remove the annoying notices, while this function is used in
#  a lot of scripts. There is not reason why we should discontinue it's use
#  as it works perfect for about 99% of the time.
2002-09-11 21:06:52 +00:00
Georg Richter
a9c64d174b - renamed rollback function to _restore_connection_default
- in _restore_connection_default:
  - unset the selected database (thx to Paul DuBois)
  - set session variable autocommit to default (=1)
2002-09-09 15:53:05 +00:00
Georg Richter
0797d5f989 fixed typo 2002-09-06 12:11:30 +00:00
foobar
3bf7519210 @- Added --disable-all configure option. (Jani) 2002-09-04 18:47:28 +00:00
foobar
04bbf46957 Fix bug: #19159, mysql_field_count was available since 3.22.24 2002-08-29 01:17:24 +00:00
Yasuo Ohgaki
d23cb1686d Rename mysql_character_set_name() to mysql_client_encoding(). pg_client_encoding() is available from PHP4.0.3 and this function is available from PHP 4.3.0 2002-08-24 21:41:25 +00:00
Zeev Suraski
4b81d04210 Undeprecate mysql_db_query() 2002-08-24 13:15:35 +00:00
Georg Richter
11bd3c08b6 changed zend_error -> php_error_docref() 2002-08-24 10:53:40 +00:00
Georg Richter
3bd2a54064 changed error messages according to CODING_STANDARDS 2002-08-24 09:27:51 +00:00
Georg Richter
6650761f9b fixed bug #18643 2002-08-23 15:56:34 +00:00
Georg Richter
0c386174db fixed bug #19016
SSL is only available for MYSQL_VERSION_ID >= 40000
2002-08-23 14:10:27 +00:00
Georg Richter
8153dfc877 fixed bug #16965 2002-08-23 10:16:19 +00:00
Derick Rethans
ccf51590b3 - Proper format for CREDITS files 2002-08-21 05:41:49 +00:00
Georg Richter
0019a842b4 forgot to remove another LOCAL_INFILE opion call 2002-08-09 21:13:00 +00:00
Georg Richter
34b166579c fixed bug #18815 2002-08-09 20:38:12 +00:00
Georg Richter
f9e5ba3446 Ups, forgot to remove load_infile tests. Thx to Brad Bulgar 2002-08-08 08:17:24 +00:00
Georg Richter
8f7792a769 added zend_error messages for deprecated functions
inserted zak and me in author list/credits
2002-08-07 22:02:11 +00:00
Georg Richter
f4b4797aa8 removed unsued constants (MYSQL_USE_RESULT and MYSQL_STORE_RESULT) 2002-08-07 21:21:46 +00:00
Georg Richter
cbcdae7002 removed changes for mysql_select_db (optional parameter)
Why:
1) Its not the common way to add additionally functionality for functions or
features which are already implemented in SQL. Therefore also a lot of
mysql functions are marked as deprecated (and will be removed in near future)

2) The implemented workaround works only when mysql_select_db was called
before (fetching the databasename from mysql->conn.db). It returns invalid
or inconsistent results e.g.:

- when "USE databasename" via mysql_query was used
- when database was dropped or grant privileges had changed.

In conjunction with persistent connection, there are also some inconsistencies,
cause mysql_select_db returns the databasename from an old connection.

To determine the database name just use the SQL command "SELECT DATABASE()"
2002-07-21 21:36:10 +00:00
Georg Richter
96276bf8a0 fixed bug in mysql_real_escape_string:
allocated 1 more byte for '\0' terminating character
2002-07-21 20:16:03 +00:00
foobar
dcb0523894 fix protos 2002-07-16 19:26:23 +00:00
Georg Richter
950a576f73 Added support for php.ini parameter "mysql.connect_timeout" 2002-07-16 13:53:54 +00:00
Anantha Kesari H Y
44bbec7acb mysql_create_db and mysql_drop_db disabled for NetWare 2002-07-15 11:14:18 +00:00
foobar
5d001a9ab6 Partially reverted the netware related commit. 2002-07-12 23:25:30 +00:00
foobar
20a735db2c Beauify a bit.. 2002-07-12 22:59:35 +00:00
foobar
21245bcbeb Some ws fixes. And removed the problems causing typedef for ushort. 2002-07-12 22:57:19 +00:00
Anantha Kesari H Y
2af885d467 Added NetWare changes 2002-07-12 12:55:56 +00:00
Georg Richter
05007b0cbb 1) New constants:
MYSQL_CLIENT_SSL for ssl connections
MYSQL_CLIENT_COMPRESS for compressed protocol
MYSQL_CLIENT_IGNORE_SPACES for spaces after function names
MYSQL_CLIENT_INTERACTIVE for closing connections after timeout_interactive seconds

2) Optional parameter client_flags for mysql_connect and mysql_pconnect
For parameter desctiption see 1.
This also should fix bug #13589

3) New internal function _rollback_mysql_transactions, which is called via
PHP_RSHUTDOWN_FUNCTION
This fixes bug #12513
2002-07-10 13:16:24 +00:00
foobar
df9fc2bb51 Fix shared build and made the logic of finding the socket location better. 2002-07-08 15:31:01 +00:00
foobar
316a8b0b4f - Fix annoying redefine warning..
# ZAK! Heads up and fix this in Mysql CVS too.
2002-06-28 08:34:34 +00:00
Derick Rethans
7d4a78bad5 Unify error messages 2002-06-26 08:07:59 +00:00
foobar
73f2ab9951 - Reverted last bogus commit and fixed the credits in NEWS.
# STIG! Do a 'cvs update' before you commit anything!!
2002-06-11 00:18:34 +00:00
Stig Bakken
a4ecce0cd9 @Add --with-mysql-sock option (James Cox) 2002-06-10 21:35:26 +00:00
Markus Fischer
cac49284b4 - Fix win32/mysql.
- Revert cryptic WS commit on php4dllts.dsp.
2002-06-10 15:53:26 +00:00
Harald Radi
d63056b10b fix the build
# these files were blank, i suppose this happened by accident
2002-06-10 13:09:46 +00:00
James Cox
210744928f dont test for the socket -- enables installs over NFS etc.
# my previous commit was the revision before the fixed one (ie, i had the fix) so apologies for that.
2002-06-09 11:43:50 +00:00
Sander Roobol
2f6c2a9b18 Fixed configure stuff
# It didn't work for me... hope it works for everybody now...
2002-06-09 10:46:13 +00:00
foobar
c8bacb7a06 Cleaned up the mess. Now it actually works too.
# TEST BEFORE COMMIT!!
2002-06-09 00:50:46 +00:00
James Cox
00779e5fa3 @ added support for --with-mysql-sock so people can specify it (eg, NFS compiles, etc)
changed the default mysql.sock location to use the one from the RPM. Added /usr/local
  locations to the search list. (imajes)
2002-06-08 11:37:20 +00:00
Zak Greant
9daec6d227 Updating embedded libmysql to version 3.23.48 2002-06-07 15:07:55 +00:00
Zak Greant
4128739695 Minor improvement to error message for mysql_data_seek 2002-05-08 07:38:09 +00:00
foobar
80f9fdf3c7 @- Added optional 3rd parameter to mysql_select_db() which makes it return
@  the previously selected database name. (Jani)
2002-04-28 06:38:12 +00:00
foobar
305260ce4a kill a compile warning 2002-04-28 05:36:05 +00:00
foobar
6147e1e720 Fix bug: #16743 2002-04-27 01:02:52 +00:00
Edin Kadribasic
54440c8bfd Some systems have mysql socket in /var/run/mysql 2002-04-25 21:07:36 +00:00
foobar
e46f57b6fb - Fixed a typo..
# not related to the localhost.localdomain thing..
2002-04-24 18:00:39 +00:00
Sebastian Bergmann
c57ab20ac8 Make use of HAVE_MYSQL. Reviewed by: Sterling. 2002-04-18 16:48:03 +00:00
Andi Gutmans
35befd3eb3 - Fix build with Visual Studio .NET. The MySQL team said they'll commit
- their fix a long time ago and never did. One day they'll update the
- whole MySQL client library.
2002-04-07 20:49:10 +00:00
foobar
a0e3bd8f0e WS fix 2002-03-29 12:56:25 +00:00
Jan Lehnardt
bc19dd6900 - add mysql_info function 2002-03-29 12:47:02 +00:00
Georg Richter
6a0bf08ce3 fixed prototype for mysql_ping 2002-03-25 12:09:38 +00:00
Sterling Hughes
7ae1dd662f more zend_parse_parameters fixup 2002-03-25 01:19:59 +00:00
Sterling Hughes
3c3ae850a2 Fix-up the last fix a bit
Clean up mysql_list_processes
2002-03-25 01:14:30 +00:00
Sterling Hughes
05475d809b clean up mysql_real_escape_string() a bit
# I really think we should just add a database handle
# parameter to mysql_escape_string()
2002-03-25 01:07:23 +00:00
Zak Greant
3fae05b014 Added mysql_table_name() alias for mysql_tablename()
Improved logic of parameter parsing code for mysql_ping
 - made test for no arguments more explicit
 - combined to if blocks into one if/else if block
2002-03-24 23:33:07 +00:00
Sander Roobol
f12dfba7e0 Fixed tiny mistake in proto (tnx to Egon for spotting it). 2002-03-24 18:19:31 +00:00
Sander Roobol
68b18b05fe Fix typo in proto. 2002-03-24 18:01:41 +00:00
Derick Rethans
a9439b7072 - Fix proto 2002-03-24 17:59:39 +00:00