~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

Merge Siddharth

Show diffs side-by-side

added added

removed removed

Lines of Context:
1672
1672
      my_error(ER_NO_SUCH_TABLE, MYF(0), db.str, table_name.str);
1673
1673
    else
1674
1674
    {
1675
 
      sprintf(buff,"%s",normalized_path.str);
 
1675
      snprintf(buff, sizeof(buff), "%s",normalized_path.str);
1676
1676
      my_error((db_errno == EMFILE) ? ER_CANT_OPEN_FILE : ER_FILE_NOT_FOUND,
1677
1677
               errortype, buff, db_errno);
1678
1678
    }
1692
1692
    }
1693
1693
    err_no= (db_errno == ENOENT) ? ER_FILE_NOT_FOUND : (db_errno == EAGAIN) ?
1694
1694
      ER_FILE_USED : ER_CANT_OPEN_FILE;
1695
 
    sprintf(buff,"%s%s", normalized_path.str,datext);
 
1695
    snprintf(buff, sizeof(buff), "%s%s", normalized_path.str,datext);
1696
1696
    my_error(err_no,errortype, buff, db_errno);
1697
1697
    delete cursor;
1698
1698
    break;
1712
1712
    break;
1713
1713
  }
1714
1714
  case 6:
1715
 
    sprintf(buff,"%s", normalized_path.str);
 
1715
    snprintf(buff, sizeof(buff), "%s", normalized_path.str);
1716
1716
    my_printf_error(ER_NOT_FORM_FILE,
1717
1717
                    _("Table '%-.64s' was created with a different version "
1718
1718
                    "of Drizzle and cannot be read"),
1722
1722
    break;
1723
1723
  default:                              /* Better wrong error than none */
1724
1724
  case 4:
1725
 
    sprintf(buff,"%s", normalized_path.str);
 
1725
    snprintf(buff, sizeof(buff), "%s", normalized_path.str);
1726
1726
    my_error(ER_NOT_FORM_FILE, errortype, buff, 0);
1727
1727
    break;
1728
1728
  }