Commit Graph

1488 Commits

Author SHA1 Message Date
Xinchen Hui
3aa2182db6 Merge branch 'PHP-7.0' 2015-11-27 15:53:19 +08:00
Xinchen Hui
a347b0be48 Fixed bug #70949 (SQL Result Sets With NULL Can Cause Fatal Memory Errors) 2015-11-27 15:52:55 +08:00
Andrey Hristov
85e4fcf647 Give the possibility of the client to pass a factory 2015-11-24 10:23:44 +01:00
Andrey Hristov
6b0d026c76 Remove unused variable 2015-11-23 11:36:25 +01:00
Andrey Hristov
e59814ff34 Fix the macro in case of no statistics 2015-11-18 10:49:37 +01:00
Andrey Hristov
b7b4364269 Fix wrong macro name 2015-11-18 10:35:10 +01:00
Andrey Hristov
ee396aa566 Revert "Fixed compilation on 32-bit Linux"
This reverts commit 11c9729a9c.
2015-11-18 10:13:34 +01:00
Andrey Hristov
d477557094 Revert "Add some const-ness to the protocol frame codec"
This reverts commit f8c2b45948.
2015-11-17 17:55:32 +01:00
Andrey Hristov
057ad5626b Don't use the specific translated name but use the macro for this 2015-11-17 17:48:27 +01:00
Dmitry Stogov
11c9729a9c Fixed compilation on 32-bit Linux 2015-11-17 19:01:50 +03:00
Andrey Hristov
a6b79f08b3 More const and moved the declaration of php_mysqlnd_scramble() to mysqlnd_auth.h 2015-11-17 14:59:59 +01:00
Andrey Hristov
4ee4a4bb52 constify parameters 2015-11-17 14:49:18 +01:00
Andrey Hristov
43bfbd86d9 Rename from previous acronym (ppec became pfc) 2015-11-17 14:40:03 +01:00
Andrey Hristov
fae994fed9 Bring consistency to the class by renaming the methods too (from the
old temporary name)
2015-11-17 13:28:47 +01:00
Andrey Hristov
f8c2b45948 Add some const-ness to the protocol frame codec 2015-11-17 13:17:17 +01:00
Andrey Hristov
33e97d465d mysqlnd refactoring:
- move MYSQLND_READ_BUFFER to own file
2015-11-17 12:32:01 +01:00
Andrey Hristov
e4173bd15c mysqlnd refactoring:
- reorganize the statistics code a bit. There is one mysqlnd specific function,
  for convenience, in mysqlnd_statistics.c - namelyu _mysqlnd_get_client_stats().
  The mysqlnd specific stats macros are moved to mysqlnd.h to keep
  mysqlnd_statistics.h from being mysqlnd specific.
2015-11-16 16:23:39 +01:00
Andrey Hristov
4fed8a28d0 mysqlnd refactoring :
- move the command buffer out of the networking code to the protocol frame
  codec.
2015-11-16 15:37:11 +01:00
Andrey Hristov
24cb185cb3 Merge branch 'PHP-7.0' 2015-11-16 13:03:12 +01:00
Andrey Hristov
96406f0842 Merge branch 'PHP-5.6' into PHP-7.0 2015-11-16 12:39:04 +01:00
Andrey Hristov
822400ef3b News for fixed bug #68344 2015-11-16 12:38:25 +01:00
Andrey Hristov
398caf9336 - Remove dead macrom mysql_list_fields()
- Small optimizations here and there
2015-11-16 11:55:46 +01:00
Xinchen Hui
f5be26e04b Unused var 2015-11-16 18:22:56 +08:00
Xinchen Hui
5bdc5f4e2b Merge branch 'PHP-7.0' 2015-11-16 17:59:54 +08:00
Xinchen Hui
9134f9e98f Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/mysql/php_mysql.c
2015-11-16 17:59:46 +08:00
Xinchen Hui
be6fd4ba89 Fixed bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction)
Actually, this only be fixed if php uses mysqlnd
2015-11-16 16:59:55 +08:00
Dmitry Stogov
485408b20d Fixed compilation errors 2015-11-13 00:46:13 +03:00
Andrey Hristov
067380d7c6 MNDR:
- constify some parameters to MYSQLND_RES functions
2015-11-12 16:19:16 +01:00
Andrey Hristov
0a7e08d385 MNDR:
- cleanup in mysqlnd_result.c
- switch from zend_ulong to size_t for lengths. Accordingly change
  mysqli and pdo_mysql for this.
2015-11-12 16:19:16 +01:00
Andrey Hristov
abc8c00072 MNDR:
- rename mysqlnd.c to mysqlnd_connection.c
2015-11-12 16:19:16 +01:00
Andrey Hristov
c24d452f60 MNDR:
- less dereferencing in mysqlnd_ps . Dereference stmt->conn only once and
  use a stack variable. Also make the source cleaner.
2015-11-12 16:19:16 +01:00
Andrey Hristov
94ce013bff MNDR:
- remove unused macros
2015-11-12 16:19:16 +01:00
Andrey Hristov
2e3fc57c5c MNDR:
- move things out of mysqlnd_priv.h
2015-11-12 16:19:16 +01:00
Andrey Hristov
e8ace2d4db MNDR:
- remove inclusion of uneeded headers
2015-11-12 16:19:16 +01:00
Andrey Hristov
4248240648 MNDR:
- move the command factory to own file - mysqlnd_commands.c
2015-11-12 16:19:16 +01:00
Andrey Hristov
3f0a542d04 MNDR:
- route the option to the right handler
2015-11-12 16:19:16 +01:00
Andrey Hristov
2cea04165c MNDR:
- move all data members from MYSQLND_PFC to MYSQLND_PFC_DATA
2015-11-12 16:19:16 +01:00
Andrey Hristov
c286d7075d MNDR:
- move from char* + len to MYSQLND_STRING
- add some more const modifiers
2015-11-12 16:19:16 +01:00
Andrey Hristov
a530ecff97 MNDR:
- better name for MYSQLND_PPEC - MYSQLND_PFC (protocol frame codec)
2015-11-12 16:19:16 +01:00
Andrey Hristov
654d1a7caf MNDR:
- rename MYSQLND_NET to MYSQLND_PPEC (protocol packet envelope codec).
  PPEC does only the encoding and decoding to the protocol frame.
