~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

Rename of handler to Cursor.  You would not believe how long I have wanted
to do that.

Show diffs side-by-side

added added

removed removed

Lines of Context:
420
420
 
421
421
  SYNOPSIS
422
422
    mysql_rm_table_part2()
423
 
    session                     Thread handler
 
423
    session                     Thread Cursor
424
424
    tables              Tables to drop
425
425
    if_exists           If set, don't give an error if table doesn't exists.
426
426
                        In this case we give an warning of level 'NOTE'
427
427
    drop_temporary      Only drop temporary tables
428
428
    dont_log_query      Don't write query to log files. This will also not
429
 
                        generate warnings if the handler files doesn't exists
 
429
                        generate warnings if the Cursor files doesn't exists
430
430
 
431
431
  TODO:
432
432
    When logging to the binary log, we should log
831
831
                               AlterInfo *alter_info,
832
832
                               bool tmp_table,
833
833
                               uint32_t *db_options,
834
 
                               handler *file,
 
834
                               Cursor *file,
835
835
                               KEY **key_info_buffer,
836
836
                               uint32_t *key_count,
837
837
                               int select_field_count)
1597
1597
  uint32_t          path_length;
1598
1598
  uint          db_options, key_count;
1599
1599
  KEY           *key_info_buffer;
1600
 
  handler       *file;
 
1600
  Cursor        *file;
1601
1601
  bool          error= true;
1602
1602
  /* Check for duplicate fields and check type of table to create */
1603
1603
  if (!alter_info->create_list.elements)
1614
1614
    db_options|=HA_OPTION_PACK_RECORD;
1615
1615
  if (!(file= create_info->db_type->getCursor((TableShare*) 0, session->mem_root)))
1616
1616
  {
1617
 
    my_error(ER_OUTOFMEMORY, MYF(0), sizeof(handler));
 
1617
    my_error(ER_OUTOFMEMORY, MYF(0), sizeof(Cursor));
1618
1618
    return true;
1619
1619
  }
1620
1620
 
1946
1946
 
1947
1947
  SYNOPSIS
1948
1948
    wait_while_table_is_used()
1949
 
    session                     Thread handler
 
1949
    session                     Thread Cursor
1950
1950
    table               Table to remove from cache
1951
1951
    function            HA_EXTRA_PREPARE_FOR_DROP if table is to be deleted
1952
1952
                        HA_EXTRA_FORCE_REOPEN if table is not be used
1981
1981
 
1982
1982
  SYNOPSIS
1983
1983
    close_cached_table()
1984
 
    session                     Thread handler
 
1984
    session                     Thread Cursor
1985
1985
    table               Table to remove from cache
1986
1986
 
1987
1987
  NOTES
2025
2025
                              uint32_t extra_open_options,
2026
2026
                              int (*prepare_func)(Session *, TableList *,
2027
2027
                                                  HA_CHECK_OPT *),
2028
 
                              int (handler::*operator_func)(Session *,
 
2028
                              int (Cursor::*operator_func)(Session *,
2029
2029
                                                            HA_CHECK_OPT *))
2030
2030
{
2031
2031
  TableList *table;
2155
2155
      open_for_modify= 0;
2156
2156
    }
2157
2157
 
2158
 
    if (table->table->s->crashed && operator_func == &handler::ha_check)
 
2158
    if (table->table->s->crashed && operator_func == &Cursor::ha_check)
2159
2159
    {
2160
2160
      session->client->store(table_name);
2161
2161
      session->client->store(operator_name);
2350
2350
{
2351
2351
  return(mysql_admin_table(session, tables, check_opt,
2352
2352
                           "optimize", TL_WRITE, 1,0,0,0,
2353
 
                           &handler::ha_optimize));
 
2353
                           &Cursor::ha_optimize));
2354
2354
}
2355
2355
 
2356
2356
/*
2597
2597
 
2598
2598
  return(mysql_admin_table(session, tables, check_opt,
2599
2599
                                "analyze", lock_type, 1, 0, 0, 0,
2600
 
                                &handler::ha_analyze));
 
2600
                                &Cursor::ha_analyze));
2601
2601
}
2602
2602
 
2603
2603
 
2608
2608
  return(mysql_admin_table(session, tables, check_opt,
2609
2609
                                "check", lock_type,
2610
2610
                                0, 0, HA_OPEN_FOR_REPAIR, 0,
2611
 
                                &handler::ha_check));
 
2611
                                &Cursor::ha_check));
2612
2612
}
2613
2613
 
2614
2614
/*
2616
2616
 
2617
2617
  SYNOPSIS
2618
2618
    mysql_recreate_table()
2619
 
    session                     Thread handler
 
2619
    session                     Thread Cursor
2620
2620
    tables              Tables to recreate
2621
2621
 
2622
2622
 RETURN