~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
523
523
private:
524
524
  /* container for handler's private per-connection data */
525
525
  Ha_data ha_data[MAX_HA];
 
526
  /*
 
527
    Id of current query. Statement can be reused to execute several queries
 
528
    query_id is global in context of the whole MySQL server.
 
529
    ID is automatically generated from an atomic counter.
 
530
    It's used in Cursor code for various purposes: to check which columns
 
531
    from table are necessary for this select, to check if it's necessary to
 
532
    update auto-updatable fields (like auto_increment and timestamp).
 
533
  */
 
534
  query_id_t query_id;
 
535
  query_id_t warn_query_id;
526
536
public:
527
537
  void **getEngineData(const drizzled::plugin::StorageEngine *engine);
528
538
  Ha_trx_info *getEngineInfo(const drizzled::plugin::StorageEngine *engine,
654
664
  uint32_t total_warn_count;
655
665
  Diagnostics_area main_da;
656
666
 
657
 
  /*
658
 
    Id of current query. Statement can be reused to execute several queries
659
 
    query_id is global in context of the whole MySQL server.
660
 
    ID is automatically generated from mutex-protected counter.
661
 
    It's used in handler code for various purposes: to check which columns
662
 
    from table are necessary for this select, to check if it's necessary to
663
 
    update auto-updatable fields (like auto_increment and timestamp).
664
 
  */
665
 
  query_id_t query_id;
666
 
  query_id_t warn_id;
667
667
  ulong col_access;
668
668
 
669
669
  /* Statement id is thread-wide. This counter is used to generate ids */
777
777
    return proc_info;
778
778
  }
779
779
 
 
780
  /** Sets this Session's current query ID */
 
781
  inline void setQueryId(query_id_t in_query_id)
 
782
  {
 
783
    query_id= in_query_id;
 
784
  }
 
785
 
780
786
  /** Returns the current query ID */
781
787
  inline query_id_t getQueryId()  const
782
788
  {
783
789
    return query_id;
784
790
  }
785
791
 
 
792
 
 
793
  /** Sets this Session's warning query ID */
 
794
  inline void setWarningQueryId(query_id_t in_query_id)
 
795
  {
 
796
    warn_query_id= in_query_id;
 
797
  }
 
798
 
 
799
  /** Returns the Session's warning query ID */
 
800
  inline query_id_t getWarningQueryId()  const
 
801
  {
 
802
    return warn_query_id;
 
803
  }
 
804
 
786
805
  /** Returns the current query text */
787
806
  inline const char *getQueryString()  const
788
807
  {