Re: cvs: php4 /ext/odbc php_odbc.c

From: Date: Tue, 05 Mar 2002 20:35:31 +0000
Subject: Re: cvs: php4 /ext/odbc php_odbc.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9697@lists.php.net to get a copy of this message
I think the issues which are fixed with this outweight the minor number of broken scripts. Dan might be better person to explain them though. :) --Jani On Tue, 5 Mar 2002, Andi Gutmans wrote: >I still think people who used it will get burned but if I'm the only person >to think so... > >Andi > >At 22:26 05/03/2002 +0200, Jani Taskinen wrote: > >> Since 28th of June 2001. >> >> --Jani >> >> >> >>On Tue, 5 Mar 2002, Andi Gutmans wrote: >> >> >How long? >> > >> >Andi >> > >> >At 22:00 05/03/2002 +0200, Jani Taskinen wrote: >> > >> >> >> >> http://www.php.net/manual/en/function.odbc-fetch-into.php >> >> >> >> Check the note in the bottom. Has been there for a while. >> >> >> >> --Jani >> >> >> >> >> >>On Tue, 5 Mar 2002, Andi Gutmans wrote: >> >> >> >> >I think you're breaking BC a bit lightly here. >> >> >Many people really on ODBC calls and your patch means all ODBC sites will >> >> >stop working. >> >> >Am I missing something? >> >> > >> >> >Andi >> >> > >> >> >At 16:45 05/03/2002 +0000, Dan Kalowsky wrote: >> >> >>kalowsky Tue Mar 5 11:45:04 2002 EDT >> >> >> >> >> >> Modified files: >> >> >> /php4/ext/odbc php_odbc.c >> >> >> Log: >> >> >> Breaking BC, but making odbc_fetch_into behavior more consistent >> >> >> >> >> >> >> >> >>Index: php4/ext/odbc/php_odbc.c >> >> >>diff -u php4/ext/odbc/php_odbc.c:1.119 php4/ext/odbc/php_odbc.c:1.120 >> >> >>--- php4/ext/odbc/php_odbc.c:1.119 Mon Mar 4 04:10:31 2002 >> >> >>+++ php4/ext/odbc/php_odbc.c Tue Mar 5 11:45:02 2002 >> >> >>@@ -20,7 +20,7 @@ >> >> >> >> >> +----------------------------------------------------------------------+ >> >> >> */ >> >> >> >> >> >>-/* $Id: php_odbc.c,v 1.119 2002/03/04 09:10:31 imajes Exp $ */ >> >> >>+/* $Id: php_odbc.c,v 1.120 2002/03/05 16:45:02 kalowsky Exp $ */ >> >> >> >> >> >> #ifdef HAVE_CONFIG_H >> >> >> #include "config.h" >> >> >>@@ -69,7 +69,7 @@ >> >> >> >> >> >> #define SAFE_SQL_NTS(n) ((SWORD) ((n)?(SQL_NTS):0)) >> >> >> >> >> >>-static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, >> >> >>BYREF_FORCE, BYREF_FORCE }; >> >> >>+static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, >> >> >>BYREF_FORCE, BYREF_ALLOW}; >> >> >> >> >> >> /* {{{ odbc_functions[] >> >> >> */ >> >> >>@@ -1379,20 +1379,22 @@ >> >> >> /* }}} */ >> >> >> #endif >> >> >> >> >> >>-/* {{{ proto int odbc_fetch_into(int result_id [, int rownumber], array >> >> >>result_array) >> >> >>+/* {{{ proto int odbc_fetch_into(int result_id, array result_array, [, >> >> >>int rownumber]) >> >> >> Fetch one result row into an array */ >> >> >> PHP_FUNCTION(odbc_fetch_into) >> >> >> { >> >> >> int numArgs, i; >> >> >> odbc_result *result; >> >> >> RETCODE rc; >> >> >>- SWORD sql_c_type; >> >> >>+ SWORD sql_c_type; >> >> >> char *buf = NULL; >> >> >>+ pval **pv_res, **pv_res_arr, *tmp; >> >> >> #ifdef HAVE_SQL_EXTENDED_FETCH >> >> >>+ pval **pv_row; >> >> >> UDWORD crow; >> >> >> UWORD RowStatus[1]; >> >> >> SDWORD rownum = -1; >> >> >>- pval **pv_res, **pv_row, **pv_res_arr, *tmp; >> >> >>+#endif /* HAVE_SQL_EXTENDED_FETCH */ >> >> >> >> >> >> numArgs = ZEND_NUM_ARGS(); >> >> >> >> >> >>@@ -1401,26 +1403,18 @@ >> >> >> if (zend_get_parameters_ex(2, &pv_res, >> >> >> &pv_res_arr) == FAILURE) >> >> >> WRONG_PARAM_COUNT; >> >> >> break; >> >> >>+#ifdef HAVE_SQL_EXTENDED_FETCH >> >> >> case 3: >> >> >>- if (zend_get_parameters_ex(3, &pv_res, >> >> >>&pv_row, >> >> >>&pv_res_arr) == FAILURE) >> >> >>+ if (zend_get_parameters_ex(3, &pv_res, >> >> >>&pv_res_arr, &pv_row) == FAILURE) >> >> >> WRONG_PARAM_COUNT; >> >> >> SEPARATE_ZVAL(pv_row); >> >> >> convert_to_long_ex(pv_row); >> >> >> rownum = Z_LVAL_PP(pv_row); >> >> >> break; >> >> >>+#endif /* HAVE_SQL_EXTENDED_FETCH */ >> >> >> default: >> >> >> WRONG_PARAM_COUNT; >> >> >> } >> >> >>- >> >> >>-#else >> >> >>- pval **pv_res, **pv_res_arr, *tmp; >> >> >>- >> >> >>- numArgs = ZEND_NUM_ARGS(); >> >> >>- >> >> >>- if (numArgs != 2 || zend_get_parameters_ex(2, &pv_res, >> >> >>&pv_res_arr) == FAILURE) { >> >> >>- WRONG_PARAM_COUNT; >> >> >>- } >> >> >>-#endif >> >> >> >> >> >> ZEND_FETCH_RESOURCE(result, odbc_result *, pv_res, -1, "ODBC >> >> >> result", le_result); >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>-- >> >> >>PHP CVS Mailing List (http://www.php.net/) >> >> >>To unsubscribe, visit: >> >> >>http://www.php.net/unsub.php >> >> > >> >> > >> >> > >> >> >> >>-- >> > >> > >> > >> >>-- > > > --

« previous php.cvs (#9697) next »