Commit graph

36407 commits

Author SHA1 Message Date
unknown
c57d6f729d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27563-bug-5.0-opt-mysql


sql/item_func.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
2007-05-23 23:31:33 +04:00
unknown
1734b4e990 Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
If a stored function or a trigger was killed it had aborted but no error
was thrown. This allows the caller statement to continue without a notice.
This may lead to a wrong data being inserted/updated to/deleted as in such
cases the correct result of a stored function isn't guaranteed. In the case
of triggers it allows the caller statement to ignore kill signal and to
waste time because of re-evaluation of triggers that always will fail
because thd->killed flag is still on.

Now the Item_func_sp::execute() and the sp_head::execute_trigger() functions
check whether a function or a trigger were killed during execution and
throws an appropriate error if so.
Now the fill_record() function stops filling record if an error was reported
through thd->net.report_error.


sql/item_func.cc:
  Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
  Now the Item_func_sp::execute() function checks whether a trigger was killed
  during execution and throws an appropriate error if so.
sql/sp_head.cc:
  Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
  Now the sp_head::execute_trigger() function checks whether a function was
  killed during execution and throws an appropriate error if so.
sql/sql_base.cc:
  Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
  Now the fill_record() function stops filling record if an error was reported
  through thd->net.report_error.
mysql-test/r/kill.result:
  Added a test case for the bug#27563: Stored functions and triggers wasn't
  throwing an error when killed.
mysql-test/t/kill.test:
  Added a test case for the bug#27563: Stored functions and triggers wasn't
  throwing an error when killed.
2007-05-23 23:24:16 +04:00
unknown
f7f593ae7d Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/mysql-5.0o-pushee


sql/sql_select.cc:
  Auto merged
2007-05-22 18:30:23 +02:00
unknown
13cf5bddd8 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28476-5.0-opt


sql/sql_base.cc:
  Auto merged
sql/table.h:
  Auto merged
2007-05-22 17:05:33 +03:00
unknown
3332b80130 Bug #28476: force index on a disabled myisam index gives error 124
When processing the USE/FORCE index hints
the optimizer was not checking if the indexes 
specified are enabled (see ALTER TABLE).
Fixed by:
 Backporting the fix for bug 20604 to 5.0


mysql-test/r/key.result:
  Test for BUG 20604.
  The important part of the test is the explain output that 
  tests what indexes are used.
mysql-test/r/myisam.result:
  Bug #28476: test cases
mysql-test/t/key.test:
  Bug 20604: 
  The minimal test case that reveals the bug. The optimizer for 
  aggregates relies on keys disabled with ALTER TABLE ... DISABLE KEYS
  not being in the set TABLE::keys_in_use_for_query.
  When the execution engine tries to use a disabled index, MyISAM
  returns an error.
mysql-test/t/myisam.test:
  Bug #28476: test cases
sql/sql_base.cc:
  Bug #28476: 
   - Ignore disabled indexes in USE/FORCE index
sql/sql_select.cc:
  Bug 20604 : The intersection operation between table->s->keys_in_use 
  and table->keys_in_use_for_query is no longer necessary.
  We can trust that the latter is a subset of the former.
sql/table.h:
  Bug 20604:
  Added comments to TABLE_SHARE::keys_in_use and
  TABLE::keys_in_use_for_query.
2007-05-22 15:58:30 +03:00
unknown
3c76d36956 Merge dl145s.mysql.com:/users/mhansson/mysql/push/bug23856/my50-bug23856
into  dl145s.mysql.com:/users/mhansson/mysql/push/bug23856/mysql-5.0o-pushee


sql/item_sum.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/func_gconcat.result:
  Bug#23856: Manually merged
mysql-test/t/func_gconcat.test:
  Bug#23856: Manually merged
2007-05-22 14:48:49 +02:00
unknown
14cb59d8bb Added initializations to avoid compiler warnings. 2007-05-21 16:44:36 -07:00
unknown
f3b78f34e5 Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE
mode.

When a new DATE/DATETIME field without default value is being added by the
ALTER TABLE the '0000-00-00' value is used as the default one. But it wasn't
checked whether such value was allowed by the set sql mode. Due to this
'0000-00-00' values was allowed for DATE/DATETIME fields even in the
NO_ZERO_DATE mode.