2015-11-12 16:19:16 +01:00
Andrey Hristov
80d59a3a36 MNDR:
- intermediate step to move MYSQLND_NET from mysqlnd_vio.c to mysqlnd_wireprotocol.c
  In following commits MYSQLND_NET's methods and data will be moved to MYSQLND_PROTOCOL
2015-11-12 16:19:16 +01:00
Andrey Hristov
05c5e051be MNDR:
- moved networking code to mysqlnd_vio.c
2015-11-12 16:19:16 +01:00
Andrey Hristov
e9f3139f43 MNDR:
- split MYSQLND_NET into MYSQLND_NET and MYSQLND_VIO
  MYSQLND_NET is above MYSQLND_VIO. _NET takes care of protocol packet
  counting (even with compressed), while VIO is just about the network
  (or in case of windows, non-network, but PIPE) transport.
2015-11-12 16:19:16 +01:00
Andrey Hristov
a990573752 MNDR:
- some small renaming of methods
2015-11-12 16:19:16 +01:00
Andrey Hristov
0d3329fc93 MNDR:
- send_command and send_command_handle_response_* moved to a structure
2015-11-12 16:19:16 +01:00
Andrey Hristov
e81ecc80ca MNDR:
- Move transport string generation to own function, which can be overloaded or sniffed
2015-11-12 16:19:16 +01:00
Andrey Hristov
51085dac1a MNDR:
- remove double decrement
2015-11-12 16:19:16 +01:00
Andrey Hristov
b8b1d45c3c MNDR:
- move connection establishment code to own command - COM_HANDSHAKE
2015-11-12 16:19:16 +01:00
Andrey Hristov
e6419ab401 MNDR:
- convert the API of MYSQLND_NET to MYSQLND_STRING
2015-11-12 16:19:16 +01:00
Andrey Hristov
baab519ae5 MNDR:
- decouple the commands from the connection. CONN ist passed now only in 1 case
2015-11-12 16:19:16 +01:00
Andrey Hristov
5abee1948e MNDR:
- remove dead code
2015-11-12 16:19:16 +01:00
Andrey Hristov
71e703761f MNDR:
- clean up some things
2015-11-12 16:19:16 +01:00
Andrey Hristov
e30e884e53 MNDR:
- move COM_INIT_DE result handling to the command
2015-11-12 16:19:16 +01:00
Andrey Hristov
fefc3045a3 MNDR:
- remove COM_FIELD_LIST
2015-11-12 16:19:16 +01:00
Andrey Hristov
75a1fcc724 MNDR:
- move handling of commands to the command itself
2015-11-12 16:19:16 +01:00
Andrey Hristov
7e6f9a84cb MNDR:
- split handle_response() into handle_OK and handle_EOF
2015-11-12 16:19:16 +01:00
Andrey Hristov
aa4966d4e3 MNDR:
- now send_command_handle_response() also doesn't depend directly on
  MYSQLND_CONN_DATA
2015-11-12 16:19:16 +01:00
Andrey Hristov
f7a445856d MNDR:
- pass connection closer and its context
- remove unused parameter
2015-11-12 16:19:16 +01:00
Andrey Hristov
280c834c49 MNDR:
- rename the macro for updating the connection state
2015-11-12 16:19:16 +01:00
Andrey Hristov
109dc08ffd MNDR:
- make the connection state a class
2015-11-12 16:19:16 +01:00
Andrey Hristov
78cb5456da MNDR:
- simplify the macroses for the types
2015-11-12 16:19:16 +01:00
Andrey Hristov
e9bccffe29 MNDR:
- switch to macro generation of structure names for the methods
2015-11-12 16:19:16 +01:00
Andrey Hristov
3eee292669 MNDR:
- Remove the SET_STMT_ERROR macro
2015-11-12 16:19:16 +01:00
Andrey Hristov
4bb784cd0d MNDR:
- make MYSQLND_ERROR_INFO a class
2015-11-12 16:19:16 +01:00
Andrey Hristov
fb1b5abe31 MNDR:
- switch to MYSQLND_CLASS_METHOD_TABLE_NAME_DECL() for automatic naming
  of class methods
2015-11-12 16:19:16 +01:00
Andrey Hristov
5609eabc6f MDNR:
- make MYSQLND_UPSERT_STATUS more like an object that a simple structure
  Still use macros to make updates simple
2015-11-12 16:19:16 +01:00
Andrey Hristov
092afe7212 MNDR:
- abstract SSL enabling into COM_ENABLE_SSL
2015-11-12 16:19:16 +01:00
Andrey Hristov
10d4fb8a94 MDNR:
- Refactor the command factory. Let the factory be exchangeable.
2015-11-12 16:19:16 +01:00
Andrey Hristov
e24dc94f32 MDNR:
- remove dead code
2015-11-12 16:19:16 +01:00
Andrey Hristov
7d7ff67b82 MDNR:
- send_command() is no more, thus we need commands for all COM_STMT_*
  + CHANGE_USER
2015-11-12 16:19:16 +01:00
Andrey Hristov
f6ec3df895 MNDR:
- Switch for directly executing a command over the wire to creating a
  command object which is then executed.
2015-11-12 16:19:16 +01:00
Andrey Hristov
2a44cee4d5 MNDR:
- Remove unused variable
2015-11-12 16:19:16 +01:00
Andrey Hristov
c33d3b6e5b MDNR:
- remove dead code
2015-11-12 16:19:16 +01:00
Andrey Hristov
ab961ca347 MNDR:
- remove export of functions and have things exported thru an interface
  with default implementation
2015-11-12 16:19:16 +01:00
Andrey Hristov
784a371829 MNDR:
- Inject the object factory
2015-11-12 16:19:16 +01:00
Andrey Hristov
f16686faa7 MNDR:
- don't use the static function name but the hook
2015-11-12 16:19:16 +01:00
Andrey Hristov
19443351ed MNDR:
- remove static function and make it a method. The function doesn't need to
  be in mysqlnd_ps.c as it doesn't use any resources anymore from it (it used
  in the past)
2015-11-12 16:19:16 +01:00
Andrey Hristov
3f7a7837cd MDNR:
- cleanup after PHP7 changes (removal of TSRMLS_**)
2015-11-12 16:19:16 +01:00
Andrey Hristov
cfd868651a MDNR:
- removed init() method from mysqlnd_conn_data and moved the initialization
  to the object factory->get_connection(). Now it is unified as with the prepared
  statement which doesn't have any init() method
- the protocol decoder factory now takes connection as parameter at creation and
  thus there is no need to pass the connection as parameter when calling the read
  or the write method of a packet.
- saved the protocol payload decoder factory as pointer in every packet (read/write)
  so the connection doesn't need to be passed on every call of read/write (dependency
  has been already injected at creation). This will alow to move protocol specific
  code from MYSQLND_NET (send_ex()) to make MYSQLND_NET leaner and free from protocol
  stuff.
2015-11-12 16:19:16 +01:00
Andrey Hristov
75dc67c6ae MNDR:
- move macro to a function
2015-11-12 16:19:16 +01:00
Andrey Hristov
2ea4891e75 MNDR:
- rename mysqlnd_init to mysqlnd_connection_init
- rename mysqlnd_connect to mysqlnd_connection_connect
- created macros for BC
2015-11-12 16:19:16 +01:00
Andrey Hristov
34a33928d6 MNDR:
- Rename MYSQLND_PROTOCOL to MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY
- Rename other symbols related to MYSQLND_PROTOCOL accordingly
2015-11-12 16:19:16 +01:00
Andrey Hristov
4c83582c74 MNDR
- enum_mysqlnd_protocol_type -> enum_mysqlnd_session_protocol_type
2015-11-12 16:19:16 +01:00
Andrey Hristov
3091a01799 MNDR
- mysqlnd_option -> mysqlnd_client_option
2015-11-12 16:19:16 +01:00
Andrey Hristov
6051a47776 MNDR
- Rename simple_command* to send_command
2015-11-12 16:19:16 +01:00
Andrey Hristov
0f38d479e1 MNDR :
- Rename MYSQLND_OPTIONS to MYSQLND_SESSION_OPTIONS
- Rename MYSQLND_NET_OPTIONS to MYSQLND_IO_OPTIONS
2015-11-12 16:19:16 +01:00
Andrey Hristov
6d51b7b2e3 Another Fix for Bug #68344 MySQLi does not provide way to disable peer certificate validation
Added the possibility to explicitly state that the peer certificate should not be checked.
Back to the default - checking the certificate.
Exported MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
Usage : mysqli_real_connect( , , , , , MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT)

If mysqli_ssl_set() is not called, but only MYSQLI_CLIENT_SSL is passed, without the (don't) very flag,
then no verification takes place.
2015-10-27 12:59:09 +01:00
Dmitry Stogov
c67fc6bb09 Fixed memory leak in php_stream_context_set_option() 2015-10-29 20:06:55 +03:00
Andrey Hristov
c133515811 Merge branch 'PHP-5.6' into PHP-7.0 2015-10-27 13:32:45 +01:00
Andrey Hristov
3dc0bf7428 Merge branch 'PHP-5.6' into PHP-7.0 2015-10-22 11:50:12 +02:00
Andrey Hristov
afd31489d0 Improve fix for Bug #68344 MySQLi does not provide way to disable peer certificate validation 2015-10-22 11:48:53 +02:00
Andrey Hristov
8f9b2b68ee Merge branch 'PHP-5.6' into PHP-7.0 2015-10-21 15:52:38 +02:00
Andrey Hristov
8292260515 Fix for Bug #68344 MySQLi does not provide way to disable peer certificate validation 2015-10-21 15:10:24 +02:00
Andrey Hristov
7e3cd7cadf Merge branch 'PHP-5.6' into PHP-7.0 2015-09-25 14:29:06 +02:00
Andrey Hristov
59de2c037c Fixed bug #70572 segfault in mysqlnd_connect 2015-09-25 14:06:28 +02:00
Andrey Hristov
003b764a49 Fix for Bug #70384 mysqli_real_query(): Unknown type 245 sent by the server 2015-09-23 18:38:29 +02:00
Andrey Hristov
f79cd18789 Fix for Bug #70384 mysqli_real_query(): Unknown type 245 sent by the server 2015-09-23 18:25:12 +02:00
Dmitry Stogov
6a3580fd56 Use Zend MM to keep statistic of non-persistent connections (calloc/free->pecalloc/pefree) 2015-09-18 10:36:09 +03:00
Christoph M. Becker
71f90dfbad Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #70456: mysqlnd doesn't activate TCP keep-alive when connecting to a server

Resolved conflicts:
	ext/mysqlnd/mysqlnd_net.c
2015-09-09 03:19:55 +02:00
Sergei Turchanov
7b3616db77 Fix #70456: mysqlnd doesn't activate TCP keep-alive when connecting to a server
libmysqlclient activates TCP keep-alive when connecting to a server. PHP
mysqlnd extension must do the same to maintain compatibility.
2015-09-09 01:43:29 +02:00
Anatol Belski
545b364d56 remove TSRMLS_*
either remains or merged in from PHP5
2015-08-02 13:42:01 +02:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Nikita Popov
8a9eee8f7e Fix mysqlnd warnings 2015-07-17 17:48:02 +02:00
Stanislav Malyshev
d8aa5675ad Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM) 2015-07-07 10:16:54 -07:00
Stanislav Malyshev
6c884e8e84 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Better fix for bug #69958
  update news
  Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM)
  Fix bug #69923 - Buffer overflow and stack smashing error in phar_fix_filepath
  Fix bug #69958 - Segfault in Phar::convertToData on invalid file
  Better fix for bug #69958
  Better fix for bug #69958
  update news
  Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM)
  Fix bug #69923 - Buffer overflow and stack smashing error in phar_fix_filepath
  Fix bug #69958 - Segfault in Phar::convertToData on invalid file

Conflicts:
	ext/phar/phar_object.c
2015-07-07 10:12:51 -07:00
Stanislav Malyshev
b4b082e63e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Better fix for bug #69958
  update news
  Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM)
  Fix bug #69923 - Buffer overflow and stack smashing error in phar_fix_filepath
  Fix bug #69958 - Segfault in Phar::convertToData on invalid file

Conflicts:
	ext/mysqlnd/mysqlnd.c
