into polly.local:/home/kaa/src/maint/m41-maint--07OGk
sql/field.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_time.result:
Manually merged
mysql-test/t/func_time.test:
Manually merged
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced
include/my_time.h:
Added defines for the TIME limits
Added defines for the warning flags set by str_to_time() and check_time_range()
Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
Fixed testcase which relied on incorrect behaviour
Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
Added check_time_range() to be used from str_to_time() and item_timefunc.cc
Added new out-of-range flag to str_to_time() warnings
Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
Checks for 'unsigned int' overflows in Item_func_maketime
Use make_time_with_warn() instead of make_time() in Item_func_maketime
Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
Check for return value of str_to_time() along with warning flags
- backport patch from 5.0
- "table" can be NULL in temporary fields used for type conversion
sql/field.cc:
table can be NULL in temporary fields used for type conversion.
Store value in field as if db_low_byte_first was set.
sql/field.h:
table can be NULL in temporary fields used for type conversion.
Store value in field as if db_low_byte_first was set.
This bug in Field_string::cmp resulted in a wrong comparison
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
Wrong key comparisons could lead to wrong result sets if
the selected query execution plan used a range scan by
a partial index over a utf8 character field.
This also caused wrong results in many other cases.
mysql-test/t/ctype_utf8.test:
Added test cases for bug #14896.
mysql-test/r/ctype_utf8.result:
Added test cases for bug #14896.
sql/field.cc:
Fixed bug #14896.
This bug in Field_string::cmp resulted in a wrong comparison
with keys in partial indexes over multi-byte character fields.
Given field a is declared as a varchar(16) collate utf8_unicode_ci
INDEX(a(4)) gives us an example of such an index.
Wrong key comparisons could lead to wrong result sets if
the selected query execution plan used a range scan by
a partial index over a utf8 character field.
This also caused wrong results in many other cases.
can lead to a wrong result.
All date/time functions has the STRING result type thus their results are
compared as strings. The string date representation allows a user to skip
some of leading zeros. This can lead to wrong comparison result if a date/time
function result is compared to such a string constant.
The idea behind this bug fix is to compare results of date/time functions
and data/time constants as ints, because that date/time representation is
more exact. To achieve this the agg_cmp_type() is changed to take in the
account that a date/time field or an date/time item should be compared
as ints.
This bug fix is partially back ported from 5.0.
The agg_cmp_type() function now accepts THD as one of parameters.
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.
From the Item_func_between::fix_length_and_dec() function removed the part
which was converting date/time constants to int if possible. Now this is
done by the agg_cmp_type() function.
The new function result_as_longlong() is added to the Item class.
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.
Correct val_int() methods are implemented for classes Item_date_typecast,
Item_func_makedate, Item_time_typecast, Item_datetime_typecast. All these
classes are derived from Item_str_func and Item_str_func::val_int() converts
its string value to int without regard to the date/time type of these items.
Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant. This is done
to get a correct result of comparisons like date_time_function() = string_constant.
mysql-test/r/cast.result:
Fixed wrong test case result after bug fix#16377.
sql/item_timefunc.h:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
The result_as_longlong() function is set to return TRUE for these classes:
Item_date, Item_date_func, Item_func_curtime, Item_func_sec_to_time,
Item_date_typecast, Item_time_typecast, Item_datetime_typecast,
Item_func_makedate.
sql/item_timefunc.cc:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.Correct val_int() methods are implemented for classes Item_date_typecast,
Item_func_makedate, Item_time_typecast, Item_datetime_typecast.
sql/item_cmpfunc.h:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant.
sql/field.cc:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
Field::set_warning(), Field::set_datetime_warning() now use current_thd to get thd if table isn't set.
sql/item_cmpfunc.cc:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
The agg_cmp_type() function now accepts THD as one of parameters.
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.
sql/item.h:
The new function result_as_longlong() is added to the Item class.
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.
mysql-test/t/func_time.test:
Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
mysql-test/r/func_time.result:
Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
mysql-test/r/func_time.result:
Fix for #16327: invalid TIMESTAMP values retrieved
- test result
mysql-test/t/func_time.test:
Fix for #16327: invalid TIMESTAMP values retrieved
- test case
sql/field.cc:
Fix for #16327: invalid TIMESTAMP values retrieved
- let 1969 as well
column is increasing when table is recreated with PS/SP":
make use of create_field::char_length more consistent in the code.
Reinit create_field::length from create_field::char_length
for every execution of a prepared statement (actually fixes the
bug).
mysql-test/r/ps.result:
Test results fixed (Bug#13134)
mysql-test/t/ps.test:
A test case for Bug#13134 "Length of VARCHAR() utf8 column is
increasing when table is recreated with PS/SP"
sql/field.cc:
Move initialization of create_field::char_length to the constructor
of create_field.
sql/field.h:
Rename chars_length to char_length (to be consistent with
how this term is used throughout the rest of the code).
sql/sql_parse.cc:
Initialize char_length in add_field_to_list. This function
effectively works as another create_field constructor.
sql/sql_table.cc:
Reinit length from char_length for every field in
mysql_prepare_table. This is not needed if we're executing
a statement for the first time, however, at subsequent executions
length contains the number of bytes, not characters (as it's expected
to).
field.cc:
BLOB variations have number-in-bytes limit,
unlike CHAR/VARCHAR which have number-of-characters limits.
A tinyblob column can store up to 255 bytes.
In the case of basic Latin letters (which use 1 byte per character)
we can store up to 255 characters in a tinyblob column.
When passing an utf8 tinyblob column as an argument into
a function (e.g. COALESCE) we need to reserve 3*255 bytes.
I.e. multiply length in bytes to mbcharlen for the character set.
Although in reality a tinyblob column can never be 3*255 bytes long,
we need to set max_length to multiply to make fix_length_and_dec()
of the function-caller (e.g. COALESCE) calculate the correct max_length
for the column being created.
ctype_utf8.result, ctype_utf8.test:
Adding test case.
mysql-test/t/ctype_utf8.test:
Adding test case.
mysql-test/r/ctype_utf8.result:
Adding test case.
sql/field.cc:
Bug#15581: COALESCE function truncates mutli-byte TINYTEXT values
BLOB variations have byte limits,
unlike CHAR/VARCHAR which have number-of-character limits.
It means tinyblob can store up to 255 bytes.
All of them can be basic latin letters which use 1 byte
per character.
I.e. we can store up to 255 characters in a tinyblob column.
When passing a tinyblob column as an argument into
a function (for example COALESCE or CONCAT) we
need to reserve 3*255 bytes in the case of utf-8.
I.e. multiply length in bytes to mbcharlen for the
character set.
field.cc:
Adding longlong range checking to return
LONGLONG_MIN or LONGLONG_MAX when out of range.
Using (longlong) cast only when range is ok.
cast.test:
Adding test case.
cast.result:
Fixing results accordingly.
sql/field.cc:
Bug#15098 CAST(column double TO signed int), wrong result
Adding longlong range checking.
mysql-test/t/cast.test:
Bug#15098 CAST(column double TO signed int), wrong result
Adding longlong range checking.
mysql-test/r/cast.result:
Fixing results accordingly.
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space
required for field_X in the new table.
mysql-test/r/create.result:
Testcase for BUG#14139
mysql-test/t/create.test:
Testcase for BUG#14139
sql/field.cc:
BUG#14139: Make create_length_to_internal_length() save length-in-characters in
create_field::chars_length.
sql/field.h:
BUG#14139: Add create_length::chars_length where we save length-in-characters, added comments.
sql/sql_table.cc:
BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
we get two instances of create_field: (1) is occurence of field_X in create list, and (2) is
in select list. If we figure they both refer to the same field, we "join" them according to
some rule that is not explicitly specified anywhere.
When we do this "join", create_field::length already contains length-in-bytes for both, so
when we transfer field length (in characters) from (1) to (2), use length-in-characters that
we have saved in create_length::chars_length.
No separate typecode for MEDIUMTEXT/LONGTEXT is added, as we
have no sound decision yet what typecodes and for what types are
sent by the server (aka what constitutes a distinct type in MySQL).
mysql-test/r/ps_2myisam.result:
Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_3innodb.result:
Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_4heap.result:
Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_5merge.result:
Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_6bdb.result:
Test results fixed: new longtext/longblob length (2^32)
mysql-test/r/ps_7ndb.result:
Test results fixed: new longtext/longblob length (2^32)
sql/field.cc:
A fix for Bug#9735 "mysql_fetch_fields() acts strange on
LONGBLOB/LONGTEXT": fix wrong initialization of field_length
in case of BLOB fields.
tests/mysql_client_test.c:
A test case for Bug#9735 "mysql_fetch_fields() acts strange on
LONGBLOB/LONGTEXT"
Added a test case for bug #10124.
sql_select.h, item_subselect.cc, sql_select.cc:
Fixed bug #10124.
The copy method of the store_key classes can return
STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
field.cc:
Fixed bug #10124.
When ussuing a warning the store methods return 2 instead of 1 now.
sql/field.cc:
Fixed bug #10124.
When ussuing a warning the store methods return 2 instead of 1 now.
sql/sql_select.cc:
Fixed bug #10124.
The copy method of the store_key classes can return
STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
sql/item_subselect.cc:
Fixed bug #10124.
The copy method of the store_key classes can return
STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
sql/sql_select.h:
Fixed bug #10124.
The copy method of the store_key classes can return
STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
mysql-test/t/func_str.test:
Added a test case for bug #10124.
mysql-test/r/func_str.result:
Added a test case for bug #10124.
Fixed wrong allocation that could cause buffer overrun when using join cache
myisam/mi_open.c:
Fixed indentation
mysql-test/r/lowercase_table2.result:
Drop tables and databases used in the test
mysql-test/t/lowercase_table2.test:
Drop tables and databases used in the test
mysys/my_fopen.c:
Cleanup of comments and parameter names
Simple optimization
Removed compiler warnings
sql/field.cc:
Fixed wrong allocation that could cause buffer overrun
sql/mysqld.cc:
Removed not needed code
sql/set_var.cc:
Simply code
sql/sql_select.cc:
Use int2store/int2korr to store length of cached VARCHAR fields
(Not dependent on type and faster code as we avoid one possible call)
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
mysql-test/r/func_gconcat.result:
Move innodb specific test to innodb.test
Changed table name r2 -> t2
More test to see how ROLLUP was optimized
mysql-test/r/innodb.result:
Moved test here form func_gconcat
mysql-test/r/olap.result:
New test results after optimization
mysql-test/t/func_gconcat.test:
Move innodb specific test to innodb.test
Changed table name r2 -> t2
More test to see how ROLLUP was optimized
mysql-test/t/innodb.test:
Moved test here form func_gconcat
sql/field.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_berkeley.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_blackhole.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_heap.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_innodb.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isam.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isammrg.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisam.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisammrg.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_ndbcluster.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/handler.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/hash_filo.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_cmpfunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_func.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called
sql/item_geofunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_strfunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_subselect.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_sum.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_timefunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_uniq.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/log_event.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/mysql_priv.h:
Change key_map_full to not be const as we are giving it a proper value on startup
sql/mysqld.cc:
Move key_map variables here and initialize key_map_full properly
sql/opt_range.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/opt_range.h:
Fix that test_quick_select() works with any ammount of keys
sql/procedure.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol_cursor.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/set_var.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_analyse.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_class.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_crypt.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_insert.cc:
Fixed that max_rows is ulong
sql/sql_list.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_map.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_olap.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_select.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
Fixed that ROLLUP don't have to always create a temporary table
Added new argument to remove_const() to make above possible
Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP
sql/sql_string.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_table.cc:
Simple optimizations
Fixed wrong checking of build_table_path() in undef-ed code
sql/sql_udf.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_yacc.yy:
removed extra {}
adding test
field.cc:
bug#10714 Inserting double value into utf8 column crashes server:
sprintf was executed with too big length, which caused
crash on some Windows platforms.
sql/field.cc:
bug#10714 Inserting double value into utf8 column crashes server
sprintf was executed with too long length, which cau
crashe on Windows.
mysql-test/t/ctype_utf8.test:
adding test
mysql-test/r/ctype_utf8.result:
adding test
Set #pragma implementation" earlier
Many files:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
client/sql_string.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
mysys/raid.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/field.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_berkeley.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_blackhole.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_heap.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_innodb.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_isam.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_isammrg.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_myisam.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_myisammrg.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_ndbcluster.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/handler.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/hash_filo.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_cmpfunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_func.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_geofunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_strfunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_subselect.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_sum.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_timefunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/log_event.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/opt_range.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/procedure.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/protocol.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/protocol_cursor.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/set_var.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_class.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_list.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_map.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_olap.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_archive.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_select.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_string.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_udf.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_example.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_tina.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/tztime.cc:
Set #pragma implementation" earlier
sql/field.cc:
Use a separate variable. Otherwise "error" value gets lost
after well_formed_length call.
strings/ctype-mb.c:
Don't return an error if we reached end of line.
mysql-test/r/func_group.result:
new result
mysql-test/r/metadata.result:
new result
test of metadata of variables, unions and derived tables
mysql-test/r/union.result:
new results
test of union of enum
mysql-test/t/metadata.test:
test of metadata of variables, unions and derived tables
mysql-test/t/union.test:
test of union of enum
sql/field.cc:
Field type merging rules added
Fixed table name/alias returting for field made from temporary tables
sql/field.h:
removed unned field type reporting
sql/item.cc:
fixed bug in NEW_DATE type field creartion
replaced mechanism of merging types of UNION
sql/item.h:
replaced mechanism of merging types of UNION
sql/item_func.h:
new item type to make correct field type detection possible
sql/item_subselect.cc:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_derived.cc:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_lex.h:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_parse.cc:
made function for enum/set pack length calculation
sql/sql_prepare.cc:
added table name parameter to prepare() to show right table alias for derived tables
sql/sql_select.cc:
new temporary table field creation by Item_type_holder
fixed table alias for temporary table
sql/sql_union.cc:
added table name parameter to prepare() to show right table alias for derived tables
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)
client/mysql.cc:
Fix wront usage of charset (found during review of pushed code)
include/m_string.h:
Backported my_strtod() from 5.0
mysql-test/mysql-test-run.sh:
Run also mysql_client_test with --debug
mysql-test/r/ps_1general.result:
Safety fix (if mysql_client_test.test fails)
mysql-test/r/type_float.result:
More test
mysql-test/t/mysql_client_test.test:
Comments for what to do if this test fails
mysql-test/t/ps_1general.test:
Safety fix (if mysql_client_test.test fails)
mysql-test/t/type_float.test:
More test to better test new strtod() function
Test also bug #7740 (wrong comparsion between integer and float-in-integer-range)
sql/field.cc:
Backport my_strntod() from 5.0
sql/item.cc:
Backport my_strntod() from 5.0
sql/item.h:
Backport my_strntod() from 5.0
sql/item_func.h:
Backport my_strntod() from 5.0
sql/item_strfunc.cc:
Backport my_strntod() from 5.0
sql/item_sum.cc:
Backport my_strntod() from 5.0
sql/item_sum.h:
Backport my_strntod() from 5.0
sql/procedure.h:
Backport my_strntod() from 5.0
strings/ctype-simple.c:
Backport my_strntod() from 5.0
strings/ctype-ucs2.c:
Backport my_strntod() from 5.0
strings/strtod.c:
Backport my_strntod() from 5.0
Change conversion to delay division as long as possible.
This gives us more exact integer-> float conversion for numbers of type '123.45E+02'
mysql-test/r/ctype_ucs.result:
Test case
mysql-test/t/ctype_ucs.test:
Test case
sql/field.cc:
Fixed minus check to be UCS2-compatible
strings/ctype-ucs2.c:
Missing my_scan_ucs2() was added.
bug#7833: Wrong datatype of aggregate column is returned
mysql-test/r/func_group.result:
Test case for bug 7833: Wrong datatype of aggregate column is returned
mysql-test/r/union.result:
Test case for bug 6931: Date Type column problem when using UNION-Table.
mysql-test/t/func_group.test:
Test case for bug 7833: Wrong datatype of aggregate column is returned
mysql-test/t/union.test:
Test case for bug 6931: Date Type column problem when using UNION-Table.
mysql-test/t/type_date.test:
Add new regression test
mysql-test/r/type_date.result:
Add result
sql/field.cc:
Set YEAR to 0 when set to a non-numeric string, not 2000,
and issue a warning.
of log_10 array.
sql/field.cc:
Avoid pointless calculation for really short fields, and what could be
an attempt to access outside the bounds of the log_10 array.
absolute value of the float is less than 1, and also fix calculation of
length for negative values. (Bug #7774)
sql/field.cc:
Fix handling of negative values and fabs(values> < 1 in Field_str::store
mysql-test/r/type_float.result:
Add results
mysql-test/r/type_float.result.es:
Add results
mysql-test/t/type_float.test:
Add test for conversion of floats to character field
with a number of decimals specified. (Bug #7361)
mysql-test/t/type_float.test:
Add test for maximum values of float and double columns with number of decimals
mysql-test/r/type_float.result:
Add results for new test
mysql-test/r/type_float.result.es:
Add results for new test
sql/field.cc:
Use ::store(double nr) from ::store(longlong nr) so we get the same range checking
mysql-test/r/rpl_start_stop_slave.result:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/type_enum.result:
merged test cases
mysql-test/t/type_enum.test:
merged test cases
Added auto-correct of field length for enum/set tables for ALTER TABLE
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
mysql-test/r/rpl_start_stop_slave.result:
Fixed wrong test
mysql-test/r/type_enum.result:
Added test for wrong enum/set length after alter table
mysql-test/t/ps.test:
removed empty line
mysql-test/t/type_enum.test:
Added test for wrong enum/set length after alter table
sql/field.cc:
Added auto-correct of field length for enum/set tables.
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
sql/item_cmpfunc.cc:
Simple optimization
sql/mysql_priv.h:
Made local function global
sql/set_var.cc:
Simple cleanup
sql/sql_table.cc:
Simple cleanups & optimizations
properly" with main tree.
libmysql/libmysql.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
tests/client_test.c:
Manual merge.
In server we assume that datetime values stored in MYSQL_TIME struct
are normalized (and year is not greater than 9999), so we should
perform range checks in all places then we convert something to
MYSQL_TIME.
include/my_time.h:
Added one more argument to set_zero_time() function to make it more
convinient.
Added comment clarifying why MAX_DATE_STRING_REP_LENGTH value is 30.
include/mysql_time.h:
Documented MySQL's internal assumptions for members of MYSQL_TIME
structure.
libmysql/libmysql.c:
It does not make sense to set MYSQL_TIME::time_type twice in case of
errors.
mysql-test/r/type_datetime.result:
Added test for bug #6266 "Invalid DATETIME value not handled properly".
mysql-test/t/type_datetime.test:
Added test for bug #6266 "Invalid DATETIME value not handled properly".
sql-common/my_time.c:
str_to_datetime(): Added missing check for too big year values.
set_zero_time(): added time_type argument, since MYSQL_TIMESTAMP_NONE
is not the value that we want in most cases.
sql/field.cc:
Field_datetime::store_time():
clarified why we don't perform any range checks here.
sql/item.cc:
Item_param::set_time():
Added comment describing this method and range checking for TIME
values.
sql/sql_prepare.cc:
Removed comments about range checking for TIME values in prepared
statements, which are no longer true.
set_zero_time() has one more argument now.
tests/client_test.c:
Added test for bug #6266 "Invalid DATETIME value not handled properly"