Commit graph

48608 commits

Author SHA1 Message Date
unknown
b59217ebbb Slow query log to file now displays queries with microsecond precission
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime()  (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init() 


include/my_getopt.h:
  Added support for double arguments
include/my_sys.h:
  Fixed wrong type to packfrm()
  Added new my_time functions
include/mysql/plugin.h:
  Added support for DOUBLE
libmysql/CMakeLists.txt:
  Added new time functions
libmysql/Makefile.shared:
  Added new time functions
mysql-test/r/variables.result:
  Testing of long_query_time
mysql-test/t/variables.test:
  Testing of long_query_time
mysys/charset.c:
  Fixed compiler warnings
mysys/default_modify.c:
  Fixed compiler warnings
mysys/hash.c:
  Fixed compiler warnings
mysys/mf_getdate.c:
  Use my_time()
mysys/mf_iocache2.c:
  Fixed compiler warnings
mysys/mf_pack.c:
  Fixed compiler warnings
mysys/mf_path.c:
  Fixed compiler warnings
mysys/my_append.c:
  Fixed compiler warnings
mysys/my_compress.c:
  Fixed compiler warnings
mysys/my_copy.c:
  Fixed compiler warnings
mysys/my_gethwaddr.c:
  Fixed compiler warnings
mysys/my_getopt.c:
  Added support for double arguments
mysys/my_getsystime.c:
  Added functions to get time in microseconds.
  Added faster time() functions for system that has gethrtime()  (Solaris)
  Moved windows initialization code to my_init()
mysys/my_init.c:
  Added initializing of variables needed for windows time functions
mysys/my_static.c:
  Added variables needed for windows time functions
mysys/my_static.h:
  Added variables needed for windows time functions
mysys/my_thr_init.c:
  Added THR_LOCK_time, used for faster my_time()
mysys/mysys_priv.h:
  Added THR_LOCK_time, used for faster my_time()
mysys/thr_alarm.c:
  time() -> my_time()
sql/event_data_objects.cc:
  end_time() -> set_current_time()
sql/event_queue.cc:
  end_time() -> set_current_time()
sql/event_scheduler.cc:
  Fixed compiler warnings
sql/field.h:
  Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
sql/item.h:
  Added decimal to Item_float(double)
sql/item_cmpfunc.h:
  Added decimal to Item_float(double)
sql/item_timefunc.cc:
  time() -> my_time()
sql/item_xmlfunc.cc:
  Fixed compiler warning
sql/lock.cc:
  lock_time() -> set_time_after_lock()
sql/log.cc:
  Timing in slow query log to file is now done in microseconds
  Changed some while() loops to for() loops.
  Fixed indentation
  time() -> my_time()
sql/log.h:
  Slow query logging is now done based on microseconds
sql/log_event.cc:
  time() -> my_time()
  Fixed arguments to new Item_float()
sql/mysql_priv.h:
  Fixed compiler warnings
  Added opt_log_slow_slave_statements
sql/mysqld.cc:
  Added --log_slow_slave_statements and --min_examined_row_limit
  --long-query-time now takes a double argument with microsecond resolution
  Don't write shutdown message when using --help
  Removed not needed \n
  Thread create time and connect time is now done in microseconds
  time() -> my_time()
  Avoid some time() calls
sql/net_serv.cc:
  Fixed compiler warnings
sql/parse_file.cc:
  time() -> my_time()
sql/set_var.cc:
  Added support for DOUBLE variables
  Added support for variables that are given in seconds with microsecond resolution
sql/set_var.h:
  Added support for variables that are given in seconds with microsecond resolution
sql/slave.cc:
  Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given
  time() -> my_time()
sql/sql_cache.h:
  Fixed compiler warning()
sql/sql_class.cc:
  Initialize new THD variables
sql/sql_class.h:
  long_query_time is now in microseconds
  Added min_examined_row_limit
  Reordered some THD elements for higher efficency
  Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock)
  Start of query is now recorded both in seconds and in microseconds.
  Following renames was made for more clarity and avoid merge problems from earlier versions:
  connect_time -> connect_utime
  thr_create_time -> thr_create_utime
  end_time()  -> set_current_time()
  lock_time() -> set_time_after_lock()
  
  Added THD::start_utime, which is start of query in microseconds from some arbitary time
  Added function THD::current_utime()
  
  Removed safe_time() as retry's are handled in my_time()
