[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli_api.c mysqli_mysqlnd.h /ext/mysqlnd mysqlnd_libmysql_compat.h

2009-05-29 Thread Andrey Hristov
andrey  Fri May 29 13:09:22 2009 UTC

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli_api.c mysqli_mysqlnd.h 
/php-src/ext/mysqlndmysqlnd_libmysql_compat.h 
  Log:
  Add support for mysql_stmt_store_result() from libmysql 6.0.8+ and 5.4.x
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.m4?r1=1.31r2=1.32diff_format=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.31 php-src/ext/mysqli/config.m4:1.32
--- php-src/ext/mysqli/config.m4:1.31   Mon Mar 10 20:27:15 2008
+++ php-src/ext/mysqli/config.m4Fri May 29 13:09:22 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.31 2008/03/10 20:27:15 andrey Exp $
+dnl $Id: config.m4,v 1.32 2009/05/29 13:09:22 andrey Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -61,6 +61,16 @@
   ],[
 $MYSQLI_LIBLINE
   ])
+  dnl
+  dnl Check the library for mysql_stmt_store_result
+  dnl
+  PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_stmt_next_result,
+  [
+AC_DEFINE(HAVE_STMT_NEXT_RESULT, 1, [ ])
+  ],[
+  ],[
+$MYSQLI_LIBLINE
+  ])
 fi
 
 dnl Build extension
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.175r2=1.176diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.175 
php-src/ext/mysqli/mysqli_api.c:1.176
--- php-src/ext/mysqli/mysqli_api.c:1.175   Thu May 28 19:40:37 2009
+++ php-src/ext/mysqli/mysqli_api.c Fri May 29 13:09:22 2009
@@ -17,7 +17,7 @@
   |  Ulf Wendel u...@php.net |
   +--+
 
-  $Id: mysqli_api.c,v 1.175 2009/05/28 19:40:37 kalle Exp $ 
+  $Id: mysqli_api.c,v 1.176 2009/05/29 13:09:22 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1537,7 +1537,7 @@
 /* }}} */
 
 
-#ifdef MYSQLI_USE_MYSQLND
+#ifdef HAVE_STMT_NEXT_RESULT
 /* {{{ proto bool mysqli_stmt_next_result(object link)
check if there any more query results from a multi query */
 PHP_FUNCTION(mysqli_stmt_more_results)
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_mysqlnd.h?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/mysqli/mysqli_mysqlnd.h
diff -u php-src/ext/mysqli/mysqli_mysqlnd.h:1.7 
php-src/ext/mysqli/mysqli_mysqlnd.h:1.8
--- php-src/ext/mysqli/mysqli_mysqlnd.h:1.7 Wed Dec 31 11:12:33 2008
+++ php-src/ext/mysqli/mysqli_mysqlnd.h Fri May 29 13:09:22 2009
@@ -40,4 +40,6 @@
 #define mysqli_bg_store_result(r)  mysqlnd_bg_store_result((r))
 #define mysqli_async_query(c, q, l)mysqlnd_async_query((c), (q), 
(l))
 
+#define HAVE_STMT_NEXT_RESULT
+
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h
diff -u php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.10 
php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.11
--- php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h:1.10  Thu Jan 22 20:57:31 2009
+++ php-src/ext/mysqlnd/mysqlnd_libmysql_compat.h   Fri May 29 13:09:22 2009
@@ -101,6 +101,8 @@
 #define mysql_stmt_attr_set(s,a,v) mysqlnd_stmt_attr_set((s), (a), 
(v))
 #define mysql_stmt_param_metadata(s)   mysqlnd_stmt_param_metadata((s))
 #define mysql_stmt_result_metadata(s)  mysqlnd_stmt_result_metadata((s))
+#define mysql_stmt_next_result(s)  mysqlnd_stmt_next_result((s))
+#define mysql_stmt_more_results(s) mysqlnd_stmt_more_results((s))
 #define mysql_thread_safe()mysqlnd_thread_safe()
 #define mysql_info(r)  mysqlnd_info((r))
 #define mysql_options(r,a,b)   mysqlnd_options((r), (a), (b))



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4 config.w32 mysqli_fe.c mysqli_repl.c php_mysqli_structs.h /ext/mysqli/tests mysqli_disable_rpl_parse.phpt mysqli_enable_rpl_parse.phpt mysqli_rpl_parse_en

2007-12-28 Thread Andrey Hristov
andrey  Fri Dec 28 15:38:23 2007 UTC

  Removed files:   
/php-src/ext/mysqli mysqli_repl.c 
/php-src/ext/mysqli/tests   mysqli_disable_rpl_parse.phpt 
mysqli_enable_rpl_parse.phpt 
mysqli_rpl_parse_enabled.phpt 
mysqli_rpl_probe.phpt 
mysqli_rpl_query_type.phpt 

  Modified files:  
/php-src/ext/mysqli config.m4 config.w32 mysqli_fe.c 
php_mysqli_structs.h 
  Log:
  Remove RPL functions. They were always experimental and lead to crashes.
  The underlying functions will be removed from libmysql as of MySQL 6.0, so
  it's right time to remove them.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.m4?r1=1.29r2=1.30diff_format=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.29 php-src/ext/mysqli/config.m4:1.30
--- php-src/ext/mysqli/config.m4:1.29   Fri Jul 27 01:09:18 2007
+++ php-src/ext/mysqli/config.m4Fri Dec 28 15:38:23 2007
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.29 2007/07/27 01:09:18 jani Exp $
+dnl $Id: config.m4,v 1.30 2007/12/28 15:38:23 andrey Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -61,8 +61,6 @@
   ],[
 $MYSQLI_LIBLINE
   ])