Now the mysql_alter_table() function checks whether the '0000-00-00' value
is allowed for DATE/DATETIME fields by the set sql mode.
The new error_if_not_empty flag is used in the mysql_alter_table() function
to indicate that it should abort if the table being altered isn't empty.
The new new_datetime_field field is used in the mysql_alter_table() function
for error throwing purposes. 
The new error_if_not_empty parameter is added to the copy_data_between_tables()
function to indicate the it should return error if the source table isn't empty.


mysql-test/t/alter_table.test:
  Added a test case for the bug#27507: Wrong DATETIME value was allowed by
  ALTER TABLE in the NO_ZERO_DATE mode.
mysql-test/r/alter_table.result:
  Added a test case for the bug#27507: Wrong DATETIME value was allowed by
  ALTER TABLE in the NO_ZERO_DATE mode.
sql/sql_table.cc:
  Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE
  mode.
  Now the mysql_alter_table() function checks whether the '0000-00-00' value
  is allowed for DATE/DATETIME fields by the set sql mode.
  The new error_if_not_empty flag is used in the mysql_alter_table() function
  to indicate that it should abort if the table being altered isn't empty.
  The new new_datetime_field field is used in the mysql_alter_table() function
  for error throwing purposes. 
  The new error_if_not_empty parameter is added to the copy_data_between_tables()
  function to indicate the it should return error if the source table isn't empty.
2007-05-22 00:22:53 +04:00
unknown
bc31b650af Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/27984/my50-27984
2007-05-21 22:29:39 +05:00
unknown
741bbb75ad Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/27984/my50-27984


mysql-test/r/type_newdecimal.result:
  merging
mysql-test/t/type_newdecimal.test:
  merging
2007-05-21 22:28:50 +05:00
unknown
cfb9378b3d Bug #27984 Long Decimal Maths produces truncated results.
decimal_round failed to perform a correct rounding 
of a decimal number if its first nine digits were '9'.
It just sets those digits to 0.


mysql-test/r/type_newdecimal.result:
  Bug #27984 Long Decimal Maths produces truncated results.
  test result
mysql-test/t/type_newdecimal.test:
  Bug #27984 Long Decimal Maths produces truncated results.
  test case
strings/decimal.c:
  Bug #27984 Long Decimal Maths produces truncated results.
  when to == from we break the data if we do to->buf[0]=0
  So now doing this after the data is moved and only
  if we really need to set to->buf[0] to zero
2007-05-21 22:22:47 +05:00
unknown
00ed873c84 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/28361/my50-28361
2007-05-21 17:55:06 +05:00
unknown
786adf870b test result fixed 2007-05-21 17:53:55 +05:00
unknown
be043a5ea7 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/27894/my50-27894
2007-05-21 14:54:21 +05:00
unknown
84966af9fc bug#23856 2007-05-21 10:27:33 +02:00
unknown
d2c985e354 Bug #28361 Buffer overflow in DECIMAL code on Windows
result max length changed for the 'decimal' fields
so test results have to be fixed


mysql-test/r/ps_2myisam.result:
  Bug #28361 Buffer overflow in DECIMAL code on Windows 
  test result fixed
mysql-test/r/ps_3innodb.result:
  Bug #28361 Buffer overflow in DECIMAL code on Windows 
  test result fixed
mysql-test/r/ps_4heap.result:
  Bug #28361 Buffer overflow in DECIMAL code on Windows 
  test result fixed
mysql-test/r/ps_5merge.result:
  Bug #28361 Buffer overflow in DECIMAL code on Windows 
  test result fixed
mysql-test/r/ps_7ndb.result:
  Bug #28361 Buffer overflow in DECIMAL code on Windows 
  test result fixed
2007-05-21 13:02:03 +05:00
unknown
330a82f066 Merge macbook:mysql/work/B22855-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B22855-5.0-opt


sql/item_subselect.cc:
  Auto merged
mysql-test/r/subselect3.result:
  manual merge
mysql-test/t/subselect3.test:
  manual merge
2007-05-21 10:21:55 +03:00
unknown
59a7e066e3 bug #28361 Buffer overflow in DECIMAL code on Windows
my_decimal in some cases can contain more decimal digits than
is officially supported (DECIMAL_MAX_PRECISION), so we need to
prepare bigger buffer for the resulting string.