2015-07-07 10:09:34 -07:00
Stanislav Malyshev
97aa752fee Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM) 2015-07-07 09:38:31 -07:00
Stanislav Malyshev
303d97feda Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM)
  Fix bug #69923 - Buffer overflow and stack smashing error in phar_fix_filepath
  Fix bug #69958 - Segfault in Phar::convertToData on invalid file

Conflicts:
	ext/mysqlnd/mysqlnd.c
2015-07-06 21:52:49 -07:00
Stanislav Malyshev
0d2f147d80 Fix bug #69669 (mysqlnd is vulnerable to BACKRONYM) 2015-07-06 21:50:01 -07:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Xinchen Hui
141f0ca18c Fixed Bug #69796 mysqli_stmt::fetch doesn't assign null values to bound variables 2015-06-11 13:35:43 +08:00
Dmitry Stogov
4d9a1883aa Fixed bug #68887 (resources are not freed correctly) 2015-04-08 13:29:42 +03:00
Andrey Hristov
871ff65fd1 Rename prefixed mysqlnd functions - prefixed with undescore, which were
accessible through a macro. Also removing the access macros.
These prefixed functions were used, similarly to many functions in Zend2,
because of TSRMLS - the macro was adding the the tsrm pointer to the call.
However, as in Zend3 no TSRM pointers are passed down the stack, because of
the usage of cached TSRM pointer in a real thread local variable, these
macros and prefixed naming have lost their purpose.
2015-04-07 21:48:08 +02:00
Andrey Hristov
ed0f134a64 Split mysqlnd_stmt::execute in 2 logical parts :
- mysqlnd_stmt::send_execute() which just creates the wire message by using
  an aux function and sends it to the server
- mysqlnd_stmt::parse_execute_respose() which is responsible for handling
  the bytes sent from the server in response to COM_EXECUTE.
This makes it possible to implement finer method overwriting in mysqlnd
plugins.
2015-04-07 21:39:29 +02:00
Andrey Hristov
a970ae76e2 Add more info to the calls:
- let the callee knows whether it was called directly or indirectly
- two NULL zval * parameters for future extension in a pecl plugin
2015-04-07 20:45:17 +02:00
Dmitry Stogov
83a15801cc Use PHP memory manager for mysqlnd memory pools. 2015-04-02 14:28:39 +03:00
Kalle Sommer Nielsen
3d4aad5e27 Remove this VC8 check as our minimum target version of VC is higher 2015-03-29 06:50:09 +02:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Lior Kaplan
a4384bd3d4 s/PHP Version 5/PHP Version 7/g
Follow up for d0cb7153
2015-03-13 11:09:42 +02:00
Dmitry Stogov
bb91bf83f9 Minimize copying of HashTable realocation 2015-03-05 17:22:10 +03:00
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Dmitry Stogov
1eb4352143 Use new ZEND_HASH_FOREACH_... API. 2015-02-10 15:43:12 +03:00
Stanislav Malyshev
bf55a4e223 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix sizeof size
2015-02-01 12:42:00 -08:00
Stanislav Malyshev
969e389121 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix sizeof size
2015-02-01 12:41:33 -08:00
Stanislav Malyshev
f66f5b2ffa Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix sizeof size
2015-02-01 12:41:00 -08:00
Stanislav Malyshev
7efbd70b03 fix sizeof size 2015-02-01 12:40:38 -08:00
Keyur Govande
4c6918ec17 Patch commit d9f85373e3 by moving the float_to_double function to
a header file.
2015-01-26 21:20:29 +00:00
Keyur Govande
b34f8ef599 Fix for bugs #68114 (Build fails on OS X due to undefined symbols)
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
has rounding errors).

The patch removes support for Decimal floating point numbers and
now defaults to using similar logic as what libmysqlclient does:
convert a 4 byte floating point number into a string, and then the
string into a double. The quirks of MySQL are maintained as seen in
Field_Float::val_str()
2015-01-26 21:20:29 +00:00
Keyur Govande
1933b556b9 Patch commit d9f85373e3 by moving the float_to_double function to
a header file.
2015-01-26 21:19:00 +00:00
Keyur Govande
e51980f4e6 Fix for bugs #68114 (Build fails on OS X due to undefined symbols)
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
has rounding errors).

The patch removes support for Decimal floating point numbers and
now defaults to using similar logic as what libmysqlclient does:
convert a 4 byte floating point number into a string, and then the
string into a double. The quirks of MySQL are maintained as seen in
Field_Float::val_str()
2015-01-26 21:19:00 +00:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Keyur Govande
961da40809 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add NEWS
  Add NEWS
  Patch commit d9f85373e3 by moving the float_to_double function to a header file.
  Fix for bugs #68114 (Build fails on OS X due to undefined symbols) and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient has rounding errors).
  5.5.22 now

Conflicts:
	ext/mysqli/mysqli_api.c
2015-01-07 23:23:26 +00:00
Keyur Govande
90144c0d08 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add NEWS
  Patch commit d9f85373e3 by moving the float_to_double function to a header file.
  Fix for bugs #68114 (Build fails on OS X due to undefined symbols) and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient has rounding errors).
  5.5.22 now

Conflicts:
	configure.in
	main/php_version.h
2015-01-07 22:50:55 +00:00
Keyur Govande
3062cf1b42 Patch commit d9f85373e3 by moving the float_to_double function to
a header file.
2015-01-07 22:45:23 +00:00
Keyur Govande
f2eadb93b9 Fix for bugs #68114 (Build fails on OS X due to undefined symbols)
and #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
has rounding errors).

The patch removes support for Decimal floating point numbers and
now defaults to using similar logic as what libmysqlclient does:
convert a 4 byte floating point number into a string, and then the
string into a double. The quirks of MySQL are maintained as seen in
Field_Float::val_str()
2015-01-07 22:45:23 +00:00
Keyur Govande
e4ef6bf2e5 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix for failing tests. gcc 4.8.3 would optimize away the assigment.
2014-12-26 20:38:26 +00:00
Keyur Govande
83e5547827 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix for failing tests. gcc 4.8.3 would optimize away the assigment.
2014-12-26 20:37:50 +00:00
Keyur Govande
aa192f57c9 Fix for failing tests. gcc 4.8.3 would optimize away the assigment. 2014-12-26 20:36:19 +00:00
Nikita Popov
2d212b426a Drop duplicate arg from hash_get_current_key_ex 2014-12-26 21:06:18 +01:00
Anatol Belski
386cb177bd remove unused ZTS macros 2014-12-17 11:05:23 +01:00
Anatol Belski
99d0078ab9 remove TSRMLS_* occurence 2014-12-17 11:03:13 +01:00
Anatol Belski
7b6ed8db2f almost all the replacements of TSRMLS_* are done
Some places have to be yet touched as they use different/custom
macros namings for the same. Also some places in the code became
redundant now, this is the next task. To name some: ext/mysqlnd,
sapi/embed, ext/curl and some smaller places here and there.
2014-12-14 14:22:42 +01:00
Anatol Belski
e112f6a04e second shot on removing TSRMLS_* 2014-12-14 14:07:59 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
4f3ac2cdbe Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (36 commits)
  NEWS
  adapt test for error message introduce in fix for #68463
  Fix bug #68463 listen.allowed_clients can silently result in no allowed access
  run a few request in this test
  fix test
  fix test
  added info about some other macro changes
  added note about toolset and phpize
  added note about the response files
  split msgfmt_format_intlcalendar_variant*.phpt for ICU 54.1
  split formatter_format*.phpt for ICP 54.1
  split dateformat_timezone_arg_variations*.phpt for ICU 54.1
  split dateformat_get_set_timezone_variant*.phpt for ICU 54.1
  fix icu version to test
  split ext/intl/tests/dateformat_get_set_calendar_variant*.phpt for 54.1
  split dateformat_formatObject_datetime_variant*.phpt for ICU 54.1
  split dateformat_formatObject_calendar_variant*.phpt for ICU 54.1
  split dateformat_create_cal_arg_variant2.phpt for ICU 53.1 and 54.1
  clone dateformat_calendars_variant3.phpt for ICU 54.1
  split collator_get_sort_key_variant3.phpt for icu 54.1
  ...
2014-11-20 15:20:18 +01:00
Veres Lajos
4b9535341a typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-19 20:23:00 +00:00
Anatol Belski
c6bad96f30 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
  NEWS
  add test for bug #68381
  Fixed bug #68381 Set FPM log level earlier during init
  proper dllexport
  move to size_t where zend_string is used internally
  fix some datatype mismatches
  return after the warning, to fix uninitialized salt usage
  fix datatype mismatches
  add missing type specifier
  fix datatype mismatches
  fix unsigned check
  "extern" shouldn't be used for definitions
  joined identical conditional blocks
  simplify fpm tests
  SEND_VAR_NO_REF optimization
  Add test for bug #68442
  Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
  Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
  Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
  Add new FPM test for IPv4/IPv6
  ...

Conflicts:
	win32/build/config.w32
2014-11-18 21:18:52 +01:00
Anatol Belski
8434a7f2ab validate sockets portable way 2014-11-14 17:39:38 +01:00
Anatol Belski
2942a4aa45 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  check for zlib headers as well as lib for mysqlnd
  a realpath cache key can be int or float, catching this
  TLS 1.0, 1.1 and 1.2 Curl constants - bug #68247
  Micro optimizations for isset/empty
  Micro optimization for zend_hash_next_index_insert_new()
  Fix array_keys() on $GLOBALS
  Fix procedural finfo calls in methods

Conflicts:
	ext/mysqlnd/config.w32
2014-10-17 10:13:08 +02:00
Anatol Belski
1f6bd98143 check for zlib headers as well as lib for mysqlnd 2014-10-17 10:09:40 +02:00
Anatol Belski
98a8481e5e converted some ext/mysql* and fixed ext/zlib 2014-10-15 12:08:25 +02:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
9af9f874c7 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Add to NEWS
  Add to NEWS
  Fix for bug #68087 (ODBC not reading DATE columns correctly)
  Add to NEWS
  Add to NEWS
  Fix for bug #68114 (Build fails on OS X due to undefined symbols)
  Micro optimization
  Improved return by reference handling
2014-10-08 09:32:19 +02:00
Keyur Govande
07e285d880 Merge branch 'PHP-5.6'
* PHP-5.6:
  Add to NEWS
  Fix for bug #68114 (Build fails on OS X due to undefined symbols)
2014-10-07 21:08:33 +00:00
Keyur Govande
bcda6c9392 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add to NEWS
  Fix for bug #68114 (Build fails on OS X due to undefined symbols)
2014-10-07 21:08:18 +00:00
Keyur Govande
648673bffe Fix for bug #68114 (Build fails on OS X due to undefined symbols)
gcc (i686-apple-darwin10-gcc-4.2.1) on OS X cannot link fixed-width
decimals and fails with undefined symbols errors like ___extendsddf.
If configure used gcc for compiling it would notice and mark the
feature HAVE_DECIMAL_FP_SUPPORT as unsupported.
But configure seems to use cc (i686-apple-darwin10-llvm-gcc-4.2)
instead, which doesn't support fixed-width decimals either, but the
code compiles and links just fine. I suspect it may have something
to do with the llvm backend printed in the version.
Lacking the time to debug this further, the patch fixes the issue by
checking the expected output when fixed-width decimal support is
present and correctly implemented.
2014-10-07 20:58:43 +00:00
Anatol Belski
57dbe02364 drop unused tsrm_ls 2014-09-26 20:48:41 +02:00
krakjoe
7ceff7780e remove fetches from mysqlnd 2014-09-26 11:28:37 +01:00
Anatol Belski
31cc63b1a4 fix some extension builds 2014-09-25 20:02:48 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Anatol Belski
db24742f01 fixed type 2014-09-16 21:17:18 +02:00
Anatol Belski
77137b56b8 align 4 byte to the start of the word 2014-09-14 10:27:00 +02:00
Anatol Belski
ea4ab02446 fix conditions
substraction from an unsigned
2014-09-14 10:24:10 +02:00
Anatol Belski
65100a6474 reduce the struct size by 8 byte on 64 bit 2014-09-14 09:40:56 +02:00
Anatol Belski
27d0cfb8a7 reduce the struct size by 8 byte on 64 bit 2014-09-14 09:25:09 +02:00
Anatol Belski
273763dd63 reduce the struct size by 8 byte on 64 bit 2014-09-14 09:22:02 +02:00
Anatol Belski
cac71ecc93 reduce the struct size by 8 byte on 64 bit 2014-09-14 01:22:55 +02:00
Anatol Belski
35a2937e6b reduce the struct size by 8 byte on 64 bit 2014-09-14 01:12:12 +02:00
Anatol Belski
b056859d17 reduce the struct size by 8 byte on 64 bit 2014-09-14 00:59:46 +02:00
Anatol Belski
99fb5d0ea8 remove extra semicolon 2014-09-12 14:39:18 +02:00
Anatol Belski
e699f654f0 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix precision when fetching float through mysqlnd
2014-09-10 19:32:25 +02:00
Anatol Belski
0b89bb83ba Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix precision when fetching float through mysqlnd
2014-09-10 19:31:59 +02:00
Anatol Belski
dff820cea3 fix precision when fetching float through mysqlnd
fixes failing ext/mysqli/tests/010.phpt
2014-09-10 19:29:11 +02:00
Anatol Belski
5661a1ba0b fix null pointer deref 2014-09-07 20:26:01 +02:00
Xinchen Hui
bb92801338 it's should be zend_ulong 2014-09-04 16:26:53 +08:00
Anatol Belski
fee39d0868 fix type 2014-09-02 15:56:13 +02:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Christopher Jones
e39cc57bbd Merge branch 'PHP-5.6'
* PHP-5.6:
  Remove 550+ compile warnings on OS X
