Commit graph

2051 commits

Author SHA1 Message Date
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
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
unknown
64b82dfdb7 Fixed windows compilation failure introduced by fix for BUG#12982.
include/my_global.h:
  Remove cast to ssize_t, since there is no ssize_t type on Windows.
2006-06-15 13:38:32 +05:00
unknown
cd323e29d4 BUG#12982 - LOAD DATA fails without any error for big files with big
read buffer
Setting read buffer to values greater than SSIZE_MAX results in
unexpected behavior.

According to read(2) manual:
If count is greater than SSIZE_MAX, the result is unspecified.

Set upper limit for read_buffer_size and read_rnd_buffer_size to
SSIZE_MAX.


include/my_global.h:
  Define SSIZE_MAX if not defined.
sql/mysqld.cc:
  Set upper limit for read_buffer_size and read_rnd_buffer_size to
  SSIZE_MAX.
2006-06-07 19:44:43 +05:00
unknown
a9a4202c9c Merge anna@bk-internal.mysql.com:/home/bk/mysql-5.0
into  hasky.mysql.fi:/home/anjuta/my/mysql-5.0-clean


sql/table.cc:
  Auto merged
2006-06-02 22:31:51 +03:00
unknown
eadcf20081 bug #16017 (memory leaks in embedded server)
There actually was 3 different problems -
hash_user_connections wasn't cleaned
one strdupped database name wasn't freed
and stmt->mem_root wasn't cleaned as it was
replased with mysql->field_alloc for result
For the last one - i made the library using stmt's
fields to store result if it's the case.


include/mysql.h:
  statement pointer added to the advanced_command to be checked in
  embedded server
include/sql_common.h:
  stmt added to the cli_advanced_command interface
libmysql/libmysql.c:
  stmt pointer now sent to advanced_command
libmysqld/embedded_priv.h:
  it's enough to send database name to check_embedded_connection
libmysqld/lib_sql.cc:
  Now we store result directly in the MYSQL_STMT structure to
  avoid extra copying
libmysqld/libmysqld.c:
  it's enough to only send database pointer to check_embedded_connection
sql-common/client.c:
  stmt fake attribute added to cli_advanced_command
sql/sql_parse.cc:
  hash_user_connections isn't used if no access checks compiled
2006-06-01 17:06:42 +05:00
unknown
59a33015b4 Fixed Bug#19479:mysqldump creates invalid dump.
Only check for FN_DEVCHAR in filenames if FN_DEVCHAR is defined.
This allows to use table names with ":" on non windows platforms.
On Windows platform get an error if you use table name that contains FN_DEVCHAR


include/config-win.h:
  Moved FN_DEVCHAR to config-win.h
include/my_global.h:
  Moved FN_DEVCHAR to config-win.h
mysql-test/r/create.result:
  Added testcase for Bug#19479:mysqldump creates invalid dump
BitKeeper/etc/ignore:
  Added sql/share/iso639-2.txt sql/share/fixerrmsg.pl to the ignore list
mysql-test/t/create.test:
  Added testcase for Bug#19479:mysqldump creates invalid dump
mysys/mf_fn_ext.c:
  Added checking of BASKSLASH_MBTAIL as dirname_part depends on it.
  Fixed cast and indentation.
sql/table.cc:
  Only check for FN_DEVCHAR in filenames if FN_DEVCHAR is defined.
  This allows to use table names with ":" on non windows platforms.
  On Windows platform get an error if you use table name that contains FN_DEVCHAR
2006-06-01 12:34:44 +03:00
unknown
0c29fb8850 Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files 2006-05-31 22:21:40 +02:00
unknown
a2993441ab Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
refers to a column name.


mysql-test/r/select.result:
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new test case.
mysql-test/t/select.test:
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new test case.
sql/share/czech/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/danish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/dutch/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/english/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/estonian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/french/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/german/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/greek/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.\
sql/share/hungarian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/italian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/japanese-sjis/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.\
sql/share/japanese/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/korean/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/norwegian-ny/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/norwegian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/polish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/portuguese/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/romanian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/russian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/serbian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/slovak/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/spanish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/swedish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/ukrainian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
2006-05-30 00:08:58 -07:00
unknown
42104b2efd Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
refers to a column name.
Added a new error message ER_INDEX_DOES_NOT_EXIST.