mysql-test/r/type_newdecimal.result:
  bug #28361 Buffer overflow in DECIMAL code on Windows
  test result
mysql-test/t/type_newdecimal.test:
  bug #28361 Buffer overflow in DECIMAL code on Windows
  test case
  This test case doesn't fall in most cases even without the fix
  Still valgrind shows the problemn
sql/my_decimal.h:
  bug #28361 Buffer overflow in DECIMAL code on Windows
  DECIMAL_MAX_POSSIBLE_PRECISION introduced to be used in places,
  when we need to check for the number of digits technicaly possible
  in my_decimal.
  DECIMAL_MAX_STR_LENGTH fixed as it has to fit for the MAX_POSSIBLE_PRECISION
2007-05-20 21:22:57 +05:00
unknown
8b33c41554 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
2007-05-18 22:09:15 +05:00
unknown
8933c18cca Merge bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
2007-05-18 18:22:38 +02:00
unknown
f7434c4f93 added cleanup to some tests
mysql-test/r/sp_trans.result:
  added cleanup
mysql-test/r/strict.result:
  added cleanup
mysql-test/t/sp_trans.test:
  added cleanup
mysql-test/t/strict.test:
  added cleanup
2007-05-18 17:48:44 +02:00
unknown
5f66ebe8b7 Merge mysql.com:/d2/hf/mrg/mysql-4.1-opt
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
2007-05-18 20:02:55 +05:00
unknown
caf045dbeb Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
2007-05-18 20:02:27 +05:00
unknown
25090a6da6 Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/d2/hf/mrg/mysql-4.1-opt
2007-05-18 20:01:49 +05:00
unknown
507ad360d7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/28261-bug-5.0-opt-mysql
2007-05-18 13:39:34 +04:00
unknown
042b1717c4 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28337
2007-05-17 16:06:57 -07:00
unknown
c4a4df5aa4 Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
is involved.

The Arg_comparator::compare_datetime() comparator caches its arguments if
they are constants i.e. const_item() returns true. The
Item_func_get_user_var::const_item() returns true or false based on
the current query_id and the query_id where the variable was created.
Thus even if a query can change its value its const_item() still will return
true. All this leads to a wrong comparison result when an object of the
Item_func_get_user_var class is involved.

Now the Arg_comparator::can_compare_as_dates() and the
get_datetime_value() functions never cache result of the GET_USER_VAR()
function (the Item_func_get_user_var class).


mysql-test/t/type_datetime.test:
  A test case is added for the bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
  is involved.
mysql-test/r/type_datetime.result:
  A test case is added for the bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
  is involved.
sql/item_cmpfunc.cc:
  Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
  is involved.
  Now the Arg_comparator::can_compare_as_dates() and the
  get_datetime_value() functions never cache result of the GET_USER_VAR()
  function (the Item_func_get_user_var class).
2007-05-17 23:09:45 +04:00
unknown
455352b0b8 Bug#22855:
Conversion errors when constructing the condition for an
IN predicates were treated as if the affected column contains
NULL. If such a IN predicate is inside NOT we get wrong 
results.
Corrected the handling of conversion errors in an IN predicate 
that is resolved by unique_subquery (through 
subselect_uniquesubquery_engine).


mysql-test/r/subselect3.result:
  Bug#22855: test case
mysql-test/t/subselect3.test:
  Bug#22855: test case
sql/item_subselect.cc:
  Bug#22855: corrected the handling of conversion errors and
  NULL key values in IN predicate that is resolved by index
  lookup.
2007-05-17 19:38:34 +03:00
unknown
dd1a118000 Fixed bug #28337: wrong results for grouping queries with correlated
subqueries in WHERE conditions.
This bug was introduced by the patch for bug 27321.


mysql-test/r/subselect.result:
  Added a test case for bug #28337.
mysql-test/t/subselect.test:
  Added a test case for bug #28337.
sql/item.cc:
  Fixed bug #28337: wrong results for grouping queries with correlated
  subqueries in WHERE conditions.
  This bug was introduced by the patch for bug 27321.
  
  Now in the Item_field::fix_outer_field function we create an Item_outer_ref
  object for an outer reference only if it is used in the SELECT list or
  in the HAVING clause of the subquery against which the reference is resolved.
