~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/ha_commands.cc

Remove PLUGIN and MODULES.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  Handler-calling-functions
24
24
*/
25
25
 
26
 
#include "drizzled/server_includes.h"
27
 
#include "mysys/hash.h"
 
26
#include "config.h"
 
27
#include "drizzled/my_hash.h"
28
28
#include "drizzled/error.h"
29
29
#include "drizzled/gettext.h"
30
30
#include "drizzled/probes.h"
40
40
#include "drizzled/field/timestamp.h"
41
41
#include "drizzled/message/table.pb.h"
42
42
#include "drizzled/plugin/client.h"
 
43
#include "drizzled/internal/my_sys.h"
43
44
 
44
45
using namespace std;
45
46
using namespace drizzled;
57
58
  "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "PAGE", "?","?","?"
58
59
};
59
60
 
60
 
const char *tx_isolation_names[] =
61
 
{ "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE",
62
 
  NULL};
63
 
 
64
 
TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
65
 
                               tx_isolation_names, NULL};
66
61
 
67
62
 
68
63
/**
502
497
  else
503
498
    trans= &session->transaction.stmt;
504
499
 
505
 
  ha_info= session->ha_data[engine->getSlot()].ha_info + static_cast<unsigned>(all);
 
500
  ha_info= session->getEngineInfo(engine, all ? 1 : 0);
506
501
 
507
502
  if (ha_info->is_started())
508
503
    return; /* already registered, return */
511
506
 
512
507
  trans->no_2pc|= not engine->has_2pc();
513
508
  if (session->transaction.xid_state.xid.is_null())
514
 
    session->transaction.xid_state.xid.set(session->query_id);
 
509
    session->transaction.xid_state.xid.set(session->getQueryId());
515
510
}
516
511
 
517
512
/**
544
539
 
545
540
    if (! all)
546
541
    {
547
 
      Ha_trx_info *ha_info_all= &session->ha_data[ha_info->engine()->getSlot()].ha_info[1];
 
542
      Ha_trx_info *ha_info_all= session->getEngineInfo(ha_info->engine(), 1);
548
543
      assert(ha_info != ha_info_all);
549
544
      /*
550
545
        Merge read-only/read-write information about statement
699
694
        * and propogating the message to all registered replicators.
700
695
        */
701
696
      ReplicationServices &replication_services= ReplicationServices::singleton();
702
 
      replication_services.commitNormalTransaction(session);
 
697
      replication_services.commitTransaction(session);
703
698
    }
704
699
  }
705
700
  return error;
737
732
    }
738
733
    trans->ha_list= 0;
739
734
    trans->no_2pc=0;
 
735
    
 
736
    /* 
 
737
     * We need to signal the ROLLBACK to ReplicationServices here
 
738
     * BEFORE we set the transaction ID to NULL.  This is because
 
739
     * if a bulk segment was sent to replicators, we need to send
 
740
     * a rollback statement with the corresponding transaction ID
 
741
     * to rollback.
 
742
     */
 
743
    ReplicationServices &replication_services= ReplicationServices::singleton();
 
744
    replication_services.rollbackTransaction(session);
 
745
 
740
746
    if (is_real_trans)
741
747
      session->transaction.xid_state.xid.null();
742
748
    if (all)