# Fwd: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c

- Thread: https://externals.io/message/9197
- Original archive: https://news-web.php.net/php.internals/9197
- Started by Andi Gutmans on 2004-04-15T17:28:22+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9197 — Andi Gutmans — 2004-04-15T17:28:22+00:00

URL: https://externals.io/message/9197#9197

Georg,

I held RC2 because I thought this was a critical engine bug. It happened 
because instead of not implementing `NULL` you implemented it without a body. 
Right now I changed it to `NULL` which means that any clone either via 
"clone" or compatibility_mode will result in an error message that MySQLi 
is not cloneable (no crash anymore).
Should I go ahead with RC2 right now or can you fix this in the very near 
future?

Andi

>From: "Andi Gutmans" <andi@php.net>
>To: php-cvs@lists.php.net
>Date: Thu, 15 Apr 2004 17:25:51 -0000
>Subject: [PHP-CVS] cvs: php-src /ext/mysqli mysqli.c
>
>andi            Thu Apr 15 13:25:51 2004 EDT
>
>   Modified files:
>     /php-src/ext/mysqli mysqli.c
>   Log:
>   - Temporary fix for bug #27869
>   - George, you need to implement clone in order for "clone" and
>   - compatibility mode to work.
>
>
>http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.37&r2=1.38&ty=u
>Index: php-src/ext/mysqli/mysqli.c
>diff -u php-src/ext/mysqli/mysqli.c:1.37 php-src/ext/mysqli/mysqli.c:1.38
>--- php-src/ext/mysqli/mysqli.c:1.37    Sun Mar 21 13:27:23 2004
>+++ php-src/ext/mysqli/mysqli.c Thu Apr 15 13:25:51 2004
>@@ -15,7 +15,7 @@
>    | Author: Georg Richter <georg@php.net>                                |
>    +----------------------------------------------------------------------+
>
>-  $Id: mysqli.c,v 1.37 2004/03/21 18:27:23 stas Exp $
>+  $Id: mysqli.c,v 1.38 2004/04/15 17:25:51 andi Exp $
>  */
>
>  #ifdef HAVE_CONFIG_H
>@@ -280,7 +280,7 @@
>         zend_hash_copy(intern->zo.properties, 
> &class_type->default_properties, (copy_ctor_func_t) zval_add_ref,
>                                         (void *) &tmp, sizeof(zval *));
>
>-       retval.handle = zend_objects_store_put(intern, NULL, 
>mysqli_objects_free_storage, mysqli_objects_clone TSRMLS_CC);
>+       retval.handle = zend_objects_store_put(intern, NULL, 
>mysqli_objects_free_storage, `NULL` /*mysqli_objects_clone*/ TSRMLS_CC);
>         retval.handlers = &mysqli_object_handlers;
>
>         return retval;
>@@ -353,7 +353,7 @@
>         REGISTER_INI_ENTRIES();
>
>         memcpy(&mysqli_object_handlers, zend_get_std_object_handlers(), 
> sizeof(zend_object_handlers));
>-       mysqli_object_handlers.clone_obj = zend_objects_store_clone_obj;
>+       mysqli_object_handlers.clone_obj = `NULL` 
>/*zend_objects_store_clone_obj*/;
>         mysqli_object_handlers.read_property = mysqli_read_property;
>         mysqli_object_handlers.write_property = mysqli_write_property;
>         mysqli_object_handlers.get_property_ptr_ptr = NULL;
>
>--
>PHP CVS Mailing List (http://www.php.net/)

---

## #9202 — Adam Maccabee Trachtenberg — 2004-04-15T18:09:39+00:00

URL: https://externals.io/message/9197#9202 · In reply to: #9197

> I held RC2 because I thought this was a critical engine bug. It happened
> because instead of not implementing `NULL` you implemented it without a body.
> Right now I changed it to `NULL` which means that any clone either via
> "clone" or compatibility_mode will result in an error message that MySQLi
> is not cloneable (no crash anymore).
> Should I go ahead with RC2 right now or can you fix this in the very near
> future?

FYI: the MySQL Conference started yesterday. I don't know if Georg is
there, but it may be busy if he is.

-adam

-- 
adam@trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!

---

## #9205 — Andi Gutmans — 2004-04-15T18:14:00+00:00

URL: https://externals.io/message/9197#9205 · In reply to: #9197

At 02:09 PM 4/15/2004 -0400, Adam Maccabee Trachtenberg wrote:
>
>
> > […]
>
>FYI: the MySQL Conference started yesterday. I don't know if Georg is
>there, but it may be busy if he is.

Personally, I think we can roll RC2 with the way the tree is now. The fact 
that MySQLi isn't cloneable isn't a big deal because:
a) It's a new PHP 5 feature which is most likely not run in 
zend.zend1_compatibility_mode
b) If explicit "clone" isn't supported, that's fine. An extension doesn't 
have to be cloneable.

Andi

---

## #9207 — Adam Maccabee Trachtenberg — 2004-04-15T18:15:58+00:00

URL: https://externals.io/message/9197#9207 · In reply to: #9205

> Personally, I think we can roll RC2 with the way the tree is now. The fact
> that MySQLi isn't cloneable isn't a big deal because:
> a) It's a new PHP 5 feature which is most likely not run in
> zend.zend1_compatibility_mode
> b) If explicit "clone" isn't supported, that's fine. An extension doesn't
> have to be cloneable.

c) MySQL 4.1 is still alpha, so nobody should be relying on it for
production use anyway.

-adam

-- 
adam@trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!

---

## #9209 — Andrey Hristov — 2004-04-15T18:30:03+00:00

URL: https://externals.io/message/9197#9209 · In reply to: #9202

Adam Maccabee Trachtenberg wrote:
> 
> 
> 
> > […]
> 
> 
> FYI: the MySQL Conference started yesterday. I don't know if Georg is
> there, but it may be busy if he is.

No, he is not at the conference but is really busy. AFAIK some of the OO stuff was done by 
Marcus, so maybe he can volunteer.

Andrey