2014-08-29 08:48:56 -07:00
Christopher Jones
6fe0bdda9c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Remove 550+ compile warnings on OS X
2014-08-29 08:48:43 -07:00
Christopher Jones
9063188fad Remove 550+ compile warnings on OS X
The warnings had the signature:
php-src/ext/mysqlnd/mysqlnd_debug.h:127:25: note: expanded from macro 'DBG_ENTER_EX2'
                          if (dbg_skip_trace); /* shut compiler's mouth */\
                                             ^
php-src/ext/mysqlnd/mysqlnd.c:114:2: note: put the semicolon on a separate line to silence this warning
2014-08-29 08:48:10 -07:00
Anatol Belski
a831bd40d0 Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed DBG_INF macro name
  reworked NEWS for 5.6.0GA
2014-08-27 12:11:59 +02:00
Anatol Belski
4d667eeaf3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fixed DBG_INF macro name
2014-08-27 12:11:35 +02:00
Anatol Belski
7fac56e072 fixed DBG_INF macro name 2014-08-27 12:10:35 +02:00
Xinchen Hui
6469339a58 Fixed incompatible pointer 2014-08-26 12:19:09 +08:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
b9514bb8fd master renames phase 6 2014-08-25 21:26:42 +02:00
Anatol Belski
28b7a03318 master renamings phase 5 2014-08-25 21:20:44 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
eb1871b3fb yet trivial fixes to mysql exts 2014-08-21 09:54:40 +02:00
Anatol Belski
bdbf47df18 ported mysql and mysqlnd 2014-08-19 16:51:06 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Lior Kaplan
543d5eb495 Merge branch 'PHP-5.6'
* PHP-5.6:
  typofixes

Conflicts:
	ext/spl/php_spl.c
2014-08-17 15:53:33 +03:00
Lior Kaplan
56d02d564e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  typofixes
2014-08-17 15:51:15 +03:00
Lior Kaplan
be2128c805 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  typofixes
2014-08-17 15:48:22 +03:00
Veres Lajos
3f42f2f5d1 typofixes 2014-08-17 15:44:02 +03:00
Keyur Govande
603e3ddfc0 Merge branch 'PHP-5.6'
* PHP-5.6:
  Update NEWS
  Fix another failing test
  Add NEWS
  Fix failing tests
  Patch for bug #67839 (mysqli does not handle 4-byte floats correctly)
2014-08-15 23:47:31 +00:00
Keyur Govande
032dee4982 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Update NEWS
  Fix another failing test
  Add NEWS
  Fix failing tests
  Patch for bug #67839 (mysqli does not handle 4-byte floats correctly)

Conflicts:
	ext/mysqli/tests/mysqli_change_user.phpt
2014-08-15 23:47:06 +00:00
Keyur Govande
7c4b5d9187 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add NEWS
  Fix failing tests
  Patch for bug #67839 (mysqli does not handle 4-byte floats correctly)

Conflicts:
	ext/mysqli/tests/table.inc
2014-08-15 23:13:36 +00:00
Keyur Govande
c044164a96 Patch for bug #67839 (mysqli does not handle 4-byte floats correctly)
Before the patch, a value of 9.99 in a FLOAT column came out of mysqli
as 9.9998998641968. This is because it would naively cast a 4-byte float
into PHP's internal 8-byte double.
To fix this, with GCC we use the built-in decimal support to "up-convert"
the 4-byte float to a 8-byte double.
When that is not available, we fall back to converting the float
to a string and then converting the string to a double. This mimics
what MySQL does.
2014-08-14 18:19:56 +00:00
Dmitry Stogov
5a06ac88da cleanup (use zend_string* instead of char*) 2014-08-13 14:51:48 +04:00
Xinchen Hui
da3aeeed39 clean up - avoid realloc 2014-08-13 15:51:43 +08:00
Dmitry Stogov
4c716e8b51 Merge branch 'master' into test
* master: (39 commits)
  Add __debugInfo() to UPGRADING.
  fix TS build
  Update NEWS
  Update NEWS
  Update NEWS
  Small tidy ups and raise visibility of GitHub PR process
  Bug #41631: Observe socket read timeouts in SSL streams
  wrap int8_t and int16_t with #ifdef to avoid possible clashes
  - Updated to version 2014.6 (2014f)
  Removed Countable::count() change info from UPGRADE.INTERNALS too
  NEWS and UPGRADING for intdiv()
  Revert "Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option"
  Fixed skip case for intdiv 64-bit test
  Use callback structure
  Add EXPECTF
  Fix handling of multi-result sets with PS...used to clean not only the result set but the whole PS.
  5.5.17 now
  5.4.33-dev now
  Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option
  Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option
  ...

Conflicts:
	ext/fileinfo/libmagic/softmagic.c
	main/streams/xp_socket.c