include/mysqld_error.h:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
include/sql_state.h:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/explain.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/key_cache.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/preload.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/select.result:
  Added a test case for bug #17873.
mysql-test/t/explain.test:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/t/select.test:
  Added a test case for bug #17873.
sql/share/czech/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/danish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/dutch/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/english/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/estonian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/french/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/german/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/greek/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/hungarian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/italian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/japanese-sjis/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/japanese/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/korean/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/norwegian-ny/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/norwegian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/polish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/portuguese/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/romanian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/russian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/serbian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/slovak/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/spanish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/swedish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/ukrainian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
2006-05-27 23:57:33 -07:00
unknown
719bfafc2f Merge mysql.com:/home/jimw/my/mysql-5.0-1039
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
include/sslopt-longopts.h:
  Resolve conflict
include/sslopt-vars.h:
  Resolve conflict
mysql-test/r/variables.result:
  Resolve conflict
mysql-test/t/variables.test:
  Resolve conflict
2006-05-19 16:17:24 -07:00
unknown
8dff422f0b Merge msvensson@bk-internal.mysql.com:/home/bk/mysql-5.0
into  devsrv-b.mysql.com:/users/msvensson/mysql-5.0


sql/mysqld.cc:
  Auto merged
2006-05-19 13:16:06 +02:00
unknown
f98e7a9e13 Merge neptunus.(none):/home/msvensson/mysql/my41-bug13711
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


include/my_pthread.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2006-05-19 13:09:15 +02:00
unknown
5ceb394fe2 Bug#15869 Cannot shutdown the server - it restarts
- A segfault occured when the function 'kill_server' called 
   'my_sigset' with signal number 0. 'my_sigset' is a macro which
   uses 'sigaction' to install the signal handler with an invalid
   signal number will on most platforms return EINVAL but yields
   a segfauilt on IRIX 6.5
 - The server crash was detected by mysqld_safe and it was restarted although
   a shutdown was requested. 
 - Semantics of kill_server(0) is not known, leaving it intact


include/my_pthread.h:
  Check return value from sigaction with a DBUG_ASSERT
  Also DBUG_ASSERT if signal number 0 is passed
sql/mysqld.cc:
  Don't call my_sigset if signo is 0
2006-05-19 13:07:24 +02:00
unknown
167d54cd63 Merge mysql.com:/usr/local/mysql/mysql-5.0-vgfix
into  mysql.com:/usr/local/mysql/tmp-5.0


include/my_sys.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
2006-05-15 19:57:12 +02:00
unknown
a046322b4e Fix two Valgrind memory leak warnings.
client/mysqlbinlog.cc:
  Now my_end() deallocates DBUG by default, but that fails in mysqlbinlog
  because of global destructors that use DBUG.
dbug/dbug.c:
  Add a facility to deallocate the debug stack, to avoid memory leak warnings
  in Valgrind.
include/my_dbug.h:
  Add a facility to deallocate the debug stack, to avoid memory leak warnings
  in Valgrind.
include/my_sys.h:
  Change my_end() to deallocate DBUG memory by default (can be disabled with
  MY_DONT_FREE_DBUG option).
libmysql/libmysql.c:
  Do not deallocate DBUG during cleanup.
mysys/my_init.c:
  Change my_end() to deallocate DBUG memory by default (can be disabled with
  MY_DONT_FREE_DBUG option).
sql/mysqld.cc:
  Add missing my_thread_end() call, seems to occasionally trigger a memory
  leak (not repeatable).
2006-05-15 18:07:18 +02:00
unknown
f7d265a99c Correct spelling errors 2006-05-12 11:00:34 +02:00
unknown
0d3825a67e Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2006-05-09 08:26:25 +02:00
unknown
c06972bf2a Bug #1039: tmpdir and datadir not available via @@ system variable syntax
Bug #19606: ssl variables are not displayed in show variables
Bug #19616: log_queries_not_using_indexes  is not listed in show variables

  Make basedir, datadir, tmpdir, log_queries_not_using_indexes, ssl_ca,
  ssl_capath, ssl_cert, ssl_cipher, and ssl_key all available both from
  SHOW VARIABLES and as @@variables.

  As a side-effect of this change, log_queries_not_using_indexes can
  be changed at runtime (but only globally, not per-connection).