2007-05-16 23:42:10 -07:00
unknown
867d346099 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  trift2.:/MySQL/M50/push-5.0
2007-05-16 21:24:54 +02:00
unknown
2d38d4d6ff Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-05-16 21:23:15 +02:00
unknown
b015146e41 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2007-05-17 00:10:39 +05:00
unknown
5e00d4b7f6 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2007-05-17 00:09:43 +05:00
unknown
b7cf6fcbba Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:27:30 +02:00
unknown
42dae8f51d Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
2007-05-16 17:26:55 +02:00
unknown
2428326ff2 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:26:18 +02:00
unknown
38553bcd92 Merge bk-internal:/home/bk/mysql-5.0-runtime
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:13:42 +02:00
unknown
fe206129fa Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:07:34 +02:00
unknown
edd8df1c8c Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
2007-05-16 16:04:42 +02:00
unknown
7c70011e21 Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-05-16 14:54:47 +02:00
unknown
d9ce3033f5 Bug#27415 Text Variables in stored procedures
- Problem was reported as a SP variable using itself as 
   right value inside SUBSTR caused corruption of data. 
 - This bug could not be verified in either 5.0bk or 5.1bk
 - Added test case to prevent future regressions.


mysql-test/r/sp-vars.result:
  Added test case for a reported regression which couldn't be
  verified.
mysql-test/t/sp-vars.test:
  Added test case for a reported regression which couldn't be
  verified.
2007-05-16 14:25:38 +02:00
unknown
418a2983c0 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/5.0o-bug27573


mysql-test/r/func_group.result:
  Auto merged
mysql-test/t/func_group.test:
  bug#27573: hand merged test case
2007-05-16 12:22:20 +03:00
unknown
75392f3707 Fix a failing assert.
sql/sql_insert.cc:
  Do not access delayed thread memory without a mutex.
2007-05-16 11:49:15 +04:00
unknown
7e628372e9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  vajra.(none):/opt/local/work/mysql-5.0-21483


sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
2007-05-16 09:52:01 +04:00
unknown
3395c53efc A fix and a test case for
Bug#21483 "Server abort or deadlock on INSERT DELAYED with another
implicit insert"
Also fixes and adds test cases for bugs:
20497 "Trigger with INSERT DELAYED causes Error 1165"
21714 "Wrong NEW.value and server abort on INSERT DELAYED to a
table with a trigger".
Post-review fixes.

Problem:
In MySQL INSERT DELAYED is a way to pipe all inserts into a
given table through a dedicated thread. This is necessary for
simplistic storage engines like MyISAM, which do not have internal
concurrency control or threading and thus can not
achieve efficient INSERT throughput without support from SQL layer.
DELAYED INSERT works as follows:
For every distinct table, which can accept DELAYED inserts and has
pending data to insert, a dedicated thread is created to write data
to disk. All user connection threads that attempt to
delayed-insert into this table interact with the dedicated thread in
producer/consumer fashion: all records to-be inserted are pushed
into a queue of the dedicated thread, which fetches the records and 
writes them.
In this design, client connection threads never open or lock
the delayed insert table.
This functionality was introduced in version 3.23 and does not take 
into account existence of triggers, views, or pre-locking.
E.g. if INSERT DELAYED is called from a stored function, which,
in turn, is called from another stored function that uses the delayed
table, a deadlock can occur, because delayed locking by-passes
pre-locking. Besides:
 * the delayed thread works directly with the subject table through
   the storage engine API and does not invoke triggers
 * even if it was patched to invoke triggers, if triggers,
   in turn, used other tables, the delayed thread would
   have to open and lock involved tables (use pre-locking).
 * even if it was patched to use pre-locking, without deadlock
   detection the delayed thread could easily lock out user 
   connection threads in case when the same table is used both
   in a trigger and on the right side of the insert query: 
   the delayed thread would not release locks until all inserts 
   are complete, and user connection can not complete inserts 
   without having locks on the tables used on the right side of the
   query.

Solution:

These considerations suggest two general alternatives for the
future of INSERT DELAYED:
 * it is considered a full-fledged alternative to normal INSERT
 * it is regarded as an optimisation that is only relevant 
   for simplistic engines.
