Commit graph

38372 commits

Author SHA1 Message Date
unknown
04468cba0a Merge polly.(none):/home/kaa/src/opt/bug32202/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
2007-11-10 22:46:25 +03:00
unknown
e7c6a81f25 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.


sql/item.cc:
  Fixed bug #28076.
  The Item_cache_str::save_in_field method has been overloaded
  to check cached values for an illegal padding before the saving
  into a field.
sql/item.h:
  Fixed bug #28076.
  The Item_cache_str::is_varbinary flag has been added and the
  Item_cache_str::save_in_field method has been overloaded to prevent
  cached values from an illegal padding when saving in fields.
  The signature of the Item_cache::get_cache method has been
  changed to accept pointers to Item instead of Item_result
  values.
sql/item_cmpfunc.cc:
  Fixed bug #28076.
  The Item_in_optimizer::fix_left method has been modified to
  to call Item_cache::get_cache in a new manner.
sql/item_subselect.cc:
  Fixed bug #28076.
  The subselect_indexsubquery_engine::exec method has been
  modified to take into account field conversion errors
  (copy&paste from subselect_uniquesubquery_engine::exec).
sql/sp_rcontext.cc:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method has been
  modified to call Item_cache::get_cache in a new manner.
sql/sp_rcontext.h:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method signature
  has been modified to pass Item pointers to the
  Item_cache::get_cache method.
sql/sql_class.cc:
  Fixed bug #28076.
  The select_max_min_finder_subselect::send_data method has been
  modified to call Item_cache::get_cache in a new manner.
mysql-test/t/subselect.test:
  Added test case for bug #28076.
mysql-test/r/subselect.result:
  Added test case for bug #28076.
2007-11-10 23:44:48 +04:00
unknown
7a39b1289f Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31700/50-31700


sql/sql_select.cc:
  Auto merged
2007-11-10 19:18:47 +01:00
unknown
170b1aa738 compiler warnings fixed.
sql/ha_myisam.cc:
  compiler warning fixed.
sql/unireg.cc:
  compiler warning fixed.
2007-11-10 21:39:30 +04:00
unknown
a41b476314 Bug#31700: thd->examined_row_count not incremented for 'const' type queries
UNIQUE (eq-ref) lookups result in table being considered as a "constant" table.
Queries that consist of only constant tables are processed in do_select() in a
special way that doesn't invoke evaluate_join_record(), and therefore doesn't
increase the counters join->examined_rows and join->thd->row_count.

The patch increases these counters in this special case.

NOTICE:
This behavior seems to contradict what the documentation says in Sect. 5.11.4:
"Queries handled by the query cache are not added to the slow query log, nor
are queries that would not benefit from the presence of an index because the
table has zero rows or one row."

No test case in 5.0 as issue shows only in slow query log, and other counters
can give subtly different values (with regard to counting in create_sort_index(),
synthetic rows in ROLLUP, etc.).


sql/sql_class.h:
  add documentation for some variables
sql/sql_select.cc:
  Don't forget const tables when counting read records!
2007-11-10 18:29:13 +01:00
unknown
122bb7e2f7 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b32137/b32137.5.0
2007-11-10 18:57:32 +04:00
unknown
f56e68929a manual merge. 2007-11-10 18:27:57 +04:00
unknown
71d1a9ca25 Merge mysql.com:/home/ram/work/b32137/b32137.4.1
into  mysql.com:/home/ram/work/b32137/b32137.5.0
2007-11-10 18:04:46 +04:00
unknown
6b00e6eb2c Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31800/50-31800


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2007-11-10 13:35:35 +01:00
unknown
ac3ef6c759 Bug#31800: Date comparison fails with timezone and slashes for greater than comparison
BETWEEN was more lenient with regard to what it accepted as a DATE/DATETIME
in comparisons than greater-than and less-than were. ChangeSet makes < >
comparisons similarly robust with regard to trailing garbage (" GMT-1")
and "missing" leading zeros. Now all three comparators behave similarly
in that they throw a warning for "junk" at the end of the data, but then
proceed anyway if possible. Before < > fell back on a string- (rather than
date-) comparison when a warning-condition was raised in the string-to-date
conversion. Now the fallback only happens on actual errors, while warning-
conditions still result in a warning being to delivered to the client.


