sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Manual merge
sql/sql_update.cc:
Manual merge
#5860 "Multi-table UPDATE does not activate update triggers"
#6812 "Triggers are not activated for INSERT ... SELECT"
#8755 "Trigger is not activated by LOAD DATA".
This patch also implements proper handling of triggers for special forms
of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE.
Also now we don't call after trigger in case when we have failed to
inserted/update or delete row. Trigger failure should stop statement
execution.
I have not properly tested handling of errors which happen inside of
triggers in this patch, since it is simplier to do this once we will be
able to access tables from triggers.
mysql-test/r/trigger.result:
Added tests for triggers behavior for various non-standard forms of
INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
Also added tests for bugs #5860 "Multi-table UPDATE does not activate
update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
and #8755 "Trigger is not activated by LOAD DATA".
mysql-test/t/trigger.test:
Added tests for triggers behavior for various non-standard forms of
INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
Also added tests for bugs #5860 "Multi-table UPDATE does not activate
update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
and #8755 "Trigger is not activated by LOAD DATA".
sql/item.cc:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Item_trigger_field::setup_field()/fix_fields() were changed to implement
this approach.
sql/item.h:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Item_trigger_field:
- Added field_idx member to store index of Field object corresponding to
this Item in TABLE::field array.
- Added triggers member to be able to access to parent Table_trigger_list
object from fix_fields() method.
- setup_field() no longer needs to know for which type of event this
trigger is, since it does not make decision Field for which buffer
(record[0] or record[1] is appropriate for this Item_trigger_field)
sql/mysql_priv.h:
Added fill_record_n_invoke_before_triggers() methods. They are simple
wrappers around fill_record() which invoke proper before trigger right
after filling record with values.
sql/sql_base.cc:
Added fill_record_n_invoke_before_triggers() methods. They are simple
wrappers around fill_record() which invoke proper before trigger right
after filling record with values.
sql/sql_delete.cc:
mysql_delete():
Now we stop statement execution if one of triggers failed, we also
don't execute after delete trigger if we failed to delete row from
the table (We also pass information about which buffer contains old
version of row to process_triggers()).
multi_delete::send_data()/do_deletes():
Now we also invoke triggers in case of multi-delete.
sql/sql_insert.cc:
mysql_insert():
Moved invocation of before triggers to fill_record_n_invoke_before_triggers()
method. After triggers are now executed as part of write_record().
(as nice side effect now we also stop statement execution if one of
triggers fail).
write_record():
Invoke after insert trigger after performing insert. Also invoke proper
triggers if insert is converted to update or conflicting row is deleted.
Cleaned up error handling a bit - no sense to report error via
handler::print_error if it was not generated by handler method and
was reported before.
Also now we will execute after trigger only if we really have written
row to the table.
select_insert::send_data()/store_values():
We should also execute INSERT triggers for INSERT ... SELECT statement.
sql/sql_load.cc:
read_fixed_length()/read_sep_field():
We should execute INSERT triggers when processing LOAD DATA statement.
Small cleanup in auto-increment related code. Also moved check for
thd->killed which is used to abort LOAD DATA in case of problems
in 'traditional' mode to better place..
sql/sql_trigger.cc:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Table_triggers_list methods were changed to implement this approach
(see also comments for sql_trigger.h).
sql/sql_trigger.h:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Changed Table_triggers_list to implement this new approach:
- Added record1_field member to store array of Field objects bound
to TABLE::record[1] buffer (instead of existing old_field member)
- Added new_field member and changed meaning of old_field member.
During trigger execution they should point to arrays of Field objects
bound to buffers holding new and old versions of row respectively.
- Added 'table' member to be able to get access to TABLE instance
(for which this trigger list object was created) from process_triggers()
method.
- Now process_triggers() method sets old_field and new_field members
properly before executing triggers body (basing on new
old_row_is_record1 parameter value).
- Renamed prepare_old_row_accessors_method() to prepare_record1_accessors()
Also added has_before_update_triggers() method which allows to check
whenever any before update triggers exist for table.
sql/sql_update.cc:
mysql_update():
Now we invoke before triggers in fill_record_n_invoke_before_triggers()
method. Also now we abort statement execution when one of triggers fail.
safe_update_on_fly():
When we are trying to understand if we can update first table in multi
update on the fly we should take into account that BEFORE UPDATE
trigger can change field values.
multi_update::send_data()/do_updates()
We should execute proper triggers when doing multi-update
(in both cases when we do it on the fly and using temporary tables).
Memory leak in locally evalutated expressions during SP execution fixed by
reusing allocated item slots when possible.
Note: No test case added, since the test is a stress test that tries to make
the machine to run out of memory.
Second attempt, now tested with debug build, valgrind build, max (optimized)
build, with and without --debug, --vagrind and --ps-protocol.
Errors in trigger and view test with --debug in debug build where present
before this patch, and likewise for valgrind warnings for view test in
valgrind build with --ps-protocol.
sql/item.cc:
Init rsize in Item (for SP item reusal).
sql/item.h:
Addes special new operator for reuse of Items, for SP internal use only.
sql/sp_head.cc:
Reuse items assigned internally in SPs when possible.
sql/sp_rcontext.cc:
Reuse items assigned internally in SPs when possible.
Moved the local variable assignment here (from sp_head) to avoid
duplicated code.
sql/sp_rcontext.h:
New arg to sp_rcontext::set_item_eval() (and some coding style).
sql/sql_class.cc:
Adjusted call to new set_item_eval().
Memory leak in locally evalutated expressions during SP execution fixed by
reusing allocated item slots when possible.
Note: No test case added, since the test is a stress test that tries to make
the machine to run out of memory.
sql/item.cc:
Make it possible to reuse allocated item slots (for use in SP execution).
sql/item.h:
Make it possible to reuse allocated item slots (for use in SP execution).
sql/sp_head.cc:
Reuse allocated item slots for expression evalutation during SP execution.
sql/sp_rcontext.cc:
Updated sp_eval_func_item() call, and prevent item reuse in reused frames (for handlers).
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
some optimisation of IF/NOT IF ptomised to Pem
mysql-test/r/sp.result:
test for bug#5963
mysql-test/t/sp.test:
test for bug#5963
sql/item.cc:
new method which return reference on Item for SP variables support
sql/item.h:
comment fixed
method added
sql/sp_head.cc:
preparation of item made separate function
we do not need new constant Item to check IF/IF NOT
support of passing correct address of item for fix_fields method
sql/sp_rcontext.cc:
support of Item address passing to fix_fields
sql/sp_rcontext.h:
support of correct address passing to fix_fields
sql/sql_class.cc:
support of correct item address passing to fix_field
BitKeeper/etc/logging_ok:
auto-union
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/item.h:
SCCS 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
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ndb_restore.test:
Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
should return a non empty one"
(see comments for the changed files for details).
mysql-test/r/ps.result:
A test case for Bug#9777: tests results fixed.
mysql-test/t/ps.test:
A test case for Bug#9777
sql/item.cc:
A fix for Bug#9777: when creating a constant item from within
Item_int_with_ref::new_item, create the item by value, not by name.
This should work with prepared statements placeholders.
Item_int_with_ref is a special optimization case used
when we compare datetime constants with datetime value.
Converting the item to integer early is OK as it is in line
with the purpose of Item_int_with_ref - to speed up comparison by
using integers.
Minor cleanups.
sql/item.h:
Declaration for Item_int_with_ref::new_item
- 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
records if prepared statements is used" (see comments to
the changed files).
mysql-test/r/ps.result:
Post-merge fix for Bug#9096: test results fixed.
mysql-test/r/type_datetime.result:
Post-merge fix for Bug#9096: now we do better constants comparison,
so the optimizer is able to guess from the index that we don't
need to evaluate WHERE clause.
sql/item.cc:
Post-merge fixes for Bug#9096: implement by-value comparison for
new 5.0 DECIMAL type.
Item_real is renamed to Item_float in 5.0
Item_varbinary is renamed to Item_hex_string in 5.0
sql/item.h:
Post-merge fixes for Bug#9096: declaration for Item_decimal::eq
records if prepared statements is used".
This fix changes equality evaluation method of basic constants from
by-name to by-value, thus effectively enabling use of parameter markers
in some optimizations (constants propagation, evaluation of possible
keys for query).
mysql-test/r/ps.result:
Test results for the test case for Bug#9096
mysql-test/t/ps.test:
A short test case for Bug#9096 "select doesn't return all matched records if
prepared statements is used". The is enough to reproduce the
glitch in update_ref_and_keys causing the bug to occur.
sql/item.cc:
Implement by-value equality evaluation of basic constants.
This is needed to work with Item_param values. Until now
Item_param was compared with other items by its name, which is always "?".
The bug at hand showed up when an integer
constant was created from one parameter marker (with value 200887 and
name "?") and then compared by-name with another parameter marker
(with value 860 and name "?"). True returned by this comparison resulted
in a wrong table access method used to evaluate the query.
Implement Item_param methods needed to emulate "basic constant" mode at
full.
sql/item.h:
Change declaration of basic_const_item(): now it also widens its
argument from const Item * to Item * if the argument is a basic constant.
Declare eq() for all basic constatns, as long as now they
are compared by value, not by name. Each constant needs its own
comparison method.
Declarations of Item_param methods needed to fully emulate
a basic constant when parameter value is set.
sql/item_func.cc:
Fix wrong casts.
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
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)
(BUG#10041)
sql/item.cc:
depended_from shoudl be cleaned
layout fixed
function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/item.h:
function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/item_subselect.h:
function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/sql_base.cc:
if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
Added a test case for bug #9338.
sql_select.cc:
Fixed bug #9338.
When an occurence of a field reference has to be replaced
by another field reference the whole Item_field must be
replaced.
item.cc:
Fixed bug #9338.
The method Item_field::replace_equal_field_processor was
replaced by Item_field::replace_equal_field. The new method
is used to replace the occurences of Item_field objects.
item.h:
Fixed bug #9338.
The virtual function replace_equal_field_processor was replaced
by replace_equal_field. The latter is supposed to be used as a
callback function in calls of the method transform.
sql/item.h:
Fixed bug #9338.
The virtual function replace_equal_field_processor was replaced
by replace_equal_field. The latter is supposed to be used as a
callback function in calls of the method transform.
sql/item.cc:
The method Item_field::replace_equal_field_processor was
replaced by Item_field::replace_equal_field The new method
is used to replace the occurences of Item_field objects.
sql/sql_select.cc:
Fixed bug #9338.
When an occurence of a field reference has to be replaced
by another field reference the whole Item_field must be
replaced.
mysql-test/t/subselect.test:
Added a test case for bug #9338.
mysql-test/r/subselect.result:
Added a test case for bug #9338.
overwrites IN variable
and added error checking of variables for [IN]OUT parameters while
rewriting the out parameter handling.
mysql-test/r/sp-error.result:
New test case for non-variable argument for [IN]OUT parameters.
(And changed to qualified names in some other error messages.)
mysql-test/r/sp.result:
New test case for BUG#9598.
mysql-test/t/sp-error.test:
New test case for non-variable argument for [IN]OUT parameters.
mysql-test/t/sp.test:
New test case for BUG#9598.
sql/item.h:
Need to distinguish between SP local variable items and other items,
for error checking and [IN]OUT parameter handling.
sql/share/errmsg.txt:
New error message for non-variable arguments for [IN]OUT parameters in stored procedures.
sql/sp_head.cc:
Rewrote the [IN]OUT parameter handling in procedure invokation, to make
it work properly when using user variables in sub-calls.
Also added error checking for non-variable arguments for such parameters
(and changed to qualified names for wrong number of arg. errors).
sql/sp_rcontext.cc:
No need to keep track on the out index for an [IN]OUT parameter any more.
sql/sp_rcontext.h:
No need to keep track on the out index for an [IN]OUT parameter any more.
mysql-test/r/create.result:
Auto merged
mysql-test/r/ctype_latin1_de.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/grant2.result:
Auto merged
mysql-test/r/limit.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/rpl000001.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/ctype_latin1_de.test:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/type_blob.test:
Auto merged
mysql-test/t/type_ranges.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/sql_insert.cc:
Auto merged
mysql-test/t/strict.test:
SCCS merged
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
into sanja.is.com.ua:/home/bell/mysql/bk/work-union_merge-5.0
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_parse.cc:
Auto merged
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/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
sql/item.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item.cc:
SCCS merged
- Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare.
mysql-test/include/ps_query.inc:
Adde new test case
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/ps_7ndb.result:
Update test result
sql/item.cc:
Add function Item_param::fix_fields, which will mark any subselects they are part of as not being a constant expression unless the param value is specified, ie. it will be not be constant during prepare phase.
sql/item.h:
Adde Item_param::fix_fields
sql/item_subselect.h:
Make Item_param::fix_field friend of Item_subselect
mysql-test/r/metadata.result:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
mysql-test/r/union.result:
SCCS merged
mysql-test/t/union.test:
SCCS 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
heap/hp_create.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/key.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_string.h:
Auto merged
client/mysqldump.c:
Manual merge
mysql-test/r/func_gconcat.result:
Manual merge
mysql-test/r/func_str.result:
Manual merge
mysql-test/t/func_gconcat.test:
Manual merge
sql/ha_heap.cc:
Manual merge
sql/sql_select.cc:
Manual merge
Added a test case for bug #8616.
item.h:
Fixed bug #8616.
Added class Item_null_result used in rollup processing.
sql_select.h, sql_select.cc:
Fixed bug #8616.
Added JOIN::rollup_write_data to cover rollup queries
with DISTINCT. Modified other rollup methods.
sql/sql_select.cc:
Fixed bug #8616.
Added JOIN::rollup_write_data to cover rollup queries
with DISTINCT. Modified other rollup methods.
sql/sql_select.h:
Fixed bug #8616.
Added JOIN::rollup_write_data to cover rollup queries
with DISTINCT. Modified other rollup methods.
sql/item.h:
Fixed bug #8616.
Added class Item_null_result used in rollup processing.
mysql-test/t/olap.test:
Added a test case for bug #8616.
mysql-test/r/olap.result:
Added a test case for bug #8616.
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/logging_ok:
auto-union
innobase/trx/trx0trx.c:
Auto merged
mysql-test/r/ctype_collate.result:
Auto merged
mysql-test/r/func_system.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/opt_sum.cc:
Auto merged
innobase/ut/ut0mem.c:
e
merge from 4.1
mysql-test/r/func_group.result:
merge from 4.1
mysql-test/r/func_str.result:
merge from 4.1
mysql-test/t/func_group.test:
merge from 4.1