sql/sql_connect.cc:
  User resources are now using microsecond resolution
sql/sql_insert.cc:
  end_time() -> set_current_time()
sql-common/client.c:
  time() -> my_time()
sql/sql_parse.cc:
  Testing if we should print to slow_query_log() is now done with microsecond precission.
  If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this.
sql/sql_select.cc:
  Simplify code now that Item_float() takes decimals as argument
sql/sql_show.cc:
  time() -> my_time()
  Added support for SYS_DOUBLE
sql/sql_table.cc:
  Added debug function for stopping in mysql_admin_table() when tables are locked
sql/structs.h:
  intime -> reset_utime
2007-07-30 11:33:50 +03:00
unknown
ae8d075508 Add 'extension' field to all client library structures to make them extensible
Reorder structure elements to make structures smaller and faster on 64 bit systems
This is a first step in cleaning up the client include files (but should be enough to allow us to do future fixes without breaking the library)
This change is part of WL#2872,  Make client library extensible.


configure.in:
  Increased shared library version of client library
  Detect gethrtime (for future)
include/mysql.h:
  Add 'extension' field to all structures to make them extensible
  Reorder structure elements to make structures smaller and faster on 64 bit systems
  Removed an old define that is not needed for MySQL 5.1
include/mysql_com.h:
  Add 'extension' field to all structures to make them extensible
  Reorder structure elements to make structures smaller and faster on 64 bit systems
2007-07-30 06:22:25 +03:00
unknown
08dd5dcf16 Added support for 'internal temporary tables' in HEAP tables.
Now we don't take any mutexes when creating or dropping internal HEAP tables during SELECT.
Change buffer sizes to size_t to make keycache 64 bit safe on platforms where sizeof(ulong) != sizeof(size_t)


BitKeeper/etc/ignore:
  added support-files/mysqld_multi.server
include/heap.h:
  Added 'internal_table' to HP_CREATE_INFO
include/keycache.h:
  Change buffer sizes to size_t to make keycache 64 bit safe
include/my_base.h:
  Added HA_OPEN_INTERNAL_TABLE to mark temporary tables that should be deleted on close
mysys/mf_keycache.c:
  Change buffer sizes to size_t to make keycache 64 bit safe
sql/sql_select.cc:
  Added HA_OPEN_INTERNAL_TABLE to mark temporary tables that should be deleted on close
  Removed not anymore needed call to delete_table()
storage/heap/ha_heap.cc:
  Added support for internal temporary tables that should be deleted on close.
  Internal tables now use dedicated open and close calls to avoid taking mutexes.
  If heap_open() failes, now delete the newly created table. (This fixes a possible memory leak)
  Remove never executed info() in create()
storage/heap/ha_heap.h:
  Added slots needed to handle internal temporary tables
storage/heap/heapdef.h:
  Protect against C++ inclusion
storage/heap/hp_close.c:
  Don't call list_delete() for internal temporary tables (They are not in the list)
storage/heap/hp_create.c:
  Added HP_SHARE ** element to heap_create() to store the SHARE of the newly created table.
  For internal temporary tables: Don't take any mutex and don't put them into the open table list.
storage/heap/hp_open.c:
  Split heap_open() into sub functions to be able to create internal temporary tables without putting them in the heap_share_list.
  Add faster open() functions for when we already know the 'share'.
storage/heap/hp_test1.c:
  Update call to heap_create()
  Initialize all keyinfo members.
storage/heap/hp_test2.c:
  Update call to heap_create()
2007-07-25 01:58:12 +03:00
unknown
4c1171ed05 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


client/mysqltest.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/hash.c:
  Auto merged
mysys/my_conio.c:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/stacktrace.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2007-07-23 20:39:53 +03:00
unknown
ce203858e9 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1


libmysql/libmysql.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
2007-07-21 12:36:37 +02:00
unknown
47507276aa Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kent/bk/tmp3/mysql-5.0-build


libmysql/libmysql.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
2007-07-21 01:53:19 +02:00
unknown
066d97ba09 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/kent/bk/tmp3/mysql-5.1-build