mysql-test/r/select.result:
  Show that we compare DATE/DATETIME-like strings as date(time)s
  now, rather than as bin-strings.
  Adjust older result as "2005-09-3a" is now correctly seen as
  "2005-09-3" + trailing garbage, rather than as "2005-09-30".
mysql-test/t/select.test:
  Show that we compare DATE/DATETIME-like strings as date(time)s
  now, rather than as bin-strings.
sql-common/my_time.c:
  correct/clarify date-related comments, particulary for check_date().
  doxygenize comment while at it.
sql/item_cmpfunc.cc:
  get_date_from_str() no longer signals an error when all we had
  was a warning-condition -- and one we already gave the user a
  warning for at that. Preamble doxygenized.
2007-11-10 13:33:42 +01:00
unknown
e9a78d8ca5 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31990/50-31990
2007-11-10 03:12:57 +01:00
unknown
836398b98e Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50-fix
into  ramayana.hindu.god:/home/tsmith/m/bk/build/50
2007-11-09 18:44:08 -07:00
unknown
dae9042bc6 Fix Windows build problems.
libmysql/CMakeLists.txt:
  Add new mysys/mf_arr_appstr.c source file
mysys/default.c:
  Fix some bad code that caused warnings on Windows
2007-11-09 18:27:20 -07:00
unknown
55499d2bf4 Fix for bug #32202: ORDER BY not working with GROUP BY
The bug is a regression introduced by the fix for bug30596. The problem
was that in cases when groups in GROUP BY correspond to only one row,
and there is ORDER BY, the GROUP BY was removed and the ORDER BY
rewritten to ORDER BY <group_by_columns> without checking if the
columns in GROUP BY and ORDER BY are compatible. This led to
incorrect ordering of the result set as it was sorted using the
GROUP BY columns. Additionaly, the code discarded ASC/DESC modifiers
from ORDER BY even if its columns were compatible with the GROUP BY
ones.

This patch fixes the regression by checking if ORDER BY columns form a
prefix of the GROUP BY ones, and rewriting ORDER BY only in that case,
preserving the ASC/DESC modifiers. That check is sufficient, since the
GROUP BY columns contain a unique index.


mysql-test/r/group_by.result:
  Added a test case for bug #32202.
mysql-test/t/group_by.test:
  Added a test case for bug #32202.
sql/sql_select.cc:
  In cases when groups in GROUP BY correspond to only one row and there
  is ORDER BY, rewrite the query to ORDER BY <group_by_columns> only if
  the columns in ORDER BY and GROUP BY are compatible, i.e. either one
  forms a prefix for another.
2007-11-09 19:12:12 +03:00
unknown
9eb28b96dd Merge capulet.net:/home/bk/mysql-5.0-rpl
into  capulet.net:/home/mats/devel/b31793-mysql-5.0-rpl


sql/log_event.cc:
  Auto merged
2007-11-09 13:45:10 +01:00
unknown
d7bc28fc72 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  capulet.net:/home/bk/mysql-5.0-rpl
2007-11-09 13:44:23 +01:00
unknown
dc91bc74c7 BUG#31793 (log event corruption causes crash):
When running mysqlbinlog on a 64-bit machine with a corrupt relay log,
it causes mysqlbinlog to crash. In this case, the crash is caused
because a request for 18446744073709534806U bytes is issued, which
apparantly can be served on a 64-bit machine (speculatively, I assume)
but this causes the memcpy() issued later to copy the data to segfault.

The request for the number of bytes is caused by a computation
of data_len - server_vars_len where server_vars_len is corrupt in such
a sense that it is > data_len. This causes a wrap-around, with the
the data_len given above.

This patch adds a check that if server_vars_len is greater than
data_len before the substraction, and aborts reading the event in
that case marking the event as invalid. It also adds checks to see
that reading the server variables does not go outside the bounds
of the available space, giving a limited amount of integrity check.


mysql-test/r/mysqlbinlog.result:
  Result change.
mysql-test/t/mysqlbinlog.test:
  Adding test that it fails gracefully for a corrupt relay log.
sql/log_event.cc:
  Adding check that status var length does not cause wrap-around
  when performing subtraction. Extending get_str_len_and_pointer() to
  check that the string can actually be read without reading outside
  bounds. Adding checks when reading server variables from the Query-
  log_event so that the variable can really be read. Abort reading
  and mark the event as invalid otherwise.