Since we missed our chance to provide complete support of new
features when 5.0 was in development, the first alternative
currently renders infeasible.
However, even the second alternative, which is to detect
new features and convert DELAYED insert into a normal insert, 
is not easy to implement.
The catch-22 is that we don't know if the subject table has triggers
or is a view before we open it, and we only open it in the
delayed thread. We don't know if the query involves pre-locking
until we have opened all tables, and we always first create
the delayed thread, and only then open the remaining tables.
This patch detects the problematic scenarios and converts
DELAYED INSERT to a normal INSERT using the following approach:
 * if the statement is executed under pre-locking (e.g. from
   within a stored function or trigger) or the right
   side may require pre-locking, we detect the situation
   before creating a delayed insert thread and convert the statement
   to a conventional INSERT.
  * if the subject table is a view or has triggers, we shutdown
   the delayed thread and convert the statement to a conventional
   INSERT.


mysql-test/r/insert.result:
  Update test results.
mysql-test/t/insert.test:
  Add a test case for Bug#21483, Bug#20497, Bug#21714 (INSERT DELAYED
  and stored routines, triggers).
sql/sp_head.cc:
  Upgrade lock type to TL_WRITE when computing the pre-locking set.
sql/sql_base.cc:
  Use a new method.
sql/sql_insert.cc:
  INSERT DELAYED and pre-locking:
  - if  under pre-locking, upgrade the lock type to TL_WRITE
  and proceed as a normal write
  - if DELAYED table has triggers, also request a lock upgrade.
  - make sure errors in the delayed thread are propagated
  correctly
sql/sql_lex.h:
  Add a method to check if a parsed tree refers to stored
  routines.
2007-05-16 09:51:05 +04:00
unknown
1e33cfb36a bug #8663 cant use bigint unsigned as input to cast
in the case of the overflow in the decimal->integer conversion
we didn't return the proper boundary value, but just the result
of the conversion we calculated on the moment of the error


mysql-test/r/bigint.result:
  bug #8663 cant use bigint unsigned as input to cast
  test result fixed
mysql-test/t/bigint.test:
  bug #8663 cant use bigint unsigned as input to cast
  test case
strings/decimal.c:
  bug #8663 cant use bigint unsigned as input to cast
  decimal->int conversion fixed to return proper boundary value
  in the case of overflow
2007-05-16 10:12:49 +05:00
unknown
0e234075e5 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
2007-05-15 14:14:52 -07:00
unknown
9aa67a4096 Bug#28208: Wrong result of a non-const STRING function with a const DATETIME
function.

A wrong  condition was used to check that the
Arg_comparator::can_compare_as_dates() function calculated the value of the
string constant. When comparing a non-const STRING function with a constant
DATETIME function it leads to saving an arbitrary value as a cached value of
the DATETIME function.

Now the Arg_comparator::set_cmp_func() function initializes the const_value
variable to the impossible DATETIME value (-1) and this const_value is
cached only if it was changed by the Arg_comparator::can_compare_as_dates()
function.


mysql-test/t/type_datetime.test:
  Added a test case for the bug#28208: Wrong result of a non-const STRING function with a const DATETIME function.
mysql-test/r/type_datetime.result:
  Added a test case for the bug#28208: Wrong result of a non-const STRING function with a const DATETIME function.
sql/item_cmpfunc.cc:
  Bug#28208: Wrong result of a non-const STRING function with a const DATETIME
  function.
  Now the Arg_comparator::set_cmp_func() function initializes the const_value
  variable to the impossible DATETIME value (-1) and this const_value is
  cached only if it was changed by the Arg_comparator::can_compare_as_dates()
  function.
2007-05-16 00:30:12 +04:00
unknown
dfc85a63b1 Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug28272
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272


mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
sql/sql_select.cc:
  Manual merge
2007-05-15 13:16:10 -07:00
unknown
09fb739b95 Fix bug#27833 "Bourne shell string comparison issue in scripts/make_win_bin_dist":
Several string comparisons could never yield true because they had an 'x' guard
added to the variable but not to the constant value. Fix that by guarding both sides.


scripts/make_win_bin_dist:
  Fix bug#27833 "Bourne shell string comparison issue in scripts/make_win_bin_dist":
  
  Several string comparisons could never yield true because they had an 'x' guard
  added to the variable but not to the constant value. Fix that by guarding both sides.
  
  Use this occasion to apply some corrections to the comments and the usage text.
  
  Also, ensure the ".pdb" file is always optional.
2007-05-15 18:19:18 +02:00