-
-  mysqli_extra_sources=$mysqli_extra_sources mysqli_repl.c
 fi
 
 dnl Build extension
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.w32?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/mysqli/config.w32
diff -u php-src/ext/mysqli/config.w32:1.10 php-src/ext/mysqli/config.w32:1.11
--- php-src/ext/mysqli/config.w32:1.10  Tue Oct 23 10:44:25 2007
+++ php-src/ext/mysqli/config.w32   Fri Dec 28 15:38:23 2007
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10 2007/10/23 10:44:25 andrey Exp $
+// $Id: config.w32,v 1.11 2007/12/28 15:38:23 andrey Exp $
 // vim:ft=javascript
 
 // Note: The extension name is mysqli, you enable it with --with-mysqli.
@@ -26,9 +26,7 @@
CHECK_HEADER_ADD_INCLUDE(mysql.h, CFLAGS_MYSQLI, 
PHP_MYSQLI + 

\\include; + PHP_PHP_BUILD +

\\include\\mysql; + PHP_MYSQLI)) {
-   // No mysqli_repl.c when using mysqlnd
-   mysqli_extra_sources = mysqli_repl.c;
-   EXTENSION(mysqli, mysqli_source +   + 
mysqli_extra_sources);
+   EXTENSION(mysqli, mysqli_source);
AC_DEFINE('HAVE_MYSQLILIB', 1, 'Have MySQLi library');
} else {
WARNING(mysqli not enabled; libraries and headers not 
found);
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_fe.c?r1=1.58r2=1.59diff_format=u
Index: php-src/ext/mysqli/mysqli_fe.c
diff -u php-src/ext/mysqli/mysqli_fe.c:1.58 php-src/ext/mysqli/mysqli_fe.c:1.59
--- php-src/ext/mysqli/mysqli_fe.c:1.58 Tue Oct  2 10:43:09 2007
+++ php-src/ext/mysqli/mysqli_fe.c  Fri Dec 28 15:38:23 2007
@@ -17,7 +17,7 @@
   |  Ulf Wendel [EMAIL PROTECTED]
 |
   +--+
 
-  $Id: mysqli_fe.c,v 1.58 2007/10/02 10:43:09 andrey Exp $ 
+  $Id: mysqli_fe.c,v 1.59 2007/12/28 15:38:23 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -65,18 +65,6 @@
PHP_FE(mysqli_data_seek,
NULL)
PHP_FE(mysqli_dump_debug_info,  
NULL)
PHP_FE(mysqli_debug,
NULL)
-#if !defined(HAVE_MYSQLND)
-   PHP_FE(mysqli_disable_reads_from_master,NULL)
-   PHP_FE(mysqli_disable_rpl_parse,
NULL)
-   PHP_FE(mysqli_enable_reads_from_master, NULL)
-   PHP_FE(mysqli_enable_rpl_parse, 
NULL)
-   PHP_FE(mysqli_send_query,   
NULL)
-   PHP_FE(mysqli_slave_query,  
NULL)
-   PHP_FE(mysqli_master_query, 
NULL)
-   PHP_FE(mysqli_rpl_parse_enabled,
NULL)
-   PHP_FE(mysqli_rpl_probe,
NULL)
-   PHP_FE(mysqli_rpl_query_type,   
NULL)
-#endif
 #if defined(HAVE_EMBEDDED_MYSQLI)
PHP_FE(mysqli_embedded_server_end,  
NULL)
PHP_FE(mysqli_embedded_server_start,NULL)
@@ -207,17 +195,6 @@
PHP_FALIAS(connect,mysqli_connect,NULL)

[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2006-10-08 Thread Georg Richter
georg   Mon Oct  9 04:46:03 2006 UTC

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  Fix for bug #39085:
  PHP6 requires mysqli_set_character_set function which was introduced in 
  MySQL 4.1.13 and 5.0.7
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.m4?r1=1.24r2=1.25diff_format=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.24 php-src/ext/mysqli/config.m4:1.25
--- php-src/ext/mysqli/config.m4:1.24   Thu Jun  1 19:15:31 2006
+++ php-src/ext/mysqli/config.m4Mon Oct  9 04:46:03 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.24 2006/06/01 19:15:31 mike Exp $
+dnl $Id: config.m4,v 1.25 2006/10/09 04:46:03 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -49,9 +49,9 @@
 PHP_EVAL_INCLINE($MYSQLI_INCLINE)
 PHP_EVAL_LIBLINE($MYSQLI_LIBLINE, MYSQLI_SHARED_LIBADD)
 AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
-PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_stmt_field_count,
+PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_set_character_set,
 [ ],[
-   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.3 (for 
MySQL 4.1.x) and  5.0.1 for (MySQL 5.0.x) anymore. Please update your 
libraries.])
+   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.13 (for 
MySQL 4.1.x) and  5.0.7 for (MySQL 5.0.x) anymore. Please update your 
libraries.])
],[$MYSQLI_LIBLINE])
   ],[
 AC_MSG_ERROR([wrong mysql library version or lib not found. Check 
config.log for more information.])

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2005-11-29 Thread Jani Taskinen
sniper  Tue Nov 29 16:31:35 2005 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  MFB51: Always use $SED instead of sed
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.22r2=1.23ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.22 php-src/ext/mysqli/config.m4:1.23
--- php-src/ext/mysqli/config.m4:1.22   Tue Jun  7 08:39:02 2005
+++ php-src/ext/mysqli/config.m4Tue Nov 29 16:31:35 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.22 2005/06/07 12:39:02 sniper Exp $
+dnl $Id: config.m4,v 1.23 2005/11/29 21:31:35 sniper Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -30,8 +30,8 @@
   fi
   
   if test -x $MYSQL_CONFIG  $MYSQL_CONFIG $MYSQL_LIB_CFG  /dev/null 21; 
then
-MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | sed -e s/'//g`
-MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | sed -e s/'//g`
+MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | $SED -e s/'//g`
+MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | $SED -e s/'//g`
   else
 AC_MSG_RESULT([mysql_config not found])
 AC_MSG_ERROR([Please reinstall the mysql distribution])

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2005-02-05 Thread Georg Richter
georg   Sat Feb  5 05:59:38 2005 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  fix for bug #29329
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.19r2=1.20ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.19 php-src/ext/mysqli/config.m4:1.20
--- php-src/ext/mysqli/config.m4:1.19   Fri Jan  7 09:59:59 2005
+++ php-src/ext/mysqli/config.m4Sat Feb  5 05:59:38 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.19 2005/01/07 14:59:59 georg Exp $
+dnl $Id: config.m4,v 1.20 2005/02/05 10:59:38 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -47,7 +47,7 @@
 PHP_CHECK_LIBRARY(mysqlclient, mysql_stmt_field_count,
 [ ],[
AC_MSG_ERROR([MySQLI doesn't support versions  4.1.3 (for 
MySQL 4.1.x) and  5.0.1 for (MySQL 5.0.x) anymore. Please update your 
libraries.])
-   ],[])
+   ],[$MYSQLI_LIBLINE])
   ],[
 AC_MSG_ERROR([wrong mysql library version or lib not found. Check 
config.log for more information.])
   ],[

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli.c mysqli_api.c mysqli_driver.c mysqli_embedded.c mysqli_exception.c mysqli_fe.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c mysqli_warning.c php_mysqli.h /ext/mysqli/tests 001.phpt 014.phpt 017.phpt 033.phpt 034.phpt 041.phpt 045.phpt 047.phpt 049.phpt 061.phpt connect.inc skipif.inc skipifemb.inc

2005-01-07 Thread Georg Richter
georg   Fri Jan  7 10:00:00 2005 EDT

  Added files: 
/php-src/ext/mysqli mysqli_driver.c mysqli_embedded.c 
mysqli_exception.c mysqli_warning.c 
/php-src/ext/mysqli/tests   skipifemb.inc 

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli.c mysqli_api.c mysqli_fe.c 
mysqli_nonapi.c mysqli_prop.c mysqli_report.c 
php_mysqli.h 
/php-src/ext/mysqli/tests   001.phpt 014.phpt 017.phpt 033.phpt 
034.phpt 041.phpt 045.phpt 047.phpt 
049.phpt 061.phpt connect.inc skipif.inc 
  Log:
  Added new classes:
mysqli_driver
mysqli_warning
mysqli_exception
mysqli_sql_exception
  
  Improved embedded server support
  changed testsuite to work also with embedded server
  
  Made statement and resultset classes extendable
  
  minor fixes
  
  http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.18r2=1.19ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.18 php-src/ext/mysqli/config.m4:1.19
--- php-src/ext/mysqli/config.m4:1.18   Thu Jul 22 03:24:55 2004
+++ php-src/ext/mysqli/config.m4Fri Jan  7 09:59:59 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.18 2004/07/22 07:24:55 georg Exp $
+dnl $Id: config.m4,v 1.19 2005/01/07 14:59:59 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -54,6 +54,6 @@
 $MYSQLI_LIBLINE
   ])
 