include/sslopt-longopts.h:
  Put options in alphabetical order
include/sslopt-vars.h:
  Allow define of SSL_VARS_NOT_STATIC to prevent variables from not being
  made static.
mysql-test/r/variables.result:
  Add new results
mysql-test/t/variables.test:
  Add new regression tests
sql/mysql_priv.h:
  Add extern for opt_log_queries_not_using_indexes
sql/mysqld.cc:
  Handle opt_log_queries_not_using_indexes as extern, and define
  SSL_VARS_NO_STATIC so they can be accessed outside of mysqld.cc
sql/set_var.cc:
  Handle basedir, datadir, tmpdir, log_queries_not_using_indexes, and
  various ssl settings so that they are accessible as server variables
  and listed in SHOW VARIABLES.
sql/set_var.h:
  Add new sys_var_constr_str_ptr class, for when we have a system variable
  that is only set via the command-line that is a pointer to a string.
2006-05-08 16:38:45 -07:00
unknown
bc32493732 Remove valgrind and compiler warnings
Add function 'vio_end' that will cleanup resources allocated by vio and the components it uses.


include/violite.h:
  Import patch warnings.patch
libmysql/libmysql.c:
  Import patch warnings.patch
sql/mysqld.cc:
  Import patch warnings.patch
vio/test-ssl.c:
  Import patch warnings.patch
vio/test-sslclient.c:
  Import patch warnings.patch
vio/test-sslserver.c:
  Import patch warnings.patch
vio/vio.c:
  Import patch warnings.patch
vio/viosslfactories.c:
  Import patch warnings.patch
2006-05-08 17:14:06 +02:00
unknown
7f1cc13802 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG17810/mysql-5.0
2006-05-03 16:37:42 +05:00
unknown
4d1cd02ef6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0__bug17667


mysys/Makefile.am:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-05-01 22:50:36 -04:00
unknown
3010890e58 SECURITY FIX
Bug#17667: An attacker has the opportunity to bypass query logging.

This adds a new, local-only printf format specifier to our *printf functions
that allows us to print known-size buffers that must not be interpreted as 
NUL-terminated "strings."

It uses this format-specifier to print to the log, thus fixing this 
problem.


include/my_sys.h:
  Add prototype for my_memmem() .
mysys/Makefile.am:
  Add reference to new file, my_memmem.c
mysys/mf_iocache2.c:
  Add a "%.1234b" and "%.*b" percent-code.  It takes a width, just like "%s", 
  but unlike the string-indicator, it requires the width and doesn't stop printing
  at NUL characters.
  
  Also, simplify the code a bit.
  
  TODO:  This code should be unified with the strings/my_vnsprintf.c code in 
  the future.
sql/sql_parse.cc:
  The query is not a C-string, but is a sized buffer, containing any character 
  at all, which may include NUL characters.
strings/my_vsnprintf.c:
  Add a "%.1234b" and "%.*b" percent-code.  It takes a width, just like "%s", 
  but unlike the string-indicator, it requires the width and doesn't stop printing
  at NUL characters.
tests/Makefile.am:
  We may need some of our local functions.
tests/mysql_client_test.c:
  Add a "%.1234b" and "%.*b" percent-code.  It takes a width, just like "%s", 
  but unlike the string-indicator, it requires the width and doesn't stop printing
  at NUL characters.
mysql-test/t/mysql_client_test.opt:
  New BitKeeper file ``mysql-test/t/mysql_client_test.opt''
  
  Add '--log' server parameter.
mysys/my_memmem.c:
  New BitKeeper file ``mysys/my_memmem.c''
  
  Implement memmem, a black-box work-alike of the GNU memmem(), which functions
  like strstr() but for arbitrary blocks of memory.
2006-05-01 22:10:50 -04:00
unknown
57b21b5bdb Fix for Win build
BitKeeper/etc/ignore:
  Added client/mysql_upgrade to the ignore list
client/mysql_upgrade.c:
  fixed for Win build
include/config-win.h:
  fixed for Win build
