List:General Discussion« Previous MessageNext Message »
From:Wolfgang Suttrop Date:September 10 1999 3:04pm
Subject:xmysqladmin-1.0 - browse tables with more than 80 columns
View as plain text  
Hello!

I found that xmysqladmin-1.0 crashes when trying to browse a mysql table
with more than 80 columns. The reason is apparently that browsetable_setOrder() in
browseTable.c doesn't care about xforms' maximum number of choice items
(FL_CHOICE_MAXITEMS constant, defined in xforms/FORMS/forms.h).
As it turns out xforms 0.88 accepts one item less than
FL_CHOICE_MAXITEMS says.
Please find a patch (diff of browseTable.c) attached which limits the
number of entries and prevents xmysqladmin from crashing
(but unfortunately does not allow to use columns 79+ for sorting).
I haven't yet browsed through xmysqladmin to check for more potential
choice list overflows.

Greetings,
Wolfgang Suttrop

---
Wolfgang Suttrop                Suttrop@stripped
Max-Planck-Institut fuer        http://www.ipp.mpg.de/~Wolfgang.Suttrop
Plasmaphysik, D-85748 Garching  Phone: +49 (89) 3299-1466, FAX: -2580

197a198
>    int n = 1;   /* items counter */
208,209c209,210
<    {
<       if(cur->type < 13 || cur->type > 15) /* refuse les blob */
---
>      {        /* refuse les blob */
>       if((cur->type < 13 || cur->type > 15) && ++n < FL_CHOICE_MAXITEMS ) 
Thread
xmysqladmin-1.0 - browse tables with more than 80 columnsWolfgang Suttrop10 Sep
  • Re: xmysqladmin-1.0 - browse tables with more than 80 columnsTommie M. Jones10 Sep
    • Re: xmysqladmin-1.0 - browse tables with more than 80 columnsMichael Widenius15 Sep