-  PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_prop.c 
mysqli_nonapi.c mysqli_fe.c mysqli_report.c mysqli_repl.c, $ext_shared)
+  PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_prop.c 
mysqli_nonapi.c mysqli_fe.c mysqli_report.c mysqli_repl.c mysqli_driver.c 
mysqli_warning.c mysqli_exception.c mysqli_embedded.c, $ext_shared)
   PHP_SUBST(MYSQLI_SHARED_LIBADD)
 fi
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.57r2=1.58ty=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.57 php-src/ext/mysqli/mysqli.c:1.58
--- php-src/ext/mysqli/mysqli.c:1.57Sun Dec 26 08:16:38 2004
+++ php-src/ext/mysqli/mysqli.c Fri Jan  7 09:59:59 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli.c,v 1.57 2004/12/26 13:16:38 georg Exp $ 
+  $Id: mysqli.c,v 1.58 2005/01/07 14:59:59 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -37,9 +37,12 @@
 ZEND_DECLARE_MODULE_GLOBALS(mysqli)
 static zend_object_handlers mysqli_object_handlers;
 static HashTable classes;
+static HashTable mysqli_driver_properties;
 static HashTable mysqli_link_properties;
 static HashTable mysqli_result_properties;
 static HashTable mysqli_stmt_properties;
+static HashTable mysqli_warning_properties;
+
 extern void php_mysqli_connect(INTERNAL_FUNCTION_PARAMETERS);
 
 typedef int (*mysqli_read_t)(mysqli_object *obj, zval **retval TSRMLS_DC);
@@ -142,6 +145,10 @@
if (my_res  my_res-ptr) {
mysql_free_result(my_res-ptr);
}
+   } else if (intern-zo.ce == mysqli_warning_class_entry) { /* warning 
object */
+   if (my_res  my_res-ptr) {
+   php_clear_warnings((MYSQLI_WARNING *)my_res-ptr);
+   }
}
my_efree(my_res);
efree(object);
@@ -282,7 +289,8 @@
mysqli_object *obj = (mysqli_object *)zend_objects_get_address(object 
TSRMLS_CC);
 
