The crash happens due to wrong max_length value which is set on
Item_func_round::fix_length_and_dec() stage. The value is set to
args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields.
The fix is to set max_length using float_length() function.
mysql-test/r/func_math.result:
test result
mysql-test/t/func_math.test:
test case
sql/item_func.cc:
The crash happens due to wrong max_length value which is set on
Item_func_round::fix_length_and_dec() stage. The value is set to
args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields.
The fix is to set max_length using float_length() function.
The RAND(N) function where the N is a field of "constant" table
(table of single row) failed with a SIGFPE.
Evaluation of RAND(N) rely on constant status of its argument.
Current server "seeded" random value for each constant argument
only once, in the Item_func_rand::fix_fields method.
Then the server skipped a call to seed_random() in the
Item_func_rand::val_real method for such constant arguments.
However, non-constant state of an argument may be changed
after the call to fix_fields, if an argument is a field of
"constant" table. Thus, pre-initialization of random value
in the fix_fields method is too early.
Initialization of random value by seed_random() has been
removed from Item_func_rand::fix_fields method.
The Item_func_rand::val_real method has been modified to
call seed_random() on the first evaluation of this method
if an argument is a function.
mysql-test/r/func_math.result:
Added test case for bug #44768.
mysql-test/t/func_math.test:
Added test case for bug #44768.
sql/item_func.cc:
Bug #44768: SIGFPE crash when selecting rand from a view containing null
1. Initialization of random value by seed_random() has been
removed from Item_func_rand::fix_fields method.
2. The Item_func_rand::val_real method has been modified to
call seed_random() on the first evaluation of this method
if an argument is a function.
sql/item_func.h:
Bug #44768: SIGFPE crash when selecting rand from a view containing null
1. The Item_func_rand::first_eval has been added to trace
the first evaluation of the val_real method.
2. The Item_func_rand::cleanup method has been added to
cleanup the first_eval flag.
Both of our own implementations of rint(3) were inconsistent with the
most common behavior of rint() on those platforms that have it: round
to nearest, break ties by rounding to nearest even.
Fixed by leaving just one implementation of rint() in our source tree,
and changing its behavior to match the most common native
implementations on other platforms.
configure.in:
Added checks for fenv.h and fesetround().
include/config-win.h:
Removed the incorrect implementation of rint() for Windows.
include/my_global.h:
Added an rint() implementation for platforms that do not have it.
mysql-test/r/func_math.result:
Added a test case for bug #15936.
mysql-test/t/func_math.test:
Added a test case for bug #15936.
sql/mysqld.cc:
Explicitly set the FPU rounding mode with fesetround().
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases
depending on whether the text-based or prepared statements protocol is used for a query.
Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.
This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).
client/sql_string.cc:
Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
libmysql/libmysql.c:
Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
mysql-test/r/archive_gis.result:
Fixed test results to take additional precision into account.
mysql-test/r/func_group.result:
Fixed test results to take additional precision into account.
mysql-test/r/func_math.result:
Fixed test results to take additional precision into account.
mysql-test/r/func_str.result:
Fixed test results to take additional precision into account.
mysql-test/r/gis.result:
Fixed test results to take additional precision into account.
mysql-test/r/innodb_gis.result:
Fixed test results to take additional precision into account.
mysql-test/r/select.result:
Fixed test results to take additional precision into account.
mysql-test/r/sp.result:
Fixed test results to take additional precision into account.
mysql-test/r/type_float.result:
Fixed test results to take additional precision into account.
mysql-test/t/type_float.test:
Fixed test results to take additional precision into account.
sql/sql_string.cc:
Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does.
floating point numbers
Some math functions did not check if the result is a valid number
(i.e. neither of +-inf or nan).
Fixed by validating the result where necessary and returning NULL in
case of invalid result.
BitKeeper/deleted/.del-matherr.c:
Rename: sql/matherr.c -> BitKeeper/deleted/.del-matherr.c
configure.in:
Removed DONT_USE_FINITE, it is not used anywhere.
include/my_global.h:
isfinite() is a C99 macro which absoletes finite(). First try to use
it, then fall back to finite() if the target platform has it,
otherwise use our own implementation.
mysql-test/r/func_math.result:
Added a test case for bug #31236.
mysql-test/r/strict.result:
Fixed a test case which relied on old behavior.
mysql-test/t/func_math.test:
Added a test case for bug #31236.
mysql-test/t/strict.test:
Fixed a test case which relied on old behavior.
sql/field.cc:
No need to check if the finite() or its equivalent is available.
sql/item_func.cc:
Use fix_result() wherever the result can be one of +-inf or nan,
assuming the function arguments are valid numbers.
Removed fix_result() from functions that are defined for all possible
input numbers.
sql/item_func.h:
Moved fix_result() from Item_dec_func to Item_func which is a common
ancestor for Item_dec_func and Item_num_op.
sql/unireg.h:
Removed POSTFIX_ERROR because no code returns it.
mysql-test/r/func_math.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.cc:
Auto merged
into magare.gmz:/home/kgeorge/mysql/work/B30587-5.1-opt
mysql-test/r/func_math.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
sql/item_func.cc:
Auto merged
When calculating the result length of an integer DIV function
the number of decimals was used without checking the result type
first. Thus an uninitialized number of decimals was used for some
types. This caused an excessive amount of memory to be allocated
for the field's buffer and crashed the server.
Fixed by using the number of decimals only for data types that
can have decimals and thus have valid decimals number.
mysql-test/r/func_math.result:
Bug #30587: test case
mysql-test/t/func_math.test:
Bug #30587: test case
sql/item_func.cc:
Bug #30587: Don't use decimals on a type that doesn't have them.
into polly.local:/home/kaa/src/maint/bug24912/my51-bug24912
mysql-test/r/type_newdecimal.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
mysql-test/r/func_math.result:
Manual merge.
sql/item_strfunc.cc:
Manual merge.
- unsigned flag was not handled correctly for a number of mathematical funcions, which led to incorrect results
- passing large values as the number of decimals to ROUND() resulted in incorrect results and even server crashes in some cases
- reverted the fix and the testcase for bug #10083 as it violates the manual
- fixed some testcases which relied on broken ROUND() behavior
mysql-test/r/func_math.result:
- Removed the testcase for bug #10083 (not a bug according to the manual)
- Changed the testcase for bug #9837 to expect a correct ROUND() behavior
- Added testcases for bug #24912 and all related bugs found
mysql-test/r/type_newdecimal.result:
Fixed a truncate() testcase which relied on broken behavior
mysql-test/t/func_math.test:
- Removed the testcase for bug #10083 (not a bug according to the manual)
- Changed the testcase for bug #9837 to expect a correct ROUND() behavior
- Added testcases for bug #24912 and all related bugs found
sql/item_func.cc:
Various changes to fix bug #24912 and all related bugs found:
- honor unsigned_flag in various Item_* functions
- correctly handle out-of-range numbers of decimals in Item_func_round::fix_length_and_dec()
- changed the argument specifying the number of decimals in my_double_round() from int to longlong, added a new argument to pass the 'unsigned flag'
- changed my_double_round() to correctly handle large values passed as the 'number of decimals' argument
- added a my_double_round() analog for BIGINT UNSIGNED arguments (my_unsigned_round())
- fixed Item_func_round()::int_op() to not overflow even when the result is within integer range
- fixed a bug Item_founc_round()::decimal_op() which resulted in crash when a large number of decimals was passed to my_decimal_round()
sql/item_func.h:
Various fixed to correctly handle unsigned values.
sql/item_strfunc.cc:
Changed the call to my_double_round() to match the new declaration.
sql/mysql_priv.h:
Changed the declaration for my_double_round() to be able pass arbitrary integers as number of decimals (both signed and unsigned)
RAND() must accept scalar expressions regardless of their kind.
That includes both constant expressions and expressions that
depend on column values.
When the expression is constant the random seed can be initialized
at compile time.
However when the expression is not constant the random seed must be
initialized at each invocation (while it still can be allocated at
compile time).
Implemented the above rules by extending Item_func_rand::val_real()
to initialize the random seed at the correct place.
mysql-test/r/func_math.result:
Bug #6172: RAND(a) should only accept constant values as arguments
- extened the test case
mysql-test/t/func_math.test:
Bug #6172: RAND(a) should only accept constant values as arguments
- extened the test case
sql/item_func.cc:
Bug #6172: RAND(a) should only accept constant values as arguments
- allow specifying non-const expressions as RAND() arguments
sql/item_func.h:
Bug #6172: RAND(a) should only accept constant values as arguments
- allow specifying non-const expressions as RAND() arguments
Due to the complexity of this change, everything is documented in WL#3565
This patch is the third iteration, it takes into account the comments
received to date.
mysql-test/r/func_math.result:
Improved test coverage
mysql-test/r/view.result:
Name collision, x() is a geometry native in function
mysql-test/t/func_math.test:
Improved test coverage
mysql-test/t/view.test:
Name collision, x() is a geometry native in function
sql/item_create.cc:
Revised the create_func implementation
sql/item_create.h:
Revised the create_func implementation
sql/item_geofunc.h:
Explicit Item allocation in the thread memory pool.
sql/lex.h:
Removed function parsing from the lexical parser
sql/lex_symbol.h:
Removed function parsing from the lexical parser
sql/mysql_priv.h:
Server initialization and shutdown
sql/mysqld.cc:
Server initialization and shutdown
sql/share/errmsg.txt:
New error messages
sql/sql_yacc.yy:
Removed function parsing from the lexical parser
tests/mysql_client_test.c:
Spaces are no longer significant for function calls
mysql-test/include/parser_bug21114.inc:
New tests
mysql-test/r/parser.result:
New tests
mysql-test/r/parser_bug21114_innodb.result:
New tests
mysql-test/t/parser.test:
New tests
mysql-test/t/parser_bug21114_innodb.test:
New tests
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/binlog_row_blackhole.result:
Auto merged
mysql-test/r/binlog_stm_blackhole.result:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_compress.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_system.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/partition_pruning.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/rpl_get_lock.result:
Auto merged
mysql-test/r/rpl_master_pos_wait.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/partition_pruning.test:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.h:
Auto merged
- Make the range-et-al optimizer produce E(#table records after table
condition is applied),
- Make the join optimizer use this value,
- Add "filtered" column to EXPLAIN EXTENDED to show
fraction of records left after table condition is applied
- Adjust test results, add comments
mysql-test/r/archive_gis.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/auto_increment.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bdb_gis.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bench_count_distinct.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/binlog_stm_blackhole.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/case.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/cast.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/compress.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_collate.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_cp1250_ch.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/date_formats.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/distinct.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/fulltext.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_compress.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_crypt.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_default.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_encrypt.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_gconcat.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_group.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_if.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_in.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_like.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_math.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_op.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_regexp.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_set.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_str.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_system.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_test.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_time.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/gis.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_by.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_min_max.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/having.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap_hash.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_innodb.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_ror.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/innodb_gis.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/insert_update.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join_nested.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/key_diff.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/myisam.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ndb_gis.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/negation_elimination.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/null.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/olap.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/partition_pruning.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/query_cache.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/row.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_get_lock.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_master_pos_wait.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/select.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl_compress.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/subselect.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/type_blob.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/union.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/varbinary.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/variables.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/view.result:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/ctype_cp1250_ch.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/func_like.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/group_min_max.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror_cpk.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/join.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/partition_pruning.test:
BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
sql/opt_range.cc:
BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows -
estimate of #records that will match the table condition.
sql/sql_class.cc:
BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.cc:
BUG#14940:
- Make the join optimizer to use TABLE::quick_condition_rows=
= E(#table records after filtering with table condition)
- Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.h:
BUG#14940: Added comments
sql/table.h:
BUG#14940: Added comments
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
include/my_sys.h:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/func_system.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/log.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/slave.h:
SCCS merged
mysql-test/r/show_check.result:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
sql/log_event.cc:
Manual merge.
sql/share/errmsg.txt:
Manual merge.
sql/sql_class.h:
Manual merge.
sql/sql_db.cc:
Manual merge.
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.
The solution is to remember that original value.
mysql-test/r/auto_increment.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_compress.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_math.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_system.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_time.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/information_schema.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/query_cache.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_get_lock.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_master_pos_wait.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/show_check.result:
Add result for bug#17203.
mysql-test/r/subselect.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/type_blob.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/variables.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/view.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/t/show_check.test:
Add test case for bug#17203.
sql/sql_lex.cc:
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
sql/sql_lex.h:
Add SELECT_LEX::sql_cache field to store original user setting.
sql/sql_select.cc:
Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
sql/sql_yacc.yy:
Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive. Ignore
SQL_CACHE if SQL_NO_CACHE was used. Remember what was set by the user.
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
into mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
libmysql/libmysql.c:
Auto merged
mysql-test/r/binary.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/t/binary.test:
Auto merged
mysql-test/t/federated.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/field_conv.cc:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_federated.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
support-files/mysql.spec.sh:
Manual merge. (use local)
calculate Item_func_format::max_length using charset->mbmaxlen
mysql-test/r/func_math.result:
Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8
test case
mysql-test/t/func_math.test:
Fix for bug#16678 FORMAT gives wrong result if client run with default-character-set=utf8
test case
mysql-test/r/alter_table.result:
Update test result
mysql-test/r/analyse.result:
Update test result
mysql-test/r/archive.result:
Update test result
mysql-test/r/archive_bitfield.result:
Update test result
mysql-test/r/archive_gis.result:
Update test result
mysql-test/r/bdb.result:
Update test result
mysql-test/r/bdb_gis.result:
Update test result
mysql-test/r/bigint.result:
Update test result
mysql-test/r/binary.result:
Update test result
mysql-test/r/case.result:
Update test result
mysql-test/r/cast.result:
Update test result
mysql-test/r/constraints.result:
Update test result
mysql-test/r/create.result:
Update test result
mysql-test/r/ctype_collate.result:
Update test result
mysql-test/r/ctype_create.result:
Update test result
mysql-test/r/ctype_latin1_de.result:
Update test result
mysql-test/r/ctype_many.result:
Update test result
mysql-test/r/ctype_mb.result:
Update test result
mysql-test/r/ctype_recoding.result:
Update test result
mysql-test/r/ctype_sjis.result:
Update test result
mysql-test/r/ctype_tis620.result:
Update test result
mysql-test/r/ctype_ucs.result:
Update test result
mysql-test/r/ctype_ujis.result:
Update test result
mysql-test/r/ctype_utf8.result:
Update test result
mysql-test/r/default.result:
Update test result
mysql-test/r/events.result:
Update test result
mysql-test/r/federated.result:
Update test result
mysql-test/r/fulltext.result:
Update test result
mysql-test/r/func_gconcat.result:
Update test result
mysql-test/r/func_group.result:
Update test result
mysql-test/r/func_math.result:
Update test result
mysql-test/r/func_misc.result:
Update test result
mysql-test/r/func_str.result:
Update test result
mysql-test/r/func_system.result:
Update test result
mysql-test/r/gis-rtree.result:
Update test result
mysql-test/r/heap.result:
Update test result
mysql-test/r/index_merge_innodb.result:
Update test result
mysql-test/r/information_schema.result:
Update test result
mysql-test/r/innodb.result:
Update test result
mysql-test/r/innodb_gis.result:
Update test result
mysql-test/r/key.result:
Update test result
mysql-test/r/merge.result:
Update test result
mysql-test/r/myisam.result:
Update test result
mysql-test/r/mysqldump-max.result:
Update test result
mysql-test/r/mysqldump.result:
Update test result
mysql-test/r/ndb_bitfield.result:
Update test result
mysql-test/r/ndb_gis.result:
Update test result
mysql-test/r/ndb_partition_key.result:
Update test result
mysql-test/r/null.result:
Update test result
mysql-test/r/partition.result:
Update test result
mysql-test/r/partition_02myisam.result:
Update test result
mysql-test/r/partition_mgm_err.result:
Update test result
mysql-test/r/partition_range.result:
Update test result
mysql-test/r/ps_2myisam.result:
Update test result
mysql-test/r/ps_3innodb.result:
Update test result
mysql-test/r/ps_4heap.result:
Update test result
mysql-test/r/ps_5merge.result:
Update test result
mysql-test/r/ps_6bdb.result:
Update test result
mysql-test/r/rpl_mixed_ddl_dml.result:
Update test result
mysql-test/r/rpl_multi_engine.result:
Update test result
mysql-test/r/rpl_ndb_UUID.result:
Update test result
mysql-test/r/show_check.result:
Update test result
mysql-test/r/sp-vars.result:
Update test result
mysql-test/r/sp.result:
Update test result
mysql-test/r/sql_mode.result:
Update test result
mysql-test/r/strict.result:
Update test result
mysql-test/r/subselect.result:
Update test result
mysql-test/r/symlink.result:
Update test result
mysql-test/r/synchronization.result:
Update test result
mysql-test/r/system_mysql_db.result:
Update test result
mysql-test/r/temp_table.result:
Update test result
mysql-test/r/trigger.result:
Update test result
mysql-test/r/type_binary.result:
Update test result
mysql-test/r/type_bit.result:
Update test result
mysql-test/r/type_bit_innodb.result:
Update test result
mysql-test/r/type_blob.result:
Update test result
mysql-test/r/type_decimal.result:
Update test result
mysql-test/r/type_enum.result:
Update test result
mysql-test/r/type_float.result:
Update test result
mysql-test/r/type_nchar.result:
Update test result
mysql-test/r/type_newdecimal.result:
Update test result
mysql-test/r/type_set.result:
Update test result
mysql-test/r/type_timestamp.result:
Update test result
mysql-test/r/type_varchar.result:
Update test result
mysql-test/r/union.result:
Update test result
mysql-test/r/user_var.result:
Update test result
mysql-test/r/variables.result:
Update test result
sql/sql_show.cc:
Make ouput from SHOW CREATE TABLE use uppercase for "CHARACTER SET", "COLLATE", "DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
fix for bug#8461
BUG 8461 - TRUNCATE returns incorrect result if 2nd argument is negative
Reason: Both TRUNCATE/ROUND converts INTEGERS to DOUBLE and back to INTEGERS
Changed the integer routine to work on integers only.
This bug affects 4.1, 5.0 and 5.1
Fixing in 4.1 will need to change the routine to handle different types individually.
5.0 did had different routines for different types already just the INTEGER routine was bad.
sql/item_func.cc:
fix for bug#8461
BUG 8461 - TRUNCATE returns incorrect result if 2nd argument is negative
Reason: TRUNCATE converts INTEGERS to DOUBLE and back to INTEGERS
Both ROUND and TRUNCATE are affected by this.
Changed the integer routine to work on integers only.
This bug affects 4.1 5,0 and 5
Fixing in 4.1 will need to change the routine to handle different types individually.
mysql-test/r/func_math.result:
Add new results
mysql-test/t/func_math.test:
Add new regression test
sql/item_func.cc:
Set maybe_null in Item_func_abs::fix_length_and_dec().
mysql-test/r/func_math.result:
result fixed
mysql-test/t/func_math.test:
test case added
sql/item_func.cc:
tests for (value<=0.0) added to LOG* functions
into sanja.is.com.ua:/home/bell/mysql/bk/work-mrg-5.0
configure.in:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
mysql-test/r/func_math.result:
Add new results
mysql-test/t/func_math.test:
Add new regression test
sql/item_func.cc:
Don't set result of abs() to unsigned. Result should still be
a signed value, even if always positive.
mysql-test/r/func_math.result:
test result fixed
mysql-test/t/func_math.test:
test case added
strings/decimal.c:
handling of round_digit changed - we have to check all the digits after
the point if round_digit is 0
mysql-test/r/func_math.result:
test result ixed
mysql-test/t/func_math.test:
test case added
sql/item_strfunc.cc:
Item_func_format::val_str now handles 'decimal' and 'double' values in
different way
we need proper rounding there
mysql-test/r/func_math.result:
test result fixed
mysql-test/t/func_math.test:
test case added
sql/item_func.cc:
my_double_round implementation added
sql/item_strfunc.cc:
my_double_round used
sql/mysql_priv.h:
my_double_round interface
mysql-test/r/func_math.result:
after merge fix:
the test should be added after we have new hf's pm code pushed.
mysql-test/t/func_math.test:
after merge fix:
the test should be added after we have new hf's pm code pushed.
sql/item_func.cc:
A fix (bug #9837: round(1, 6) delivers wrong value in create table context).
As we change decimals, we should change max_length accordingly.
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
BitKeeper/etc/logging_ok:
auto-union
VC++Files/innobase/innobase.dsp:
Auto merged
VC++Files/libmysql/libmysql.dsp:
Auto merged
acinclude.m4:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-com0shm.c~6a16f0c3d81de1f:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
extra/replace.c:
Auto merged
include/my_sys.h:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/btr/btr0pcur.c:
Auto merged
innobase/btr/btr0sea.c:
Auto merged
innobase/configure.in:
Auto merged
innobase/data/data0data.c:
Auto merged
innobase/dict/dict0boot.c:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/dict/dict0load.c:
Auto merged
innobase/dict/dict0mem.c:
Auto merged
innobase/ha/ha0ha.c:
Auto merged
innobase/ha/hash0hash.c:
Auto merged
innobase/include/btr0btr.ic:
Auto merged
innobase/include/data0type.ic:
Auto merged
innobase/include/dict0mem.h:
Auto merged
innobase/include/log0log.ic:
Auto merged
innobase/include/mach0data.ic:
Auto merged
innobase/include/mtr0log.h:
Auto merged
innobase/include/mtr0mtr.h:
Auto merged
innobase/include/os0file.h:
Auto merged
innobase/include/row0upd.ic:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/include/sync0sync.h:
Auto merged
innobase/include/trx0rseg.ic:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/log/log0recv.c:
Auto merged
innobase/mem/mem0dbg.c:
Auto merged
innobase/mtr/mtr0log.c:
Auto merged
innobase/mtr/mtr0mtr.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/page/page0cur.c:
Auto merged
innobase/page/page0page.c:
Auto merged
innobase/pars/lexyy.c:
Auto merged
innobase/read/read0read.c:
Auto merged
innobase/rem/rem0cmp.c:
Auto merged
innobase/rem/rem0rec.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0purge.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/row/row0undo.c:
Auto merged
innobase/row/row0upd.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
innobase/sync/sync0rw.c:
Auto merged
innobase/thr/thr0loc.c:
Auto merged
innobase/trx/trx0purge.c:
Auto merged
innobase/trx/trx0rec.c:
Auto merged
innobase/trx/trx0roll.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/trx/trx0undo.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/myisamchk.c:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/mysqlbinlog.result:
Auto merged
mysql-test/r/rpl_error_ignored_table.result:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
mysys/mf_iocache.c:
Auto merged
mysys/mf_pack.c:
Auto merged
mysys/my_getopt.c:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
tests/thread_test.c:
Auto merged
client/mysqldump.c:
Keep original indentation
mysql-test/r/merge.result:
keep old file
scripts/mysql_fix_privilege_tables.sh:
Keep old structure in merge with 4.0
sql/table.cc:
merge with 4.0 + simple optimizations
mysql-test/r/func_math.result:
Updated tests after merge with 3.23
mysql-test/r/multi_update.result:
Fixed not portable test
mysql-test/r/mysqlbinlog.result:
Fixed test after push without doing 'make test'
mysql-test/t/multi_update.test:
Fixed not portable test
sql/sql_parse.cc:
Don't use static inline, as this is not portable
BitKeeper/etc/logging_ok:
auto-union
myisam/mi_check.c:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
sql/item_func.cc:
Auto merged
mysql-test/r/func_math.result:
added test for Bug #3051 "FLOOR returns invalid"
mysql-test/t/func_math.test:
added test for Bug #3051 "FLOOR returns invalid"
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
mysql-test/r/ctype_tis620.result-old:
Merge rename: mysql-test/r/ctype_tis620.result -> mysql-test/r/ctype_tis620.result-old
BUILD/compile-pentium-max:
Auto merged
BitKeeper/etc/config:
Auto merged
Build-tools/Bootstrap:
Auto merged
Build-tools/Do-compile:
Auto merged
configure.in:
Auto merged
mysql-test/t/ctype_tis620.test-old:
Merge rename: mysql-test/t/ctype_tis620.test -> mysql-test/t/ctype_tis620.test-old
Docs/Makefile.am:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/my_sys.h:
Auto merged
include/myisam.h:
Auto merged
innobase/btr/btr0cur.c:
Auto merged
innobase/ibuf/ibuf0ibuf.c:
Auto merged
innobase/include/dict0dict.h:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/include/ut0mem.h:
Auto merged
innobase/log/log0log.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_dynrec.c:
Auto merged
myisam/mi_key.c:
Auto merged
myisam/myisam_ftdump.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/bigint.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged