Commit graph

2280 commits

Author SHA1 Message Date
unknown
9e48e73f9a Fix for Bug #20246 (enum mysql_enum_shutdown_level not well-defined in mysql_com.h)
MYSQL_VERSION_ID is tested before it has been defined.  This leads to
a warning when compiling with -Wundef and it also will break the
internal logic of mysql_com.h as soon as MYSQL_VERSION_ID exceeds
50000.

The fix entailed a simple re-ordering of included files in mysql.h


include/mysql.h:
  Fix for Bug #20246 (enum mysql_enum_shutdown_level not well-defined in mysql_com.h)
  
  MYSQL_VERSION_ID is tested before it has been defined.  This leads to
  a warning when compiling with -Wundef and it also will break the
  internal logic of mysql_com.h as soon as MYSQL_VERSION_ID exceeds
  50000.
  
  Placed the #include for mysql_version.h above mysql_com.h to resolve conflict
2006-12-06 19:13:00 -05:00
unknown
2b0c447683 BUG#23526 - show table status reports incorrect values for MyISAM tables
This problem could happen when show table status get outdated copy
of TABLE object from table cache.

MyISAM updates state info when external_lock() method is called. Though
I_S does not lock a table to avoid deadlocks. If I_S opens a table which
is in a table cache it will likely get outdated state info copy.

In this case shared state copy is more recent than local copy. This problem
is fixed by correctly restoring myisam state info pointer back to original
value, that is to shared state.

Affects MyISAM only. No good deterministic test case for this fix.


include/thr_lock.h:
  Added restore_status, that will be called prior to release a
  read lock.
myisam/mi_locking.c:
  Added mi_restore_status, that will be called prior to release a
  read lock. This function is intended to set myisam state pointer
  back to original value, that is to shared state.
myisam/mi_open.c:
  Added restore_status, that will be called prior to release a
  read lock.
myisam/myisamdef.h:
  Added mi_restore_status, that will be called prior to release a
  read lock.
mysys/thr_lock.c:
  Call restore_status if we have lock with priority lower than
  TL_WRITE_CONCURRENT_INSERT.
2006-12-05 18:44:14 +04:00
unknown
2e5a6f9eaa Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/ignore:
  auto-union
Docs/Makefile.am:
  Auto merged
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_handler.cc:
  Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
  Manual merge with import of upstream yaSSL