if (obj-zo.ce != mysqli_link_class_entry  obj-zo.ce != 
mysqli_stmt_class_entry 
-   obj-zo.ce != mysqli_result_class_entry) {
+   obj-zo.ce != mysqli_result_class_entry  obj-zo.ce != 
mysqli_driver_class_entry  
+   obj-zo.ce != mysqli_warning_class_entry) {
return obj-zo.ce-constructor;
} else {
static zend_internal_function f;
@@ -300,6 +308,10 @@
f.handler = ZEND_FN(mysqli_stmt_construct);
} else if (obj-zo.ce == mysqli_result_class_entry) {
f.handler = ZEND_FN(mysqli_result_construct);
+   } else if (obj-zo.ce == mysqli_driver_class_entry) {
+   f.handler = ZEND_FN(mysqli_driver_construct);
+   } else if (obj-zo.ce == mysqli_warning_class_entry) {
+   f.handler = ZEND_FN(mysqli_driver_construct);
}

return (union _zend_function*)f;
@@ -397,6 +409,11 @@
mysqli_globals-report_mode = 0;
mysqli_globals-report_ht = 0;
mysqli_globals-multi_query = 0;
+#ifdef HAVE_EMBEDDED_MYSQLI
+   mysqli_globals-embedded = 1;
+#else
+   mysqli_globals-embedded = 0;
+#endif
 }
 /* }}} */
 
@@ -404,9 +421,8 @@
  */
 PHP_MINIT_FUNCTION(mysqli)
 {
-   zend_class_entry *ce;
+   zend_class_entry *ce,cex;

[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2004-07-22 Thread Georg Richter
georg   Thu Jul 22 03:24:57 2004 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  changed warning (bug #29298) for outdated client library
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.17r2=1.18ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.17 php-src/ext/mysqli/config.m4:1.18
--- php-src/ext/mysqli/config.m4:1.17   Wed Jul  7 04:02:27 2004
+++ php-src/ext/mysqli/config.m4Thu Jul 22 03:24:55 2004
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.17 2004/07/07 08:02:27 georg Exp $
+dnl $Id: config.m4,v 1.18 2004/07/22 07:24:55 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -46,7 +46,7 @@
 AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
 PHP_CHECK_LIBRARY(mysqlclient, mysql_stmt_field_count,
 [ ],[
-   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.3 anymore. Please 
update your libraries.])
+   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.3 (for MySQL 
4.1.x) and  5.0.1 for (MySQL 5.0.x) anymore. Please update your libraries.])
],[])
   ],[
 AC_MSG_ERROR([wrong mysql library version or lib not found. Check config.log for 
more information.])

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli.c mysqli_api.c mysqli_fe.c mysqli_prop.c mysqli_report.c php_mysqli.h

2004-07-07 Thread Georg Richter
georg   Wed Jul  7 04:02:27 2004 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli.c mysqli_api.c mysqli_fe.c 
mysqli_prop.c mysqli_report.c php_mysqli.h 
  Log:
  added check in config.m4 for deprecated library
  added support for new 4.1.3-beta functions
mysqli_stmt_field_count
mysqli_stmt_attr_set
mysqli_stmt_attr_get
  removed support for deprecated/old api functions
  fixed bug in constructor_get
  
  http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.16r2=1.17ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.16 php-src/ext/mysqli/config.m4:1.17
--- php-src/ext/mysqli/config.m4:1.16   Wed Mar 31 16:11:23 2004
+++ php-src/ext/mysqli/config.m4Wed Jul  7 04:02:27 2004
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.16 2004/03/31 21:11:23 derick Exp $
+dnl $Id: config.m4,v 1.17 2004/07/07 08:02:27 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -44,10 +44,10 @@
 PHP_EVAL_INCLINE($MYSQLI_INCLINE)
 PHP_EVAL_LIBLINE($MYSQLI_LIBLINE, MYSQLI_SHARED_LIBADD)
 AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
-PHP_CHECK_LIBRARY(mysqlclient, mysql_bind_param,
-[
-   AC_DEFINE(HAVE_MYSQLI_OLDAPI,1,[ ])
-],[],[])
+PHP_CHECK_LIBRARY(mysqlclient, mysql_stmt_field_count,
+[ ],[
+   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.3 anymore. Please 
update your libraries.])
+   ],[])
   ],[
 AC_MSG_ERROR([wrong mysql library version or lib not found. Check config.log for 
more information.])
   ],[
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.42r2=1.43ty=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.42 php-src/ext/mysqli/mysqli.c:1.43
--- php-src/ext/mysqli/mysqli.c:1.42Mon Jul  5 15:36:10 2004
+++ php-src/ext/mysqli/mysqli.c Wed Jul  7 04:02:27 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli.c,v 1.42 2004/07/05 19:36:10 helly Exp $ 
+  $Id: mysqli.c,v 1.43 2004/07/07 08:02:27 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -273,7 +273,7 @@
 {
mysqli_object *obj = (mysqli_object *)zend_objects_get_address(object 
TSRMLS_CC);
 
-   if (obj-zo.ce != mysqli_link_class_entry) {
+   if (obj-zo.ce != mysqli_link_class_entry  obj-zo.ce-constructor) {
return obj-zo.ce-constructor;
} else {
static zend_internal_function f;
@@ -441,6 +441,8 @@
REGISTER_LONG_CONSTANT(MYSQLI_NUM, MYSQLI_NUM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(MYSQLI_BOTH, MYSQLI_BOTH, CONST_CS | 
CONST_PERSISTENT);

+   /* for mysqli_stmt_set_attr */
+   REGISTER_LONG_CONSTANT(MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, 
STMT_ATTR_UPDATE_MAX_LENGTH, CONST_CS | CONST_PERSISTENT);

/* column information */
REGISTER_LONG_CONSTANT(MYSQLI_NOT_NULL_FLAG, NOT_NULL_FLAG, CONST_CS | 
CONST_PERSISTENT);
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.84r2=1.85ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.84 php-src/ext/mysqli/mysqli_api.c:1.85
--- php-src/ext/mysqli/mysqli_api.c:1.84Tue Jun  8 02:20:58 2004
+++ php-src/ext/mysqli/mysqli_api.c Wed Jul  7 04:02:27 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.84 2004/06/08 06:20:58 georg Exp $ 
+  $Id: mysqli_api.c,v 1.85 2004/07/07 08:02:27 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -240,7 +240,7 @@

var_cnt = argc - start;
 
-   if (var_cnt != stmt-stmt-field_count) {
+   if (var_cnt != mysql_stmt_field_count(stmt-stmt)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Number of bind variables 
doesn't match number of fields in prepared statmement.);
efree(args);
RETURN_FALSE;
@@ -321,11 +321,7 @@
}
}
 
-#ifndef HAVE_MYSQLI_OLDAPI 
rc = mysql_stmt_bind_result(stmt-stmt, bind);
-#else
-   rc = mysql_bind_result(stmt-stmt, bind);
-#endif
MYSQLI_REPORT_STMT_ERROR(stmt-stmt);
 
if (rc) {
@@ -565,11 +561,7 @@
}   
}
}
-#ifndef HAVE_MYSQLI_OLDAPI 
if (mysql_stmt_execute(stmt-stmt)) {
-#else
-   if (mysql_execute(stmt-stmt)) {
-#endif
MYSQLI_REPORT_STMT_ERROR(stmt-stmt);
RETURN_FALSE;
}
@@ -607,11 +599,7 @@
memset(stmt-result.buf[i].val, 0, stmt-result.buf[i].buflen);
}
}
-#ifndef HAVE_MYSQLI_OLDAPI 
if (!(ret = mysql_stmt_fetch(stmt-stmt))) {
-#else
-   if (!(ret = mysql_fetch(stmt-stmt))) {

[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli_api.c mysqli_repl.c

2004-02-20 Thread Georg Richter
georg   Fri Feb 20 08:09:15 2004 EDT

  Added files: 
/php-src/ext/mysqli mysqli_repl.c 

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli_api.c 
  Log:
  Moved functions for replication support in to file mysqli_repl.c
- these functions are marked as experimental now in documentation
  not sure if we will replace or extend them with NDB support in
  April
  
  http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.13r2=1.14ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.13 php-src/ext/mysqli/config.m4:1.14
--- php-src/ext/mysqli/config.m4:1.13   Fri Dec 12 19:28:21 2003
+++ php-src/ext/mysqli/config.m4Fri Feb 20 08:09:14 2004
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.13 2003/12/13 00:28:21 georg Exp $
+dnl $Id: config.m4,v 1.14 2004/02/20 13:09:14 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -50,6 +50,6 @@
 $MYSQLI_LIBLINE
   ])
 
-  PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c 
mysqli_fe.c mysqli_report.c, $ext_shared)
+  PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c 
mysqli_fe.c mysqli_report.c mysqli_repl.c, $ext_shared)
   PHP_SUBST(MYSQLI_SHARED_LIBADD)
 fi
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.72r2=1.73ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.72 php-src/ext/mysqli/mysqli_api.c:1.73
--- php-src/ext/mysqli/mysqli_api.c:1.72Wed Feb 18 08:26:57 2004
+++ php-src/ext/mysqli/mysqli_api.c Fri Feb 20 08:09:14 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.72 2004/02/18 13:26:57 georg Exp $ 
+  $Id: mysqli_api.c,v 1.73 2004/02/20 13:09:14 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -469,38 +469,6 @@
 }
 /* }}} */
 
-/* {{{ proto void mysqli_disable_reads_from_master(object link)
-*/
-PHP_FUNCTION(mysqli_disable_reads_from_master)
-{
-   MYSQL   *mysql;
-   zval*mysql_link;
-
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, 
mysql_link, mysqli_link_class_entry) == FAILURE) {
-   return;
-   }
-   MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link);
-   mysql_disable_reads_from_master(mysql);
-   RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto void mysqli_disable_rpl_parse(object link)
-*/
-PHP_FUNCTION(mysqli_disable_rpl_parse)
-{
-   MYSQL   *mysql;
-   zval*mysql_link;
-
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, 
mysql_link, mysqli_link_class_entry) == FAILURE) {
-   return;
-   }
-   MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link);
-   mysql_disable_rpl_parse(mysql);
-   RETURN_TRUE;
-}
-/* }}} */
-
 /* {{{ proto bool mysqli_dump_debug_info(object link)
 */
 PHP_FUNCTION(mysqli_dump_debug_info)
@@ -523,40 +491,6 @@
 }
 /* }}} */
 
-/* {{{ proto void mysqli_enable_reads_from_master(object link)
-*/
-PHP_FUNCTION(mysqli_enable_reads_from_master)
-{
-   MYSQL   *mysql;
-   zval*mysql_link;
-
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, 
mysql_link, mysqli_link_class_entry) == FAILURE) {
-   return;
-   }
-   MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link);
-
-   mysql_enable_reads_from_master(mysql);
-   RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto void mysqli_enable_rpl_parse(object link)
-*/
-PHP_FUNCTION(mysqli_enable_rpl_parse)
-{
-   MYSQL   *mysql;
-   zval*mysql_link;
-
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), O, 
mysql_link, mysqli_link_class_entry) == FAILURE) {
-   return;
-   }
-   MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link);
-
-   mysql_enable_rpl_parse(mysql);
-   RETURN_TRUE;
-}
-/* }}} */
-
 /* {{{ proto int mysqli_errno(object link)
Returns the numerical value of the error message from previous MySQL operation */
 PHP_FUNCTION(mysqli_errno)
@@ -1084,26 +1018,6 @@
 }
 /* }}} */
 
-/* {{{ proto bool mysqli_master_query(object link, string query)
-   Enforce execution of a query on the master in a master/slave setup */
-PHP_FUNCTION(mysqli_master_query) {
-   MYSQL   *mysql;
-   zval*mysql_link;
-   char*query = NULL;
-   unsigned intquery_len;
-
-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), Os, 
mysql_link, mysqli_link_class_entry, query, query_len) == FAILURE) {
-   return;
-   }
-   MYSQLI_FETCH_RESOURCE(mysql, MYSQL *, mysql_link, mysqli_link);
-
-   if 

[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2003-12-08 Thread Jani Taskinen
sniper  Mon Dec  8 13:57:10 2003 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  ws
  
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.11 php-src/ext/mysqli/config.m4:1.12
--- php-src/ext/mysqli/config.m4:1.11   Sun Dec  7 10:33:19 2003
+++ php-src/ext/mysqli/config.m4Mon Dec  8 13:57:09 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.11 2003/12/07 15:33:19 sniper Exp $
+dnl $Id: config.m4,v 1.12 2003/12/08 18:57:09 sniper Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -22,7 +22,7 @@
   fi
 
   if test $PHP_EMBEDDED_MYSQLI = yes; then
-   AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
+AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
 MYSQL_LIB_CFG='--libmysqld-libs'
   else
 MYSQL_LIB_CFG='--libs'

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2003-12-07 Thread Jani Taskinen
sniper  Sun Dec  7 10:33:20 2003 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  Fix logic
  
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.10 php-src/ext/mysqli/config.m4:1.11
--- php-src/ext/mysqli/config.m4:1.10   Sat Nov 22 16:20:06 2003
+++ php-src/ext/mysqli/config.m4Sun Dec  7 10:33:19 2003
@@ -1,17 +1,15 @@
 dnl
-dnl $Id: config.m4,v 1.10 2003/11/22 21:20:06 georg Exp $
+dnl $Id: config.m4,v 1.11 2003/12/07 15:33:19 sniper Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
 [  --with-mysqli[=FILE]Include MySQLi support. FILE is the optional 
   pathname to mysql_config.])
 
-PHP_ARG_WITH(embedded_mysqli, for embedded MySQLi support,
-[  --with-embedded-mysqli[=FILE]
-  Include embedded MySQLi support. FILE is the optional 
-  pathname to mysql_config.])
+PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support,
+[  --enable-embedded-mysqli  MYSQLi: Enable embedded support.], no, no)
 
-if test $PHP_MYSQLI != no || test $PHP_EMBEDDED_MYSQLI != no; then
+if test $PHP_MYSQLI != no; then
 
   if test $PHP_MYSQL = yes; then
 AC_MSG_ERROR([--with-mysql (using bundled libs) can not be used together with 
--with-mysqli.])
@@ -20,18 +18,14 @@
   if test $PHP_MYSQLI = yes; then
 MYSQL_CONFIG=`$php_shtool path mysql_config`
   else
-   if test $PHP_MYSQLI != no; then
-  MYSQL_CONFIG=$PHP_MYSQLI
-else
-  MYSQL_CONFIG=$PHP_EMBEDDED_MYSQLI
-fi
+MYSQL_CONFIG=$PHP_MYSQLI
   fi
 
-  if test $PHP_MYSQLI != no; then
-MYSQL_LIB_CFG='--libs'
-  else
+  if test $PHP_EMBEDDED_MYSQLI = yes; then
AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
 MYSQL_LIB_CFG='--libmysqld-libs'
+  else
+MYSQL_LIB_CFG='--libs'
   fi
   
   if test -x $MYSQL_CONFIG  $MYSQL_CONFIG $MYSQL_LIB_CFG  /dev/null 21; then
@@ -56,6 +50,6 @@
 $MYSQLI_LIBLINE
   ])
 
-  PHP_SUBST(MYSQLI_SHARED_LIBADD)
   PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c 
mysqli_fe.c mysqli_profiler.c mysqli_profiler_com.c, $ext_shared)
+  PHP_SUBST(MYSQLI_SHARED_LIBADD)
 fi

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli.c mysqli_api.c mysqli_fe.c mysqli_nonapi.c mysqli_prop.c php_mysqli.h

2003-11-22 Thread Georg Richter
georg   Sat Nov 22 16:20:07 2003 EDT

  Added files: 
/php-src/ext/mysqli mysqli_prop.c 

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli.c mysqli_api.c mysqli_fe.c 
mysqli_nonapi.c php_mysqli.h 
  Log:
  - Added multiquery support:
mysqli_multi_query
mysqli_more_results
mysqli_next_results
  
  - added read-only properties (and removed methods)
object mysql
affected_rows
client_flags
client_version
errno, error,
host, host_info, info
server_capabilities, server_version
sqlstate, port, protocol_version,
server_language
thread_id, user, warning_count
  
object result
current_field, field_count,
lengths, num_rows, type
  
object stmt
query, param_count, field_count,
id, errno, error, sqlstate
  
  
  - added constructor
  
  - minor fixes, prototypes
  
  Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.9 php-src/ext/mysqli/config.m4:1.10
--- php-src/ext/mysqli/config.m4:1.9Fri Oct 31 08:48:34 2003
+++ php-src/ext/mysqli/config.m4Sat Nov 22 16:20:06 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.9 2003/10/31 13:48:34 sniper Exp $
+dnl $Id: config.m4,v 1.10 2003/11/22 21:20:06 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -57,5 +57,5 @@
   ])
 
   PHP_SUBST(MYSQLI_SHARED_LIBADD)
-  PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_nonapi.c mysqli_fe.c 
mysqli_profiler.c mysqli_profiler_com.c, $ext_shared)
+  PHP_NEW_EXTENSION(mysqli, mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c 
mysqli_fe.c mysqli_profiler.c mysqli_profiler_com.c, $ext_shared)
 fi
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.18 php-src/ext/mysqli/mysqli.c:1.19
--- php-src/ext/mysqli/mysqli.c:1.18Fri Nov  7 12:20:48 2003
+++ php-src/ext/mysqli/mysqli.c Sat Nov 22 16:20:06 2003
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli.c,v 1.18 2003/11/07 17:20:48 iliaa Exp $ 
+  $Id: mysqli.c,v 1.19 2003/11/22 21:20:06 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -36,7 +36,20 @@
 
 ZEND_DECLARE_MODULE_GLOBALS(mysqli)
 static zend_object_handlers mysqli_object_handlers;
+static HashTable classes;
+static HashTable mysqli_link_properties;
+static HashTable mysqli_result_properties;
+static HashTable mysqli_stmt_properties;
 PR_MAIN *prmain;
+extern void php_mysqli_connect(INTERNAL_FUNCTION_PARAMETERS);
+
+typedef int (*mysqli_read_t)(mysqli_object *obj, zval **retval TSRMLS_DC);
+typedef int (*mysqli_write_t)(mysqli_object *obj, zval *member, zval *newval 
TSRMLS_DC);
+
+typedef struct _mysqli_prop_handler {
+   mysqli_read_t read_func;
+   mysqli_write_t write_func;
+} mysqli_prop_handler;
 
 /* {{{ php_free_stmt_bind_buffer */
 void php_free_stmt_bind_buffer(BIND_BUFFER bbuf, int type)
@@ -96,6 +109,9 @@
mysqli_object   *intern = (mysqli_object *)object;
MYSQLI_RESOURCE *my_res = (MYSQLI_RESOURCE *)intern-ptr;
 
+   zend_hash_destroy(intern-zo.properties);
+   FREE_HASHTABLE(intern-zo.properties);
+
/* link object */
if (intern-zo.ce == mysqli_link_class_entry) {
if (my_res  my_res-ptr) {
@@ -111,7 +127,7 @@
}
}
my_efree(my_res);
-   zend_objects_destroy_object(object, handle TSRMLS_CC);
+   efree(object);
 }
 /* }}} */
 
@@ -122,7 +138,85 @@
/* TODO */
 }
 /* }}} */
-   
+
+/* {{{ mysqli_read_na */
+static int mysqli_read_na(mysqli_object *obj, zval **retval TSRMLS_DC)
+{
+   *retval = NULL;
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, Cannot read property);
+   return FAILURE;
+}
+/* }}} */
+
+/* {{{ mysqli_write_na */
+static int mysqli_write_na(mysqli_object *obj, zval *member, zval *newval TSRMLS_DC)
+{
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, Cannot write property);
+   return FAILURE;
+}
+/* }}} */
+
+/* {{{ mysqli_read_property */
+zval *mysqli_read_property(zval *object, zval *member, zend_bool silent TSRMLS_DC)
+{
+   zval tmp_member;
+   zval *retval;
+   mysqli_object *obj;
+   mysqli_prop_handler *hnd;
+   zend_object_handlers *std_hnd;
+   int ret;
+
+   if (member-type != IS_STRING) {
+   tmp_member = *member;
+   zval_copy_ctor(tmp_member);
+   convert_to_string(tmp_member);
+   member = tmp_member;
+   }
+
+   ret = FAILURE;
+   obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC);
+
+   if (obj-prop_handler != NULL) {
+   ret = zend_hash_find(obj-prop_handler, Z_STRVAL_P(member), 

[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2003-10-31 Thread Jani Taskinen
sniper  Fri Oct 31 08:48:35 2003 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  cosmetics
  
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.8 php-src/ext/mysqli/config.m4:1.9
--- php-src/ext/mysqli/config.m4:1.8Wed Oct 29 15:48:47 2003
+++ php-src/ext/mysqli/config.m4Fri Oct 31 08:48:34 2003
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.8 2003/10/29 20:48:47 georg Exp $
+dnl $Id: config.m4,v 1.9 2003/10/31 13:48:34 sniper Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -7,10 +7,11 @@
   pathname to mysql_config.])
 
 PHP_ARG_WITH(embedded_mysqli, for embedded MySQLi support,
-[  --with-embedded-mysqli[=FILE]Include embedded MySQLi support. FILE is the 
optional 
+[  --with-embedded-mysqli[=FILE]
+  Include embedded MySQLi support. FILE is the optional 
   pathname to mysql_config.])
 
-if test $PHP_MYSQLI != no '-o' $PHP_EMBEDDED_MYSQLI != no; then
+if test $PHP_MYSQLI != no || test $PHP_EMBEDDED_MYSQLI != no; then
 
   if test $PHP_MYSQL = yes; then
 AC_MSG_ERROR([--with-mysql (using bundled libs) can not be used together with 
--with-mysqli.])
@@ -29,7 +30,7 @@
   if test $PHP_MYSQLI != no; then
 MYSQL_LIB_CFG='--libs'
   else
-   AC_DEFINE([HAVE_EMBEDDED_MYSQLI],[1], [embedded MySQL support enabled])
+   AC_DEFINE(HAVE_EMBEDDED_MYSQLI, 1, [embedded MySQL support enabled])
 MYSQL_LIB_CFG='--libmysqld-libs'
   fi
   

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli_api.c mysqli_nonapi.c php_mysqli.h

2003-10-29 Thread Georg Richter
georg   Wed Oct 29 15:48:48 2003 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli_api.c mysqli_nonapi.c 
php_mysqli.h 
  Log:
  added support for embedded MySQL Server
  some prototype fixes
  
  Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.7 php-src/ext/mysqli/config.m4:1.8
--- php-src/ext/mysqli/config.m4:1.7Mon May 19 19:43:41 2003
+++ php-src/ext/mysqli/config.m4Wed Oct 29 15:48:47 2003
@@ -1,12 +1,16 @@
 dnl
-dnl $Id: config.m4,v 1.7 2003/05/19 23:43:41 sniper Exp $
+dnl $Id: config.m4,v 1.8 2003/10/29 20:48:47 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
 [  --with-mysqli[=FILE]Include MySQLi support. FILE is the optional 
   pathname to mysql_config.])
 
-if test $PHP_MYSQLI != no; then
+PHP_ARG_WITH(embedded_mysqli, for embedded MySQLi support,
+[  --with-embedded-mysqli[=FILE]Include embedded MySQLi support. FILE is the 
optional 
+  pathname to mysql_config.])
+
+if test $PHP_MYSQLI != no '-o' $PHP_EMBEDDED_MYSQLI != no; then
 
   if test $PHP_MYSQL = yes; then
 AC_MSG_ERROR([--with-mysql (using bundled libs) can not be used together with 
--with-mysqli.])
@@ -15,12 +19,23 @@
   if test $PHP_MYSQLI = yes; then
 MYSQL_CONFIG=`$php_shtool path mysql_config`
   else
-MYSQL_CONFIG=$PHP_MYSQLI
+   if test $PHP_MYSQLI != no; then
+  MYSQL_CONFIG=$PHP_MYSQLI
+else
+  MYSQL_CONFIG=$PHP_EMBEDDED_MYSQLI
+fi
+  fi
+
+  if test $PHP_MYSQLI != no; then
+MYSQL_LIB_CFG='--libs'
+  else
+   AC_DEFINE([HAVE_EMBEDDED_MYSQLI],[1], [embedded MySQL support enabled])
+MYSQL_LIB_CFG='--libmysqld-libs'
   fi
   
-  if test -x $MYSQL_CONFIG  $MYSQL_CONFIG --libs  /dev/null 21; then
+  if test -x $MYSQL_CONFIG  $MYSQL_CONFIG $MYSQL_LIB_CFG  /dev/null 21; then
 MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | sed -e s/'//g`
-MYSQLI_LIBLINE=`$MYSQL_CONFIG --libs   | sed -e s/'//g`
+MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | sed -e s/'//g`
   else
 AC_MSG_RESULT([mysql_config not found])
 AC_MSG_ERROR([Please reinstall the mysql distribution])
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.46 php-src/ext/mysqli/mysqli_api.c:1.47
--- php-src/ext/mysqli/mysqli_api.c:1.46Thu Sep 25 07:19:25 2003
+++ php-src/ext/mysqli/mysqli_api.c Wed Oct 29 15:48:47 2003
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.46 2003/09/25 11:19:25 georg Exp $ 
+  $Id: mysqli_api.c,v 1.47 2003/10/29 20:48:47 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1614,6 +1614,41 @@
 }
 /* }}} */
 