mysql-test/std_data/corrupt-relay-bin.000624:
  BitKeeper file /home/mats/devel/b31793-mysql-5.0-rpl/mysql-test/std_data/corrupt-relay-bin.000624
2007-11-09 13:43:09 +01:00
unknown
5eafd5b122 BUG#29083 - test suite times out on OS X 64bit - also in older releases
The "mysql client in mysqld"(which is used by
replication and federated) should use alarms instead of setting
socket timeout value if the rest of the server uses alarm. By
always calling 'my_net_set_write_timeout'
or 'net_set_read_timeout' when changing the timeout value(s), the
selection whether to use alarms or timeouts will be handled by
ifdef's in those two functions.

This is minimal backport of patch for BUG#26664, which was pushed
to 5.0 and up.

Affects 4.1 only.


include/mysql_com.h:
  Move the net_set_*_timeout function declarations to mysql_com.h
sql-common/client.c:
   Use my_net_read_timeout or my_net_write_timeout when setting the timeouts
sql/mysql_priv.h:
  Move the net_set_*_timeout function declarations to mysql_com.h
2007-11-09 16:05:01 +04:00
unknown
e68540a6b8 Merge polly.(none):/home/kaa/src/opt/bug32020/my50-bug31445
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_udf.cc:
  Auto merged
2007-11-09 13:41:50 +03:00
unknown
737cdfeaeb Fix for bug #32020: loading udfs while --skip-grant-tables is enabled
causes out of memory errors

The code in mysql_create_function() and mysql_drop_function() assumed
that the only reason for UDFs being uninitialized at that point is an
out-of-memory error during initialization. However, another possible 
reason for that is the --skip-grant-tables option in which case UDF 
initialization is skipped and UDFs are unavailable.

The solution is to check whether mysqld is running with
--skip-grant-tables and issue a proper error in such a case.


mysql-test/r/skip_grants.result:
  Added a test case for bug #32020.
mysql-test/t/skip_grants.test:
  Added a test case for bug #32020.
sql/sql_udf.cc:
  Issue a proper error when a user tries to CREATE/DROP a UDF 
  on a server running with the --skip-grant-tables option.
2007-11-09 13:29:43 +03:00
unknown
4b2753b8cf Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  mysql.com:/home/kent/bk/bug25205/mysql-5.0-build
2007-11-08 18:16:58 +01:00
unknown
5c6b995b7f Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-11-08 10:33:57 +01:00
unknown
a5d7fa746f Merge polly.(none):/home/kaa/src/opt/mysql-4.1-opt
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-08 12:08:22 +03:00
unknown
0075aa4960 Merge polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2007-11-08 12:06:14 +03:00
unknown
6c5a2e50c4 Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-4.1-opt
2007-11-08 12:04:48 +03:00
unknown
4713575c77 Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into  polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215


mysql-test/t/select.test:
  Auto merged
mysql-test/r/select.result:
  Manual merge.
sql/item.h:
  Manual merge.
2007-11-08 11:46:58 +03:00
unknown
b1fc4b9e63 Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.

Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.


mysql-test/r/cast.result:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
  Show that this coincides with how DATE-columns behave.
mysql-test/t/cast.test:
  Show that HOUR(), MINUTE(), ... return sensible values when used
  on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
  Show that this coincides with how DATE-columns behave.
sql/item_timefunc.cc:
  Add get_time() method to DATE-cast object to overload
  the method in Item superclass that would return spurious
  results. Return zero-result; flag NULL if input was NULL.
sql/item_timefunc.h:
  Add get_time() declaration to DATE-cast object.
2007-11-08 06:08:44 +01:00
unknown
3a7e070f53 Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50
into  ramayana.hindu.god:/home/tsmith/m/bk/build/b20748/50


include/my_sys.h:
  Auto merged
2007-11-07 16:26:29 -07:00
unknown
707f42a6b9 Bug #20748: Configuration files should not be read more than once
A user could not override system-wide settings in their ~/.my.cnf,
because the DEFAULT_SYSCONFDIR was being searched last.  Also, in
some configurations (especially when the --sysconfdir compile-time
option is set to /etc or /etc/mysql), the system-wide my.cnf file
was read multiple times, causing confusion and potential problems.

Rearrange default directories to conform to the manual and logic.
Move --sysconfdir=<path> (DEFAULT_SYSCONFDIR) from the last default
directory to the middle of the list.  $HOME/.my.cnf should be last,
so the user is able to override the system-wide settings.

Change init_default_directories() to remove duplicates from the
list.


include/my_sys.h:
  Add array_append_string_unique(), from mf_arr_appstr.c
libmysql/Makefile.shared:
  Add new mf_arr_appstr.lo object
mysys/CMakeLists.txt:
  Add new mf_arr_appstr.c source.
mysys/Makefile.am:
  Add new mf_arr_appstr.c source.
mysys/default.c:
  Change order in which defaults files are added to default_directories,
  in order to conform to the manual (and to common sense).  This fixes
  a particularly bad problem on Unix, where ~/.my.cnf was read before
  /usr/local/etc/my.cnf.
  
  Also, don't add duplicate entries; move the existing entry to the
  end of the list instead.
  
  
  Here is a comparison of the order of defaults files, BEFORE and AFTER
  this patch.
  
  On Windows:
  
  BEFORE:  C:\, GetWindowsDirectory(), GetSystemWindowsDirectory(),
           $MYSQL_HOME, defaults-extra-file, INSTALLDIR
  
  AFTER:  GetSystemWindowsDirectory(), GetWindowsDirectory(), C:\,
          INSTALLDIR, $MYSQL_HOME, defaults-extra-file
  
  GetSystemWindowsDirectory() is moved before GetWindowsDirectory() because
  the former is shared by all Terminal Services users, while the latter is
  private for each user.
  
  
  On Netware (no change):
  
  BEFORE:  sys:/etc/, $MYSQL_HOME, defaults-extra-file
  
  AFTER:  sys:/etc, $MYSQL_HOME, defaults-extra-file
  
  
  On OS/2:
  
  BEFORE:  $ETC, /etc, $MYSQL_HOME, defaults-extra-file
  
  AFTER:  /etc, $ETC, $MYSQL_HOME, defaults-extra-file
  
  
  On everything else (general Unix):
  
  BEFORE:  /etc, $MYSQL_HOME, defaults-extra-file, ~/, --sysconfdir
  
  AFTER:  /etc/, --sysconfdir, $MYSQL_HOME, defaults-extra-file, ~/
  
  The BEFORE code added --sysconfdir on all systems, but only the
  Unix build system actually defined a value for it.
mysys/mf_arr_appstr.c:
  BitKeeper file /home/tsmith/m/bk/build/50-b20748/mysys/mf_arr_appstr.c
2007-11-07 15:23:50 -07:00
unknown
0a7a55d175 Fix for bug #32103: optimizer crash when join on int and mediumint with
variable in where clause.

Problem: the new_item() method of Item_uint used an incorrect
constructor. "new Item_uint(name, max_length)" calls
Item_uint::Item_uint(const char *str_arg, uint length) which assumes the
first argument to be the string representation of the value, not the
item's name. This could result in either a server crash or incorrect
results depending on usage scenarios.

Fixed by using the correct constructor in new_item():
Item_uint::Item_uint(const char *str_arg, longlong i, uint length).


mysql-test/r/select.result:
  Added a test case for bug #32103.
mysql-test/t/select.test:
  Added a test case for bug #32103.
sql/item.h:
  Use the correct constructor for Item_uint in Item_uint::new_item().
2007-11-07 18:45:04 +03:00
unknown
f668665955 Fix for bug #30666: Incorrect order when using range conditions on 2
tables or more

The problem was that the optimizer used the join buffer in cases when
the result set is ordered by filesort. This resulted in the ORDER BY
clause being ignored, and the records being returned in the order
determined by the order of matching records in the last table in join.

Fixed by relaxing the condition in make_join_readinfo() to take
filesort-ordered result sets into account, not only index-ordered ones.


mysql-test/r/select.result:
  Added a test case for bug #30666.
mysql-test/t/select.test:
  Added a test case for bug #30666.
sql/sql_select.cc:
  Relaxed the condition to determine when the join buffer usage must be
  disabled. The condition is now true for cases when the result set is
  ordered by filesort, that is when 'join->order &&
  !join->skip_sort_order' is true.
