Commit graph

34184 commits

Author SHA1 Message Date
cmiller@zippy.cornsilk.net
1944bc11d5 Add profiling source file to cmake file. 2007-02-22 12:27:15 -05:00
cmiller@zippy.cornsilk.net
d4966ba24a Enclose profiling in preprocessor conditions. 2007-02-22 11:48:56 -05:00
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
cmiller@zippy.cornsilk.net
dffdc8118b Merge bk-internal.mysql.com:/home/bk/mysql-5.0-community
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
2007-01-18 09:53:07 -05:00
cmiller@zippy.cornsilk.net
1478b54cec Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community--bug24822
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
2007-01-18 09:51:55 -05:00
cmiller@zippy.cornsilk.net
205d6a35b3 Bug#24822: Patch: uptime_since_flush_status
Provide the number of seconds since flush as a new status variable
named "Uptime_since_flush_status".
---
Override the post-flush value, as a second could pass between the two
statements.
2007-01-18 09:50:16 -05:00
baker@bk-internal.mysql.com
5750f5c968 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-community
2007-01-14 04:09:38 +01:00
kostja@bodhi.local
7c298786f1 Merge bodhi.local:/opt/local/work/mysql-4.1-runtime
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2007-01-12 22:01:53 +03:00
kostja@bodhi.local
5a99ffdf92 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2007-01-12 21:59:17 +03:00
kostja@bodhi.local
a7862496ce Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.local:/opt/local/work/mysql-4.1-runtime
2007-01-12 18:06:43 +03:00
joerg@trift2.
4ffada35bf Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into  trift2.:/MySQL/M41/mysql-4.1
2007-01-12 14:40:28 +01:00
gluh@mysql.com/eagle.(none)
6d5cf25d20 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/5.0
2007-01-12 13:58:08 +04:00
gluh@mysql.com/eagle.(none)
c081e28ef5 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0
2007-01-12 13:57:40 +04:00
joerg@trift2.
59e2133e00 Merge trift2.:/MySQL/M41/mysql-4.1
into  trift2.:/MySQL/M41/push-4.1
2007-01-12 10:17:39 +01:00
mjorgensen@production.mysql.com
21cb2ef60f Merge bk-internal:/home/bk/mysql-5.0
into  production.mysql.com:/usersnfs/mjorgensen/bktrees/mysql-5.0-community
2007-01-12 00:10:18 +01:00
kostja@bodhi.local
61a4d6e5ed Merge bodhi.local:/opt/local/work/mysql-4.1-runtime
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2007-01-11 22:09:48 +03:00
kostja@bodhi.local
bf1005a125 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2007-01-11 21:59:28 +03:00
kostja@bodhi.local
dd03d51f22 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.local:/opt/local/work/mysql-4.1-runtime
2007-01-11 21:49:52 +03:00
gkodinov/kgeorge@rakia.gmz
7eebacadad Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B25106-5.0-opt
2007-01-11 19:13:04 +02:00
gkodinov/kgeorge@macbook.gmz
15bcf13182 BUG#25106: A USING clause in combination with a VIEW results in column
aliases ignored
When a column reference to a column in JOIN USING is resolved and a new 
Item is created for this column the user defined name was lost.
This fix preserves the alias by setting the name of the new Item to the
original alias.
2007-01-11 19:10:01 +02:00
kent@mysql.com/kent-amd64.(none)
bd2ec8051d Many files:
Reverted change for bug#13859, applied smaller patch from Marko
2007-01-11 12:31:52 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
3ff9dff06a Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/d2/hf/mr10/my50-mr10
2007-01-11 13:18:49 +04:00
mmj@tiger.mmj.dk
49913f2a95 Merge mjorgensen@bk-internal.mysql.com:/home/bk/mysql-5.0-sage
into  tiger.mmj.dk:/Users/mmj/bktrees/mysql-5.0
2007-01-11 09:19:32 +01:00
joerg@trift2.
4d12d97cc3 Merge trift2.:/MySQL/M40/clone-4.0
into  trift2.:/MySQL/M41/push-4.1
2007-01-10 21:05:13 +01:00
joerg@trift2.
e9f7b6f797 Merge trift2.:/MySQL/M40/upward-4.0
into  trift2.:/MySQL/M41/push-4.1
2007-01-10 20:29:14 +01:00
igor@olga.mysql.com
f5f8c35ef2 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-4.1-opt
2007-01-10 10:49:46 -08:00
kent@mysql.com/kent-amd64.(none)
ba7b6e86f2 configure.in:
Corrected default for --disable-grant-options
2007-01-10 18:19:51 +01:00
igor@olga.mysql.com
61cd864bc0 Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2007-01-10 08:55:55 -08:00
holyfoot/hf@mysql.com/hfmain.(none)
27d56afcfc Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/d2/hf/mr10/my50-mr10
2007-01-10 20:37:22 +04:00
kent@mysql.com/kent-amd64.(none)
1768b21a14 configure.in:
Removed line accidently inserted when correcting bug#18526
2007-01-10 14:50:09 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
bcd4d84de9 Merge mysql.com:/d2/hf/common/my50-common
into  mysql.com:/d2/hf/mr10/my50-mr10
2007-01-10 14:33:34 +04:00
gluh@mysql.com/eagle.(none)
4a3fe2b682 after merge fix 2007-01-10 14:03:36 +04:00
gluh@mysql.com/eagle.(none)
9da22c73d0 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-01-10 13:04:58 +04:00
gluh@mysql.com/eagle.(none)
b61f3545f5 Fix for bug#20867 InnoDB Bug - create temporary table+crash => mysqld needs to clean up
2nd version
During tmp tables cleanup we get the handler for temporary table
and delete table using handler method.
2007-01-10 12:57:03 +04:00
igor@olga.mysql.com
578fae9dc8 Fixed bug #25427.
In the method Item_field::fix_fields we try to resolve the name of
the field against the names of the aliases that occur in the select
list. This is done by a call of the function find_item_in_list.
When this function finds several occurrences of the field name
it sends an error message to the error queue and returns 0.
Yet the code did not take into account that find_item_in_list
could return 0 and tried to dereference the returned value.
2007-01-10 00:27:11 -08:00
tsmith@siva.hindu.god
bac65ee90a WL #3670: Compile-time option to remove GRANT-related startup options
- configure --disable-grant-options defines DISABLE_GRANT_OPTIONS
- configure.js/cmake also updated
- if DISABLE_GRANT_OPTIONS is defined, mysqld no longer recognizes:
  --bootstrap
  --init-file
  --skip-grant-tables