+#ifdef HAVE_EMBEDDED_MYSQLI
+/* {{{ proto bool mysqli_server_init(void)
+   initialize embedded server */
+PHP_FUNCTION(mysqli_server_init)
+{
+   zval*server;
+   zval*groups;
+
+   if (MyG(embedded)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Embedded server already 
initialized.);
+   RETURN_FALSE;
+   }
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |aa, server, groups) 
== FAILURE) {
+   return;
+   }
+
+   if (mysql_server_init(0, NULL, NULL)) {
+   RETURN_FALSE;
+   }
+   MyG(embedded) = 1;
+   RETURN_TRUE;
+}
+/* }}} */
+
+/* {{{ proto void mysqli_server_end(void)
+*/
+PHP_FUNCTION(mysqli_server_end)
+{
+   mysql_server_end();
+}
+/* }}} */
+#endif
+
+
 /* {{{ proto bool mysqli_slave_query(object link, string query)
Enforce execution of a query on a slave in a master/slave setup */
 PHP_FUNCTION(mysqli_slave_query)
@@ -1832,7 +1867,7 @@
 }
 /* }}} */
 
-/* {{{ proto resource mysqli_stmt_store_result(stmt)
+/* {{{ proto object mysqli_stmt_store_result(stmt)
 */
 PHP_FUNCTION(mysqli_stmt_store_result)
 {
@@ -1871,7 +1906,7 @@
 #endif
 /* }}} */
 
-/* {{{ proto resource mysqli_store_result(object link)
+/* {{{ proto object mysqli_store_result(object link)
Buffer result set on client */
 PHP_FUNCTION(mysqli_store_result)
 {
@@ -1921,7 +1956,7 @@
 
 /* }}} */
 
-/* {{{ proto resource mysqli_use_result(object link)
+/* {{{ proto object mysqli_use_result(object link)
Directly retrieve query results - do not buffer results on client side */
 PHP_FUNCTION(mysqli_use_result)
 {
@@ -1945,7 +1980,7 @@
 }
 /* }}} */
 
-/* {{{ proto resource mysqli_warning_count (object link)
+/* {{{ proto int mysqli_warning_count (object link)
Return number of warnings from the last query for the given link */
 PHP_FUNCTION(mysqli_warning_count)
 {
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.17 php-src/ext/mysqli/mysqli_nonapi.c:1.18
--- php-src/ext/mysqli/mysqli_nonapi.c:1.17 Tue Sep 16 15:45:22 2003
+++ php-src/ext/mysqli/mysqli_nonapi.c  Wed Oct