List:Commits« Previous MessageNext Message »
From:Mayank Prasad Date:September 7 2011 9:29pm
Subject:bzr push into mysql-trunk-wl5767 branch (mayank.prasad:3379 to 3380)
View as plain text  
 3380 Mayank Prasad	2011-09-08
      fix for failing test cases on pb2

    modified:
      sql/sql_lex.cc
      storage/perfschema/pfs.cc
 3379 Mayank Prasad	2011-09-07
      WL#5767 : performance schema, statement digest
      
      Code changes:
      1. Coded digest_start/digest_end and added calls.
      2. Made digest_storage to thread/statement specific.
      3. Added restriction to number of tokens collected for long query.
      4. Added digest initialization code in unittest (pfs-t) to run clean.

    modified:
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      mysys/psi_noop.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_events_statements.h
      storage/perfschema/unittest/pfs-t.cc
=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2011-09-07 10:38:59 +0000
+++ b/sql/sql_lex.cc	2011-09-07 21:27:46 +0000
@@ -37,8 +37,8 @@
     */                                                                       \
     if( _token != 0 )                                                        \
     {                                                                        \
-      uint yylen=0;                                                          \
-      char *yychar;                                                          \
+      uint yylen= 0;                                                          \
+      char *yychar= NULL;                                                    \
       if( _token != END_OF_INPUT )                                           \
       {                                                                      \
         /*
@@ -47,8 +47,8 @@
         */                                                                   \
         yylen= _yylen!=0 ? _yylen : lip->yyLength_PS();                      \
         yylen= yylen<TOCK_NAME_LENGTH ? yylen : TOCK_NAME_LENGTH-1;          \
-        yychar= _yychar!=NULL ? (char*)_yychar :                             \
-                                (char*)lip->get_cpp_tok_start();             \
+        yychar= _yychar ? (char*)_yychar :                                   \
+                          (char*)lip->get_cpp_tok_start();                   \
       }                                                                      \
       PSI_server->digest_add_token(lip->m_digest_psi,_token,yychar,yylen);   \
     }                                                                        \

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2011-09-07 10:38:59 +0000
+++ b/storage/perfschema/pfs.cc	2011-09-07 21:27:46 +0000
@@ -4794,6 +4794,14 @@ static struct PSI_digest_locker* digest_
   PFS_events_statements      *pfs;
   PFS_digest_storage         *digest_storage;
 
+  /* 
+    If current statement is not instrumented
+  */
+  if(!flag_events_statements_current)
+  {
+    return NULL;
+  }
+
   /*
     Get statement locker state from statement locker
   */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5767 branch (mayank.prasad:3379 to 3380) Mayank Prasad8 Sep