~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.cc

Merge of show work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
696
696
 
697
697
inline
698
698
void
699
 
Cursor::mark_trx_read_write()
 
699
Cursor::setTransactionReadWrite()
700
700
{
701
 
  Ha_trx_info *ha_info= ha_session()->getEngineInfo(engine);
 
701
  ResourceContext *resource_context= ha_session()->getResourceContext(engine);
702
702
  /*
703
703
    When a storage engine method is called, the transaction must
704
704
    have been started, unless it's a DDL call, for which the
707
707
    Unfortunately here we can't know know for sure if the engine
708
708
    has registered the transaction or not, so we must check.
709
709
  */
710
 
  if (ha_info->is_started())
 
710
  if (resource_context->isStarted())
711
711
  {
712
 
      ha_info->set_trx_read_write();
 
712
    resource_context->markModifiedData();
713
713
  }
714
714
}
715
715
 
727
727
int
728
728
Cursor::ha_delete_all_rows()
729
729
{
730
 
  mark_trx_read_write();
 
730
  setTransactionReadWrite();
731
731
 
732
732
  int result= delete_all_rows();
733
733
 
757
757
int
758
758
Cursor::ha_reset_auto_increment(uint64_t value)
759
759
{
760
 
  mark_trx_read_write();
 
760
  setTransactionReadWrite();
761
761
 
762
762
  return reset_auto_increment(value);
763
763
}
772
772
int
773
773
Cursor::ha_analyze(Session* session, HA_CHECK_OPT*)
774
774
{
775
 
  mark_trx_read_write();
 
775
  setTransactionReadWrite();
776
776
 
777
777
  return analyze(session);
778
778
}
786
786
int
787
787
Cursor::ha_disable_indexes(uint32_t mode)
788
788
{
789
 
  mark_trx_read_write();
 
789
  setTransactionReadWrite();
790
790
 
791
791
  return disable_indexes(mode);
792
792
}
801
801
int
802
802
Cursor::ha_enable_indexes(uint32_t mode)
803
803
{
804
 
  mark_trx_read_write();
 
804
  setTransactionReadWrite();
805
805
 
806
806
  return enable_indexes(mode);
807
807
}
816
816
int
817
817
Cursor::ha_discard_or_import_tablespace(bool discard)
818
818
{
819
 
  mark_trx_read_write();
 
819
  setTransactionReadWrite();
820
820
 
821
821
  return discard_or_import_tablespace(discard);
822
822
}
830
830
void
831
831
Cursor::closeMarkForDelete(const char *name)
832
832
{
833
 
  mark_trx_read_write();
 
833
  setTransactionReadWrite();
834
834
 
835
835
  return drop_table(name);
836
836
}
1513
1513
    table->timestamp_field->set_time();
1514
1514
 
1515
1515
  DRIZZLE_INSERT_ROW_START(table_share->db.str, table_share->table_name.str);
1516
 
  mark_trx_read_write();
 
1516
  setTransactionReadWrite();
1517
1517
  error= write_row(buf);
1518
1518
  DRIZZLE_INSERT_ROW_DONE(error);
1519
1519
 
1540
1540
  assert(new_data == table->record[0]);
1541
1541
 
1542
1542
  DRIZZLE_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
1543
 
  mark_trx_read_write();
 
1543
  setTransactionReadWrite();
1544
1544
  error= update_row(old_data, new_data);
1545
1545
  DRIZZLE_UPDATE_ROW_DONE(error);
1546
1546
 
1560
1560
  int error;
1561
1561
 
1562
1562
  DRIZZLE_DELETE_ROW_START(table_share->db.str, table_share->table_name.str);
1563
 
  mark_trx_read_write();
 
1563
  setTransactionReadWrite();
1564
1564
  error= delete_row(buf);
1565
1565
  DRIZZLE_DELETE_ROW_DONE(error);
1566
1566