Scripts which rely on those three options are modified to check the environment for MYSQLD_BOOTSTRAP; it should be set to the full path of a mysqld which does handle those options.

For example:

$ export MYSQLD_BOOTSTRAP
$ MYSQLD_BOOTSTRAP=/path/to/full/MySQL/bin/mysqld
$ mysql_install_db
$ make test
2007-01-09 19:22:01 -07:00
igor@olga.mysql.com
add0ab219d Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2007-01-09 17:31:14 -08:00
joerg@trift2.
b63c167f66 support-files/MySQL-shared-compat.spec.sh : Dummy, irrelevant change - just trigger a new build. 2007-01-10 00:36:41 +01:00
evgen@moonbone.local
e098f736e1 Fixed bug#16861: User defined variable can have a wrong value if a tmp table was
used.

The Item::save_in_field() function is called from fill_record() to fill the 
new row with data while execution of the CREATE TABLE ... SELECT statement.
Item::save_in_field() calls val_xxx() methods in order to get values.
val_xxx() methods do not take into account the result field. Due to this
Item_func_set_user_var::val_xxx() methods returns values from the original
table, not from the temporary one.

The save_in_field() member function is added to the Item_func_set_user_var
class. It detects whether the result field should be used and properly updates
the value of the user variable.
2007-01-09 23:24:56 +03:00
igor@olga.mysql.com
ebc68a176c Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2007-01-09 12:07:13 -08:00
evgen@moonbone.local
ac48c8bae1 Bug#14171: Wrong internal default value for a BINARY field.
A BINARY field is represented by the Field_string class. The space character
is used as the filler for unused characters in such a field. But a BINARY field 
should use \x00 instead.

Field_string:reset() now detects whether the current field is a BINARY one
and if so uses the \x00 character as a default value filler.
2007-01-09 22:35:30 +03:00
evgen@moonbone.local
fe30a0959c Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
2007-01-09 22:14:11 +03:00
igor@olga.mysql.com
5cd4ba4e0b Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug25027
2007-01-09 10:26:28 -08:00
joerg@trift2.
46a8d14e21 Version 4.0 is in "extended maintenance" by now, and so
no future build of it will include Berkeley DB:
Remove it from the Windows VC++ project files.
2007-01-09 17:21:54 +01:00
df@kahlann.erinye.com
696bc7a237 raise version number after cloning 5.0.33 2007-01-09 14:42:56 +01:00
thek@kpdesk.mysql.com
979c888bdd Merge kpdesk.mysql.com:/home/thek/dev/bug23010/my41-bug23010
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-build
2007-01-09 14:36:28 +01:00
thek@kpdesk.mysql.com
2af1ec2911 Merge kpdesk.mysql.com:/home/thek/dev/bug23010/my50-bug23010
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-build
2007-01-09 14:35:16 +01:00
dfischer/mysqldev@mysql.com/production.mysql.com
ee9388d628 Merge mysql.com:/data0/mysqldev/my/build-200701091147-5.0.33/mysql-5.0-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0-community
2007-01-09 14:31:13 +01:00
dfischer/mysqldev@mysql.com/production.mysql.com
754a148a35 configure.in:
raise version to 5.0.33
2007-01-09 13:02:15 +01:00
holyfoot/hf@mysql.com/hfmain.(none)
0fa12d2491 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/d2/hf/opt/my50-opt
2007-01-09 15:37:31 +04:00