2014-08-11 11:38:41 +04:00
Andrey Hristov
fa19a22279 Merge branch 'PHP-5.6' 2014-08-06 16:52:44 +03:00
Andrey Hristov
9959ead309 Use callback structure 2014-08-06 16:50:27 +03:00
Andrey Hristov
3dc9bef819 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/fileinfo/data_file.c
	ext/fileinfo/libmagic/softmagic.c
	ext/fileinfo/magicdata.patch
2014-08-06 16:25:12 +03:00
Andrey Hristov
41e1ccefd5 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
	configure.in
	main/php_version.h
2014-08-06 15:27:56 +03:00
Andrey Hristov
547451796c Fix handling of multi-result sets with PS...used to clean not only
the result set but the whole PS.
2014-08-06 14:52:12 +03:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Andrey Hristov
1d609d2d26 Merge branch 'PHP-5.6' 2014-07-31 21:28:19 +03:00
Andrey Hristov
f5deb18b20 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-31 21:28:09 +03:00
Andrey Hristov
95febf26c6 Fix wrong lenght size 2014-07-31 21:27:51 +03:00
Xinchen Hui
110bf9c720 Merge remote-tracking branch 'origin/master' into phpng
Conflicts:
	Zend/zend_compile.h
	ext/openssl/xp_ssl.c
2014-07-18 16:25:43 +08:00
Andrey Hristov
24381cdeb2 Merge branch 'PHP-5.6' 2014-07-16 19:50:41 +03:00
Andrey Hristov
23554aae19 Easier to read 2014-07-16 19:50:28 +03:00
Andrey Hristov
5d6805d498 Merge branch 'PHP-5.6'
Conflicts:
	NEWS
2014-07-16 19:25:31 +03:00
Andrey Hristov
06f5f65c94 Add some trace info as well as update CLIENT_ flags 2014-07-16 19:24:39 +03:00
Xinchen Hui
d660d7f599 Fixed segfault while info printing 2014-06-30 15:26:55 +08:00
Xinchen Hui
b8e8b3fcf4 Save some strlen 2014-06-26 16:11:24 +08:00
Xinchen Hui
4cdea779f9 Use ZEND_HANDLE_NUMERIC 2014-06-25 16:34:53 +08:00
Xinchen Hui
c25828e41e Fixed stack usage 2014-06-25 12:33:35 +08:00
Xinchen Hui
58fc40d525 Remove temp file committed by accident 2014-06-25 00:52:05 +08:00
Xinchen Hui
8ce23d8f4f Don't use zend_string for other fields (only name here is enough) 2014-06-25 00:42:20 +08:00
Xinchen Hui
587923ccc8 Cleanup (refactoring is finish) 2014-06-23 23:33:38 +08:00
Xinchen Hui
305da4a88a We don't need extra 1 byte anymore 2014-06-23 22:58:09 +08:00
Dmitry Stogov
ba45650d63 Fixed string destruction (ext/mysql/tests/mysql_list_fields.phpt was failed) 2014-06-23 17:18:47 +04:00
Xinchen Hui
56a966e88a Respect the origin behavior (fix one test: ext/pdo_mysql/tests/bug_33689.phpt) 2014-06-23 19:34:55 +08:00
Xinchen Hui
92a7089893 Use zend_string in mysqlnd 2014-06-23 19:27:24 +08:00
Xinchen Hui
64c6b9bd58 typo 2014-06-23 17:10:25 +08:00
Xinchen Hui
c84aff541f Fixed the trick.... 2014-06-23 16:29:48 +08:00
Dmitry Stogov
36374ff32d Merge branch 'master' into phpng
* master:
  skip this test which fails without network
  add missing entry to NEWS
  add missing entry to NEWS
  add NEWS block for 5.6.0RC2
  Add support for gb18030/MySQL 5.7
  Fix another problem with MySQL 5.7
  new test, missing in ea466a3
  Suppress test failure with MySQL 5.7
2014-06-20 11:16:57 +04:00
Dmitry Stogov
3f11ddcfe3 Fixed compilation warning 2014-06-20 10:32:05 +04:00
Dmitry Stogov
7e9176731f Fixed compilation 2014-06-20 10:27:24 +04:00
Xinchen Hui
d632870e4d Fixed memory leak 2014-06-20 13:27:56 +08:00
Xinchen Hui
e091a91f43 Fixed bugs in binding result 2014-06-20 13:08:40 +08:00
Xinchen Hui
d8a4b1affb Fixed paramters binding 2014-06-19 22:28:43 +08:00
Xinchen Hui
82823e1e96 Fixed stat fields name 2014-06-19 16:16:41 +08:00
Xinchen Hui
e0680cb170 Fixed reference handling of bind_result 2014-06-19 16:08:45 +08:00
Xinchen Hui
f81498c8c8 Fixed invalid read 2014-06-19 15:56:35 +08:00
Xinchen Hui
ffaf8beda7 Fixed segfault 2014-06-19 14:43:14 +08:00
Xinchen Hui
049e52f19b Fixed various bugs 2014-06-19 14:24:49 +08:00
Xinchen Hui
b7b5fa111b Fixed MySQLi built with mysqlnd 2014-06-19 11:10:03 +08:00
Xinchen Hui
27e8e11ff9 unused variables 2014-06-19 10:46:23 +08:00
Andrey Hristov
2eb42c953d Merge branch 'PHP-5.6'
Conflicts:
	NEWS