2007-11-07 14:00:45 +03:00
unknown
c5df4b3092 BUG#31277 - myisamchk --unpack corrupts a table
With certain data sets (when compressed record length gets bigger than
uncompressed) myisamchk --unpack may corrupt data file.

Fixed that record length was wrongly restored from compressed table.


myisam/mi_check.c:
  With compressed tables compressed record length may be bigger than
  pack_reclength, thus we may allocate insufficient memory for record
  buffer.
  
  Let single function allocate record buffer, performing needed record
  length calculations.
  
  Still, it is not doable with parallel repair, as it allocates needed
  record buffers at once. For parellel repair added better record length
  calculation.
myisam/mi_open.c:
  When calculating record buffer size, take into account that compressed
  record length may be bigger than uncompressed.
myisam/mi_packrec.c:
  With certain data set share->max_pack_length (compressed record length)
  may be bigger than share->base.pack_reclength (packed record length).
  
  set_if_bigger(pack_reclength, max_pack_length) in this case causes
  myisamchk --unpack to write extra garbage, whereas pack_reclength
  remains the same in new index file. As a result we get unreadable
  table.
myisam/myisamchk.c:
  With compressed tables compressed record length may be bigger than
  pack_reclength, thus we may allocate insufficient memory for record
  buffer.
  
  Let single function allocate record buffer, performing needed record
  length calculations.
mysql-test/mysql-test-run.pl:
  Environment variables to execute myisamchk and myisampack.
mysql-test/r/myisampack.result:
  New BitKeeper file ``mysql-test/r/myisampack.result''
mysql-test/t/myisampack.test:
  New BitKeeper file ``mysql-test/t/myisampack.test''
2007-11-07 12:55:28 +04:00
unknown
c7191f90a3 Fix for bug #32137: prepared statement crash with str_to_date in update clause
Problem: calling non-constant argument's val_xxx() methods 
in the ::fix_length_and_dec() is inadmissible.

Fix: call the method only for constant arguments.


mysql-test/r/ps.result:
  Fix for bug #32137: prepared statement crash with str_to_date in update clause
    - test result.
mysql-test/t/ps.test:
  Fix for bug #32137: prepared statement crash with str_to_date in update clause
    - test case.
sql/item_timefunc.cc:
  Fix for bug #32137: prepared statement crash with str_to_date in update clause
    - call argument's val_str() only for constant items in the 
      Item_func_str_to_date::fix_length_and_dec().
2007-11-07 12:47:19 +04:00
unknown
6957e84ec6 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags
2007-11-06 20:32:52 +02:00
unknown
0c1a085cca bug#27571
refining non-deterministic tests.
The new Bug@32148 is in the way. Adjuting the tests to be somehow useful.
 


mysql-test/r/binlog_killed.result:
  results changed
mysql-test/t/binlog_killed.test:
  refining the tests as killing is inherently non-deterministic;
  leaving todos.
2007-11-06 20:31:40 +02:00
unknown
0216fb0def Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug28597-log_name_upgrade
2007-11-06 17:12:56 +02:00
unknown
d8c4501b28 bug#27571
fixing tests


mysql-test/r/binlog_killed_simulate.result:
  the new tests' result
2007-11-06 16:25:32 +02:00
unknown
ff4b438be0 BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE
RENAME TABLE against a table with DATA/INDEX DIRECTORY overwrites
the file to which the symlink points.

This is security issue, because it is possible to create a table with
some name in some non-system database and set DATA/INDEX DIRECTORY
to mysql system database. Renaming this table to one of mysql system
tables (e.g. user, host) would overwrite the system table.

Return an error when the file to which the symlink points exist.


mysql-test/r/symlink.result:
  A test case for BUG#32111.
mysql-test/t/symlink.test:
  A test case for BUG#32111.
mysys/my_symlink2.c:
  Return an error when the file to which the symlink points exist.