2006-12-04 19:28:38 +01:00
unknown
1172c8ae55 mysql_install_db.sh:
If --srcdir and --windows is given, check if error message file
  is in source or build tree (bug#24557)
Makefile.am:
  Cleaned up "ali_check" target, to satisfy "distcleancheck" (bug#24557)
mysql_install_db.sh:
  Added --srcdir=DIR option, used from top Makefile.am in dist-hook
  target, to find "fill_help_tables.sql" in VPATH build (bug#24557)
Makefile.am:
  Work around problem with "distcleancheck", "sql_yacc.cc" might be in both
  the source and build tree.
  Call "mysql_install_db" with new option --srcdir, to enable the script
  to find all that is needed, if source and build directory is not the same
  (bug#24557)


scripts/mysql_install_db.sh:
  If --srcdir and --windows is given, check if error message file
  is in source or build tree (bug#24557)
Makefile.am:
  Work around problem with "distcleancheck", "sql_yacc.cc" might be in both
  the source and build tree.
  Call "mysql_install_db" with new option --srcdir, to enable the script
  to find all that is needed, if source and build directory is not the same
  (bug#24557)
include/Makefile.am:
  Cleaned up "ali_check" target, to satisfy "distcleancheck" (bug#24557)
2006-12-02 23:16:47 +01:00
unknown
7191e77539 Fixed portability issue in my_thr_init.c (was added in my last push)
Fixed compiler warnings (detected by VC++):
- Removed not used variables
- Added casts
- Fixed wrong assignments to bool
- Fixed wrong calls with bool arguments
- Added missing argument to store(longlong), which caused wrong store method to be called.



client/mysqldump.c:
  Removed compiler warning
heap/hp_clear.c:
  Removed compiler warning
include/my_global.h:
  Removed compiler warning
include/my_tree.h:
  Changed memory limits from int to ulong
  (Allowed me to get rid of some compiler warnings)
myisam/mi_create.c:
  Removed compiler warning
myisam/myisampack.c:
  Removed compiler warning
mysys/base64.c:
  Removed compiler warning
mysys/my_thr_init.c:
  Fixed portability issue (detected on windows)
  Added DBUG_ASSERT to detect if we call my_thread_end() too many times
  Don't wait if THR_thread_count == -1 (error condition)
mysys/tree.c:
  Removed compiler warning
sql/field.cc:
  Removed compiler warning
  Fixed wrong parameter to check_date()
  Added missing argument to store(longlong)
sql/ha_archive.cc:
  Removed compiler warning
sql/ha_federated.cc:
  Removed compiler warning
sql/ha_innodb.cc:
  Removed not used variable
sql/handler.cc:
  Removed not used variable
  Fixed wrong if (we didn't detect if rollback or commit failed). Not critical as value is not yet used
sql/item.cc:
  Removed compiler warning
sql/item_func.cc:
  Removed compiler warning
sql/item_strfunc.cc:
  Removed compiler warning
sql/item_timefunc.cc:
  Removed compiler warning
sql/log.cc:
  Removed compiler warning
sql/mysql_priv.h:
  Removed compiler warning
sql/opt_range.cc:
  Removed compiler warning
sql/password.c:
  Removed compiler warning
sql/set_var.cc:
  Removed compiler warning
sql/slave.cc:
  Removed compiler warning
sql/sp.cc:
  Removed compiler warning
sql/sp_cache.cc:
  Removed compiler warning
sql/sp_head.cc:
  Removed compiler warning
  Adjusted argument to reserve() to not use up too much memory that we are probably not going to need
sql/sql_acl.cc:
  Added missing argument to store(longlong)
sql/sql_base.cc:
  Removed compiler warning
sql/sql_db.cc:
  Removed compiler warning
sql/sql_delete.cc:
  Removed compiler warning
sql/sql_handler.cc:
  Removed not used variable
sql/sql_lex.h:
  Removed not used variable
sql/sql_prepare.cc:
  Removed not used variable
sql/sql_rename.cc:
  Removed not used variable
sql/sql_select.cc:
  Fixed that select_options are not 'cut'
  Removed some not used variables
  Removed compiler warnings by adding cast
sql/sql_show.cc:
  Removed not used variables
  Added missing argument to store(longlong)
  Removed compiler warnings
sql/sql_trigger.cc:
  Removed not used variables
  Added cast to remove compiler warnings
sql/sql_update.cc:
  Fixed wrong set of bool variable
sql/sql_view.cc:
  Removed not used variables
  Added cast to get rid of compiler warnings
sql-common/client.c:
  Fixed compiler warning
sql-common/my_time.c:
  Fixed wrong argument to check_date()
  Added casts to get rid of compiler warnings
sql/sql_yacc.yy:
  Removed not used variable
sql/uniques.cc:
  Changes memory size from uint to ulong
  Added casts to get rid of compiler warnings
strings/ctype-simple.c:
  Fixed cast to get rid of compiler warnings
2006-11-30 18:25:05 +02:00
unknown
42fd48da99 Ignore some generated files
Don't return from my_thread_global_end() until all threads have called my_thread_end()
Bug#24387: Valgrind: my_thread_init (handle_sl sql, handle_one_conn, handle_slave_io)


BitKeeper/etc/ignore:
  added *.gcda *.gcno
include/my_pthread.h:
  Added my_thread_end_wait_time
  Removed not used thread variables
mysys/my_thr_init.c:
  Add thread counters.
  Don't return from my_thread_global_end() until all threads have called my_thread_end()
  (Or a timeout (5 seconds) has elapsed)
  This fixed some valgrind warnings
  Bug#24387: Valgrind: my_thread_init (handle_sl sql, handle_one_conn, handle_slave_io)
2006-11-29 22:14:08 +02:00
unknown
6ae9e9a57c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


sql/item_sum.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-11-29 17:25:23 +02:00
unknown
befbebcfdb Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


client/mysqltest.c:
  Auto merged
Makefile.am:
  Manual merge
mysql-test/mysql-test-run.pl:
  Manual merge
2006-11-28 21:11:05 +01:00
unknown
c789301fcd Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_deadlock.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/rpl_deadlock.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
include/my_sys.h:
  Manual merge, my_getpagesize broken out of "#ifdef HAVE_SYS_MMAN_H"
2006-11-28 20:59:57 +01:00
unknown
129a48b0b9 Increased heap max length to > 4G for 64 bit machines
Initialize key_part->type on open. This caused key_copy() to fail for bit_fields. (key_copy is used in HANDLER and opt_range)


include/heap.h:
  Increased heap max length to > 4G for 64 bit machines
mysql-test/r/show_check.result:
  Updated results after heap size change
mysql-test/r/type_bit.result:
  Added test for bug in bit field handling (in handler and opt_range.cc)
mysql-test/t/type_bit.test:
  Added test for bug in bit field handling (in handler and opt_range.cc)
sql/ha_heap.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/item_sum.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/mysqld.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/set_var.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/sql_class.h:
  Increased heap max length to > 4G for 64 bit machines
sql/sql_select.cc:
  Increased heap max length to > 4G for 64 bit machines
sql/table.cc:
  Initialize key_part->type ; This was used for bit fields but only set in temporary tables
sql/uniques.cc:
  Increased heap max length to > 4G for 64 bit machines
2006-11-28 00:47:21 +02:00
unknown
048dfce072 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kent/bk/mysql-5.0-merge


sql-common/my_time.c:
  Auto merged
2006-11-27 21:45:16 +01:00
unknown
4ab2a0164a Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-release
into  mysql.com:/Users/kent/mysql/bk/build/mysql-5.0-build


mysql-test/mysql-test-run.pl:
  Auto merged
2006-11-27 19:09:21 +01:00
unknown
880b3d84d1 Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt


libmysql/libmysql.c:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
strings/decimal.c:
  Auto merged
2006-11-27 16:25:52 +01:00
unknown
87e3047501 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/Makefile.am:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge of changes for RPM
2006-11-24 12:12:25 +01:00
unknown
026355d34a Rework my_getpagesize function
- Put 'my_getpagesize' in it's own .c file
 - Map the call 'my_getpagesize' directly to 'getpagesize' if it exists
 - Add default implementation for 'my_getpagesize' to be used if no platform
   specfic function exists


include/my_sys.h:
  Break out the defines for my_getpagesize from HAVE_SYS_MMAN_H as they don't depend on that.
  There is a check for the function in configure which defines HAVE_GETPAGESIZE if the function
  exists
mysys/CMakeLists.txt:
  Add new fil my_getpagesize.c
mysys/Makefile.am:
  Add new fil my_getpagesize.c
mysys/my_mmap.c:
  Remove my_getpagesize from my_mmap.c as it's now implemented in my_getpagesize.c
mysys/my_getpagesize.c:
  New BitKeeper file ``mysys/my_getpagesize.c''
2006-11-23 17:23:29 +01:00
unknown
42f6fd5f54 Added some missing DBUG_RETURN
Fixed that --valgrind works again with mysql-test-run.sh
Extended error messages when loosing connection during mysql_real_connect()


client/mysqldump.c:
  Added some missing DBUG_RETURN
include/errmsg.h:
  Extended error messages when loosing connection during mysql_real_connect()
libmysql/errmsg.c:
  Extended error messages when loosing connection during mysql_real_connect()
mysql-test/mysql-test-run.pl:
  Don't remove .reject files at startup
mysql-test/mysql-test-run.sh:
  Fixed that --valgrind works again
  Don't give warnings for directores in var/tmp
sql-common/client.c:
  Extended error messages when loosing connection during mysql_real_connect()
2006-11-23 16:41:21 +02:00
unknown
467210304a Add define for my_getpagesize to 8192(reworked in 5.0) 2006-11-23 12:06:04 +01:00
unknown
a3d041559d ABI fix
include/mysql_h.ic:
  this one should actually be removed from the ABI
2006-11-17 14:30:08 +04:00
unknown
96ad04dec0 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-0mrg


BitKeeper/deleted/.del-mysql_client.test:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
include/my_time.h:
  merging
libmysql/libmysql.c:
  merging
mysql-test/t/order_by.test:
  merging
2006-11-17 10:30:16 +04:00
unknown
17c238a15b Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1-mrg


include/mysql.h:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_class.h:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
mysql-test/t/mysql_client.test:
  merging
2006-11-16 20:44:37 +04:00
unknown
e5d88949c5 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


include/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
2006-11-13 13:33:33 +01:00
unknown
24ca44731d Remove the tmp file produced when checking abi 2006-11-13 13:32:39 +01:00
unknown
181c9b4dd4 Merge mysql.com:/home/bkroot/mysql-5.0-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
2006-11-13 12:44:53 +01:00
unknown
e1e79a8126 remove remnants of abi-check.ic
BitKeeper/deleted/.del-abi_check.ic:
  Delete: include/abi_check.ic
2006-11-10 16:07:27 +01:00
unknown
cb80733a89 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/t/rename.test:
  choose one of the race problem solutions. It was solved
  differently in -runtime and mainstream
2006-11-10 15:05:38 +03:00
unknown
4a3d614352 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


configure.in:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
2006-11-08 11:40:33 +01:00
unknown
7a7e4d5d69 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/mysql-test-run.pl:
  Auto merged
2006-11-07 12:57:30 +01:00
unknown
c6de4d1c3b Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-07 12:02:53 +01:00
unknown
b4093b65be Merge alik.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-11-07 13:45:56 +03:00
unknown
434192fe54 Make --mem settable with environment variable MTR_MEM and make it possible to pass the directory to use. I.e --mem=<directory>
include/abi_check.ic:
  Ignore file
include/abi_check:
  Ignore file
2006-11-07 11:07:27 +01:00
unknown
030d080d8b bug #19491 (5.0-related additional fixes)
include/my_time.h:
  we need to use it outside the my_time.cc
mysql-test/r/gis-rtree.result:
  result fixed
sql-common/my_time.c:
  'static' removed
sql/field.cc:
  checks for invalid datetimes added
2006-11-06 22:33:18 +04:00
unknown
e5bd94b2d4 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  outpost.site:/home/cps/mysql/trees/5.0-runtime-bug9191


configure.in:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2006-11-06 00:11:34 +03:00
unknown
6cf8ceebbf Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1-runtime
into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2006-11-06 00:05:02 +03:00
unknown
f4dd92bd4e Updates for abi_check
include/Makefile.am:
  Remove abi_check from BUILT_SOURCES it's in the "all" rule
  Make abi_check depend on mysql_h.ic as well
2006-11-04 09:23:19 +01:00
unknown
a0b3f213ae Remove sql_state-h from list of include files. (Merge error from 4.1) 2006-11-03 13:02:16 +01:00
unknown
f337a747ef Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-03 11:50:59 +01:00
unknown
f0364b7b84 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge.
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
2006-11-02 17:39:52 -05:00
unknown
e1a722b2d3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint


configure.in:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
myisam/sort.c:
  Manual merge.
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/t/innodb_mysql.test:
  Manual merge.
mysys/mf_iocache.c:
  Manual merge.
2006-11-02 17:27:42 -05:00
unknown
b74b097d1e Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


include/mysql_h.ic:
  C
  Use local
include/Makefile.am:
  Manual merge
2006-11-01 16:11:56 +01:00
unknown
b2c40c1698 Merge mysql.com:/home/cps/mysql/trees/4.1-runtime-bug9191
into  mysql.com:/home/cps/mysql/trees/5.0-runtime-bug9191


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/timezone2.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/timezone2.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/time.cc:
  Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
  Auto merged
sql-common/my_time.c:
  manual merge
sql/item_timefunc.cc:
  manual merge
sql/tztime.cc:
  manual merge
2006-11-01 17:35:35 +03:00
unknown
8a7bc05288 Fix Bug #9191 "TIMESTAMP/from_unixtime() no longer accepts 2^31-1"
(4.1 version, with post-review fixes)
  
  The fix for another Bug (6439) limited FROM_UNIXTIME() to
  TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT,
  however unix timestamp in general is not considered to be limited 
  by this value. All dates up to power(2,31)-1 are valid.
  
  This patch extends allowed TIMESTAMP range so, that max
  TIMESTAMP value is power(2,31)-1. It also corrects
  FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that
  max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME()
  is fixed accordingly to allow conversion of dates up to
  2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ()
  function to allow extended range of dates.
  
  The main problem solved in the patch is possible overflows
  of variables, used in broken-time representation to time_t
  conversion (required for UNIX_TIMESTAMP).


acinclude.m4:
  Add new macro to check time_t range
configure.in:
  Call the macro to check time_t range
include/my_time.h:
  Move time-related defines to proper place.
  Add a function to perform a rough check if
  a TIMESTAMP value fits into the boundaries.
  Note: it is defined as "static inline", as
  otherwise libmysql won't compile (due to the
  way how gcc handles "inline" directive).
mysql-test/r/func_time.result:
  Update test result
mysql-test/r/timezone.result:
  Update test result
mysql-test/r/timezone2.result:
  Update test result
mysql-test/t/func_time.test:
  Add test for Bug#9191 and update test to be consistent
  with new TIMESTAMP boundaries
mysql-test/t/timezone.test:
  Update old tests to be consistent
  with new TIMESTAMP boundaries
mysql-test/t/timezone2.test:
  Update tests for convert_tz to be consistent with new
  TIMESTAMP boundaries
sql/item_timefunc.cc:
  Fix convert_tz to allow dates from the new (extended)
  TIMESTAMP range
sql/mysql_priv.h:
  Move time handling defaults to my_time.h
sql-common/my_time.c:
  Because of increased TIMESTAMP_MAX_VALUE overflows in my_system_gmt_sec()
  became possible. Here we make it safe against the overflows by stepping
  back from the boundary dates which are likely to trigger them.
sql/time.cc:
  Update TIME_to_timestamp to allow conversion of
  extended date range
sql/tztime.cc:
  Fix new (4.1) implementation of broken-down time representation
  to time_t conversion routine to avoid overflows during conversion
  of boundary dates
mysql-test/r/timezone4.result:
  New BitKeeper file ``mysql-test/r/timezone4.result''
mysql-test/t/timezone4-master.opt:
  New BitKeeper file ``mysql-test/t/timezone4-master.opt''
mysql-test/t/timezone4.test:
  New BitKeeper file ``mysql-test/t/timezone4.test''
2006-11-01 16:47:40 +03:00
unknown
b7a4d7822f Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.0-hash-2


sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
2006-11-01 16:20:15 +03:00
unknown
57c2f22a54 Small cleanup in code handling stored routines/table prelocking.
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.


include/hash.h:
  Introduced auxillary hash_init_opt() macro which simplifies
  lazy initialization of HASH objects.
sql/sp.cc:
  Use lazy initialization for Query_tables_list::sroutines hash.
  This step should significantly decrease amount of memory consumed
  by stored routines as we no longer will allocate chunk of memory
  required for this HASH for each statement in routine.
sql/sql_lex.cc:
  Use lazy initialization for Query_tables_list::sroutines hash.
  This step should significantly decrease amount of memory consumed
  by stored routines as we no longer will allocate chunk of memory
  required for this HASH for each statement in routine.
sql/sql_lex.h:
  Updated comment describing Query_tables_list::sroutines to
  reflect that now we are use lazy initialization for this hash.
  Added constant for initial size of this hash.
2006-11-01 15:41:48 +03:00
unknown
e463ee9421 Bug#20404: SHOW CREATE TABLE fails with Turkish I
Problem: SHOW CREATE TABLE printed garbage in table
  name for tables having TURKISH I
  (i.e. LATIN CAPITABLE LETTER I WITH DOT ABOVE)
  when lower-case-table-name=1.
  
  Reason: In some cases during lower/upper conversion in utf8,
  the result string can be shorter the original string
  (including the above letter). Old implementation of caseup_str()
  and casedn_str() didn't handle the result length properly,
  assuming that length cannot change.
  
  This fix changes the result type of cs->cset->casedn_str()
  and cs->cset->caseup_str() from VOID to UINT, to return
  the result length, as well as put '\0' terminator on a 
  proper place.
  
  Also, my_caseup_str_utf8() and my_casedn_str_utf8() were 
  rewritten not to use strlen() for performance purposes.
  It was done with help of adding of new functions - my_utf8_uni_no_range()
  and my_uni_utf8_no_range() - for null terminated strings.



include/m_ctype.h:
  Changeing return type from void to int for caseup_str() and casedn_str()
mysql-test/r/lowercase_table.result:
  Adding test case
mysql-test/t/lowercase_table.test:
  Adding test case
sql/sql_parse.cc:
  Set table->table.length to result of my_casedn_str().
strings/ctype-bin.c:
  Changeing return type from void to int for caseup_str() and casedn_str()
strings/ctype-mb.c:
  Changeing return type from void to int for caseup_str() and casedn_str()
strings/ctype-simple.c:
  Changeing return type from void to int for caseup_str() and casedn_str()
strings/ctype-ucs2.c:
  Changeing return type from void to int for caseup_str() and casedn_str()
strings/ctype-utf8.c:
  Changeing return type from void to int for caseup_str() and casedn_str().
      Optimization, to get rid of strlen():
      Adding my_utf8_uni_no_range() and my_uni_utf8_no_range() - for null
      terninated strings.
2006-10-30 14:40:15 +04:00
unknown
928fa57a9e Update the rules for abi_check
include/Makefile.am:
  Move m_ctype.h from BUILT_SOURCES, it's in vcs
  Update the rule for abi_check
include/mysql_h.ic:
  Update the refernce and rename it to mysql_h.ic
2006-10-27 15:57:00 +02:00
unknown
b2ea3624e3 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/t/ctype_utf8.test:
  Auto merged
2006-10-26 22:54:25 +02:00
unknown
fc72e7623b Bug#23427 incompatible ABI change in 5.0.26?
- Improve icheck rules in Makefile.am


include/Makefile.am:
  Remove m_ctype from BUILT_SOURCES, it has been in bk for a looong time.
  Improve the icheck rules
   - Abort make if icheck fails to compare, very important.
   - Don't include include files from /usr into the icheck file. Avoids problem when running
     icheck on different machines.
   - If no icheck is availabel, touch the mysql_h.ic file so it exists for "make dist"
include/mysql_h_abi.ic:
  Remove all include files from /usr, no need to check that!
2006-10-26 22:20:43 +02:00
unknown
1444edfcef Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  siva.hindu.god:/usr/home/tim/m/bk/50


configure.in:
  Auto merged
2006-10-25 16:28:42 -06:00
unknown
d4bfae38ac Merge siva.hindu.god:/usr/home/tim/m/bk/g50
into  siva.hindu.god:/usr/home/tim/m/bk/50


configure.in:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysys/mf_iocache.c:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
myisam/sort.c:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/t/innodb_mysql.test:
  Manual merge
2006-10-24 14:42:08 -06:00
unknown
47b1c7f9a5 Update the reference file for mysql API/ABI for 5.0
include/mysql_h_abi.ic:
  Update the reference file for mysql API/ABI
2006-10-24 22:00:08 +02:00
unknown
80bd3e3856 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/ignore:
  auto-union
configure.in:
  Auto merged
include/mysql.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
include/Makefile.am:
  Merge, SUPERCLEANFILES and CLEANFILES has dissapeared in 5.0
2006-10-24 21:05:35 +02:00
unknown
9c9bf0aff2 WL#3462 Add testing of MySQL client ABI to prevent unintentional ABI breaks
BUG#23427 incompatible ABI change in 5.0.26?
   - Use the icheck tool if avaliable and compare the current mysql.h to a version
controlled reference file 


BitKeeper/etc/ignore:
  Added include/check_abi include/mysql_h.ic to the ignore list
configure.in:
  Look for icheck in configure
include/Makefile.am:
  Add rule to build mysql_h.ic if icheck is avaliable
  Add rule to compare mysql_h.ic to the version
  controlled reference file mysql_h_abi.ic
include/mysql.h:
  Add comment about taking care when editing mysql.h
  Add example how to add reserved fiels in the structs to
  allow for features to be added without breaking ABI
include/mysql_h_abi.ic:
  Add new file describing the libmysqlclient ABI used as a reference to detect ABI breakage
2006-10-24 20:32:07 +02:00
unknown
81dac08b52 Merge mysql.com:/home/hf/work/0current_stmt/my41-current_stmt
into  mysql.com:/home/hf/work/current_stmt/my50-current_stmt


include/mysql.h:
  merging
libmysqld/lib_sql.cc:
  merging
sql/sql_class.h:
  merging
2006-10-24 17:50:46 +05:00
unknown
6c4aa883ce Bug #23427 (incompatible ABI change)
the incompatibility was caused by current_stmt member added to the MYSQL
structure.
It's possible to move it to THD structure instead which saves ABI


include/mysql.h:
  member moved to the THD structure
libmysqld/lib_sql.cc:
  now we use THD member here
sql/sql_class.h:
  current_stmt member added for the embedded server
2006-10-24 17:19:02 +05:00
unknown
133e91aa89 Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-10-21 09:33:53 +02:00
unknown
c416425e9c Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0.27-release
into  mysql.com:/Users/kent/mysql/bk/mysql-5.0


configure.in:
  Auto merged
2006-10-21 01:13:50 +02:00
unknown
338c36c6e2 Merge zippy.cornsilk.net:/home/cmiller/emergency/mysql-5.0.26a-release
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-10-20 17:30:28 -04:00
unknown
a71a524eeb Bug #23427: incompatible ABI change in 5.0.26?
Revert 1 June change enough to restore ABI compatibility with previous
versions.


include/mysql.h:
  Revert patch that breaks ABI compatibility
libmysqld/lib_sql.cc:
  Remove useless assignment.
2006-10-20 17:17:24 -04:00
unknown
8cc480915f Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/myisam.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-10-20 11:02:56 +02:00
unknown
d30186772f Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/merge.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-10-19 14:37:49 +02:00
unknown
554aaed352 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-merge


sql/sql_select.cc:
  Auto merged
2006-10-19 09:59:01 +02:00
unknown
a2e0c419d3 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B22367-5.0-opt-merge


include/my_base.h:
  Auto merged
mysql-test/r/select.result:
  merge of 5.0-opt to 22367
mysql-test/t/select.test:
  merge of 5.0-opt to 22367
2006-10-17 10:58:01 +03:00
unknown
ffc1facce8 Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
MySQL is setting the flag HA_END_SPACE_KEYS for all the keys that reference
text or varchar columns with collation different than binary.
This was done to handle correctly the situation where a lookup on such a key
may return more than 1 row because of the presence of many rows that differ
only by the amount of trailing space in the table's string column.
Inserting such values however appears to violate the unique checks on 
INSERT/UPDATE. Thus that flag must not be set as it will prevent the optimizer
from choosing a faster access method.
This fix removes the setting of the HA_END_SPACE_KEYS flag.


include/my_base.h:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - disabled HA_END_SPACE_KEY as it's no longer needed
mysql-test/r/func_str.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - fixed explain in an existing case
mysql-test/r/merge.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - fixed explain in an existing case
mysql-test/r/select.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - test case
mysql-test/r/subselect.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - fixed explain in an existing case
mysql-test/t/select.test:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - test case
2006-10-16 18:09:58 +03:00
unknown
23e9415055 Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT
This will hopefully avoiid annoying crashes when running with --debug
Fix warnings  from the above in mysqltest.c


client/mysqltest.c:
  Fix format specifier warnings in mysqltest.c
include/my_dbug.h:
  Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT
  This will hopefully avoiid annoying crashes when running with --debug
2006-10-12 20:15:56 +02:00
unknown
7bcd1f9f54 Add ATTRIBUTE_FORMAT for _db_doprnt, it will catch problems
with DBUG_PRINT format specifiers


include/my_dbug.h:
  Add ATTRIBUTE_FORMAT for _db_doprnt, it will catch problems with DBUG_PRINT format specifiers
2006-10-12 20:02:17 +02:00
unknown
bac62fa32e Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/mysql-5.0.mrg


include/m_ctype.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/type_enum.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
strings/ctype-mb.c:
  SCCS merged
strings/ctype-utf8.c:
  SCCS merged
2006-10-12 13:50:22 +05:00
unknown
be0f6405c4 Merge polly.local:/tmp/maint/bug11655/my50-bug11655
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql-common/my_time.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
2006-10-12 11:28:44 +04:00
unknown
403cc15508 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug8283-one


include/my_sys.h:
  Auto merged
2006-10-11 22:28:06 +02:00
unknown
05d8dc82b4 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  chilla.local:/home/mydev/mysql-5.0-bug8283


include/my_sys.h:
  Auto merged
myisam/myisamdef.h:
  Auto merged
2006-10-11 17:57:47 +02:00
unknown
5623f2e9a6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk


sql/item_timefunc.cc:
  Auto merged
2006-10-11 14:57:09 +04:00
unknown
3baf203483 Merge polly.local:/tmp/maint/bug11655/my41-bug11655
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk


sql/field.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
2006-10-11 14:55:23 +04:00
unknown
78f47fbf3a Merge polly.local:/tmp/maint/bug11655/my41-bug11655
into  polly.local:/tmp/maint/bug11655/my50-bug11655


sql/time.cc:
  Auto merged
include/my_time.h:
  Manually merged
mysql-test/r/func_sapdb.result:
  Manually merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
sql-common/my_time.c:
  Manually merged
sql/field.cc:
  Manually merged
sql/item_timefunc.cc:
  Manually merged
2006-10-11 14:16:30 +04:00
unknown
91be4f6f0c Merge chilla.local:/home/mydev/mysql-4.1-bug8283-one
into  chilla.local:/home/mydev/mysql-5.0-bug8283


include/my_sys.h:
  Auto merged
include/myisam.h:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
myisam/mi_packrec.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
myisam/myisamdef.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Merge from 4.1
mysql-test/r/myisam.result:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Merge from 4.1
mysys/mf_iocache.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Merge from 4.1
2006-10-09 20:03:12 +02:00
unknown
679b5848f3 Merge chilla.local:/home/mydev/mysql-4.1-bug8283
into  chilla.local:/home/mydev/mysql-4.1-bug8283-one


myisam/mi_check.c:
  Auto merged
myisam/mi_packrec.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/myisam.result:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Manual merge
mysql-test/t/myisam.test:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Manual merge
2006-10-09 19:40:16 +02:00
unknown
3109da7719 Bug#8283 - OPTIMIZE TABLE causes data loss
OPTIMIZE TABLE with myisam_repair_threads > 1 performs a non-quick 
parallel repair. This means that it does not only rebuild all 
indexes, but also the data file.

Non-quick parallel repair works so that there is one thread per 
index. The first of the threads rebuilds also the new data file.

The problem was that all threads shared the read io cache on the
old data file. If there were holes (deleted records) in the table,
the first thread skipped them, writing only contiguous, non-deleted
records to the new data file. Then it built the new index so that
its entries pointed to the correct record positions. But the other
threads didn't know the new record positions, but put the positions
from the old data file into the index.

The new design is so that there is a shared io cache which is filled
by the first thread (the data file writer) with the new contiguous
records and read by the other threads. Now they know the new record
positions.

Another problem was that for the parallel repair of compressed
tables a common bit_buff and rec_buff was used. I changed it so
that thread specific buffers are used for parallel repair.

A similar problem existed for checksum calculation. I made this
multi-thread safe too.


include/my_sys.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Redesign of io_cache_share.
include/myisam.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Redesign of checksum calculation in mi_check.c.
  'calc_checksum' is now in myisamdef.h:st_mi_sort_param.
myisam/mi_check.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Implemented a new parallel repair design.
  Using a synchronized shared read/write cache.
  Allowed for thread specific bit_buff, rec_buff, and calc_checksum.
myisam/mi_open.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added DBUG output.
myisam/mi_packrec.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Allowed for thread specific bit_buff and rec_buff.
myisam/myisamdef.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Commented on checksum calculation variables.
  Allowed for thread specific bit_buff.
  Added DBUG output for better table crash detection.
myisam/sort.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added implications of the new parallel repair design.
  Renamed 'info' -> 'sort_param'.
  Added DBUG output.
mysql-test/r/myisam.result:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added test results.
mysql-test/t/myisam.test:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added test cases.
mysys/mf_iocache.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Redesign of io_cache_share.
  We do now allow a writer to synchronize himself with the
  readers of a shared cache. When all threads join in the lock,
  the writer copies the data from his write buffer to the shared
  read buffer.
2006-10-09 19:26:55 +02:00
unknown
287b027ed8 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-kt


include/m_ctype.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
2006-10-05 16:38:21 +05:00
unknown
634d3ff2c6 Fixes a number of problems with time/datetime <-> string conversion functions:
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced


include/my_time.h:
  Added defines for the TIME limits
  Added defines for the warning flags set by str_to_time() and check_time_range()
  Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
  Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
  Fixed testcase which relied on incorrect behaviour
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
  Added check_time_range() to be used from str_to_time() and item_timefunc.cc
  Added new out-of-range flag to str_to_time() warnings
  Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
  Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
  Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
  Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
  Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
  Checks for 'unsigned int' overflows in Item_func_maketime
  Use make_time_with_warn() instead of make_time() in Item_func_maketime
  Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
  Check for return value of str_to_time() along with warning flags
2006-10-04 17:13:32 +04:00
unknown
7d74876585 Merge bk-internal:/home/bk/mysql-5.0-rpl
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
include/m_ctype.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-10-03 14:24:43 +02:00
unknown
55badb1211 Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


include/m_ctype.h:
  Auto merged
include/my_global.h:
  Manual merge
2006-10-03 01:04:18 +02:00
unknown
cdec7323ec Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers
This was available from gcc 3.1, so diable it before that
Update m_ctype.h to use the new macro


include/m_ctype.h:
  Use macro ATTRIBUTE_FORMAT_FPTR on function pointer
include/my_global.h:
  Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers
  This was available from gcc 3.1, so diable it before that
2006-10-03 00:48:26 +02:00
unknown
60dc71eb95 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


include/my_global.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Manual merge
sql/mysqld.cc:
  Manual merge
2006-10-02 18:46:41 +02:00
unknown
0ca2e21b5e Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
2006-10-02 14:19:51 +02:00
unknown
5bd5f55eee When compiling with qcc on QNC the define __GNUC__will be set although it doesn't support full GNU syntax
- disable __attribute__ when using qcc


include/my_global.h:
  Disable __attribute__ when compiling with qcc
2006-10-02 13:53:10 +02:00
unknown
bde5116b51 Fix __attribute__(A) macro (it formerly used bogus __cplusplus__ symbol) 2006-10-02 13:46:40 +02:00
unknown
38a15a3151 Fix __attribute__(A) macro (it formerly used bogus __cplusplus__ symbol)
include/my_global.h:
  Change __cplusplus__ to __cplusplus in #define __attribute__(A) macro
2006-09-30 02:00:04 -06:00
unknown
343fa9005e Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-clean


include/my_global.h:
  Auto merged
2006-09-29 19:32:05 -07:00
unknown
9d2d5974d7 Merge rama.(none):/home/jimw/my/mysql-4.1-clean
into  rama.(none):/home/jimw/my/mysql-5.0-clean


include/my_global.h:
  Auto merged
2006-09-29 19:28:44 -07:00
unknown
89fa50a92b Disable __attribute__ entirely on g++ < 3.4. (Bug #2717)
include/my_global.h:
  Disable __attribute__ on g++ < 3.4. There are actually some forms of it that
  are supported, but rather than create more ATTRIBUTE_<foo> macros to handle
  them, it is easier to just disable them all. We will catch the compiler warnings
  with more recent versions of g++.
2006-09-29 19:28:16 -07:00
unknown
4357e22061 Merge mysql.com:/usr/home/bar/mysql-5.0.b6147v2
into  mysql.com:/usr/home/bar/mysql-5.0.b6147rpl


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
sql/field.cc:
  Auto merged
2006-09-29 16:40:18 +05:00
unknown
39bdf4c41c Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-clean


include/my_global.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2006-09-28 20:17:17 -07:00
unknown
00820e2b0a Fix merge of __attribute__ cleanup.
include/my_sys.h:
  Fix bad merge
sql/set_var.cc:
  Fix bad __attribute__ usage.
2006-09-28 20:15:58 -07:00
unknown
44cdd695ab Merge rama.(none):/home/jimw/my/mysql-4.1-clean
into  rama.(none):/home/jimw/my/mysql-5.0-clean


include/m_ctype.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_global.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.h:
  Auto merged
include/my_sys.h:
  Resolve conflict
sql/mysql_priv.h:
  Resolve conflict
sql/mysqld.cc:
  Resolve conflict
sql/opt_range.cc:
  Resolve conflict
sql/sql_acl.cc:
  Resolve conflict
2006-09-28 18:09:10 -07:00
unknown
ec55538728 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


include/mysql_com.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Manual merge.
mysql-test/t/ctype_utf8.test:
  Manual merge.
2006-09-28 10:09:57 -04:00
unknown
9c95543828 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0-maint.b22227
2006-09-28 10:41:09 +05:00
unknown
c1e264a5f5 after merge fix 2006-09-27 19:21:29 +05:00
unknown
6d77ba47e5 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/5.0


sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/table.cc:
  Auto merged
include/mysql_com.h:
  manual merge
mysql-test/r/ctype_utf8.result:
  manual merge
mysql-test/t/ctype_utf8.test:
  manual merge
sql/sql_acl.cc:
  manual merge
2006-09-27 18:06:46 +05:00
unknown
abd883f4d0 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
unknown
628846013f Fix for bug #22227: ulong not defined for client library
- don't use (ulong) type cast in the include/mysql_com.h as it's not 
    a standard type and might cause compilation errors on some platforms.


include/mysql_com.h:
  Fix for bug #22227: ulong not defined for client library
    - use UL istead of (ulong) type cast.
2006-09-22 14:46:18 +05:00
unknown
0b2a28f5cf BUG#9678: Client library hangs after network communication failure
(back-port to 4.0)

Socket timeouts in client library were used only on Windows.
Additionally, in 4.0 write operations erroneously set read timeout.

The solution is to use socket timeouts in client library on all
systems were they are supported, and to differentiate between read
and write timeouts.

No test case is provided because it is impossible to simulate network
failure in current test suite.


include/violite.h:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
libmysqld/lib_vio.c:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
sql/net_serv.cc:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
vio/viosocket.c:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
  Implement socket timeouts on POSIX systems.
2006-09-18 22:02:06 +04:00
unknown
dfb219f6c9 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.0-engines


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/share/errmsg.txt:
  SCCS merged
2006-09-18 16:23:45 +05:00
unknown
1e5685bde0 Add definition of SHUT_RDWR for compiling on windows 2006-09-15 17:53:45 +02:00
unknown
040c9378c1 Merge msvensson.mysql.internal:mysql/my50-m-bug21222
into  shellback.(none):/home/msvensson/mysql/work/my50-work
2006-09-15 16:49:24 +02:00
unknown
342dea0e35 Better comment text (thanks to SergeyP for suggestions made for the b#20471 patch) 2006-09-14 10:05:07 +05:00
unknown
4fd663b896 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b20471v2


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
2006-09-14 09:12:47 +05:00
unknown
dc6243e588 after merge fix
include/mysql_com.h:
  USERNAME_LENGTH is changed to USERNAME_BYTE_LENGTH
mysql-test/r/ctype_utf8.result:
  result fix
mysql-test/t/ctype_utf8.test:
  test fix
sql/sp.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
sql/sp_head.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
sql/sql_acl.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
sql/sql_class.h:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
sql/sql_parse.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  Function check_string_length() is fixed, now it check string lenght in symbols
sql/sql_repl.h:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
2006-09-07 18:09:49 +05:00
unknown
146049d2e4 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-merge
into  mysql.com:/home/gluh/MySQL/Merge/5.0


include/mysql_com.h:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/ctype_utf8.result:
  manual merge
sql/sql_acl.cc:
  manual merge
2006-09-07 15:17:46 +05:00
unknown
5d3e6c2758 Fixes for crashes and test failures
scripts/make_win_bin_dist:
  BitKeeper file /home/georg/work/mysql/prod/mysql-5.0-win/scripts/make_win_bin_dist
client/mysqlbinlog.cc:
  Fix for cmake build: Cmake doesn't use the VC++ files
extra/comp_err.c:
  fixed windows crash (debug): We can't call DBUG_RETURN after my_end.
include/my_dbug.h:
  added missing empty define for DBUG_LEAVE to prevent precompiler errors when
  compiling in non_debug mode
mysql-test/mysql-test-run.pl:
  Added support for new cmake release and debug paths.
mysql-test/t/system_mysql_db_fix.test:
  This test requires unix shell script mysql_fix_previleges_tables -> skip under windows
mysys/my_seek.c:
  Fix for windows debug crash. However this solution is bad: we should never
  call lseek with an invalid file pointer.
sql/ha_archive.cc:
  Fixed windows crash: We need dup in gzdopen to keep the filehandle open,
  otherwise subsequent calls to mysql_close will fail/crash.
2006-09-01 14:34:37 +02:00
unknown
1a22b9c1f6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897


configure.in:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-08-31 12:34:06 +04:00
unknown
2233201ba7 Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max"
  Strict mode should fail if autoincrement value is out of range


include/my_base.h:
  Add new handler error codes
sql/ha_berkeley.cc:
  handle error in update_auto_increment()
sql/ha_heap.cc:
  handle error in update_auto_increment()
sql/ha_innodb.cc:
  handle error in update_auto_increment()
sql/ha_myisam.cc:
  handle error in update_auto_increment()
sql/ha_myisammrg.cc:
  handle error in update_auto_increment()
sql/ha_ndbcluster.cc:
  handle error in update_auto_increment()
sql/handler.cc:
  return error from handler::update_auto_increment()
sql/handler.h:
  change return type of handler::update_auto_increment() to int
sql/share/errmsg.txt:
  new error message for auto-increment
mysql-test/include/strict_autoinc.inc:
  New BitKeeper file ``mysql-test/include/strict_autoinc.inc''
mysql-test/r/strict_autoinc_1myisam.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_1myisam.result''
mysql-test/r/strict_autoinc_2innodb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_2innodb.result''
mysql-test/r/strict_autoinc_3heap.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_3heap.result''
mysql-test/r/strict_autoinc_4bdb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_4bdb.result''
mysql-test/r/strict_autoinc_5ndb.result:
  New BitKeeper file ``mysql-test/r/strict_autoinc_5ndb.result''
mysql-test/t/strict_autoinc_1myisam.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_1myisam.test''
mysql-test/t/strict_autoinc_2innodb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_2innodb.test''
mysql-test/t/strict_autoinc_3heap.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_3heap.test''
mysql-test/t/strict_autoinc_4bdb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_4bdb.test''
mysql-test/t/strict_autoinc_5ndb.test:
  New BitKeeper file ``mysql-test/t/strict_autoinc_5ndb.test''
2006-08-30 13:20:39 -07:00
unknown
a595b725c6 Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-release
into  mysql.com:/Users/kent/mysql/bk/mysql-5.0


include/mysql.h:
  SCCS merged
include/mysql_com.h:
  SCCS merged
sql-common/client.c:
  SCCS merged
2006-08-30 19:31:57 +02:00
unknown
ddb9f8668f Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte


include/mysql_com.h:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN
mysql-test/r/ctype_utf8.result:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
mysql-test/t/ctype_utf8.test:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
sql-common/client.c:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/sql_acl.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that user name is not longer than USERNAME_LENGTH symbols
sql/sql_parse.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/table.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that db name is not longer than NAME_LEN symbols
2006-08-30 15:56:17 +05:00
unknown
8ea5f31a46 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
mysql-test/r/grant.result:
  Manual merge.
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/grant.test:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-08-30 00:45:33 +04:00
unknown
d3926ea657 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/release/mysql-5.0-release_mergable
into  zippy.cornsilk.net:/home/cmiller/work/mysql/release/mysql-5.0-release
2006-08-25 11:56:19 -04:00
unknown
0c1ccbf014 Bug#21543: 5.0.24 breaks ABI compatibility for python bindings: \
InterfaceError on connect

Removed the bool flag from the st_mysql_options struct, since it adds 
another word in size to the memory size and shifts member memory locations
down, both of which break binary-interface compatibility.

Instead, use a flag, 2**30, in the client_options bit-field to represent
that the client should check the SSL certificate of the server.


include/mysql.h:
  Do not change the struct size.
include/mysql_com.h:
  Add a new bit-flag for client verifying server SSL certificate.
  
  Emphasize that we're not stepping on anyone else's bit/toes.
sql-common/client.c:
  Set and read the bit-field for client-side SSL-cert checking of the server.
2006-08-25 11:54:33 -04:00
unknown
79628df018 Fix for bug#21537, "Error at startup"
These variables must be defined for Netware, or it fails
to recognize hard paths starting from the device.

(Packport of:  2006/08/16 19:30:46+03:00 jani@ua141d10.elisa.omakaista.fi  )


include/config-netware.h:
  Fix for bug#21537, "Error at startup"
  
  These variables must be defined for Netware.
  
  (Backport of:  2006/08/16 19:30:44+03:00 jani@ua141d10.elisa.omakaista.fi +4 -0  )
2006-08-23 12:08:08 +02:00
unknown
b5cbed72bc Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21051-2


include/mysql_com.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
2006-08-22 12:21:37 +04:00
unknown
877477f173 BUG#21051: RESET QUERY CACHE very slow when query_cache_type=0
There were two problems: RESET QUERY CACHE took a long time to complete
and other threads were blocked during this time.

The patch does three things:
  1 fixes a bug with improper use of test-lock-test_again technique.
      AKA Double-Checked Locking is applicable here only in few places.
  2 Somewhat improves performance of RESET QUERY CACHE.
      Do my_hash_reset() instead of deleting elements one by one.  Note
      however that the slowdown also happens when inserting into sorted
      list of free blocks, should be rewritten using balanced tree.
  3 Makes RESET QUERY CACHE non-blocking.
      The patch adjusts the locking protocol of the query cache in the
      following way: it introduces a flag flush_in_progress, which is
      set when Query_cache::flush_cache() is in progress.  This call
      sets the flag on enter, and then releases the lock.  Every other
      call is able to acquire the lock, but does nothing if
      flush_in_progress is set (as if the query cache is disabled).
      The only exception is the concurrent calls to
      Query_cache::flush_cache(), that are blocked until the flush is
      over.  When leaving Query_cache::flush_cache(), the lock is
      acquired and the flag is reset, and one thread waiting on
      Query_cache::flush_cache() (if any) is notified that it may
      proceed.


include/mysql_com.h:
  Add comment for NET::query_cache_query.
sql/net_serv.cc:
  Use query_cache_init_query() for initialization of
  NET::query_cache_query if query cache is used.
  Do not access net->query_cache_query without a lock.
sql/sql_cache.cc:
  Fix bug with accessing query_cache_size, Query_cache_query::wri and
  thd->net.query_cache_query before acquiring the lock---leave
  double-check locking only in safe places.
  Wherever we check that cache is usable (query_cache_size > 0) we now
  also check that flush_in_progress is false, i.e. we are not in the
  middle of cache flush.
  Add Query_cache::not_in_flush_or_wait() method and use it in
  Query_cache::flush_cache(), so that threads doing cache flush will
  wait it to finish, while other threads will bypass the cache as if
  it is disabled.
  Extract Query_cache::free_query_internal() from Query_cache::free_query(),
  which does not removes elements from the hash, and use it together with
  my_hash_reset() in Query_cache::flush_cache().
sql/sql_cache.h:
  Add declarations for new members and methods.
  Make is_cacheable() a static method.
  Add query_cache_init_query() function.
sql/sql_class.cc:
  Use query_cache_init_query() for initialization of
  NET::query_cache_query.
2006-08-22 11:47:52 +04:00
unknown
915bdfbea8 Bug #2717: include/my_global.h mis-defines __attribute__
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
  __attribute__((format(...))) safely, make more use of the format attribute,
  and fix some of the warnings that this turns up (plus a bonus unrelated one).


include/m_ctype.h:
  Add ATTRIBUTE_FORMAT to printf-like functions.
include/m_string.h:
  Add ATTRIBUTE_FORMAT to my_snprintf() declaration.
include/my_global.h:
  Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers.
  Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it
  is available from different versions of gcc and g++.
include/my_sys.h:
  Add ATTRIBUTE_FORMAT() to my_printf_error declaration
sql/item_subselect.cc:
  Silence warning about members being initialized out-of-order
sql/item_timefunc.cc:
  Fix format specifier in snprintf() calls with milliseconds
sql/mysql_priv.h:
  Add ATTRIBUTE_FORMAT to printf-like functions.
sql/mysqld.cc:
  Fix various format specifiers
  Make sure that method_conv is always set by myisam_stats_method
sql/opt_range.cc:
  Cast pointers to correct type for %lx
sql/set_var.cc:
  Fix __attribute__((unused)) (missing inner set of parens)
sql/slave.cc:
  Fix format specifier
sql/slave.h:
  Add ATTRIBUTE_FORMAT to slave_print_error() declaration.
sql/sql_acl.cc:
  Fix number of  arguments passed for formatting, and fix acl_host_or_ip being
  passed instead of just the hostname.
sql/sql_class.h:
  Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
2006-08-17 12:25:40 -07:00
unknown
f06744cc8c Fix for bug#21537, "Error at startup"
These variables must be defined for Netware, or it fails
to recognize hard paths starting from the device.



include/config-netware.h:
  Fix for bug#21537, "Error at startup"
  
  These variables must be defined for Netware.
2006-08-16 19:30:46 +03:00
unknown
dcb6659001 Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
The previous bug fix didn't work when using partial keys.
Don't use GNUC min/max operations are they are depricated.
Fixed valgrind warning


BitKeeper/etc/ignore:
  Added */.libs/*
include/my_global.h:
  Don't use GNUC min/max operations are they are depricated
myisam/mi_rkey.c:
  Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
  The previous bug fix didn't work when using partial keys.
myisam/mi_test_all.res:
  Updated results to match mi_test_all.sh
myisam/mi_test_all.sh:
  Removed confusing warning
mysql-test/r/myisam.result:
  Added test case for #14400
mysql-test/t/myisam.test:
  Added test case for #14400
sql/sql_select.cc:
  Fixed valgrind warning (in field_string::val_int())
2006-08-10 22:41:19 +03:00
unknown
f3919e9284 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


include/mysql.h:
  Auto merged
include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-02 14:13:01 +04:00
unknown
d6e4a75aaf Bug#21222 Patch to support GNU/kFreeBSD build
- Thanks to Christian Hammers for the patch!


include/my_global.h:
  Define __GNU_SOURCE to 1 also when __GLIBC__ is defined
2006-07-26 15:43:03 +02:00
unknown
36510232aa A fix and a test case for Bug#15752 "Lost connection to MySQL server
when calling a SP from C API"

The bug was caused by lack of checks for misuse in mysql_real_query. 
A stored procedure always returns at least one result, which is the 
status of execution of the procedure itself.
This result, or so-called OK packet, is similar to a result
returned by INSERT/UPDATE/CREATE operations: it contains the overall
status of execution, the number of affected rows and the number of
warnings. The client test program attached to the bug did not read this 
result and ivnoked the next query. In turn, libmysql had no check for 
such scenario and mysql_real_query was simply trying to send that query 
without reading the pending response, thus messing up the communication
protocol.

The fix is to return an error from mysql_real_query when it's called
prior to retrieval of all pending results.


client/mysqlbinlog.cc:
  net_safe_read -> cli_safe_read
include/mysql.h:
  Remove a private function from the public header.
include/mysql_com.h:
  Remove a define that is never used.
include/sql_common.h:
  Add a declaration for cli_safe_read - a function that reads one packet
  from the server.
libmysql/libmysql.c:
  net_safe_read -> cli_safe_read
  Return CR_COMMANDS_OUT_OF_SYNC on attempt to execute a statement
  using a connection which has pending result sets.
sql-common/client.c:
  Actual fix for Bug#15752: if the server has pending result sets for
  the client, return CR_COMMANDS_OUT_OF_SYNC on attempt to execute
  another query. Similarly to the behaviour of mysql_use_result(),
  multiple result sets block the connection and must be fetched
  before it can be used for another query.
  This uncovered an error in the protocol: the server doesn't drop
  SERVER_MORE_RESULTS_EXISTS status flag upon an error, so in case of
  a multi-query like SELECT 1; SELECT syntax_error; SELECT 2; 
  the client has no way to know that the server won't ever come to 
  execution of the third query and won't return any result sets for it.
  For now, fix it in cli_safe_read, as a proper fix requires extension
  of the client-server protocol.
sql/protocol.cc:
  Remove a name that is never used.
sql/slave.cc:
  net_safe_read -> cli_safe_read
tests/mysql_client_test.c:
  Make 'query' a local variable to avoid name clash.
  Add a test case for Bug#15752 "Lost connection to MySQL server when
  calling an SP from C API"
2006-07-24 14:56:53 +04:00
unknown
a7ba5b75a6 Merge bk://anubis/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/merge/mysql-5.0


sql/handler.cc:
  Auto merged
2006-07-21 10:14:25 -07:00
unknown
d2f7fe3558 Bug#20471 LIKE search fails with indexed utf8 char column
The main problem was already fixed by Igor under terms of 16674.
Adding some additional minor fixes and tests.


include/m_ctype.h:
  Adding reference to CHARSET_INFO.txt
mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
strings/CHARSET_INFO.txt:
  Adding comment about max_sort_char
strings/ctype-mb.c:
  Restiring that non-Unicode character sets use 0xFF as pad character
  for max_str. Only Unicode character sets use wc_mb.
strings/ctype-utf8.c:
  Fixed that max_sort_char for UTF8 from U+00FF to U+FFFF.
2006-07-20 15:52:48 +05:00
unknown
03d411b1d1 Bug#6147: Traditional: Assigning a string to a numeric column has unexpected results
The problem was that when converting a string to an exact number,
rounding didn't work, because conversion didn't understand
approximate numbers notation.
Fix: a new function for string-to-number conversion was implemented,
which is aware of approxinate number notation (with decimal point
and exponent, e.g. -19.55e-1)


include/m_ctype.h:
  Adding new function into MY_CHARSET_HANDLER
  Adding prototypes for 8bit and ucs2 functions.
mysql-test/r/loaddata.result:
  Fixing results
mysql-test/r/ps_2myisam.result:
  Fixing results
mysql-test/r/ps_3innodb.result:
  Fixing results
mysql-test/r/ps_4heap.result:
  Fixing results
mysql-test/r/ps_5merge.result:
  Fixing results
mysql-test/r/ps_6bdb.result:
  Fixing results
mysql-test/r/rpl_rewrite_db.result:
  Fixing results
mysql-test/r/select.result:
  Fixing results
mysql-test/r/sp-vars.result:
  Fixing results
mysql-test/r/strict.result:
  Fixing results
mysql-test/r/view.result:
  Fixing results
mysql-test/r/warnings.result:
  Fixing results
mysql-test/t/strict.test:
  Fixing results
sql/field.cc:
  Using new function
strings/ctype-big5.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-bin.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-cp932.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-euc_kr.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-eucjpms.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-gb2312.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-gbk.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-latin1.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-simple.c:
  Implementing my_strntoull10_8bit
  Adding new function into MY_CHARSET_HANDLER
strings/ctype-sjis.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-tis620.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-ucs2.c:
  Implementing UCS2 wrapper for 8bit version
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-ujis.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-utf8.c:
  Adding new function into the MY_CHARSET_HANDLER structure
mysql-test/r/round.result:
  New BitKeeper file ``mysql-test/r/round.result''
mysql-test/t/round.test:
  New BitKeeper file ``mysql-test/t/round.test''
2006-07-20 13:41:12 +05:00
unknown
a00f18e5e6 Merge bk-internal:/home/bk/mysql-5.0-engines
into  rama.(none):/home/jimw/my/mysql-5.0-17608


include/my_base.h:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/handler.cc:
  Auto merged
2006-07-18 10:25:04 -07:00
unknown
2dfdcae398 Merge mysql.com:/home/hf/work/mysql-4.1.mrg
into  mysql.com:/home/hf/work/mysql-5.0.mrg


libmysqld/embedded_priv.h:
  Auto merged
sql-common/client.c:
  Auto merged
include/mysql.h:
  merging
libmysql/libmysql.c:
  merging
libmysqld/lib_sql.cc:
  merging
libmysqld/libmysqld.c:
  merging
sql/sql_parse.cc:
  merging
2006-07-18 14:52:29 +05:00
unknown
d9992cc79e Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.16017


include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
libmysqld/libmysqld.c:
  merging
2006-07-13 22:32:18 +05:00
unknown
e52940aa7f Merge bk-internal:/home/bk/mysql-5.0-engines
into  rama.(none):/home/jimw/my/mysql-5.0-17766
2006-07-11 17:29:36 -07:00
unknown
97cdd9df8a Bug #17766: The server accepts to create MERGE tables which cannot work
Changed the error reporting (and a crash) when inserting data into a
 MERGE table that has no underlying tables or no INSERT_METHOD specified
 by reporting that it is read-only.


include/my_base.h:
  Add new handler error
mysql-test/r/merge.result:
  Update results
mysql-test/t/merge.test:
  Add new regression test
sql/ha_myisammrg.cc:
  When trying to insert into a MERGE table with no underlying tables
  or no INSERT_METHOD, report that it is read-only.
sql/handler.cc:
  Handle new error message
2006-07-11 17:28:50 -07:00
unknown
f5340f8c7d Merge bodhi.local:/opt/local/work/mysql-5.0-root
into  bodhi.local:/opt/local/work/mysql-5.0-runtime


sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_update.cc:
  Manual merge.
2006-07-07 22:09:43 +04:00
unknown
685ccf85d4 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/home/dlenev/mysql-5.0-bg18437-3


mysql-test/t/federated.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/federated.result:
  Manual merge.
2006-07-06 14:31:32 +04:00
unknown
520cd48539 Merge mysqldev@production:my/mysql-5.0-release
into  rt.int.sifira.dk:/usr/local/mysql/tmp-5.0


include/my_sys.h:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/t/key.test:
  Auto merged
sql/table.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-07-04 12:08:58 +02:00
unknown
ae9724cce1 Fix for bug#18437 "Wrong values inserted with a before update trigger on
NDB table".

SQL-layer was not marking fields which were used in triggers as such. As
result these fields were not always properly retrieved/stored by handler
layer. So one might got wrong values or lost changes in triggers for NDB,
Federated and possibly InnoDB tables.
This fix solves the problem by marking fields used in triggers
appropriately.

Also this patch contains the following cleanup of ha_ndbcluster code:

We no longer rely on reading LEX::sql_command value in handler in order
to determine if we can enable optimization which allows us to handle REPLACE
statement in more efficient way by doing replaces directly in write_row()
method without reporting error to SQL-layer.
Instead we rely on SQL-layer informing us whether this optimization
applicable by calling handler::extra() method with
HA_EXTRA_WRITE_CAN_REPLACE flag.
As result we no longer apply this optimzation in cases when it should not
be used (e.g. if we have on delete triggers on table) and use in some
additional cases when it is applicable (e.g. for LOAD DATA REPLACE).

Finally this patch includes fix for bug#20728 "REPLACE does not work
correctly for NDB table with PK and unique index".
  
This was yet another problem which was caused by improper field mark-up.
During row replacement fields which weren't explicity used in REPLACE
statement were not marked as fields to be saved (updated) so they have
retained values from old row version. The fix is to mark all table
fields as set for REPLACE statement. Note that in 5.1 we already solve
this problem by notifying handler that it should save values from all
fields only in case when real replacement happens.


include/my_base.h:
  Added HA_EXTRA_WRITE_CAN_REPLACE, HA_EXTRA_WRITE_CANNOT_REPLACE - new
  parameters for ha_extra() method. We use them to inform handler that
  write_row() which tries to insert new row into the table and encounters
  some already existing row with same primary/unique key can replace old
  row with new row instead of reporting error.
mysql-test/r/federated.result:
  Additional test for bug#18437 "Wrong values inserted with a before update
  trigger on NDB table".
mysql-test/r/ndb_replace.result:
  Added test for bug #20728 "REPLACE does not work correctly for NDB table
  with PK and unique index". Updated wrong results from older test.
mysql-test/t/federated.test:
  Additional test for bug#18437 "Wrong values inserted with a before update
  trigger on NDB table".
mysql-test/t/ndb_replace.test:
  Added test for bug #20728 "REPLACE does not work correctly for NDB table
  with PK and unique index".
sql/ha_ndbcluster.cc:
  We no longer rely on reading LEX::sql_command value in handler in order
  to determine if we can enable optimization which allows us to handle REPLACE
  statement in more efficient way by doing replaces directly in write_row()
  method without reporting error to SQL-layer.
  Instead we rely on SQL-layer informing us whether this optimization
  applicable by calling handler::extra() method with
  HA_EXTRA_WRITE_CAN_REPLACE flag.
  As result we no longer apply this optimization in cases when it should not
  be used (e.g. if we have on delete triggers on table) and use in some
  additional cases when it is applicable (e.g. for LOAD DATA REPLACE).
sql/item.cc:
  Item_trigger_field::setup_field():
    Added comment explaining why we don't set Field::query_id in this method.
sql/mysql_priv.h:
  mysql_alter_table() function no longer takes handle_duplicates argument.
  Added declaration of mark_fields_used_by_triggers_for_insert_stmt() function.
sql/sql_delete.cc:
  Mark fields which are used by ON DELETE triggers so handler will retrieve
  values for these fields.
sql/sql_insert.cc:
  Explicitly inform handler that we are doing REPLACE (using ha_extra() method)
  in cases when it can promote insert operation done by write_row() to replace.
  Also when we do REPLACE we want to store values for all columns so we should
  inform handler about it.
  Finally we should mark fields used by ON UPDATE/ON DELETE triggers as such
  so handler can properly retrieve/restore values in these fields during
  execution of REPLACE and INSERT ... ON DUPLICATE KEY UPDATE statements.
sql/sql_load.cc:
  Explicitly inform handler that we are doing LOAD DATA REPLACE (using
  ha_extra() method) in cases when it can promote insert operation done by
  write_row() to replace.
  Also when we do replace we want to save (replace) values for all columns
  so we should inform handler about it.
  Finally to properly execute LOAD DATA for table with triggers we should
  mark fields used by ON INSERT triggers as such so handler can properly
  store values for these fields.
sql/sql_parse.cc:
  mysql_alter_table() function no longer takes handle_duplicates argument.
sql/sql_table.cc:
  Got rid of handle_duplicates argument in mysql_alter_table() and
  copy_data_between_tables() functions. These functions were always
  called with handle_duplicates == DUP_ERROR and thus contained dead
  (and probably incorrect) code.
sql/sql_trigger.cc:
  Added Table_triggers_list::mark_fields_used() method which is used to mark
  fields read/set by triggers as such so handlers will be able properly
  retrieve/store values in these fields.
sql/sql_trigger.h:
  Table_triggers_list:
    Added mark_fields_used() method which is used to mark fields read/set by
    triggers as such so handlers will be able properly retrieve/store values
    in these fields. To implement this method added 'trigger_fields' member
    which is array of lists linking items for all fields used in triggers
    grouped by event and action time.
sql/sql_update.cc:
  Mark fields which are used by ON UPDATE triggers so handler will retrieve
  and save values for these fields.
mysql-test/r/ndb_trigger.result:
  Added test for bug#18437 "Wrong values inserted with a before update trigger
  on NDB table".
mysql-test/t/ndb_trigger.test:
  Added test for bug#18437 "Wrong values inserted with a before update trigger
  on NDB table".
2006-07-02 01:51:10 +04:00
unknown
805e85548c my_sys.h:
Added missing parameter type change for _my_strdup_with_length()


include/my_sys.h:
  Added missing parameter type change for _my_strdup_with_length()
2006-07-01 15:11:59 +02:00
unknown
0bbc6fbeb7 After merge fixes
BitKeeper/etc/ignore:
  added scripts/mysql_upgrade_shell
include/my_handler.h:
  my_handler.h should not include my_global.h
mysql-test/r/key.result:
  Update results after merge
2006-06-30 20:07:33 +03:00
unknown
b76a687304 mysql.spec.sh:
Disable old RPM strip
my_global.h:
  Fixed wrong cast, which caused problems with gcc 4.0 and
  floats in prepared statements (Bug #19694)
mysqlmanager.vcproj:
  Place output files in common release/debug directory


server-tools/instance-manager/mysqlmanager.vcproj:
  Place output files in common release/debug directory
include/my_global.h:
  Fixed wrong cast, which caused problems with gcc 4.0 and
  floats in prepared statements (Bug #19694)
support-files/mysql.spec.sh:
  Disable old RPM strip
2006-06-30 02:49:28 +02:00
unknown
2226065b27 Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0


include/my_global.h:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysys/my_handler.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
strings/strtod.c:
  Auto merged
mysql-test/r/func_time.result:
  Manual merge
mysql-test/t/func_time.test:
  Manual merge
2006-06-30 02:35:52 +03:00
unknown
77deeb7ee6 Fixed include file usage
hp_test2 now works again
Fixed wrong cast, which caused problems with gcc 4.0 and floats in prepared statements (Bug #19694)


heap/hp_test1.c:
  Portability fix
heap/hp_test2.c:
  Added max_table_size (fixes that hp_test2 works again)
include/my_global.h:
  Fixed wrong cast, which caused problems with gcc 4.0 (Bug #19694)
mysys/my_handler.c:
  Added missing include file
strings/strtod.c:
  Fixed include files
2006-06-30 02:25:35 +03:00
unknown
32e2acadc3 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


include/my_sys.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/log.cc:
  Auto merged
2006-06-29 14:14:08 +02:00
unknown
82f5656af3 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bkroot/mysql-5.0-release


include/my_sys.h:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/log.cc:
  Auto merged
2006-06-29 14:03:41 +02:00
unknown
b5f89708eb Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-kt


sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-28 14:23:33 +05:00
unknown
39defccfd4 Fixing BUG#17719 "Delete of binlog files fails on Windows"
and BUG#19208 "Test 'rpl000017' hangs on Windows".
 Both bugs are caused by attempting to delete an opened
 file and to create immediatedly a new one with the same
 name. On Windows it can be supported only on NT-platforms
 (by using FILE_SHARE_DELETE mode and with renaming the
 file before deletion). Because deleting not-closed files
 is not supported on all platforms (e.g. Win 98|ME) this
 is to be considered harmful and should be eliminated by
 a "code redesign".


VC++Files/mysys/mysys.vcproj:
  To be sure that __NT__ is defined for Win configurations.
   Temporary, to be changed in more appropriate way.
include/my_sys.h:
  Adding my_delete_allow_opened to be invoked to delete
   a (possibly) not closed file on Windows NT-platforms.
mysys/my_delete.c:
  Adding nt_share_delete() function implementing
   a (possibly) not closed file deletion on Windows NT.
sql/log.cc:
  MYSQL_LOG::reset_logs(): Deleting usually not
   closed binlog files.
2006-06-28 10:21:01 +04:00
unknown
e3ef15ea37 Fix compilation failures on Windows caused by the patch for Bug#17199.
Fix a minor issue with Bug#16206 (bdb.test failed if the tree is compiled 
without blackhole).


include/my_sys.h:
  Change declaration of my_strdup_with_length to accept const char *,
  not const byte *: in 5 places out of 6 where this function is used,
  it's being passed char *, not byte *
mysql-test/r/bdb.result:
  Remove dependency on an optional engine (updated test results).
mysql-test/t/bdb.test:
  Remove dependency on an optional engine.
mysys/my_malloc.c:
  my_strdup_with_length: const byte * -> const char *
mysys/safemalloc.c:
  my_strdup_with_length: const byte * -> const char *
sql/ha_federated.cc:
  my_strdup_with_length: const byte * -> const char *
sql/log_event.cc:
  my_strdup_with_length: const byte * -> const char *
sql/set_var.cc:
  my_strdup_with_length: const byte * -> const char *
sql/sql_class.h:
  Change db_length type to uint from uint32 (see also table.h)
sql/table.h:
  Change the type of db_length to uint from uint32: LEX_STRING uses uint for 
  length, we need a small and consistent set of types to store length to 
  minimize cast and compile failures.
2006-06-27 14:56:24 +04:00
unknown
87257abe59 merging
libmysqld/libmysqld.c:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-26 22:32:02 +05:00
unknown
e8e52a6a25 Cleanup to patch for Bug#18246, "compilation error with tcp_wrapper"
include/my_libwrap.h:
  Changed includes to the header file.
mysys/my_libwrap.c:
  Added comment and .c file now takes needed includes from
  the corresponding .h file.
sql/mysqld.cc:
  Include this block from my_libwra.h now.
  Moved two variables out of the otherwise
  same block.
2006-06-21 18:35:19 +03:00
unknown
72cb1d5049 Fix for Bug#18246 "compilation error with tcp_wrapper"
sql/mysqld.cc:
  Fix for Bug#18246 "compilation error with tcp_wrapper"
  
  Added wrapper functions.
2006-06-21 02:23:18 +03:00
unknown
8b6c2d312b bug #20318 (ctype_ucs2_def test fails with embedded)
there was two problems about charsets in embedded server
1. mysys/charset.c - defined there default_charset_info variable is
modified by both server and client code (particularly when
--default-charset option is handled)
In embedded server we get two codelines modifying one variable.
I created separate default_client_charset_info for client code

2. mysql->charset and mysql->options.charset initialization isn't
properly done for embedded server - necessary calls added


include/sql_common.h:
  client charset info default declared
libmysqld/lib_sql.cc:
  thd_init_client_charset calls added
libmysqld/libmysqld.c:
  check_embedded_connection moved to client.c to avoid code duplication
sql-common/client.c:
  charset initialization moved to mysql_init_character_set to
  be used in embedded server
sql/sql_parse.cc:
  thread client charset initialization moved to thd_init_client_charset
  to avoid code duplication
2006-06-19 22:11:01 +05:00
unknown
eeb29b5f70 Merge april:devel/BitKeeper/mysql-5.0-engines
into  may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-5.0


include/my_global.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2006-06-19 16:11:23 +05:00