Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c /ext/mysqli/tests bug46109.phpt
Hi Tony, I noticed it when I saw what files are being committed :( Sorry! Andrey Antony Dovgal wrote: > Err.. This can't be right, Andrey. > > On 19.09.2008 15:35, Andrey Hristov wrote: >> http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.133&r2=1.134&diff_format=u >> Index: php-src/ext/mysqli/mysqli.c >> diff -u php-src/ext/mysqli/mysqli.c:1.133 php-src/ext/mysqli/mysqli.c:1.134 >> --- php-src/ext/mysqli/mysqli.c:1.133Mon Sep 15 18:07:58 2008 >> +++ php-src/ext/mysqli/mysqli.c Fri Sep 19 11:35:37 2008 >> @@ -17,7 +17,7 @@ >>| Ulf Wendel <[EMAIL PROTECTED]> >> | >>+--+ >> >> - $Id: mysqli.c,v 1.133 2008/09/15 18:07:58 andrey Exp $ >> + $Id: mysqli.c,v 1.134 2008/09/19 11:35:37 andrey Exp $ >> */ >> >> #ifdef HAVE_CONFIG_H >> @@ -1255,7 +1255,7 @@ >> } else { >> ZVAL_STRINGL(res, row[i], field_len[i], 1); >> } >> - >> +if (m >> if (fetchtype & MYSQLI_NUM) { >> add_index_zval(return_value, i, res); >> } > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c /ext/mysqli/tests bug46109.phpt
Err.. This can't be right, Andrey. On 19.09.2008 15:35, Andrey Hristov wrote: > http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.133&r2=1.134&diff_format=u > Index: php-src/ext/mysqli/mysqli.c > diff -u php-src/ext/mysqli/mysqli.c:1.133 php-src/ext/mysqli/mysqli.c:1.134 > --- php-src/ext/mysqli/mysqli.c:1.133 Mon Sep 15 18:07:58 2008 > +++ php-src/ext/mysqli/mysqli.c Fri Sep 19 11:35:37 2008 > @@ -17,7 +17,7 @@ >| Ulf Wendel <[EMAIL PROTECTED]> >| >+--+ > > - $Id: mysqli.c,v 1.133 2008/09/15 18:07:58 andrey Exp $ > + $Id: mysqli.c,v 1.134 2008/09/19 11:35:37 andrey Exp $ > */ > > #ifdef HAVE_CONFIG_H > @@ -1255,7 +1255,7 @@ > } else { > ZVAL_STRINGL(res, row[i], field_len[i], 1); > } > - > + if (m > if (fetchtype & MYSQLI_NUM) { > add_index_zval(return_value, i, res); > } -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c /ext/mysqli/tests 068.phpt
On 02.10.2006 19:48, Andrei Zmievski wrote: Great! So, has anyone tested or played around with the mysqli extension after these updates? It passes all the tests for me (in both native and Unicode modes), even with -m. -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c /ext/mysqli/tests 068.phpt
Great! So, has anyone tested or played around with the mysqli extension after these updates? -Andrei On Oct 1, 2006, at 2:01 PM, Georg Richter wrote: georg Sun Oct 1 21:01:31 2006 UTC Modified files: /php-src/ext/mysqli mysqli.c mysqli_api.c mysqli_nonapi.c /php-src/ext/mysqli/tests 068.phpt Log: unicode fixes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c php_mysqli.h
Am Do, den 28.09.2006 schrieb Andrei Zmievski um 18:43: Hello Andrei, > > A couple more notes. Thanks, I will fix it this weekend. > Also, I don't know much about MySQL client library, but it seems that > it only works in UTF-8 mode. Is this correct? Does it translate UTF-8 > to other charsets when communicating with server that has tables in > those other charsets? If a table or a column uses another charset, MySQL Server automatically converts utf8 to another charset. When PHP runs in unicode, we automatically set the client character set to utf8. UCS2 is not fully supported currently. /Georg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c php_mysqli.h
Hi Georg, A couple more notes. 1. This can be simplified: if (UG(unicode)) { zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, row[i], field_len[i] TSRMLS_CC); ZVAL_UNICODEL(res, ustr, ulen, 0); } else { ZVAL_STRINGL(res, row[i], field_len[i], 1); } Use ZVAL_UTF8_STRINGL(res, row[i], field_len[i], ZSTR_DUPLICATE) 2. This also: ZVAL_UTF8_STRINGL(return_value, strerr, strlen(strerr), ZSTR_DUPLICATE); to: RETURN_UTF8_STRINGL(strerr, strlen(strerr), ZSTR_DUPLICATE); 3. As well as this: if (UG(unicode)) { zend_string_to_unicode(UG(utf8_conv), &ustr, &ulen, (field->name) ? field->name : "", (field->name) ? strlen(field->name) : 0 TSRMLS_CC); add_property_unicodel(value, "name", ustr, ulen, 0); } else { add_property_string(value, "name", (field->name) ? field->name : "", 1); } Use add_property_utf8_string(): add_property_utf8_string(value, "name", (field->name) ? field->name : "", ZSTR_DUPLICATE); Also, I don't know much about MySQL client library, but it seems that it only works in UTF-8 mode. Is this correct? Does it translate UTF-8 to other charsets when communicating with server that has tables in those other charsets? -Andrei On Sep 27, 2006, at 8:25 AM, Georg Richter wrote: georg Wed Sep 27 15:25:52 2006 UTC Modified files: /php-src/ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c php_mysqli.h Log: ZTS fixes. Implemented Andrei's hints (simplifying unicode stuff) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c php_mysqli.h /ext/mysqli/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt
ZTS build is badly broken =( On 26.09.2006 17:06, Georg Richter wrote: georg Tue Sep 26 13:06:13 2006 UTC Modified files: /php-src/ext/mysqli mysqli.c mysqli_api.c mysqli_driver.c mysqli_nonapi.c mysqli_prop.c mysqli_report.c php_mysqli.h /php-src/ext/mysqli/tests 001.phpt 002.phpt 003.phpt 004.phpt 005.phpt 009.phpt 011.phpt 012.phpt 014.phpt 015.phpt 016.phpt 017.phpt 019.phpt 020.phpt 021.phpt 022.phpt 026.phpt 028.phpt 031.phpt 032.phpt 042.phpt 043.phpt 045.phpt 047.phpt 048.phpt 049.phpt 057.phpt 058.phpt 059.phpt 060.phpt 061.phpt 062.phpt 063.phpt 065.phpt 069.phpt 072.phpt 073.phpt 074.phpt bug28817.phpt bug31141.phpt bug31668.phpt bug32405.phpt bug33263.phpt bug34785.phpt bug35517.phpt bug36745.phpt connect.inc skipif.inc Log: added unicode support for mysqli extension -- Wbr, Antony Dovgal -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
Are you sure? Are you fixing 5.2 build in 6.0 CVS??? Dmitry. > -Original Message- > From: Michael Wallner [mailto:[EMAIL PROTECTED] > Sent: Monday, July 10, 2006 5:08 PM > To: php-cvs@lists.php.net > Subject: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c > > > mike Mon Jul 10 13:08:11 2006 UTC > > Modified files: > /php-src/ext/mysqli mysqli.c > Log: > - fix 5.2 build > > http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1 > .94&r2=1.95&diff_format=u > Index: php-src/ext/mysqli/mysqli.c > diff -u php-src/ext/mysqli/mysqli.c:1.94 > php-src/ext/mysqli/mysqli.c:1.95 > --- php-src/ext/mysqli/mysqli.c:1.94 Mon Jul 10 13:02:31 2006 > +++ php-src/ext/mysqli/mysqli.c Mon Jul 10 13:08:11 2006 > @@ -15,7 +15,7 @@ >| Author: Georg Richter <[EMAIL PROTECTED]> > | > > +- > -+ > > - $Id: mysqli.c,v 1.94 2006/07/10 13:02:31 tony2001 Exp $ > + $Id: mysqli.c,v 1.95 2006/07/10 13:08:11 mike Exp $ > */ > > #ifdef HAVE_CONFIG_H > @@ -255,7 +255,7 @@ > } > > if (ret == SUCCESS) { > - if (strcmp(obj->zo.ce->name.s, "mysqli_driver") && > + if (strcmp(obj->zo.ce->name, "mysqli_driver") && > (!obj->ptr || ((MYSQLI_RESOURCE > *)(obj->ptr))->status < MYSQLI_STATUS_INITIALIZED)) { > php_error_docref(NULL TSRMLS_CC, > E_WARNING, "Couldn't fetch %s", obj->zo.ce->name ); > retval = EG(uninitialized_zval_ptr); > @@ -359,7 +359,7 @@ > } 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_warning_construct); > + f.handler = ZEND_MN(mysqli_warning___construct); > } > > return (union _zend_function*)&f; > @@ -387,7 +387,7 @@ > mysqli_base_class = mysqli_base_class->parent; > } > > - zend_hash_find(&classes, mysqli_base_class->name.s, > mysqli_base_class->name_length + 1, > + zend_hash_find(&classes, mysqli_base_class->name, > +mysqli_base_class->name_length + 1, > (void **) > &intern->prop_handler); > > zend_object_std_init(&intern->zo, class_type TSRMLS_CC); > @@ -506,33 +506,33 @@ > ce = mysqli_driver_class_entry; > zend_hash_init(&mysqli_driver_properties, 0, NULL, NULL, 1); > MYSQLI_ADD_PROPERTIES(&mysqli_driver_properties, > mysqli_driver_property_entries); > - zend_hash_add(&classes, ce->name.s, ce->name_length+1, > &mysqli_driver_properties, sizeof(mysqli_driver_properties), NULL); > + zend_hash_add(&classes, ce->name, ce->name_length+1, > +&mysqli_driver_properties, sizeof(mysqli_driver_properties), NULL); > ce->ce_flags |= ZEND_ACC_FINAL_CLASS; > > REGISTER_MYSQLI_CLASS_ENTRY("mysqli", > mysqli_link_class_entry, mysqli_link_methods); > ce = mysqli_link_class_entry; > zend_hash_init(&mysqli_link_properties, 0, NULL, NULL, 1); > MYSQLI_ADD_PROPERTIES(&mysqli_link_properties, > mysqli_link_property_entries); > - zend_hash_add(&classes, ce->name.s, ce->name_length+1, > &mysqli_link_properties, sizeof(mysqli_link_properties), NULL); > + zend_hash_add(&classes, ce->name, ce->name_length+1, > +&mysqli_link_properties, sizeof(mysqli_link_properties), NULL); > > REGISTER_MYSQLI_CLASS_ENTRY("mysqli_warning", > mysqli_warning_class_entry, mysqli_warning_methods); > ce = mysqli_warning_class_entry; > ce->ce_flags |= ZEND_ACC_FINAL_CLASS | ZEND_ACC_PROTECTED; > zend_hash_init(&mysqli_warning_properties, 0, NULL, NULL, 1); > MYSQLI_ADD_PROPERTIES(&mysqli_warning_properties, > mysqli_warning_property_entries); > - zend_hash_add(&classes, ce->name.s, ce->name_length+1, > &mysqli_warning_properties, sizeof(mysqli_warning_properties), NULL); > + zend_hash_add(&classes, ce->name, ce->name_length+1, > +&mysqli_warning_properties, sizeof(mysqli_warning_properties), NULL); > > REGISTER_MYSQLI_CLASS_ENTRY("mysqli_result", > mysqli_result_class_entry, mysqli_result_methods); > ce = mysqli_result_class_entry; > zend_hash_init(&mysqli_result_properties, 0, NULL, NULL, 1); > MYSQLI_ADD_PROPERTIES(&mysqli_result_properties, > mysqli_result_property_entries); > - zend_hash_add(&classes, ce->name.s, ce->name_length+1, > &mysqli_result_properties, sizeof(mysqli_result_properties), NULL); > + zend_hash_add(&classes, ce->name, ce->name_length+1, > +&mysqli_result_properties, sizeof(mysqli_result_properties), NULL); > > REGISTER_MYSQLI_CLASS_ENTRY("mysqli_stmt", > mysqli_stmt_class_entry, mysqli_stmt_methods); > ce = mysqli_stmt_class_entry; > zend_hash_init(&mysqli_stmt_pro
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c mysqli_warning.c php_mysqli.h
Hi Georg, After your change that eliminated ZEND_FUNCTION(mysqli_warning_construct), mysqli no longer compiles, since it tries to alias that function inside mysqli_fe.c Ilia -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
Am Sa, den 08.01.2005 schrieb Derick Rethans um 0:45: > On Fri, 7 Jan 2005, Georg Richter wrote: > > > PHP_MSHUTDOWN_FUNCTION(mysqli) > > { > > -// zend_hash_destroy(&mysqli_driver_properties); > > + zend_hash_destroy(&mysqli_driver_properties); > > + zend_hash_destroy(&mysqli_driver_properties); No, that is fixed already - but not checked in. Still waiting for Sebastian Bergmanns reply - I also fixed some Win32 compiler bugs. Will checkin later today. /Georg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
On Fri, 7 Jan 2005, Georg Richter wrote: > PHP_MSHUTDOWN_FUNCTION(mysqli) > { > -// zend_hash_destroy(&mysqli_driver_properties); > + zend_hash_destroy(&mysqli_driver_properties); > + zend_hash_destroy(&mysqli_driver_properties); Should it be there twice? regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c /ext/mysqli/tests bug30967.phpt
Am Fr, den 03.12.2004 schrieb [EMAIL PROTECTED] um 9:31: > Hi Georg, > > Would such a fix (in combination with the fix for #28430) also fix the problem > described in #28817 (http://bugs.php.net/bug.php?id=28817)? > Bug #28817 is fixed in CVS now (mysqli part). I sent a patch to Rob for ext/dom. /Georg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c /ext/mysqli/tests bug30967.phpt
Am Fr, den 03.12.2004 schrieb [EMAIL PROTECTED] um 9:31: Hi! > Would such a fix (in combination with the fix for #28430) also fix the problem > described in #28817 (http://bugs.php.net/bug.php?id=28817)? > No, sorry. I have a fix already for that, but it works in HEAD only, not in 5_0 branch (for dom and mysqli). Will still need some time. /Georg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c /ext/mysqli/tests bug30967.phpt
Hi Georg, Would such a fix (in combination with the fix for #28430) also fix the problem described in #28817 (http://bugs.php.net/bug.php?id=28817)? Kind regards, David Quoting Georg Richter <[EMAIL PROTECTED]>: > georg Fri Dec 3 02:56:19 2004 EDT > > Added files: > /php-src/ext/mysqli/tests bug30967.phpt > > Modified files: > /php-src/ext/mysqli mysqli.c > Log: > Fixed bug #30967 (properties in extended mysqli classes don't work) > > > http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.52&r2=1.53&ty=u > Index: php-src/ext/mysqli/mysqli.c > diff -u php-src/ext/mysqli/mysqli.c:1.52 php-src/ext/mysqli/mysqli.c:1.53 > --- php-src/ext/mysqli/mysqli.c:1.52 Wed Aug 25 09:57:35 2004 > +++ php-src/ext/mysqli/mysqli.c Fri Dec 3 02:56:18 2004 > @@ -15,7 +15,7 @@ >| Author: Georg Richter <[EMAIL PROTECTED]> > | >+--+ > > - $Id: mysqli.c,v 1.52 2004/08/25 13:57:35 georg Exp $ > + $Id: mysqli.c,v 1.53 2004/12/03 07:56:18 georg Exp $ > */ > > #ifdef HAVE_CONFIG_H > @@ -310,7 +310,7 @@ > zend_object_value retval; > mysqli_object *intern; > zval *tmp; > - zend_class_entry *parent; > + zend_class_entry *mysqli_base_class; > > intern = emalloc(sizeof(mysqli_object)); > memset(intern, 0, sizeof(mysqli_object)); > @@ -320,11 +320,14 @@ > intern->ptr = NULL; > intern->valid = 0; > intern->prop_handler = NULL; > - if ((parent = class_type->parent)) > + > + mysqli_base_class = class_type; > + while (mysqli_base_class->type != ZEND_INTERNAL_CLASS && > mysqli_base_class->parent != NULL) > { > - zend_hash_find(&classes, parent->name, parent->name_length + 1, > (void **) > &intern->prop_handler); > + mysqli_base_class = mysqli_base_class->parent; > } > - zend_hash_find(&classes, class_type->name, class_type->name_length + 1, > (void **) &intern->prop_handler); > + zend_hash_find(&classes, mysqli_base_class->name, > mysqli_base_class->name_length + 1, > + (void **) &intern->prop_handler); > > ALLOC_HASHTABLE(intern->zo.properties); > zend_hash_init(intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0); > > http://cvs.php.net/co.php/php-src/ext/mysqli/tests/bug30967.phpt?r=1.1&p=1 > Index: php-src/ext/mysqli/tests/bug30967.phpt > +++ php-src/ext/mysqli/tests/bug30967.phpt > --TEST-- > Bug #30967 testcase (properties) > --FILE-- >include "connect.inc"; > > class mysql1 extends mysqli { > } > > class mysql2 extends mysql1 { > } > > $mysql = new mysql2("localhost", "root", "", "test"); > > $mysql->query("THIS DOES NOT WORK"); > printf("%d\n", $mysql->errno); > > $mysql->close(); > ?> > --EXPECTF-- > 1064 > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > This message was sent using IMP, the Internet Messaging Program. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
Am Mi, den 04.08.2004 schrieb Derick Rethans um 15:02: Him > > +MYSQL *p; > > + > > What's this? :) > That's modern coding style :) Thx, I didn't delete all lines from a debug macro before - it's fixed now! /Georg -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
On Wed, 4 Aug 2004, Georg Richter wrote: > georg Wed Aug 4 08:59:09 2004 EDT > > Modified files: > /php-src/ext/mysqli mysqli.c > Log: > fixed properties when connect wasn't called > > > +MYSQL *p; > + What's this? :) Derick -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php