2007-11-06 18:09:33 +04:00
unknown
86e07400b7 bug#27571
removing extra tests (on 5.1 that's been already done)


BitKeeper/deleted/.del-binlog_killed_bug27571-master.opt:
  Delete: mysql-test/t/binlog_killed_bug27571-master.opt
BitKeeper/deleted/.del-binlog_killed_bug27571.test:
  Delete: mysql-test/t/binlog_killed_bug27571.test
2007-11-06 15:11:59 +02:00
unknown
85425773e8 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-06 13:56:15 +01:00
unknown
1a359e1471 Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-06 13:55:42 +01:00
unknown
42829c61b6 Bug#4692 - DISABLE/ENABLE KEYS waste a space
Disabling and enabling indexes on a non-empty table grows the
index file.

Disabling indexes just sets a flag per non-unique index and does not
free the index blocks of the affected indexes. Re-enabling indexes
creates new indexes with new blocks. The old blocks remain unused
in the index file.

Fixed by dropping and re-creating all indexes if non-empty disabled
indexes exist when enabling indexes. Dropping all indexes resets
the internal end-of-file marker to the end of the index file header.
It also clears the root block pointers of every index and clears the
deleted blocks chains. This way all blocks are declared as free.


myisam/mi_check.c:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added function mi_drop_all_indexes() to support drop of all indexes
  in case we want to re-enable non-empty disabled indexes.
  Changed mi_repair(), mi_repair_by_sort(), and mi_repair_parallel()
  to use the new function instead of duplicate drop index code.
mysql-test/r/myisam.result:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added test result.
mysql-test/t/myisam.test:
  Bug#4692 - DISABLE/ENABLE KEYS waste a space
  Added test.
2007-11-06 13:41:32 +01:00
unknown
3cc49bbe74 bug#27571
commit is specific for 5.0 to eliminated non-deterministic tests.
Those tests run only in 5.1 env where there is a necessary devices such
as processlist table of info_schema.


mysql-test/r/binlog_killed.result:
  results changed
mysql-test/t/binlog_killed.test:
  removing non-deterministic part of the test
mysql-test/t/binlog_killed_simulate.test:
  adding the guard same as for 5.1 version
2007-11-06 13:53:26 +02:00
unknown
b4db3f3f0a Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags


sql/sql_insert.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2007-11-06 13:27:48 +02:00
unknown
0c18525470 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31950/mysql-5.0-engines
2007-11-06 11:54:56 +04:00
unknown
441b86087a Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge
2007-11-05 09:50:09 -07:00
unknown
7bb7394545 Provide better feedback to the user when unable to find MySQL files
usually caused by a bad basedir setting.


support-files/mysql.server.sh:
  Be more verbose in error message.
2007-11-05 17:48:11 +01:00
unknown
c0be4995f9 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug28597-log_name_upgrade
2007-11-05 18:13:31 +02:00
unknown
b7cdb978d9 Bug #28597 Replication doesn't start after upgrading to 5.1.18
Since bug@20166, which replaced the binlog file name generating to base
on pidfile_name instead of the previous glob_hostname, the binlog file
name suddenly started to be stored solely in the absolute path format,
including a case when --log-bin option meant a relative path.
What's more serious, the path for binlog file can lead unrequestedly 
to pid-file directory so that after any proper fix for this bug
there might be similar to the bug report consequences for one who
upgrades from post-fix-bug@20166-pre-fix-bug@28597 to post-fix-bug@28597.

Fixed with preserving`pidfile_name' (intr.by bug@20166) but stripping
off its directory part. This restores the original logics of storing
the names in compatible with --log-bin option format and with the
requirement for --log-bin ralative path to corresond to the data directory.
Side effects for this fix:

effective fixing bug@27070, refining its test;
ensuring no overrun for buff can happen anymore (Bug#31836 
insufficient space reserved for the suffix of relay log file name);
bug#31837  --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql missed
in rpl_temporary.test;
fixes Bug@28603  Invalid log-bin default location;


mysql-test/t/rpl_dual_pos_advance.test:
  After correcting the logics of log file name composing workaround for
  
    Bug #27070 server logs are created unrequested and in wrong directory
  
  is removed.
mysql-test/t/rpl_temporary.test:
  remaining temp file of the test removed
sql/log.cc:
  stripping off the directory part of `pidfile_name' for binlog name
  generating (which fixes two more bugs on wrong binlog file location);
  ensuring no overrun for buff can happen anymore (Bug #31836 
  insufficient space reserved for the suffix of relay log file name);
2007-11-05 17:20:10 +02:00
unknown
2a0f4e4faf Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31758/my50-31758
2007-11-05 19:07:03 +04:00