2014-06-18 21:54:26 +03:00
Andrey Hristov
a886a0cf93 Add support for gb18030/MySQL 5.7 2014-06-18 21:53:34 +03:00
Xinchen Hui
b38f6f3de9 Fixed various bugs (ext/mysql with mysqlnd tests pass) 2014-06-18 23:37:15 +08:00
Xinchen Hui
d5c6816e86 Fixed memory leak while doing fetch 2014-06-18 16:10:51 +08:00
Xinchen Hui
98afbc7f75 Fixed segfaults 2014-06-18 15:43:15 +08:00
Xinchen Hui
ac1d6abbef copy_data seems useless now 2014-06-18 15:13:43 +08:00
Xinchen Hui
83d450c78d Fixed segfault of stream handling 2014-06-18 15:03:01 +08:00
Xinchen Hui
4c4dc8e239 Fixed plugin fetching 2014-06-18 14:26:17 +08:00
Xinchen Hui
6288bb8ffe Refactoring mysqlnd (incompleted, only mysqlnd ext compilable) 2014-06-18 12:09:37 +08:00
Andrey Hristov
5d4f9dfff4 Second set of changes to mysqlnd for phpng.
A bit problematic is that the streams seem not to be completely ported.
Also there are some hacks in the streams about EG(regular_list) and EG(persistent_list)
and these need to be carefully checked. The test suite should catch them, however.
2014-05-20 21:50:15 +03:00
Andrey Hristov
5d57e17a15 First set of phpng changes for mysqlnd 2014-05-20 19:57:11 +03:00
Andrey Hristov
2312af04a7 Defensive check 2014-05-20 16:41:14 +03:00
Andrey Hristov
e6e5d3535d remove mysqlnd_bt.c as it a long dead code 2014-05-19 20:32:41 +03:00
Pierre Joye
fca1e0c574 more port to phpng, zend_string and hash, work in progress 2014-05-18 11:19:02 +02:00
Pierre Joye
6223702cf4 fix smart string usage (work in progress), ps: a lot of len tests are done twice or more, rooms for cleanup here 2014-05-17 15:34:03 +02:00
Pierre Joye
bd1aae54eb fix init, new smart_str struct (use zend_string now) 2014-05-17 15:29:25 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Anatol Belski
a35723f6e1 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix crash in MINFO when no mysqlnd plugins are loaded
2014-04-14 17:45:18 +02:00
Anatol Belski
9e76e87ca9 fix crash in MINFO when no mysqlnd plugins are loaded 2014-04-14 17:44:47 +02:00
Anatol Belski
f0c95cb705 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix syntax error in vc++
2014-04-11 13:28:13 +02:00
Anatol Belski
5c87ed058b fix syntax error in vc++ 2014-04-11 13:08:46 +02:00
Andrey Hristov
6828437c11 Merge branch 'PHP-5.6'
Conflicts:
	NEWS
	ext/mysqlnd/mysqlnd_result.c
2014-04-10 18:22:01 +03:00
Andrey Hristov
090c3e87c0 Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6
Conflicts:
	ext/mysqli/tests/mysqli_begin_transaction.phpt
2014-04-10 16:49:13 +03:00
Andrey Hristov
63791d055a New result fetching mode for mysqlnd, which should use less memory but
implies more memory copy. The old method is still available and can be used.
It stays as default. Choosing the method is through a flag to mysqli_query()/mysqli_real_query()
New mode can be forced with an INI setting, for all extensions that support this mode
(ext/mysql and mysqli, because PDO due to it's architecture can't support it)
The setting is mysqlnd.fetch_data_copy=[0|1]
2014-04-10 16:44:54 +03:00
Nikita Popov
21e01f2b70 Merge branch 'PHP-5.6' 2014-04-09 12:31:35 +02:00
Nikita Popov
eaf44ec397 Remove some usages of hashtable internals 2014-04-09 12:31:21 +02:00
Andrey Hristov
ea93d1fe83 Merge branch 'PHP-5.6' 2014-03-20 17:24:26 +02:00
Andrey Hristov
d2ab74588e Merge branch 'PHP-5.5' into PHP-5.6 2014-03-20 16:30:01 +02:00
Andrey Hristov
41b4b84dda Emit a warning in case of unallowed characters. Fix another place this
code is used - reuse
2014-03-20 16:23:40 +02:00
Andrey Hristov
8ed85557e0 Merge branch 'PHP-5.6' 2014-03-20 16:16:27 +02:00
Andrey Hristov
e52334fdbe Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/mysqli/mysqli_api.c
2014-03-20 16:16:12 +02:00
Andrey Hristov
059bc99d94 don't replace with ?, just skip it 2014-03-20 12:11:16 +02:00
Andrey Hristov
e756f417b9 Merge branch 'PHP-5.6' 2014-03-19 18:55:40 +02:00
Andrey Hristov
01c2ec03bc Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	NEWS
	configure.in
	ext/mysqli/mysqli_api.c
	main/php_version.h
2014-03-19 18:54:39 +02:00
Andrey Hristov
d63ed101ee Fix problem with mysqli_commt()/mysqli_rollback() 2014-03-19 18:32:19 +02:00
Andrey Hristov
5e836b443c Merge branch 'PHP-5.6' 2014-03-10 19:16:22 +02:00
Andrey Hristov
d2a291393a inject it directly. This is not C++ and I don't want to use hacks with similar structures
that are binary compatible. Better be explicit.
2014-03-10 19:15:30 +02:00
Andrey Hristov
3456d47235 Merge branch 'PHP-5.6' 2014-03-10 18:19:22 +02:00
Andrey Hristov
73f03a47d0 DI 2014-03-10 18:18:56 +02:00
Andrey Hristov
f995187d34 Merge branch 'PHP-5.6' 2014-03-10 17:26:13 +02:00
Andrey Hristov
990f9c8f3f Switch from a single flag to a flag byte 2014-03-10 17:25:53 +02:00
Andrey Hristov
9a112e00cd Merge branch 'PHP-5.6' 2014-03-10 12:55:53 +02:00
Andrey Hristov
c8033ac207 Merge branch 'PHP-5.5' into PHP-5.6 2014-03-10 12:53:17 +02:00
Andrey Hristov
3a76cb2d95 Fix indentation 2014-03-10 12:52:56 +02:00
Andrey Hristov
529fdd5bb0 Merge branch 'PHP-5.6' 2014-03-05 16:24:43 +02:00
Andrey Hristov
6b804b96b8 Refactor the result set data structures. Move more to the buffered and unbuffered
substructures. Add methods to these too. Preparing for pluggable interface for
returning data to the engine (zvals, c-style, something else)
2014-03-05 16:22:23 +02:00
Andrey Hristov
f3e59b838e Merge branch 'PHP-5.6' 2014-02-17 19:04:14 +02:00
Andrey Hristov
3e59f041da remove dead code 2014-02-17 19:04:01 +02:00
Andrey Hristov
f83e88e3ea Merge branch 'PHP-5.6' 2014-02-17 18:37:59 +02:00