List:Commits« Previous MessageNext Message »
From:Marc Alff Date:April 18 2011 11:05pm
Subject:bzr commit into mysql-trunk branch (marc.alff:3325) Bug#12338397
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-trunk-bug12338397/ based on revid:alexander.nozdrin@stripped

 3325 Marc Alff	2011-04-18
      Bug#12338397 TRUNK DOES NOT BUILD WITHOUT PERFORMANCE SCHEMA DUE TO STAGES/STATEMENTS
      
      Prior to this fix, building the MySQL server without the performance schema failed,
      because of the recently added stage and statement instrumentation.
      
      With this fix,
      - the PSI_stage_info structure is defined even when building without the performance schema,
        because it is also used for the THD::set_proc_info instrumentation.
      - the code using PSI_statement_info, for the statement instrumentation,
        has been protected with #ifdef.

    modified:
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v2.h.pp
      sql/mysqld.h
=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h	2011-02-14 14:23:55 +0000
+++ b/include/mysql/psi/psi.h	2011-04-18 23:05:27 +0000
@@ -1710,6 +1710,20 @@ struct PSI_file_info_v2
 };
 
 /** Placeholder */
+struct PSI_stage_info_v2
+{
+  /** Placeholder */
+  int placeholder;
+};
+
+/** Placeholder */
+struct PSI_statement_info_v2
+{
+  /** Placeholder */
+  int placeholder;
+};
+
+/** Placeholder */
 struct PSI_mutex_locker_state_v2
 {
   /** Placeholder */
@@ -1834,6 +1848,31 @@ struct PSI_none
 };
 typedef struct PSI_none PSI;
 
+/**
+  Stage instrument information.
+  @since PSI_VERSION_1
+  This structure is used to register an instrumented stage.
+*/
+struct PSI_stage_info_none
+{
+  /** Unused stage key. */
+  unsigned int m_key;
+  /** The name of the stage instrument. */
+  const char *m_name;
+  /** Unused stage flags. */
+  int m_flags;
+};
+
+/**
+  The stage instrumentation has to co exist with the legacy
+  THD::set_proc_info instrumentation.
+  To avoid duplication of the instrumentation in the server,
+  the common PSI_stage_info structure is used,
+  so we export it here, even when not building
+  with HAVE_PSI_INTERFACE.
+*/
+typedef struct PSI_stage_info_none PSI_stage_info;
+
 #endif /* HAVE_PSI_INTERFACE */
 
 extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;

=== modified file 'include/mysql/psi/psi_abi_v2.h.pp'
--- a/include/mysql/psi/psi_abi_v2.h.pp	2011-02-14 14:23:55 +0000
+++ b/include/mysql/psi/psi_abi_v2.h.pp	2011-04-18 23:05:27 +0000
@@ -98,6 +98,14 @@ struct PSI_file_info_v2
 {
   int placeholder;
 };
+struct PSI_stage_info_v2
+{
+  int placeholder;
+};
+struct PSI_statement_info_v2
+{
+  int placeholder;
+};
 struct PSI_mutex_locker_state_v2
 {
   int placeholder;

=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h	2011-03-18 22:51:17 +0000
+++ b/sql/mysqld.h	2011-04-18 23:05:27 +0000
@@ -388,6 +388,7 @@ extern PSI_stage_info stage_waiting_for_
 extern PSI_stage_info stage_waiting_to_finalize_termination;
 extern PSI_stage_info stage_waiting_to_get_readlock;
 
+#ifdef HAVE_PSI_INTERFACE
 /**
   Statement instrumentation keys (sql).
   The last entry, at [SQLCOM_END], is for parsing errors.
@@ -402,6 +403,7 @@ extern PSI_statement_info com_statement_
 
 void init_sql_statement_info();
 void init_com_statement_info();
+#endif /* HAVE_PSI_INTERFACE */
 
 #ifndef __WIN__
 extern pthread_t signal_thread;


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20110418230527-0mg33yrf3d1gnkel.bundle
Thread
bzr commit into mysql-trunk branch (marc.alff:3325) Bug#12338397Marc Alff19 Apr