libmysql/libmysql.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
2007-07-21 01:52:15 +02:00
unknown
d9bad2acc0 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/cast.result:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2007-07-21 02:25:39 +05:00
unknown
d758b1e629 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29898-bug-5.0-opt-mysql
2007-07-20 22:05:20 +04:00
unknown
9c7290120b Merge trift-lap.none:/MySQL/M50/push-5.0
into  trift-lap.none:/MySQL/M51/push-5.1
2007-07-20 13:53:52 +02:00
unknown
366c21fef8 Merge trift-lap.none:/MySQL/M50/bug14151-5.0
into  trift-lap.none:/MySQL/M50/push-5.0
2007-07-20 13:35:23 +02:00
unknown
193d5f54b1 Merge trift-lap.none:/MySQL/M51/bug14151-5.1
into  trift-lap.none:/MySQL/M51/push-5.1
2007-07-20 13:32:41 +02:00
unknown
1bd1216f00 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build


libmysql/libmysql.c:
  SCCS merged
sql/field.cc:
  SCCS merged
sql/field.h:
  SCCS merged
BitKeeper/deleted/.del-CMakeLists.txt~1:
  SCCS merged
configure.in:
  SCCS merged
scripts/make_binary_distribution.sh:
  SCCS merged
2007-07-20 11:41:25 +02:00
unknown
d8305ab99b Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.46
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build


configure.in:
  Auto merged
libmysql/libmysql.c:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
2007-07-20 09:20:48 +02:00
unknown
d3294a6051 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-07-20 05:23:33 +05:00
unknown
568eccb513 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/t/disabled.def:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  SCCS merged
tests/mysql_client_test.c:
  SCCS merged
2007-07-20 04:21:46 +05:00
unknown
db31d3c96d Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-07-20 04:15:50 +05:00
unknown
a71eda722a Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2007-07-20 04:04:57 +05:00
unknown
77a0e7f718 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.44
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.46


configure.in:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
2007-07-19 23:30:26 +02:00
unknown
d9fda1cf9a BUG#20815 Errno 12 on Windows after 197 connections
CMakeLists.txt:
  BUG#20815 Set stack size. This value is really supposed to be the linker's default. I'm not quite sure why we have to specify it manually too.
2007-07-19 23:06:34 +02:00
unknown
a131428f04 Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
The Item_date_typecast::val_int function doesn't reset null_value flag.
This makes all values that follows the first null value to be treated as nulls
and led to a wrong result.

Now the Item_date_typecast::val_int function correctly sets the null_value flag
for both null and non-null values.


mysql-test/t/cast.test:
  Added a test case for the bug#29898:  Item_date_typecast::val_int doesn't reset
  the null_value flag.
mysql-test/r/cast.result:
  Added a test case for the bug#29898:  Item_date_typecast::val_int doesn't reset
  the null_value flag.
sql/item_timefunc.cc:
  Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
  Now the Item_date_typecast::val_int function correctly sets the null_value flag
  for both null and non-null values.
2007-07-20 00:06:35 +04:00
unknown
39433686e6 mysql_client_test fixed
tests/mysql_client_test.c:
  rc assignement added
2007-07-20 00:04:30 +05:00
unknown
a7a3add28e Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-07-19 20:22:29 +02:00
unknown
2eed7b94e3 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1


sql/mysql_priv.h:
  Auto merged
2007-07-19 20:16:27 +02:00
unknown
92de7b7bb2 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-07-19 20:04:35 +02:00
unknown
d0020607b3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29850-bug-5.0-opt-mysql
2007-07-19 21:40:12 +04:00
unknown
7f6a816484 Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs
a temporary table.

The result string of the Item_func_group_concat wasn't initialized in the 
copying constructor of the Item_func_group_concat class. This led to a
wrong charset of GROUP_CONCAT result when the select employs a temporary
table.

The copying constructor of the Item_func_group_concat class now correctly
initializes the charset of the result string.


mysql-test/t/func_gconcat.test:
  Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result
  when the select employs a temporary table.
mysql-test/r/func_gconcat.result:
  Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result
  when the select employs a temporary table.
sql/item_sum.cc:
  Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs
  a temporary table.
  The copying constructor of the Item_func_group_concat class now correctly
  initializes the charset of the result string.
2007-07-19 20:21:23 +04:00
unknown
809e56e467 After-merge fix for bug#14151.
sql/sql_partition.cc:
  After-merge fix for bug#14151:
  This use of "md5.h" is new in 5.1 and must be changed to "my_md5.h" as well.
