Commit Graph

250 Commits

Author SHA1 Message Date
Andrey Hristov
10d4fb8a94 MDNR:
- Refactor the command factory. Let the factory be exchangeable.
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
784a371829 MNDR:
- Inject the object factory
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
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
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
c133515811 Merge branch 'PHP-5.6' into PHP-7.0 2015-10-27 13:32:45 +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
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
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
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08: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
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
Anatol Belski
77137b56b8 align 4 byte to the start of the word 2014-09-14 10:27:00 +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
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
Xinchen Hui
6469339a58 Fixed incompatible pointer 2014-08-26 12:19:09 +08:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
bdbf47df18 ported mysql and mysqlnd 2014-08-19 16:51:06 +02: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
9959ead309 Use callback structure 2014-08-06 16:50:27 +03: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
92a7089893 Use zend_string in mysqlnd 2014-06-23 19:27:24 +08:00
Xinchen Hui
6288bb8ffe Refactoring mysqlnd (incompleted, only mysqlnd ext compilable) 2014-06-18 12:09:37 +08:00
Andrey Hristov
5d57e17a15 First set of phpng changes for mysqlnd 2014-05-20 19:57:11 +03:00
Anatol Belski
5c87ed058b fix syntax error in vc++ 2014-04-11 13:08:46 +02: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
Andrey Hristov
990f9c8f3f Switch from a single flag to a flag byte 2014-03-10 17:25:53 +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
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Johannes Schlüter
062519ed41 don't include smart_str.h in a too global header, fixes #64718 2013-04-30 14:26:55 +02:00
Andrey Hristov
666a835660 Add savepoint and rollback to savepoint support 2013-02-08 16:36:17 +01:00
Andrey Hristov
9fb0dba4be Add support for commit and rollback options.
Add support for explicitly starting a transaction - modes also available.
Using the API makes the life of load balancer mysqlnd plugins easier/possible.
2013-02-07 16:05:27 +01:00
Andrey Hristov
95346c017c fix valgrind warning 2013-01-22 16:48:39 +01:00
Andrey Hristov
1ff4352263 Add support for connect attributes, as of MySQL 5.6 2013-01-15 10:04:59 +01:00
Xinchen Hui
cbb5d42b9b Merge branch 'PHP-5.4' into PHP-5.5 2013-01-06 10:23:21 +08:00
Xinchen Hui
c2f8e90504 Merge branch 'PHP-5.3' into PHP-5.4 2013-01-06 10:20:00 +08:00