2006-05-01 22:16:08 +05:00
unknown
59a73f178b config-win.h:
Fix strange "double" define for popen.
  Avoid warnings about sprintf() etc. being unsafe.
  Corrected typo "#endfif"


include/config-win.h:
  Fix strange "double" define for popen.
  Avoid warnings about sprintf() etc. being unsafe.
  Corrected typo "#endfif"
2006-04-29 15:58:02 +02:00
unknown
88724885d5 Merge neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
include/mysql.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/client.c:
  SCCS merged
2006-04-26 22:24:25 +02:00
unknown
98a2008fd2 Backport fix for mysql client not using SSl library directly
- Add function mysql_get_ssl_cipher
 - Use function mysql_get_ssl_cipher from mysql


client/mysql.cc:
  Backport fix for mysql client not using SSl library directly
include/mysql.h:
  Backport fix for mysql client not using SSl library directly
libmysql/libmysql.def:
  Backport fix for mysql client not using SSl library directly
libmysqld/libmysqld.def:
  Backport fix for mysql client not using SSl library directly
sql-common/client.c:
  Backport fix for mysql client not using SSl library directly
2006-04-22 00:48:13 +02:00
unknown
4441e34e38 BUG#18160 - Memory-/HEAP Table endless growing indexes
Updating data in HEAP table with BTREE index results in wrong index_length
counter value, which keeps growing after each update.

When inserting new record into tree counter is incremented by:
sizeof(TREE_ELEMENT) + key_size + tree->size_of_element
But when deleting element from tree it doesn't decrement counter by key_size:
sizeof(TREE_ELEMENT) + tree->size_of_element

This fix makes accurate allocated memory counter for tree. That is
decrease counter by key_size when deleting tree element.


heap/hp_delete.c:
  Added size of the key to tree_delete() for accurate allocated memory counter.
include/my_tree.h:
  Added size of the key to tree_delete() for accurate allocated memory counter.
myisam/myisamlog.c:
  Added size of the key to tree_delete() for accurate allocated memory counter.
mysql-test/r/heap_btree.result:
  Testcase for BUG#18160.
mysql-test/t/heap_btree.test:
  Testcase for BUG#18160.
mysys/tree.c:
  Added size of the key to tree_delete() for accurate allocated memory counter.
  Note that this size is optional. If one doesn't need precise counter it is safe
  to pass 0 as key_size.
2006-04-19 15:13:50 +05:00
unknown
c1d64ccc1b Bug#17208 SSL: client does not verify server certificate
- Add new function 'ssl_verify_server_cert' which is used if we are 
   connecting to the server with SSL. It will compare the hostname in 
   the server's cert against the hostname that we used when connecting 
   to the server. Will reject the connection if hostname does not match.
 - Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options
   which will turn on checking of servers cert.
 - Add new argument "ssl-verify-server-cert" to all mysql* clients which 
   will activate the above option.
 - Generate a new server cert with 1024 bits that has "localhost" as the server name.


SSL/server-cert.pem:
  Generate a new server cert that has "localhost" as CN, so that we can test to verify the hostname we connected against with the hostname in the cert
client/client_priv.h:
  Add OPT_SSL_VERIFY_CERT
client/mysql.cc:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqladmin.cc:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqldump.c:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqlimport.c:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqlshow.c:
  Pass the variable "opt_ssl_verify_server_cert" to the mysql_options function. It's processed/included by include/sslopt*.h files
client/mysqltest.c:
  Always set opt_ssl_verify_server_cert on in mysqltest if we are using SSL
include/mysql.h:
  Add variable ssl_verify_cerver_cert
include/sslopt-longopts.h:
  Add ssl-verify-server-cert options to all clients.
include/sslopt-vars.h:
  Add opt_ssl_varify_server_cert to all clients.
sql-common/client.c:
  Add ssl_vertify_server_cert function which is executed if user has set the option ssl_verify_cerver_cert
vio/viosslfactories.c:
  Ask the SSL library to verify servers cert by setting the SSL_VERIFY_PEER flag
2006-04-18 17:58:27 +02:00
unknown
6af90061f4 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2006-04-12 12:52:34 +02:00
unknown
4a2cd8701b Fix spelling error 2006-04-07 12:46:50 +02:00