2007-07-19 18:05:55 +02:00
unknown
78cc8d3058 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/home/hf/work/29687/my51-29687
2007-07-19 21:03:26 +05:00
unknown
5547294b4e Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/29687/my51-29687
2007-07-19 21:02:11 +05:00
unknown
248c5e24e9 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/29687/my50-29687
2007-07-19 21:01:58 +05:00
unknown
223f3978f8 test case for memory leak added
tests/mysql_client_test.c:
  test case added
2007-07-19 20:59:11 +05:00
unknown
0299963601 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/29687/my50-29687
2007-07-19 20:59:08 +05:00
unknown
244c7ef315 Merge mysql.com:/home/hf/work/29687/my50-29687
into  mysql.com:/home/hf/work/29687/my51-29687


libmysql/libmysql.c:
  Auto merged
2007-07-19 20:58:04 +05:00
unknown
615be59d63 Merge bk-internal.mysql.com:/data0/bk/tsmith-tmp/mysql-5.0-maint
into  bk-internal.mysql.com:/data0/bk/tsmith-tmp/mysql-5.1-maint


sql/mysql_priv.h:
  Auto merged
2007-07-19 17:44:35 +02:00
unknown
8d592e95a5 Merge bk-internal.mysql.com:/data0/bk/mysql-4.1-maint
into  bk-internal.mysql.com:/data0/bk/tsmith-tmp/mysql-5.0-maint
2007-07-19 17:43:34 +02:00
unknown
22a644d272 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/sql_select.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2007-07-19 20:06:55 +05:00
unknown
e395b0ace2 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2007-07-19 20:01:13 +05:00
unknown
c865b22514 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/ha_myisam.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-07-19 19:57:53 +05:00
unknown
bb00bbef1b Merge trift-lap.none:/MySQL/M50/bug14151-5.0
into  trift-lap.none:/MySQL/M51/bug14151-5.1


BitKeeper/deleted/.del-MySQL-Source.icc~edded3c3a5cf83b1:
  Auto merged
BitKeeper/deleted/.del-mysqlmanager-pwgen.c~d8f5f91ec54432b9:
  Auto merged
BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b:
  Auto merged
include/Makefile.am:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/table.cc:
  Auto merged
2007-07-19 15:11:01 +02:00
unknown
f4209c71a2 Avoid the name conflict between the system-provided "md5.h" and the MySQL one
by renaming "include/md5.h" to "include/my_md5.h".

Fixes bug#14151.


include/my_md5.h:
  Rename: include/md5.h -> include/my_md5.h
2007-07-19 14:14:03 +02:00
unknown
9fa66ba423 field.cc, field.h:
i5 compatibility


sql/field.h:
  i5 compatibility
sql/field.cc:
  i5 compatibility
2007-07-19 14:12:05 +02:00
unknown
8e500b7b75 mysqldump.result:
Post-merge fix.


mysql-test/r/mysqldump.result:
  Post-merge fix.
2007-07-19 14:56:04 +05:00
unknown
0a433b21db Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/r/mysqldump.result:
  Merge with 5.0-opt.
2007-07-19 14:23:53 +05:00
unknown
8b59beaebe Merge gleb.loc:/home/uchum/work/bk/5.0-opt-28524
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-19 10:54:39 +05:00
unknown
c1d12ec726 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-07-18 15:32:22 -06:00
unknown
b55bb35c25 ddl_i18n_utf8.test, ddl_i18n_koi8r.test:
Don't run test with embedded server; requires external client connections


mysql-test/t/ddl_i18n_koi8r.test:
  Don't run test with embedded server; requires external client connections
mysql-test/t/ddl_i18n_utf8.test:
  Don't run test with embedded server; requires external client connections
2007-07-18 15:31:24 -06:00
unknown
b79daf4109 Re-set the plugin name so that we can be sure the plugin init()
function doesn't set it to something else.
2007-07-18 13:37:56 -04:00
unknown
6d0419f6bc Move the filling of the table_name column above the initialization,
so that the init function has access to the name.
2007-07-18 12:27:54 -04:00
unknown
155eb4658d 5.0-opt -> 5.1-opt merge 2007-07-18 18:08:05 +03:00