~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 17:24:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326172457-vni09y22ktvvefmn
some more sprintf --> snprintf

Show diffs side-by-side

added added

removed removed

Lines of Context:
1746
1746
    char* db = table->db;
1747
1747
    bool fatal_error=0;
1748
1748
 
1749
 
    sprintf(table_name,"%s.%s",db,table->table_name);
 
1749
    snprintf(table_name, sizeof(table_name), "%s.%s",db,table->table_name);
1750
1750
    table->lock_type= lock_type;
1751
1751
    /* open only one table from local list of command */
1752
1752
    {
2256
2256
    char table_name[NAME_LEN*2+2];
2257
2257
    Table *t;
2258
2258
 
2259
 
    sprintf(table_name,"%s.%s",table->db,table->table_name);
 
2259
    snprintf(table_name, sizeof(table_name), "%s.%s",table->db,table->table_name);
2260
2260
 
2261
2261
    t= table->table= session->openTableLock(table, TL_READ);
2262
2262
    session->clear_error();                     // these errors shouldn't get client