[Phpmyadmin-devel] Bug in Ajax table Structure column Change

Thilanka Kaushalya lgtkaushalya at gmail.com
Fri Aug 19 07:57:22 CEST 2011


Hi Marc,

I found the place where this issue generates. When we try click on
Table->Structure->Column->Change link it goes to the tbl_alter.php file and
within that the "append_fields_form" is process by using
tbl_properties.inc.php file. At line number 325 in tbl_properties.inc.php
"PMA_getSupportedDatatypes(true, $type_upper);" function is call to get the
table type select options.

You can find at line 3118 in "PMA_getSupportedDatatypes(true, $type_upper);"
the option selection is set as
*if ($selected == $value) {*
*                    $retval .= "<option
selected='selected'>$value</option>";*
*                } else {*
*                    $retval .= "<option>$value</option>";*
*                }*
 But if you use an echo you can see that *$selected contains *VARCHAR(45) as
the value and *$value contains *VARCHAR as the value. So when we try to edit
the tables which are having VARCHAR type columns it does not select the
value at the options.

I can modify the logic by splitting the *$selected *by "(" and solve the
issue. Is there any better solution you can suggest. If there any please let
me know. Thank you.

Regards,
Thilanka.

-- 
L G Thilanka Kaushalya
Computer Science & Engineering,
University of Moratuwa,
Sri Lanka

Connect with me at,
      Gmail        : lgtkaushalya at gmail.com
      Twitter       : @thilanka_k
      Facebook  : Thilanka Kaushalya
      Yahoo       : lgtkaushalya at yahoo.com
      Blog          : http://coders-view.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110819/6bf69409/attachment.html>


More information about the Developers mailing list