mysql-test/r/type_varchar.result:
Update results
mysql-test/t/type_varchar.test:
Add new regression test
sql/field.cc:
Add Field::type_can_have_key_part() static method
sql/field.h:
Add Field::type_can_have_key_part() signature.
sql/sql_table.cc:
Only reset the length of a key part when changing from a
field type that can't be used partially to a field that can,
or vice versa, or when the part is smaller than the length
of the field.
Added ASSERT() to detect wrongly packed fields
sql/field.h:
Fixed comments to right format
sql/opt_range.cc:
Merged code
sql/sql_base.cc:
Fixed indentation
sql/sql_insert.cc:
Fixed comments to right format
sql/sql_select.cc:
Simplify code
sql/unireg.cc:
Simply code for calculating key_buff_length
Added ASSERT() to detect wrongly packed fields
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
include/my_global.h:
Auto merged
sql/field.h:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_myisam.h:
Auto merged
sql/ha_myisammrg.h:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/handler.h:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_geofunc.h:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.h:
Auto merged
BitKeeper/deleted/.del-ha_isam.h~bf53d533be3d3927:
Auto merged
BitKeeper/deleted/.del-ha_isammrg.h~66fd2e5bfe7207dc:
Auto merged
sql/examples/ha_archive.h:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/procedure.h:
Auto merged
sql/protocol.h:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_string.h:
Auto merged
sql/sql_udf.h:
Auto merged
sql/tztime.h:
Auto merged
Mostly about precision/decimals of the results of the operations
include/decimal.h:
decimal interface changed a little
sql/field.cc:
a lot of precision/decimals related changes to the Field_new_decimal
sql/field.h:
Field_new_decimal interface changed
sql/ha_ndbcluster.cc:
f->precision should be used here
sql/item.cc:
precision/decimals counting related changes
sql/item.h:
precision/decimals counting related changes
sql/item_cmpfunc.cc:
precision/decimals counting related changes
sql/item_cmpfunc.h:
precision/decimals counting related changes
sql/item_func.cc:
precision/decimals counting related changes
sql/item_func.h:
precision/decimals counting related changes
sql/item_sum.cc:
precision/decimals counting related changes
sql/item_sum.h:
precision/decimals counting related changes
sql/my_decimal.cc:
precision/decimals counting related changes
sql/my_decimal.h:
precision/decimals counting related changes
sql/mysqld.cc:
precision/decimals counting related changes
sql/set_var.cc:
precision/decimals counting related changes
sql/sp_head.cc:
dbug_decimal_print was replaced with dbug_decimal_as_string
sql/sql_class.h:
div_precincrement variable added
sql/sql_parse.cc:
precision/decimals counting related changes
sql/sql_select.cc:
precision/decimals counting related changes
sql/sql_show.cc:
Field::representation_length was removed
strings/decimal.c:
decimal_actual_fraction was introduced
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
- Introduce ifdefs so we can control when to use #pragma interface on cygwin
include/my_global.h:
Turn on use of #pragma implementation and #pragma interface if compiled with GCC and platform != Cygwin
include/raid.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/examples/ha_archive.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/examples/ha_example.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/field.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_berkeley.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_blackhole.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_heap.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_innodb.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_isam.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_isammrg.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_myisam.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_myisammrg.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_ndbcluster.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/handler.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_cmpfunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_func.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_geofunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_strfunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_subselect.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_sum.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_timefunc.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/opt_range.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/procedure.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/protocol.h:
replace __GNUC__ with USE_PRAGMA_IMPLEMENTATION
sql/set_var.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_class.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_list.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_select.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_string.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_udf.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/tztime.h:
replace __GNUC__ with USE_PRAGMA_INTERFACE
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
mysql-test/r/drop.result:
Auto merged
mysys/default.c:
Auto merged
mysys/mf_keycache.c:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysqld.cc:
Auto merged
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
Auto merged
mysql-test/r/cast.result:
Merge
mysql-test/t/cast.test:
Merge
sql/sql_insert.cc:
Merge
sql/sql_select.cc:
Merge
mysql-test/r/gis-rtree.result:
test result fixed
mysql-test/r/gis.result:
test result fixed
mysql-test/t/gis-rtree.test:
test case fixed
mysql-test/t/gis.test:
test case added
sql/field.cc:
error messages launched now when we try to put bad spatial
data in the GEOMETRY field
sql/field.h:
interface fixed
sql/item_geofunc.cc:
bad_data sign now instead of NULL now returned from
Item_geometry_from_text::val_str
sql/share/errmsg.txt:
error message added
sql/spatial.cc:
bad_geometry data instance
sql/spatial.h:
bad_geometry_data declaration
sql/sql_base.cc:
messages now created in store_* function
Produce warnings of wrong cast of strings to signed/unsigned.
Don't block not resolved IP's if DNS server is down (Bug #8467)
Fix compiler problems with MinGW (Bug #8872)
configure.in:
Fix compiler problems with MinGW (Bug #8872)
include/config-win.h:
Fix compiler problems with MinGW (Bug #8872)
include/my_global.h:
Fix compiler problems with MinGW (Bug #8872)
mysql-test/r/cast.result:
Test for cast to signed/unsigned outside of range (Bug #7036)
mysql-test/t/cast.test:
Test for cast to signed/unsigned outside of range (Bug #7036)
mysys/default.c:
Cleanup (combine identical code).
Done mainly by Jani
sql/field.h:
Added cast_to_int_type() to ensure that enums are casted as numbers
sql/hostname.cc:
Don't block not resolved IP's if DNS server is down (Bug #8467)
sql/item.h:
Added cast_to_int_type() to ensure that enums are casted as numbers
sql/item_func.cc:
CAST(string_argument AS UNSIGNED) didn't work for big integers above the
signed range. (Bug #7036)
Produce warnings of wrong cast of strings to signed/unsigned
sql/item_func.h:
CAST(string_argument AS UNSIGNED) didn't work for big integers above the
signed range. (Bug #7036)
sql/field.h:
Field_bit_as_char::size_of() added - we use it in the ::new_key_field().
sql/sql_table.cc:
We have to set pack_flag for bit fields in the mysql_prepare_table()
as we use it in the create_length_to_internal_length().
into mysql.com:/home/my/mysql-5.0
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/sql_parse.cc:
Auto merged
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
ALTER TABLE now fails in STRICT mode if it generates warnings.
Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
mysql-test/r/bigint.result:
New warning added
mysql-test/r/cast.result:
Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/r/create.result:
Added test for wrong default values (#5902)
mysql-test/r/func_if.result:
Changed tests to produce less warnings
mysql-test/r/func_misc.result:
New warning
mysql-test/r/func_str.result:
Added missing drop table
Changed test to produce less warnings
New warnings
mysql-test/r/ndb_index_unique.result:
Removed wrong default usage
mysql-test/r/ps_1general.result:
Changed tests to produce less warnings
mysql-test/r/row.result:
New warnings
mysql-test/r/rpl_session_var.result:
Changed tests to produce less warnings
mysql-test/r/strict.result:
New tests for CAST() and zero date handling
mysql-test/r/subselect.result:
Changed tests to produce less warnings
mysql-test/r/type_ranges.result:
Changed tests to produce less warnings
mysql-test/t/cast.test:
Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/t/create.test:
Added test for wrong default values (#5902)
mysql-test/t/func_if.test:
Changed tests to produce less warnings
mysql-test/t/func_str.test:
Added missing drop table
Changed test to produce less warnings
New warnings
mysql-test/t/ndb_index_unique.test:
Removed wrong default usage
mysql-test/t/ps_1general.test:
Changed tests to produce less warnings
mysql-test/t/rpl_session_var.test:
Changed tests to produce less warnings
mysql-test/t/strict.test:
New tests for CAST() and zero date handling
mysql-test/t/subselect.test:
Changed tests to produce less warnings
mysql-test/t/type_ranges.test:
Changed tests to produce less warnings
sql/Makefile.am:
Added new include file
sql/field.cc:
Added warnings for zero dates for DATE, DATETIME and TIMESTAMP
Moved Field_blob::max_length() to a more appropriate position
Changed type for 'level' in set_warning() to avoid casts
sql/field.h:
Changed type for 'level' in set_warning() to avoid casts
sql/field_conv.cc:
Copy date and datetime fields through string in 'traditional' mode to detect zero dates
sql/item.cc:
Removed compiler warnings
Give warnings for wrong CAST of strings -> number
sql/item.h:
Moved Item_string::val_real() and ::val_int() to item.cc
sql/item_row.cc:
Better detection of null values (which doesn't produce warnings)
sql/item_sum.cc:
Better detection of null values (which doesn't produce warnings)
sql/item_timefunc.cc:
Give warnings for wrong CAST of number -> string
sql/my_decimal.cc:
Fixed typo in comment
sql/mysql_priv.h:
Removed prototype for static function
Moved defines for error handling to sql_error.h (to be able to use these in field.h)
sql/mysqld.cc:
Simplify code
sql/sql_class.h:
Moved to sql_error.h
sql/sql_load.cc:
Removed wrong cast
sql/sql_parse.cc:
Fixed wrong printf()
sql/sql_table.cc:
Made mysql_prepare_table() static
Changed references to pointers to make code more readable
ALTER TABLE now aborts if one gets warnings in STRICT mode
sql/time.cc:
Fixed possible wrong call
sql/unireg.cc:
Removed one call to current_thd
Give errors if one uses a wrong DEFAULT value
mysql-test/r/group_by.result:
result change
mysql-test/r/union.result:
result change
mysql-test/r/view.result:
result change
mysql-test/t/subselect.test:
fixed mistake of merge
sql/field.cc:
new 5.0 types support
temporary table/db names detection in field fixed
sql/field.h:
removed non-existent methods
added wrongly deleted during manual merge string
sql/item.cc:
support of new types added to merge of union types routines
sql/item.h:
fixed method definition
sql/item_cmpfunc.cc:
fixed type
sql/item_func.h:
item type name fixed
sql/item_subselect.cc:
added forgoten methods
sql/item_subselect.h:
fixed type
sql/sql_derived.cc:
fixed typo of manual merge
sql/sql_view.cc:
added new parameter
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/metadata.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/t/union.test:
Auto merged
sql/item.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
support-files/mysql.server.sh:
Auto merged
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
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
libmysql/libmysql.c:
Make implicit cast explicit
myisam/mi_open.c:
Make cast of value to smaller data size explicit
myisam/mi_packrec.c:
Cast file size (my_off_t) to size_t for mmap
mysys/my_mmap.c:
Fix Windows version of my_mmap() to use the right parameters
for call to CreateFileMapping()
sql/field.cc:
Use temporary value of correct type
sql/field.h:
Use query_id_t for query_id value
sql/ha_berkeley.cc:
Fix flag check
sql/ha_innodb.h:
Use query_id_t for query_id value
sql/handler.cc:
Explain opt_using_transactions calculation, and add cast
sql/handler.h:
Fix forward declaration of COND
sql/item.cc:
Fix val_bool() tests of val_int() to avoid implicit cast
sql/item_cmpfunc.cc:
Fix typo in switch label
sql/item_func.cc:
Make implicit cast explicit
sql/item_strfunc.cc:
Now that query_id is a query_id_t, need to cast it to a ulong here
sql/item_subselect.cc:
Fix test of value
sql/log.cc:
Cast my_off_t used for file size to size_t for memory allocation
Also cast my_off_t when using it to calculate the number of pages for TC log
Cast total_ha_2pc to uchar when saving it
sql/mysql_priv.h:
Move up query_id definition so it can be used more widely
sql/opt_range.cc:
Add unused delete operator to prevent compiler warning
sql/set_var.cc:
Cast value for max_user_connections
sql/sql_cache.cc:
Remove unused label
sql/sql_class.h:
Fix query id values to be of type query_id_t
sql/sql_db.cc:
Move variable only used inside #ifdef within the #ifdef
sql/sql_help.cc:
Remove unused label
sql/sql_insert.cc:
Use query_id_t for query id values
sql/sql_lex.h:
Add unused delete operator to prevent compiler warning
sql/sql_select.cc:
Remove unused variable
Make cast of value explicit
sql/sql_select.h:
Use query_id_t for query id values
sql/sql_table.cc:
Make comparison to function pointer explicit
sql/sql_update.cc:
Use query_id_t for query id values
sql/table.h:
Use query_id_t for query id values
strings/ctype-simple.c:
Add cast of long value to (char) in expression
strings/ctype-ucs2.c:
Add cast of long value to (char) in expression
strings/ctype-utf8.c:
Make cast to smaller size explicit
implementation of AVG(DISTINCT) which utilizes the approach with Fields.
The patch implemented in October is portede to the up-to-date tree
containing DECIMAL type.
Tests for AVG(DISTINCT) (although there is not much to test provided
that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT()
will follow in another changeset.
sql/field.cc:
A handy way to init create_field used for use with virtual tmp tables.
Feel free to extend it for your own needs.
sql/field.h:
Declaration for create_field::init_for_tmp_table()
sql/item.cc:
Implementation for a framework used to easily handle different result
types of SQL expressions. Instead of having instances of each possible
result type (integer, decimal, double) in every item, variables
of all used types are moved to struct Hybrid_type.
Hybrid_type can change its dynamic type in runtime, and become,
for instance, DECIMAL from INTEGER.
All type-specific Item operations are moved to the class hierarchy
Hybrid_type_traits. Item::decimals and Item::max_length can
be moved to Hybrid_type as well.
sql/item.h:
Declaration for Hybrid_type framework. See also comments for item.cc
in this changeset.
sql/item_sum.cc:
Rewritten implementation for Item_sum_sum_distinct (SUM(DISTINCT))
and added implementation for Item_sum_avg_distinct (AVG(DISTINCT)).
The classes utilize Hybrid_type class hierarchy and Fields to
convert SUM/AVG arguments to binary representation and store in a RB-tree.
sql/item_sum.h:
Declarations for Item_sum_distinct (the new intermediate class used
for SUM and AVG distinct), Item_sum_sum_distinct, Item_sum_avg_distinct.
sql/sql_select.cc:
Implementatio of create_virtual_tmp_table().
sql/sql_select.h:
Declaration for create_virtual_tmp_table.
sql/sql_yacc.yy:
Grammar support for Item_sum_avg_distinct.
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/fil/fil0fil.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
mysql-test/r/select_found.result:
Auto merged
mysql-test/r/type_set.result:
Auto merged
mysys/default.c:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
strings/ctype-simple.c:
Auto merged
include/mysql_com.h:
Merge
sql/filesort.cc:
merge
(No really critical errors found, but a few possible wrong results)
innobase/dict/dict0dict.c:
Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
mysql-test/r/select_found.result:
Add missing drop table
mysql-test/r/type_set.result:
More tests
mysql-test/t/select_found.test:
Add missing drop table
mysql-test/t/type_set.test:
More tests
mysys/my_init.c:
Avoid warning from purify (purify doesn't handle getrusage() properly)
sql/field.h:
enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/filesort.cc:
enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/item_cmpfunc.cc:
Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
sql/mysqld.cc:
Wait for signal handler to stop when running --bootstrap
(Fixes warning from purify)
sql/sql_insert.cc:
Initialize slot used by innodb.cc (not critical)
sql/sql_lex.h:
Better comments
sql/sql_repl.cc:
memcmp -> bcmp() to avoid warning from purify
sql/sql_select.cc:
Fix for out-of-bound memory reference when doing DISTINCT on const expressions
strings/ctype-simple.c:
Fixes to not access uninitialized memory
(Not critical)
Simple optimzations done while reviewing code
client/mysqltest.c:
Added options --enable-ps-warnings and --disable-ps-warnings
(to fix failing test case)
mysql-test/t/row.test:
Disable warnings that comes from 'parse' parth
sql/field.cc:
Removed calls to is_null() in field functions.
(Not needed as NULL handling is done on the level above fields)
Indentation fixes
Removed calls to alloca() as buffer needed was quite small.
sql/field.h:
Indentation changes and comment fixes
sql/filesort.cc:
Simple optimization during code review
sql/item.cc:
Indentation fixes
Removed some unnecessary tests (added DBUG_ASSERTS() instead)
sql/item_buff.cc:
Indentation fixes
sql/my_decimal.cc:
Indentation fixes
Simple optimization
Fixed compiler warning
sql/sql_update.cc:
Removed unnessessary assignment
After merge fixes
Don't give duplicate warnings for some ::store() functions
mysql-test/mysql-test-run.sh:
Added back missing line
mysql-test/r/ps_2myisam.result:
Update results after removing duplicate warnings from ::store()
mysql-test/r/ps_3innodb.result:
Update results after removing duplicate warnings from ::store()
mysql-test/r/ps_4heap.result:
Update results after removing duplicate warnings from ::store()
mysql-test/r/ps_5merge.result:
Update results after removing duplicate warnings from ::store()
sql/field.cc:
Don't give duplicate warnings for some ::store() functions
Before we could get different number of warnings in the test suite for different platforms
sql/field.h:
Update results after removing duplicate warnings from ::store()
sql/sql_class.h:
Update results after removing duplicate warnings from ::store()
sql/sql_error.cc:
Update results after removing duplicate warnings from ::store()
sql/sql_list.h:
After merge fix
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.
macros.
It does not fixes any bugs in 4.0. But it prevents from future error in
any bugfixes that may use these macros. Also after merging into 4.1 tree
this cleanup will fix bug #7884 "Able to add invalid unique index on
TIMESTAMP prefix".
sql/field.h:
Since FIELDFLAG_INTERVAL, FIELDFLAG_BITFIELD, FIELDFLAG_BLOB and
FIELDFLAG_GEOM flags occupy the same space as number of decimals for
FIELDFLAG_NUMBER fields, it is safer to check in "f_is_geom()"-type
macros that we have non-number field, like we already do in f_is_blob()
macro.
- add_field_to_list() now uses <List>String
instead of TYPELIB to be able to distinguish
literals 'aaa' and hex literals 0xaabbcc.
- move some code from add_field_to_list() where
we don't know column charset yet, to
mysql_prepare_table(), where we do.
into mysql.com:/home/dlenev/src/mysql-4.1-ryan
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
column types TIMESTAMP is NOT NULL by default, so in order to have
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).
Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
mysql-test/r/type_timestamp.result:
Added test for TIMESTAMP columns which are able to store NULL values.
mysql-test/t/type_timestamp.test:
Added test for TIMESTAMP columns which are able to store NULL values.
sql/field.cc:
Added support for TIMESTAMP fields holding NULL values.
We don't need Field_timestamp::set_timestamp_offsets() anymore.
Instead we need Field_timestamp::get_auto_set_type() function
which will convert TIMESTAMP auto-set type stored in Field in
unireg_check to value from timestamp_auto_set_type_enum.
(We can't replace this function with additional Field_timestamp member
and some code in constructor because then we will have troubles
with Field::new_field() method).
We should also set field to not null in Field_timestamp::set_time() now.
sql/field.h:
Added support for TIMESTAMP fields holding NULL values.
We don't need Field_timestamp::set_timestamp_offsets() anymore.
Instead we need Field_timestamp::get_auto_set_type() function,
which will convert TIMESTAMP auto-set type stored in Field in
unireg_check to value from timestamp_auto_set_type_enum.
We also have to support NULL values in Field_timestamp::get_timestamp()
function.
sql/field_conv.cc:
Added comment clarifying behavior in case of TIMESTAMP fields which are
able to store NULL values.
sql/ha_berkeley.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_heap.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_innodb.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_isam.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_isammrg.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_myisam.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_myisammrg.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/ha_ndbcluster.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().
sql/handler.cc:
handler::update_timestamp() is no longer needed since now we use
Field_timestamp::set_time() instead.
(we can't use handler::update_timestamp() anyway since field position
only is not enough for TIMESTAMP fields which are able to store NULLs)
sql/handler.h:
handler::update_timestamp() is no longer needed since now we use
Field_timestamp::set_time() instead.
sql/item_timefunc.cc:
Since now TIMESTAMP fields can hold NULL values we should take this into
account.
sql/sql_base.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
(Here we use Field_timestamp::get_auto_set_type() to setup its value
before further statement execution).
sql/sql_insert.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_load.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_parse.cc:
Added support for TIMESTAMP fields holding NULL values.
We should distinguish NULL default values and non-specified default
values for such fields (because latter could mean DEFAULT NOW()
ON UPDATE NOW() in some cases).
sql/sql_show.cc:
Added support for TIMESTAMP fields holding NULL values.
Unlike all other fields these are NOT NULL by default
so we have to specify NULL attribute explicitly for them.
sql/sql_table.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_update.cc:
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now.
sql/sql_yacc.yy:
Added support for TIMESTAMP fields holding NULL values.
Unlike all other fields these are NOT NULL by default
(so we have to set NOT_NULL_FLAG properly for them).
sql/table.h:
Added timestamp_auto_set_type enum which values are used for indicating
during which operations we should automatically set TIMESTAPM field
value to current timestamp.
TABLE: Replaced timestamp_default_now/on_update_now members with
timestamp_auto_set_type flag (Now when TIMESTAMP field are able to
store NULL values, single position of field in record is not enough
for updating this field anyway).
using GROUP BY"
Now we are setting Field_timestamp::field_length to 19 in open_table()
if we are in new mode (and we are restoring it back when we are coming
back to normal mode). This also should solve potential problems with
some of LOAD DATA INFILE and SELECT * INTO in this mode.
mysql-test/r/type_timestamp.result:
Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
when using GROUP BY' and other --new mode related behavior.
mysql-test/t/type_timestamp.test:
Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
when using GROUP BY' and other --new mode related behavior.
sql/field.cc:
Added Field_timestamp::orig_field_length member for saving original
field_length value, because this member can be modified if new_mode is
in effect.
Lot of Field_timestamp code simplified and Field_timestamp::make_field()
is no longer needed because we are setting field_length to 19 if we are
in --new mode now.
sql/field.h:
Added Field_timestamp::orig_field_length member for saving original
field_length value, because this member can be modified if new_mode
is in effect.
Field_timestamp::make_field() is no longer needed because we are setting
field_length to 19 if we are in --new mode now.
sql/sql_base.cc:
If --new mode is in effect all TIMESTAMP fields should pretend that they
have length of 19. We are achieving this by setting
Field_timestamp::field_length to 19 (or original value) in open_table().
We are using TABLE::timestamp_mode variable for avoiding of unnecessary
looping over all fields of the table and setting field_length if table
was used with same new_mode value before.
Note: We do not introduce general framework for setting up Field objects
for usage with current THD here because this fix is only needed in 4.0
and Monty said that we will also remove looping over all fields when
updating table_name member at some point. This more general framework
will also complicate nice optimization with avoiding of unneeded looping.
sql/sql_parse.cc:
Now when we are creating TIMESTAMP(19) fields by default in --new mode,
otherwise we will have unaligned behavior between ALTER and CREATE.
sql/table.h:
Added TABLE::timestamp_mode field for saving information whenever we set
field_length members of table's TIMESTAMP fields to 19 (to honor
new_mode) or they have original values.
Use 'mysqltest' as test database instead of test_$1 or test1,test2 to not accidently delete an important database
Safety fix for mailformed MERGE files
Build-tools/mysql-copyright:
Print correct file name in case of errors
Fixed indentation
include/config-win.h:
Removed unnecessary #ifdef
myisammrg/myrg_open.c:
Don't give a core if merge file contains INSERT_METHOD first (not legal but better safe than sorry)
Don't set struct variables to zero that are already zero
Indentation fixes
mysql-test/r/create.result:
Use 'mysqltest' as test database
mysql-test/r/ndb_basic.result:
Use 'mysqltest' as test database
mysql-test/r/ndb_blob.result:
Use 'mysqltest' as test database
mysql-test/r/ndb_transaction.result:
Use 'mysqltest' as test database
mysql-test/r/ps_1general.result:
Use 'mysqltest' as test database
mysql-test/r/rpl_charset.result:
Use 'mysqltest' as test database
mysql-test/r/rpl_delete_all.result:
Use 'mysqltest' as test database
mysql-test/r/show_check.result:
Use 'mysqltest' as test database
mysql-test/t/create.test:
Use 'mysqltest' as test database
mysql-test/t/ndb_basic.test:
Use 'mysqltest' as test database
mysql-test/t/ndb_blob.test:
Use 'mysqltest' as test database
mysql-test/t/ndb_transaction.test:
Use 'mysqltest' as test database
mysql-test/t/ps_1general.test:
Use 'mysqltest' as test database
mysql-test/t/rpl_charset.test:
Use 'mysqltest' as test database
mysql-test/t/rpl_delete_all.test:
Use 'mysqltest' as test database
mysql-test/t/show_check.test:
Use 'mysqltest' as test database
sql/field.h:
Mark functions that should be deleted as soon as we have a new prototype for store(longlong)
sql/lock.cc:
Indentation fix
sql/sql_base.cc:
Better comment.
Break find_item_in_list in case of perfect match
sql/sql_prepare.cc:
Simple optimization
sql/sql_select.cc:
Portability fix
Fixed bug in end space handle for WHERE text_column="constant"
heap/hp_hash.c:
Optimzations (no change of logic)
libmysql/libmysql.c:
Added missing casts (portability fix)
myisam/mi_key.c:
Changed macro to take arguments and not depend on local variables
Simple indentation fixes ?
mysql-test/r/connect.result:
Added test for setting empty password
mysql-test/r/create_select_tmp.result:
TYPE -> ENGINE
mysql-test/r/ctype_utf8.result:
Combine drop's
mysql-test/r/endspace.result:
Added more tests to test end space behaviour
mysql-test/r/having.result:
Added missing DROP TABLE
mysql-test/r/type_blob.result:
Added more tests to ensure that fix for BLOB usage is correct
mysql-test/r/type_timestamp.result:
Add test from 4.0
mysql-test/t/connect.test:
Added test for setting empty password
mysql-test/t/create_select_tmp.test:
TYPE -> ENGINE
mysql-test/t/ctype_utf8.test:
Combine drop's
mysql-test/t/endspace.test:
Added more tests to test end space behaviour
mysql-test/t/having.test:
Added missing DROP TABLE
mysql-test/t/type_blob.test:
Added more tests to ensure that fix for BLOB usage is correct
mysql-test/t/type_timestamp.test:
Add test from 4.0
sql/field.cc:
Removed not used variable
Portability fix (cast)
Simplified Field_str::double()
Simple indentation cleanups
sql/field.h:
Removed not needed class variable
sql/item_cmpfunc.cc:
Indentation fix
sql/item_strfunc.cc:
Use on stack variable for Item_str_func::val() instead of str_value.
This makes it safe to use str_value inside the Item's val function.
Cleaned up LEFT() usage, thanks to the above change
sql/item_sum.cc:
Indentation cleanups
sql/protocol.cc:
Added missing cast
sql/sql_acl.cc:
Indentatin cleanups.
Added missing cast
Simple optimization of get_sort()
sql/sql_select.cc:
Don't use 'ref' to search on text field that is not of type BINARY (use 'range' instead).
The reson is that for 'ref' we use 'index_next_same' to read the next possible row.
For text fields, rows in a ref may not come in order, like for 'x', 'x\t' 'x ' (stored in this order) which causes a search for 'column='x ' to fail
sql/tztime.cc:
Simple cleanup
strings/ctype-bin.c:
Comment fixes
strings/ctype-mb.c:
Changed variable names for arguments
Fix for binary collations for MyISAM and HEAP BTREE.
This patch also changes trailing spaces behaviour for
binary collations. Binary collations now have PAD
characteristic too.
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4:
Auto merged
Build-tools/Bootstrap:
Auto merged
Build-tools/mysql-copyright:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
VC++Files/innobase/innobase.dsp:
Auto merged
client/mysql.cc:
Auto merged
include/my_global.h:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/include/mtr0log.h:
Auto merged
innobase/include/mtr0log.ic:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/include/ut0dbg.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
libmysql/Makefile.am:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/conf_to_src.c:
Auto merged
libmysql/dll.c:
Auto merged
libmysql/errmsg.c:
Auto merged
libmysql/manager.c:
Auto merged
libmysql_r/Makefile.am:
Auto merged
myisam/mi_key.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/having.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/type_float.result:
Auto merged
mysql-test/t/having.test:
Auto merged
mysql-test/t/heap.test:
Auto merged
mysql-test/t/type_date.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/type_uint.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.h:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.h:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_analyse.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/danish/errmsg.txt:
Auto merged
sql/share/dutch/errmsg.txt:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/estonian/errmsg.txt:
Auto merged
sql/share/french/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/japanese/errmsg.txt:
Auto merged
sql/share/korean/errmsg.txt:
Auto merged
sql/share/norwegian-ny/errmsg.txt:
Auto merged
sql/share/norwegian/errmsg.txt:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/portuguese/errmsg.txt:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/share/slovak/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/share/swedish/errmsg.txt:
Auto merged
sql/share/ukrainian/errmsg.txt:
Auto merged
Added key part to optimize_range() to fix problems when using fields in key parts.
sql/examples/ha_archive.h:
New handler::index_flags() definition
sql/examples/ha_example.h:
New handler::index_flags() definition
sql/field.cc:
New optimize_range() definition
sql/field.h:
New optimize_range() definition
sql/ha_berkeley.cc:
New handler::index_flags() definition
sql/ha_berkeley.h:
New handler::index_flags() definition
sql/ha_heap.h:
New handler::index_flags() definition
sql/ha_innodb.h:
New handler::index_flags() definition
sql/ha_isam.h:
New handler::index_flags() definition
sql/ha_isammrg.h:
New handler::index_flags() definition
sql/ha_myisam.h:
New handler::index_flags() definition
sql/ha_myisammrg.h:
New handler::index_flags() definition
sql/ha_ndbcluster.cc:
New handler::index_flags() definition
sql/ha_ndbcluster.h:
New handler::index_flags() definition
sql/handler.h:
New handler::index_flags() definition
sql/log.cc:
Fixed compiler warnings
sql/log_event.cc:
Fixed compiler warnings (and renamed short variable name)
sql/opt_range.cc:
New handler::index_flags() definition
sql/opt_sum.cc:
New handler::index_flags() definition
sql/set_var.cc:
Removed compiler warnings
sql/sql_db.cc:
Removed compiler warnings
sql/sql_select.cc:
New handler::index_flags() definition
sql/sql_show.cc:
Removed compiler warnings
sql/sql_update.cc:
Removed compiler warnings
sql/table.cc:
New handler::index_flags() definition
BitKeeper/etc/ignore:
added sql/mysql_tzinfo_to_sql
BitKeeper/etc/logging_ok:
auto-union
acinclude.m4:
Auto merged
extra/perror.c:
Auto merged
include/mysql.h:
Auto merged
innobase/include/mach0data.ic:
Auto merged
innobase/include/mtr0log.h:
Auto merged
innobase/include/mtr0log.ic:
Auto merged
innobase/mem/mem0dbg.c:
Auto merged
innobase/pars/lexyy.c:
Auto merged
BitKeeper/deleted/.del-4.0.XX-gpl.ipr~f5909a9e9bd8094:
Auto merged
BitKeeper/deleted/.del-Clients and Tools.fgl~bf0f776883577f02:
Auto merged
BitKeeper/deleted/.del-Development.fgl~6392ce285e73f5fc:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/innodb_cache.result:
Auto merged
mysql-test/r/lowercase_table2.result:
Auto merged
mysql-test/t/innodb_cache.test:
Auto merged
mysql-test/t/lowercase_table2.test:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/handler.cc:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
libmysql/libmysql.c:
Merge with 4.0
mysql-test/r/bdb.result:
Merge with 4.0
mysql-test/r/range.result:
Merge with 4.0
mysql-test/t/bdb.test:
Merge with 4.0
mysys/hash.c:
Merge with 4.0
scripts/mysql_install_db.sh:
Merge with 4.0
sql/field.cc:
Merge with 4.0
sql/field.h:
Merge with 4.0
sql/mysql_priv.h:
Merge with 4.0
sql/sql_handler.cc:
Merge with 4.0
sql/sql_select.cc:
Merge with 4.0
sql/sql_table.cc:
Merge with 4.0
Added put_length() to get_length() and unpack_key() to pack_key().
Keys were packed with the minimum size of the length field for the key part and
unpacked with length size of the base column.
For the purpose of optimal key packing we have the method pack_key(), while rows are
packed with pack(). Now keys are unpacked with unpack_key() and no longer with
unpack() which is used for rows.
mysql-test/r/bdb.result:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added the test case results.
mysql-test/t/bdb.test:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added the test case.
sql/field.cc:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added put_length() to get_length() and unpack_key() to pack_key().
Keys were packed with the minimum size of the length field for the key part and
unpacked with length size of the base column.
For the purpose of optimal key packing we have the method pack_key(), while rows are packed
with pack(). Now keys are unpacked with unpack_key() and no longer with unpack() which is
used for rows.
sql/field.h:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added put_length() to get_length() and unpack_key() to pack_key().
The default implementation simply calls unpack() for those field types that don't need
a special key unpacking.
sql/ha_berkeley.cc:
bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Now keys are unpacked with unpack_key() and no longer with unpack() which is used for rows.
For most field types, however, this simply calls unpack().
Updated tests
After merge fix
mysql-test/r/func_time.result:
Updated tests
sql/field.cc:
After merge fix
Removed compiler warning
sql/field.h:
Field_geom should have same max_length as Field_blob