Hi all!
What do our decent developers think of Bug #731866 and #731367? I didn't notice that before and face some of those problems myself. But, to be honest, I don't have a clue about what's going on...
Garvin Hicking a écrit:
Hi all!
What do our decent developers think of Bug #731866 and #731367? I didn't notice that before and face some of those problems myself. But, to be honest, I don't have a clue about what's going on...
Garvin,
I checked bug 731866. The problem is that we are using PMA_mysql_field_type(), which returns 'blob' when field type is 'text'.
libraries/build_dump.lib.php3 is the only place we use PMA_mysql_field_type().
In fact, in phpMyAdmin we always avoided using mysql_field_type(), because of this problem.
See in tbl_change.php3, how we set $is_blob, with "SHOW FIELDS FROM...". We are using "SHOW FIELDS" in a lot of places.
So maybe remove PMA_mysql_field_type() and do a generic PMA_get_field_type() which does not use mysql_field_type().
Marc
Hi Marc!
I checked bug 731866. The problem is that we are using PMA_mysql_field_type(), which returns 'blob' when field type is 'text'.
libraries/build_dump.lib.php3 is the only place we use PMA_mysql_field_type().
In fact, in phpMyAdmin we always avoided using mysql_field_type(), because of this problem.
See in tbl_change.php3, how we set $is_blob, with "SHOW FIELDS FROM...". We are using "SHOW FIELDS" in a lot of places.
So maybe remove PMA_mysql_field_type() and do a generic PMA_get_field_type() which does not use mysql_field_type().
Ah, thanks for investigating that. As I'm not familar with that issue and I don't want to seriously cause inconsitencys, who's willing to do this? I think using a generic get_field_type sounds got...
Regards, Garvin.
Garvin Hicking a écrit:
Hi Marc!
I checked bug 731866. The problem is that we are using PMA_mysql_field_type(), which returns 'blob' when field type is 'text'.
libraries/build_dump.lib.php3 is the only place we use PMA_mysql_field_type().
In fact, in phpMyAdmin we always avoided using mysql_field_type(), because of this problem.
See in tbl_change.php3, how we set $is_blob, with "SHOW FIELDS FROM...". We are using "SHOW FIELDS" in a lot of places.
So maybe remove PMA_mysql_field_type() and do a generic PMA_get_field_type() which does not use mysql_field_type().
Ah, thanks for investigating that. As I'm not familar with that issue and I don't want to seriously cause inconsitencys, who's willing to do this? I think using a generic get_field_type sounds got...
I had a quick look. Doing a generic function would be easy, but in this case, PMA_getTableContent() can have an optional $sql_query, so maybe it's not just a question of getting the type when we know the db name and table name.
Still thinking about it...
Marc
Marc Delisle a écrit:
Garvin Hicking a écrit:
Hi Marc!
I checked bug 731866. The problem is that we are using PMA_mysql_field_type(), which returns 'blob' when field type is 'text'.
libraries/build_dump.lib.php3 is the only place we use PMA_mysql_field_type().
In fact, in phpMyAdmin we always avoided using mysql_field_type(), because of this problem.
See in tbl_change.php3, how we set $is_blob, with "SHOW FIELDS FROM...". We are using "SHOW FIELDS" in a lot of places.
So maybe remove PMA_mysql_field_type() and do a generic PMA_get_field_type() which does not use mysql_field_type().
Ah, thanks for investigating that. As I'm not familar with that issue and I don't want to seriously cause inconsitencys, who's willing to do this? I think using a generic get_field_type sounds got...
I had a quick look. Doing a generic function would be easy, but in this case, PMA_getTableContent() can have an optional $sql_query, so maybe it's not just a question of getting the type when we know the db name and table name.
Still thinking about it...
Marc
Instead of PMA_get_field_type(), it would be more efficient to call a PMA_get_fields($db, $table) or something, just once for a table, which returns an array with field names and types.
Do we already have this? :)
Marc
Marc Delisle wrote:
Marc Delisle a écrit:
Garvin Hicking a écrit:
Hi Marc!
I checked bug 731866. The problem is that we are using PMA_mysql_field_type(), which returns 'blob' when field type is 'text'.
libraries/build_dump.lib.php3 is the only place we use PMA_mysql_field_type().
In fact, in phpMyAdmin we always avoided using mysql_field_type(), because of this problem.
See in tbl_change.php3, how we set $is_blob, with "SHOW FIELDS FROM...". We are using "SHOW FIELDS" in a lot of places.
So maybe remove PMA_mysql_field_type() and do a generic PMA_get_field_type() which does not use mysql_field_type().
Ah, thanks for investigating that. As I'm not familar with that issue and I don't want to seriously cause inconsitencys, who's willing to do this? I think using a generic get_field_type sounds got...
I had a quick look. Doing a generic function would be easy, but in this case, PMA_getTableContent() can have an optional $sql_query, so maybe it's not just a question of getting the type when we know the db name and table name.
Still thinking about it...
Marc
Instead of PMA_get_field_type(), it would be more efficient to call a PMA_get_fields($db, $table) or something, just once for a table, which returns an array with field names and types.
Do we already have this? :)
Done in the cvs. One commit still pending for the case of older PHP versions.
Marc