~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_show.cc

Merging stdize-code with main trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
        char *end;
250
250
        *ext=0;                                 /* Remove extension */
251
251
        unpack_dirname(buff, file->name);
252
 
        end= strend(buff);
 
252
        end= strchr(buff, '\0');
253
253
        if (end != buff && end[-1] == FN_LIBCHAR)
254
254
          end[-1]= 0;                           // Remove end FN_LIBCHAR
255
255
        if (stat(buff, file->mystat))
888
888
      packet->append(buff, (uint) (end - buff));
889
889
    }
890
890
 
891
 
    
892
 
    if (share->table_charset)
893
 
    {
894
 
      /*
895
 
        IF   check_create_info
896
 
        THEN add DEFAULT CHARSET only if it was used when creating the table
897
 
      */
898
 
      if (!create_info_arg ||
899
 
          (create_info_arg->used_fields & HA_CREATE_USED_DEFAULT_CHARSET))
900
 
      {
901
 
        packet->append(STRING_WITH_LEN(" DEFAULT CHARSET="));
902
 
        packet->append(share->table_charset->csname);
903
 
        if (!(share->table_charset->state & MY_CS_PRIMARY))
904
 
        {
905
 
          packet->append(STRING_WITH_LEN(" COLLATE="));
906
 
          packet->append(table->s->table_charset->name);
907
 
        }
908
 
      }
909
 
    }
910
 
 
911
891
    if (share->min_rows)
912
892
    {
913
893
      char *end;
1592
1572
        {
1593
1573
          SHOW_COMP_OPTION tmp= *(SHOW_COMP_OPTION*) value;
1594
1574
          pos= show_comp_option_name[(int) tmp];
1595
 
          end= strend(pos);
 
1575
          end= strchr(pos, '\0');
1596
1576
          break;
1597
1577
        }
1598
1578
        case SHOW_CHAR:
1599
1579
        {
1600
1580
          if (!(pos= value))
1601
1581
            pos= "";
1602
 
          end= strend(pos);
 
1582
          end= strchr(pos, '\0');
1603
1583
          break;
1604
1584
        }
1605
1585
       case SHOW_CHAR_PTR:
1606
1586
        {
1607
1587
          if (!(pos= *(char**) value))
1608
1588
            pos= "";
1609
 
          end= strend(pos);
 
1589
          end= strchr(pos, '\0');
1610
1590
          break;
1611
1591
        }
1612
1592
        case SHOW_KEY_CACHE_LONG: