~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_class.cc

  • Committer: Brian Aker
  • Date: 2008-08-16 22:34:15 UTC
  • mto: This revision was merged to the branch mainline in revision 346.
  • Revision ID: brian@tangent.org-20080816223415-n24esdpfcqi4pwpy
Refactor around classes. TABLE_LIST has been factored out of table.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
1056
1056
 
1057
1057
/* add table to list of changed in transaction tables */
1058
1058
 
1059
 
void THD::add_changed_table(TABLE *table)
 
1059
void THD::add_changed_table(Table *table)
1060
1060
{
1061
1061
  assert((options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
1062
1062
              table->file->has_transactions());
1691
1691
            If this file is later loaded using this sequence of commands:
1692
1692
            
1693
1693
            mysql> create table t1 (a varchar(128)) character set big5;
1694
 
            mysql> LOAD DATA INFILE 'dump.txt' INTO TABLE t1;
 
1694
            mysql> LOAD DATA INFILE 'dump.txt' INTO Table t1;
1695
1695
            
1696
1696
            then 0x5C will be misinterpreted as the second byte
1697
1697
            of a multi-byte character "0xEE + 0x5C", instead of
2467
2467
 */
2468
2468
 
2469
2469
template <class RowsEventT> Rows_log_event* 
2470
 
THD::binlog_prepare_pending_rows_event(TABLE* table, uint32_t serv_id,
 
2470
THD::binlog_prepare_pending_rows_event(Table* table, uint32_t serv_id,
2471
2471
                                       size_t needed,
2472
2472
                                       bool is_transactional,
2473
2473
                                       RowsEventT *hint __attribute__((unused)))
2543
2543
  compiling option.
2544
2544
*/
2545
2545
template Rows_log_event*
2546
 
THD::binlog_prepare_pending_rows_event(TABLE*, uint32_t, size_t, bool,
 
2546
THD::binlog_prepare_pending_rows_event(Table*, uint32_t, size_t, bool,
2547
2547
                                       Write_rows_log_event*);
2548
2548
 
2549
2549
template Rows_log_event*
2550
 
THD::binlog_prepare_pending_rows_event(TABLE*, uint32_t, size_t, bool,
 
2550
THD::binlog_prepare_pending_rows_event(Table*, uint32_t, size_t, bool,
2551
2551
                                       Delete_rows_log_event *);
2552
2552
 
2553
2553
template Rows_log_event* 
2554
 
THD::binlog_prepare_pending_rows_event(TABLE*, uint32_t, size_t, bool,
 
2554
THD::binlog_prepare_pending_rows_event(Table*, uint32_t, size_t, bool,
2555
2555
                                       Update_rows_log_event *);
2556
2556
#endif
2557
2557
 
2583
2583
      @param length
2584
2584
      Length of data that is needed, if the record contain blobs.
2585
2585
     */
2586
 
    Row_data_memory(TABLE *table, size_t const len1)
 
2586
    Row_data_memory(Table *table, size_t const len1)
2587
2587
      : m_memory(0)
2588
2588
    {
2589
2589
      m_alloc_checked= false;
2592
2592
      m_ptr[1]= 0;
2593
2593
    }
2594
2594
 
2595
 
    Row_data_memory(TABLE *table, size_t const len1, size_t const len2)
 
2595
    Row_data_memory(Table *table, size_t const len1, size_t const len2)
2596
2596
      : m_memory(0)
2597
2597
    {
2598
2598
      m_alloc_checked= false;
2627
2627
    }
2628
2628
 
2629
2629
  private:
2630
 
    void allocate_memory(TABLE *const table, size_t const total_length)
 
2630
    void allocate_memory(Table *const table, size_t const total_length)
2631
2631
    {
2632
2632
      if (table->s->blob_fields == 0)
2633
2633
      {
2669
2669
}
2670
2670
 
2671
2671
 
2672
 
int THD::binlog_write_row(TABLE* table, bool is_trans, 
 
2672
int THD::binlog_write_row(Table* table, bool is_trans, 
2673
2673
                          uchar const *record) 
2674
2674
2675
2675
  assert(current_stmt_binlog_row_based && mysql_bin_log.is_open());
2696
2696
  return ev->add_row_data(row_data, len);
2697
2697
}
2698
2698
 
2699
 
int THD::binlog_update_row(TABLE* table, bool is_trans,
 
2699
int THD::binlog_update_row(Table* table, bool is_trans,
2700
2700
                           const uchar *before_record,
2701
2701
                           const uchar *after_record)
2702
2702
2730
2730
    ev->add_row_data(after_row, after_size);
2731
2731
}
2732
2732
 
2733
 
int THD::binlog_delete_row(TABLE* table, bool is_trans, 
 
2733
int THD::binlog_delete_row(Table* table, bool is_trans, 
2734
2734
                           uchar const *record)
2735
2735
2736
2736
  assert(current_stmt_binlog_row_based && mysql_bin_log.is_open());