mariadb/ndb
cmiller@zippy.cornsilk.net 6e096ee8d9 Prevent bugs by making DBUG_* expressions syntactically equivalent
to a single statement.
---
Bug#24795: SHOW PROFILE

Profiling is only partially functional on some architectures.  Where 
there is no getrusage() system call, presently Null values are 
returned where it would be required.  Notably, Windows needs some love 
applied to make it as useful.

  Syntax this adds:
  
  SHOW PROFILES
  
  SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
   where "n" is an integer
   and "types" is zero or many (comma-separated) of
      "CPU"
      "MEMORY" (not presently supported)
      "BLOCK IO"
      "CONTEXT SWITCHES"
      "PAGE FAULTS"
      "IPC"
      "SWAPS"
      "SOURCE"
      "ALL"

It also adds a session variable (boolean) "profiling", set to "no"
by default, and (integer) profiling_history_size, set to 15 by 
default.

This patch abstracts setting THDs' "proc_info" behind a macro that 
can be used as a hook into the profiling code when profiling 
support is compiled in.  All future code in this line should use
that mechanism for setting thd->proc_info.

---

Tests are now set to omit the statistics.

---

Adds an Information_schema table, "profiling" for access to 
"show profile" data.
---
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community-3--bug24795
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
---
Fix merge problems.
---
Fixed one bug in the query_source being NULL.  

Updated test results.
---
Include more thorough profiling tests.

Improve support for prepared statements.

Use session-specific query IDs, starting at zero.
---
Selecting from I_S.profiling is no longer quashed in profiling, as
requested by Giuseppe.

Limit the size of captured query text.

No longer log queries that are zero length.
2007-02-22 10:03:08 -05:00
..
bin .del-mysqlclusterd~7ebaf8faea0a1100: 2004-06-16 16:59:33 +00:00
config my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
demos Removed unnecessary README files 2004-04-14 15:42:56 +02:00
docs my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
home removed a bunch of "dead" files from the ndb src tree 2004-11-05 23:59:06 +00:00
include Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-12-31 01:04:07 +01:00
lib Initial revision of NDB Cluster files 2004-04-14 10:53:21 +02:00
ndbapi-examples Many files: 2006-12-23 20:17:15 +01:00
src Prevent bugs by making DBUG_* expressions syntactically equivalent 2007-02-22 10:03:08 -05:00
test Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0 2006-12-31 01:04:07 +01:00
tools my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00