~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/field.cc

  • Committer: Brian Aker
  • Date: 2011-01-18 00:26:36 UTC
  • mfrom: (2085.2.3 alter-table)
  • Revision ID: brian@tangent.org-20110118002636-mfyvnv58auvqr5gc
First pass on fix for UTF-8, this checks all of our schema names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
319
319
bool Item_field::val_bool_result()
320
320
{
321
321
  if ((null_value= result_field->is_null()))
 
322
  {
322
323
    return false;
 
324
  }
 
325
 
323
326
  switch (result_field->result_type()) {
324
327
  case INT_RESULT:
325
328
    return result_field->val_int() != 0;
366
369
    (In cases where we would choose wrong we would have to generate a
367
370
    ER_NON_UNIQ_ERROR).
368
371
  */
369
 
  return (!my_strcasecmp(system_charset_info, item_field->name,
370
 
                         field_name) &&
371
 
          (!item_field->table_name || !table_name ||
372
 
           (!my_strcasecmp(table_alias_charset, item_field->table_name,
373
 
                           table_name) &&
374
 
            (!item_field->db_name || !db_name ||
375
 
             (item_field->db_name && !strcasecmp(item_field->db_name,
376
 
                                             db_name))))));
 
372
  return (not my_strcasecmp(system_charset_info, item_field->name, field_name) &&
 
373
          (not item_field->table_name || not table_name ||
 
374
           (not my_strcasecmp(table_alias_charset, item_field->table_name, table_name) &&
 
375
            (not item_field->db_name || not db_name ||
 
376
             (item_field->db_name && not my_strcasecmp(system_charset_info, item_field->db_name, db_name))))));
377
377
}
378
378
 
379
379
 
380
380
table_map Item_field::used_tables() const
381
381
{
382
382
  if (field->getTable()->const_table)
 
383
  {
383
384
    return 0;                                   // const item
 
385
  }
 
386
 
384
387
  return (depended_from ? OUTER_REF_TABLE_BIT : field->getTable()->map);
385
388
}
386
389