~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to sql/sql_handler.cc

Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
  }
107
107
  tables->table=table;
108
108
 
109
 
  if (cond && cond->fix_fields(thd,tables))
 
109
  if (cond && cond->fix_fields(thd, tables, &cond))
110
110
    return -1;
111
111
 
112
112
  if (keyname)
180
180
      Item *item;
181
181
      for (key_len=0 ; (item=it_ke++) ; key_part++)
182
182
      {
183
 
        item->save_in_field(key_part->field);
 
183
        (void) item->save_in_field(key_part->field);
184
184
        key_len+=key_part->store_length;
185
185
      }
186
186
      if (!(key= (byte*) sql_calloc(ALIGN_SIZE(key_len))))
271
271
  for (TABLE *table=*ptr; table ; table=*ptr)
272
272
  {
273
273
    if (!memcmp(table->table_cache_key, db, dblen) &&
274
 
        !my_strcasecmp(table->table_name,table_name))
 
274
        !my_strcasecmp(system_charset_info,table->table_name,table_name))
275
275
      break;
276
276
    ptr=&(table->next);
277
277
  }