CURSOR_TYPE_READ_ONLY date/datetime filter server crash".
The fix adds support for Item_change_list in cursors (proper rollback
of the modified item tree).
sql/sql_class.cc:
No need to call fatal_error() twice.
sql/sql_prepare.cc:
- implement proper cleanup of the prepared statement in mysql_stmt_reset
if there is a cursor.
- take into account thd->change_list when fetching data through a
cursor.
sql/sql_select.cc:
- take into account thd->change_list when fetching data from a cursor:
grab it when we open a cursor, and rollback the changes to the parsed
tree when we close it.
sql/sql_select.h:
- Cursor::change_list added
tests/mysql_client_test.c:
- a test case for Bug#11172 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY date/datetime
filter server crash"
The reason it happened was that both, JOIN::cleanup() and JOIN::join_free(),
went over all nested joins and called cleanup/join_free for them.
For that:
- split recursive and non-recursive parts of JOIN::cleanup() and
JOIN::join_free()
- rename JOIN::cleanup to JOIN::destroy, as it actually destroys its
argument
- move the recursive part of JOIN::cleanup to st_select_lex::cleanup
- move the non-recursive part of JOIN::join_free to the introduced
method JOIN::cleanup().
sql/sql_lex.h:
Add st_select_lex::cleanup, a counterpart of st_select_lex_unit::cleanup()
sql/sql_select.cc:
- remove two unused arguments from return_zero_rows
- split JOIN::join_free and JOIN::cleanup to recursive and non-recursive
parts.
- note, the assert in JOIN::join_free _does_ fail in having.test.
We have two options: a) propagate `full' flag to the nested joins.
We did it before, and this patch didn't change it. If so, we
can end up cleaning up an uncacheable JOIN (that is, the join that
we might need again).
b) evaluate own 'full' flag on every level. In this case, we might
end up with tables freed in mysql_unlock_read_tables, but not
cleaned up properly, and this may be even worse. The test suite
passes with both approaches, but not with the assert.
sql/sql_select.h:
- declarations for JOIN::cleanup() and JOIN::join_free()
sql/sql_union.cc:
Add st_select_lex::cleanup, a counterpart of st_select_lex_unit::cleanup():
move the recursive part of JOIN::cleanup to it.
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.
main_mem_root is moved out of class Query_arena.
sql/sp_head.cc:
Adjust to the changed Query_arena constructor.
main_mem_root is moved out of class Query_arena.
sql/sp_head.h:
main_mem_root is moved out of class Query_arena: add it to class sp_head.
sql/sql_class.cc:
main_mem_root is moved out of class Query_arena: remove
constructors no longer relevant, remove dead code.
sql/sql_class.h:
main_mem_root is moved out of class Query_arena.
sql/sql_prepare.cc:
It's better to not use main_mem_root anywhere: logically, it's not
a public member (can't fix sp_head::make_field and Item_subselect::exec
to make it protected)
sql/sql_select.cc:
New Cursor constructor, which avoids unneeded memory allocation
when initializign main_mem_root.
sql/sql_select.h:
main_mem_root is moved out of class Query_arena.
CURSOR_TYPE_READ_ONLY". The bug was that we (me) don't perform proper
cleanups of the prepared statement when done fetching from a cursor.
Another patch.
sql/mysql_priv.h:
Rename reset_stmt_for_execute to init_stmt_before_use (to correspond to
cleanup_stmt_and_thd_after_use).
sql/sp_head.cc:
Rename.
sql/sql_prepare.cc:
Move common cleanup code to a cleanup function, call it when we close
a cursor.
sql/sql_select.cc:
Cleanup.
sql/sql_select.h:
No need for init_thd, this code has been inlined in Cursor::open.
tests/mysql_client_test.c:
Add a test case for Bug#10729 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY"
(problem reusing a prepared statemnt if there was a cursor)
(crash on attempt to re-execute a statement with an open cursor) +
post-review fixes.
include/errmsg.h:
Add a special error message when we attempt to mysql_stmt_fetch
from a statement which has no result set.
libmysql/errmsg.c:
Error message text for CR_NO_RESULT_SET
libmysql/libmysql.c:
Move the code which frees result sets on client and closes the cursor
on server, resets long data state on client and server.
This makes one function out of two (mysql_stmt_reset and
mysql_stmt_free_result), thus aggregating all related reset work
in one place.
sql-common/client.c:
Fix one place where we flushed the pending result set of a statement,
but didn't set unbuffered_fetch_cancelled flag.
sql/share/errmsg.txt:
Fix format of ER_UNKNOWN_STMT_HANDLER error message (needs to
be fixed separately in 4.1). Add two new error messages
for the case when we fetch from when there is no cursor
and for the case when we attempt to execute a statement while there is
a cursor.
sql/sql_prepare.cc:
Return error when we fetch while there is no open cursor and
when we call execute while there is a pending cursor.
Fix mysql_stmt_reset to close the open cursor if there is any.
sql/sql_select.cc:
free_items and free_root moved to Cursor::close().
sql/sql_select.h:
A comment added.
tests/mysql_client_test.c:
A test case for Bug#9478, test the case of mysql_stmt_reset
called for client-side cached result set and for the case with open cursor.
All strcpy replaced with strmov (review request).
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
- 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
with cursor". The patch refactors do_select/sub_select
functions, which implement the nested loop algorithm, and reuses them to
fetch rows for cursors as well.
Pushing with view.test failing (--ps-protocol).
sql/sql_prepare.cc:
Cursor::fetch() now returns void
sql/sql_select.cc:
A fix for Bug#9520 "SELECT DISTINCT crashes server with cursor":
* rename sub_select returns codes to be able to track down what's going
on in which case.
* move record processing and outer join record processing to a separate
function, out of sub_select read-record loop.
* use generalized sub_select() nested loop function for
cursors instead of own loop implementation used in Cursor::fetch() before
sql/sql_select.h:
Replace all return values of sub_select family with enum.
Add JOIN::resume_nested_loop flag to indicate we are restarting the nested loop
for execution of next chunk of cursor's rows.
tests/mysql_client_test.c:
A test case for Bug#9520 "SELECT DISTINCT crashes server with cursor"
Don't produce data truncation warnings from within cp_buffer_from_ref(). This function
is only used to make index search tuples and data truncation that occurs here has no
relation with truncated values being saved into tables.
mysql-test/r/update.result:
Testcase for BUG#9103
mysql-test/t/update.test:
Testcase for BUG#9103
sql/opt_range.cc:
cp_buffer_from_ref now has THD* parameter
sql/sql_select.h:
cp_buffer_from_ref now has THD* parameter
"Early NULL-values filtering for ref access" (attempt2+post-review fixes)
1. update_ref_and_keys() accumulates info about null-rejecting
predicates in in KEY_FIELD::null_rejecting, add_key_part saves
these to KEYUSE.
2. create_ref_for_key copies them to TABLE_REF.
3. add_not_null_conds adds "x IS NOT NULL" to join_tab->select_cond of
appropiate JOIN_TAB members.
Includes code cleanups:
* add_key_field() params: s/COND/Item_func/ (as only Item_funcs are
passed to it)
* add_key_fields() params: JOIN_TAB *stat removed (wasn't used)
sql/sql_select.cc:
Fix for BUG#8877: Implementation of
"Early NULL-values filtering for ref access"
1. update_ref_and_keys() accumulates info about null-rejecting
predicates in in KEY_FIELD::null_rejecting, add_key_part saves
these to KEYUSE.
2. create_ref_for_key copies them to TABLE_REF.
3. add_not_null_conds adds "x IS NOT NULL" to join_tab->select_cond
of appropiate JOIN_TAB members.
Includes code cleanups:
* add_key_field() params: s/COND/Item_func/ (as only Item_funcs are
passed to it)
* add_key_fields() params: JOIN_TAB *stat removed (wasn't used)
sql/sql_select.h:
Fix for BUG#8877: Implementation of
"Early NULL-values filtering for ref access" (attempt2)
and Bug#9159 "Server crash during mysql_stmt_close".
The patch adds support for single-row result sets in cursors.
libmysql/libmysql.c:
If we wanted a cursor, and the server wasn't able to create one,
buffer all rows on client. Currently this is possible only for
single row result sets and some SHOW commands.
sql/sql_prepare.cc:
Properly free resources if there was a request to open a cursor which
wasn't fullfilled.
Give error on attempt to open a cursor for a statement not returning
a result set.
sql/sql_select.h:
Initialize Item_arena of Cursor object. A case when a cursor object
is created but not used is possible with single-row result sets.
tests/mysql_client_test.c:
Test cases for Bug#8880 and Bug#9159
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
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.
mysql-test/r/func_group.result:
Added some tests and fix for Bug#5615.
mysql-test/r/show_check.result:
Fix for Bug#5615.
mysql-test/t/func_group.test:
Added some tests.
sql/item_sum.cc:
Fix for Bug#5615.
sql/item_sum.h:
Fix for Bug#5615.
sql/sql_select.cc:
Fix for Bug#5615.
sql/sql_select.h:
Fix for Bug#5615.
Fixed some found bugs in BIT fields
Added more test cases for BIT fields and varchar
include/my_base.h:
Merge
Added HA_BIT_PART for easier test in key.cc
innobase/os/os0proc.c:
Fixed typo
myisam/mi_dbug.c:
Add printing of BIT types when debugging
mysql-test/r/show_check.result:
Set 'Avg_row_length' to # as this value is different between 32 and 64 bit machines
mysql-test/r/type_bit.result:
More tests
mysql-test/r/type_varchar.result:
More tests
mysql-test/t/show_check.test:
Set 'Avg_row_length' to # as this value is different between 32 and 64 bit machines
mysql-test/t/type_bit.test:
More tests
mysql-test/t/type_varchar.test:
More tests
sql/field.cc:
Added Field::val_int_as_str() to get better logging of bit fields
Merged new_key_field with move_field() to fix some problems with bit fields
Fixed some bugs with bit fields
sql/field.h:
Added Field::val_int_as_str() to get better logging of bit fields
Merged new_key_field with move_field() to fix some problems with bit fields
Fixed some bugs with bit fields
sql/ha_myisam.cc:
Fixed problem with unintialized memory (not critical)
sql/key.cc:
Fix so that 'key_cmp_if_same' works with bit fields.
sql/opt_range.cc:
Move declarations first in function
Nice printing of bit fields in debug log
sql/sql_prepare.cc:
Fixed old merge error (not critical)
sql/sql_select.cc:
Use new interface to new_key_field
sql/sql_select.h:
Use new interface to new_key_fields()
This fixes a bug with BIT fields where the upper bit of the data was not stored in the key buffer
sql/structs.h:
Extend key_part_flag to be able to add HA_BIT_PART to it
sql/table.cc:
Mark BIT key parts with HA_BIT_PART to make test in key.cc simpler
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
BUILD/SETUP.sh:
Add flags for Intel 64
dbug/dbug.c:
Add 0x before pointers (to help with debugging)
heap/_check.c:
Add 0x before pointers (to help with debugging)
heap/hp_create.c:
Add support for VARCHAR with 1 or 2 length bytes
heap/hp_delete.c:
Add 0x before pointers
heap/hp_hash.c:
Add support for VARCHAR with 1 or 2 length bytes
Added more debugging
heap/hp_open.c:
Add 0x before pointers
heap/hp_rkey.c:
Add 0x before pointers
heap/hp_rrnd.c:
Add 0x before pointers
heap/hp_write.c:
Add 0x before pointers
include/my_base.h:
Add support for VARCHAR with 1 or 2 length bytes
myisam/ft_static.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/ft_test1.c:
Add support for VARCHAR with 1 or 2 length bytes
Fixed indentation
(This file should probably be deleted as it doesn't compile)
myisam/ft_update.c:
Add support for VARCHAR with 1 or 2 length bytes
Fixed indentation
Removed some not needed 'else'
myisam/mi_check.c:
Don't give an error for tables packed with myisampack
myisam/mi_checksum.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_create.c:
Add support for VARCHAR with 1 or 2 length bytes
Store in number of pack-length-bytes in keyseg->bit_start
myisam/mi_dbug.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_dynrec.c:
Add support for VARCHAR with 1 or 2 length bytes
(old code in _mi_rec_unpack() didn't really work with VARCHAR's)
myisam/mi_key.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_open.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_packrec.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_search.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_test1.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_test3.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/mi_test_all.res:
Update results
myisam/mi_unique.c:
Add support for VARCHAR with 1 or 2 length bytes
myisam/myisampack.c:
Add support for VARCHAR with 1 or 2 length bytes
mysql-test/include/varchar.inc:
Added more tests
mysql-test/r/bdb.result:
Update results after new tests
mysql-test/r/information_schema.result:
Update results
mysql-test/r/innodb.result:
Update results
mysql-test/r/myisam.result:
Update results after new tests
mysql-test/r/ps_1general.result:
Update results
mysql-test/t/bdb.test:
Shorter comments
mysys/list.c:
Add 0x before pointers
mysys/my_handler.c:
Add support for VARCHAR with 1 or 2 length bytes
mysys/raid.cc:
Add 0x before pointers
sql/field.cc:
Add support for VARCHAR with 1 or 2 length bytes
sql/field.h:
Add support for VARCHAR with 1 or 2 length bytes
sql/field_conv.cc:
Add support for VARCHAR with 1 or 2 length bytes
sql/ha_berkeley.cc:
Add support for VARCHAR with 1 or 2 length bytes
sql/ha_heap.cc:
Add support for VARCHAR with 1 or 2 length bytes
sql/ha_myisam.cc:
Ensure that enable_indexes() will report an error if it fails
Enable VARCHAR packing for MyISAM files
sql/item_sum.cc:
Change key_cmp -> cmp() as we are comparing fields, not key segements
sql/opt_range.cc:
Add support for VARCHAR with 1 or 2 length bytes
Change range_end to call ha_index_or_rnd_end() as in some error cases we may be in rnd mode when we abort
sql/sql_base.cc:
Remove compiler warning
sql/sql_parse.cc:
Move length checking code to sql_table.cc (as we don't have character set for fields at this stage)
sql/sql_select.cc:
Add support for VARCHAR with 1 or 2 length bytes
Ensure that we report an error if we get an error while writing to internal temporary tables
sql/sql_select.h:
Add support for VARCHAR with 1 or 2 length bytes
sql/sql_show.cc:
Fix typo in comment
sql/sql_table.cc:
Don't use new table generated by ALTER TABLE if index generation fails
vio/vio.c:
Fixed DBUG info
vio/viosocket.c:
Fixed DBUG info
vio/viossl.c:
Fixed DBUG info
vio/viosslfactories.c:
Fixed DBUG info
include/mysqld_error.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/rpl_charset.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/rpl_charset.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_uniq.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/parse_file.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/protocol_cursor.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/repl_failsafe.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_analyse.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_repl.h:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.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/share/german/errmsg.txt:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/italian/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/sql_udf.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/share/serbian/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
BitKeeper/etc/ignore:
auto-union
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
innobase/include/row0mysql.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/ps.result:
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/type_float.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/user_var.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
This gives us the following benefits:
- Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
- Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
- We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
client/mysqltest.c:
Remove some not needed defines
(Things like this should be done in config-win.h)
include/config-win.h:
Added popen() and pclose() compatibility macros
mysql-test/t/rpl_failed_optimize-master.opt:
Portability fix
sql/ha_berkeley.cc:
New thd->memroot handling
sql/item_cmpfunc.cc:
Simpler arena swapping code
sql/item_func.cc:
Simpler arena swapping code
sql/item_subselect.cc:
Simpler arena swapping code
New thd->mem_root handling
sql/item_sum.cc:
New thd->mem_root handling
sql/item_timefunc.cc:
Fixed not-initalized usage errors found by valgrind
sql/log_event.cc:
New thd->mem_root handling
sql/mysql_priv.h:
New thd->mem_root handling
sql/mysqld.cc:
New thd->mem_root handling
sql/opt_range.cc:
New thd->mem_root handling
sql/repl_failsafe.cc:
New thd->mem_root handling
sql/set_var.cc:
New thd->mem_root handling
sql/sql_acl.cc:
New thd->mem_root handling
sql/sql_base.cc:
Simpler arena swapping code
New thd->mem_root handling
sql/sql_class.cc:
New thd->mem_root handling
sql/sql_class.h:
Simpler arena swapping code
New thd->mem_root handling
sql/sql_db.cc:
New thd->mem_root handling
sql/sql_error.cc:
New thd->mem_root handling
sql/sql_help.cc:
New thd->mem_root handling
sql/sql_insert.cc:
New thd->mem_root handling
sql/sql_parse.cc:
New thd->mem_root handling
Added some extra checking of return value of new
sql/sql_prepare.cc:
New thd->mem_root handling
sql/sql_select.cc:
New thd->mem_root handling
sql/sql_select.h:
New thd->mem_root handling
sql/sql_union.cc:
Simpler arena swapping code
sql/sql_yacc.yy:
New thd->mem_root handling
sql/table.cc:
New thd->mem_root handling
sql/thr_malloc.cc:
New thd->mem_root handling
tests/client_test.c:
Added drop table to some tests
Changed some table names to 't1'
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_row.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
include/mysqld_error.h:
new errors added.
mysql-test/r/rpl_charset.result:
new error
mysql-test/r/rpl_timezone.result:
new error
mysql-test/r/sp-security.result:
more clean error message
mysql-test/r/sp.result:
now error state intercepted correctly
mysql-test/t/connect.test:
new error message
mysql-test/t/rpl_charset.test:
new error message
mysql-test/t/rpl_timezone.test:
new error
mysql-test/t/sp-security.test:
more correct error handling
mysql-test/t/sp.test:
now error state intercepted correctly
sql/ha_innodb.cc:
-1/1 (sent/unsent) error reporting removed
sql/ha_innodb.h:
-1/1 (sent/unsent) error reporting removed
sql/item.cc:
only boolean values should be returned by fix_fields()
sql/item_cmpfunc.cc:
only boolean values should be returned by fix_fields()
sql/item_func.cc:
only boolean values should be returned by fix_fields()
net_printf/send_error calls replaced by my_error family functions
sql/item_row.cc:
only boolean values should be returned by fix_fields()
sql/item_subselect.cc:
only boolean values should be returned by fix_fields()
-1/1 (sent/unsent) error reporting removed
sql/item_subselect.h:
-1/1 (sent/unsent) error reporting removed
sql/item_sum.cc:
only boolean values should be returned by fix_fields()
sql/item_timefunc.cc:
only boolean values should be returned by fix_fields()
sql/item_uniq.h:
only boolean values should be returned by fix_fields()
sql/mysql_priv.h:
-1/1 (sent/unsent) error reporting removed
sql/mysqld.cc:
net_printf/send_error calls replaced by my_error family functions
changes in my_message_sql to support error handling correctly
sql/protocol.cc:
net_printf/send_error calls replaced by my_error family functions
sql/protocol_cursor.cc:
net_printf/send_error calls replaced by my_error family functions
sql/repl_failsafe.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/repl_failsafe.h:
-1/1 (sent/unsent) error reporting removed
sql/set_var.cc:
net_printf/send_error calls replaced by my_error family functions
sql/share/czech/errmsg.txt:
new error messages
sql/share/danish/errmsg.txt:
new error messages
sql/share/dutch/errmsg.txt:
new error messages
sql/share/english/errmsg.txt:
new error messages
sql/share/estonian/errmsg.txt:
new error messages
sql/share/french/errmsg.txt:
new error messages
sql/share/german/errmsg.txt:
new error messages
sql/share/greek/errmsg.txt:
new error messages
sql/share/hungarian/errmsg.txt:
new error messages
sql/share/italian/errmsg.txt:
new error messages
sql/share/japanese/errmsg.txt:
new error messages
sql/share/korean/errmsg.txt:
new error messages
sql/share/norwegian-ny/errmsg.txt:
new error messages
sql/share/norwegian/errmsg.txt:
new error messages
sql/share/polish/errmsg.txt:
new error messages
sql/share/portuguese/errmsg.txt:
new error messages
sql/share/romanian/errmsg.txt:
new error messages
sql/share/russian/errmsg.txt:
new error messages
sql/share/serbian/errmsg.txt:
new error messages
sql/share/slovak/errmsg.txt:
new error messages
sql/share/spanish/errmsg.txt:
new error messages
sql/share/swedish/errmsg.txt:
new error messages
sql/share/ukrainian/errmsg.txt:
new error messages
sql/slave.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/slave.h:
-1/1 (sent/unsent) error reporting removed
sql/sp.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sp_head.cc:
new eror handling support
net_printf/send_error calls replaced by my_error family functions
sql/sp_rcontext.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sql_acl.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_acl.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_base.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_class.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sql_class.h:
my_messhage_sql now set/reset query_error flag
sql/sql_db.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_delete.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_do.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_error.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_handler.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_help.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_insert.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_lex.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_load.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_map.cc:
errors without code removed
sql/sql_parse.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed from mysql_execute_command
sql/sql_prepare.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_repl.cc:
error messages fixed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_repl.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_select.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_select.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_show.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_table.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_trigger.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_udf.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sql_union.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_update.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_view.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_view.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_yacc.yy:
net_printf/send_error calls replaced by my_error family functions
BitKeeper/etc/ignore:
auto-union
mysql-test/r/range.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/item.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/item.h:
Manual merge
sql/sql_select.cc:
Manual merge
Added the code processing on expressions for applying
multiple equalities.
sql_select.cc:
Post-merge fixes for Item_equal patch.
Added the code processing on expressions for applying
multiple equalities.
Many files:
Post-merge fixes for Item_equal patch.
item_cmpfunc.cc:
Post-merge fixes for Item_equal patch.
Fixed a problem when an equality field=const cannot be applied to
the predicate P(field,c) for constant propagation as a conversion
of field is needed.
item.h, item.cc:
Fixed a problem when an equality field=const cannot be applied to
the predicate P(field,c) for constant propagation as a conversion
of field is needed.
mysql-test/r/func_test.result:
Post-merge fixes for Item_equal patch.
mysql-test/r/index_merge.result:
Post-merge fixes for Item_equal patch.
mysql-test/r/join_nested.result:
Post-merge fixes for Item_equal patch.
mysql-test/r/range.result:
Post-merge fixes for Item_equal patch.
sql/item.cc:
Fixed a problem when an equality field=const cannot be applied to
the predicate P(field,c) for constant propagation as a conversion
of field is needed.
sql/item.h:
Fixed a problem when an equality field=const cannot be applied to
the predicate P(field,c) for constant propagation as a conversion
of field is needed.
sql/item_cmpfunc.cc:
Post-merge fixes for Item_equal patch.
Fixed a problem when an equality field=const cannot be applied to
the predicate P(field,c) for constant propagation as a conversion
of field is needed.
sql/opt_range.cc:
Post-merge fixes for Item_equal patch.
sql/sql_select.cc:
Post-merge fixes for Item_equal patch.
Added the code processing on expressions for applying
multiple equalities.
sql/sql_select.h:
Added the code processing on expressions for applying
multiple equalities.
sql/table.h:
Added the code processing on expressions for applying
multiple equalities.
sql/ha_myisam.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/key.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/opt_range.cc:
Manual merge
sql/sql_select.cc:
Manual merge
BitKeeper/etc/ignore:
auto-union
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_list.h:
Auto merged
mysql-test/r/func_test.result:
Post-automerge resolution of conflicts
mysql-test/r/index_merge.result:
Post-automerge resolution of conflicts
mysql-test/r/join_outer.result:
Post-automerge resolution of conflicts
mysql-test/r/range.result:
Post-automerge resolution of conflicts
mysql-test/r/subselect.result:
Post-automerge resolution of conflicts
sql/item.cc:
Post-automerge resolution of conflicts
sql/item.h:
Post-automerge resolution of conflicts
sql/item_cmpfunc.cc:
Post-automerge resolution of conflicts
sql/item_cmpfunc.h:
Post-automerge resolution of conflicts
sql/opt_range.cc:
Post-automerge resolution of conflicts
sql/sql_select.cc:
Post-automerge resolution of conflicts
sql/sql_select.h:
Post-automerge resolution of conflicts
Added thd to openfrm() for initialization of TABLE->in_use. This fixed a bug in BDB handling where table->in_use was used early
mysql-test/r/key.result:
Added new tests that shows a bug in warnings hat
mysql-test/t/key.test:
Added new tests that shows a bug in warnings hat
sql/handler.cc:
Added thd to openfrm() for initialization of TABLE->in_use
sql/item.cc:
New function to avoid warnings when giving field a value
sql/item.h:
New function to avoid warnings when giving field a value
sql/mysql_priv.h:
Added thd to openfrm() for initialization of TABLE->in_use
sql/opt_range.cc:
Don't give warnings in optimizer when internally storing a field value in a field. (Should be ok as we ar checking the feild in the WHERE clause later)
sql/sql_base.cc:
Give memroot explicitely to open_unireg_entry() and open_table() (Makes code simpler)
Ensure that table->in_use is set early
New arguments for openfrm()
sql/sql_insert.cc:
More debugging & comments
sql/sql_parse.cc:
Delete results for select_insert and select_create. This fixed a bug that generated warnings in test suite
sql/sql_select.h:
Don't give warnings in optimizer when internally storing a field value in a field. (Should be ok as we ar checking the feild in the WHERE clause later)
sql/sql_table.cc:
New arguments to open_table() and openfrm()
sql/table.cc:
Added thd to openfrm() for initialization of TABLE->in_use
This fixes some bugs in BDB where table->in_use was used
"Min/Max Optimization for Queries with Group By Clause"
mysql-test/r/group_min_max.result:
Added new test
mysql-test/t/group_min_max.test:
Added new test & comments
sql/item.h:
Remove processor methods that are no longer used.
sql/item_sum.cc:
Remove processor methods that are no longer used.
sql/item_sum.h:
Remove processor methods that are no longer used.
sql/opt_range.cc:
- the test procedure no longer needs to build lists and to traverse the expression trees
- all usable indexes are tested and the bes one is chosen
- added/edited function comments
sql/sql_select.cc:
Modified make_sum_func_list() so it can be reused in the test for MIN/MAX optimization.
sql/sql_select.h:
Modified make_sum_func_list() so it can be reused in the test for MIN/MAX optimization.
(Includes merge of arena code in 4.1 and 5.0)
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
VC++Files/sql/mysqld.dsp:
Auto merged
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
libmysql/client_settings.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
libmysqld/examples/Makefile.am:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/myisamchk.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/r/connect.result:
Auto merged
mysql-test/r/ctype_recoding.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/func_like.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/having.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/join.result:
Auto merged
mysql-test/r/key.result:
Auto merged
mysql-test/r/lowercase_table.result:
Auto merged
mysql-test/r/ndb_autodiscover.result:
Auto merged
mysql-test/r/null.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/ps_1general.result:
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/range.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/null.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/rpl_charset.test:
Auto merged
mysql-test/t/rpl_heap.test:
Auto merged
mysql-test/t/rpl_relayrotate.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
netware/mysql_test_run.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/mysql_create_system_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_create.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/lex.h:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/records.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_rename.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_string.h:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
client/mysqlbinlog.cc:
Merge with 4.1
configure.in:
Merge with 4.1
include/mysqld_error.h:
Add new error message (1) from 4.1
mysql-test/mysql-test-run.sh:
Merge with 4.1
mysql-test/r/func_gconcat.result:
Merge with 4.1
mysql-test/r/func_if.result:
Merge with 4.1
mysql-test/r/grant.result:
Merge with 4.1
mysql-test/r/join_outer.result:
Merge with 4.1
mysql-test/r/rpl_charset.result:
Merge with 4.1 (This has to be fixed before pushing)
mysql-test/r/system_mysql_db.result:
Merge with 4.1.
Added collation to new privileges
mysql-test/t/grant.test:
Merge with 4.1
mysql-test/t/grant_cache.test:
Merge with 4.1
mysql-test/t/show_check.test:
Merge with 4.1
sql/Makefile.am:
Merge with 4.1
sql/item.cc:
Merge with 4.1
sql/item_cmpfunc.cc:
Merge with 4.1 (arena code)
sql/item_subselect.cc:
Merge with 4.1
sql/item_subselect.h:
Merge with 4.1
sql/item_sum.cc:
Merge with 4.1
sql/item_sum.h:
Merge with 4.1
sql/log.cc:
Merge with 4.1 (Remove code that is not relevant for 5.0)
sql/mysqld.cc:
Merge with 4.1
sql/opt_range.cc:
Merge with 4.1
sql/share/czech/errmsg.txt:
Merge with 4.1
sql/share/danish/errmsg.txt:
Merge with 4.1
sql/share/dutch/errmsg.txt:
Merge with 4.1
sql/share/english/errmsg.txt:
Merge with 4.1
sql/share/estonian/errmsg.txt:
Merge with 4.1
sql/share/french/errmsg.txt:
Merge with 4.1
sql/share/german/errmsg.txt:
Merge with 4.1
sql/share/greek/errmsg.txt:
Merge with 4.1
sql/share/hungarian/errmsg.txt:
Merge with 4.1
sql/share/italian/errmsg.txt:
Merge with 4.1
sql/share/japanese/errmsg.txt:
Merge with 4.1
sql/share/korean/errmsg.txt:
Merge with 4.1
sql/share/norwegian-ny/errmsg.txt:
Merge with 4.1
sql/share/norwegian/errmsg.txt:
Merge with 4.1
sql/share/polish/errmsg.txt:
Merge with 4.1
sql/share/portuguese/errmsg.txt:
Merge with 4.1
sql/share/romanian/errmsg.txt:
Merge with 4.1
sql/share/russian/errmsg.txt:
Merge with 4.1
sql/share/serbian/errmsg.txt:
Merge with 4.1
sql/share/slovak/errmsg.txt:
Merge with 4.1
sql/share/spanish/errmsg.txt:
Merge with 4.1
sql/share/swedish/errmsg.txt:
Merge with 4.1
sql/share/ukrainian/errmsg.txt:
Merge with 4.1
sql/sql_base.cc:
Merge with 4.1
sql/sql_class.cc:
Merge with 4.1
Use arena code from 4.1
sql/sql_class.h:
Merge with 4.1
Use arena code from 4.1
sql/sql_derived.cc:
Merge with 4.1
sql/sql_lex.cc:
Merge with 4.1
sql/sql_lex.h:
Merge with 4.1
sql/sql_parse.cc:
Merge with 4.1
sql/sql_prepare.cc:
Merge with 4.1
sql/sql_select.cc:
Merge with 4.1
sql/sql_table.cc:
Merge with 4.1
sql/sql_union.cc:
Merge with 4.1
sql/sql_yacc.yy:
Merge with 4.1
sql/tztime.cc:
Merge with 4.1
tests/client_test.c:
Merge with 4.1
mysql-test/r/negation_elimination.result:
new tests of negation elimination
mysql-test/t/negation_elimination.test:
new tests of negation elimination
sql/item.h:
test of boolean functions added
sql/item_cmpfunc.cc:
NOT subtree is already checked, so wee need to return just argument
sql/item_cmpfunc.h:
test of boolean functions added
sql/mysql_priv.h:
'place' to detect WHERE clause
sql/sql_parse.cc:
function for creation negated expression
sql/sql_select.cc:
removed unused function
sql/sql_select.h:
removed unused function
sql/sql_yacc.yy:
'place' to detect WHERE clause
- after-review changes
- merged with the source tree from 204-08-27
mysql-test/r/distinct.result:
Different plans due to group-by optimization.
sql/ha_myisam.cc:
More general interface to key_copy.
sql/handler.cc:
More general interface to key_copy.
sql/item.cc:
New method to collect all Item_field objects. Used by Item::walk.
sql/item.h:
Several methods to collect different kinds of items from expression trees.
Used by Item::walk.
sql/item_sum.cc:
Added helper to collect Item_sum objects.
sql/item_sum.h:
Methods to collect and test Item_sum objects.
sql/key.cc:
More general interface to key_copy and key_restore.
sql/mysql_priv.h:
More general interface to key_copy and key_restore.
sql/opt_range.cc:
Complete implementaion of WL#1724 "Min/Max Optimization for Queries with Group By Clause".
sql/opt_range.h:
Complete implementaion of WL#1724 "Min/Max Optimization for Queries with Group By Clause".
sql/opt_sum.cc:
simple_pred is re-used in opt_range.cc
sql/sql_acl.cc:
More general interface to key_copy and key_restore.
sql/sql_handler.cc:
More general interface to key_copy.
sql/sql_insert.cc:
More general interface to key_copy.
sql/sql_select.cc:
Changes to hook the new QUICK_GROUP_MIN_MAX_SELECT due to two differences from all other
quick selects:
1)
This quick select may be created (and used) even if there is no WHERE clause.
Several places assumed that a QUICK_SELECT is constructed only if there is a WHERE clause,
which had to be changed so that QUICK_GROUP_MIN_MAX can be used.
2)
Unlike all other quick selects, this QUICK_GROUP_MIN_MAX_SELECT operates for GROUP BY queries.
Since for the caller the quick select already produces one result tuple per group, there is
no need to call end_send_group, instead we have to call end_send as for a regular quick select.
sql/sql_select.h:
simple_pred is re-used in opt_range.cc
- client side part is simple and may be considered stable
- server side part now just joggles with THD state to save execution
state and has no additional locking wisdom.
Lot's of it are to be rewritten.
include/mysql.h:
Cursor patch to push into the main tree, client library part (considered
stable):
- new statement attribute STMT_ATTR_CURSOR_TYPE
- MYSQL_STMT::flags to store statement cursor type
- MYSQL_STMT::server_status to store server status (i. e. if the server
was able to open a cursor for this query).
include/mysql_com.h:
Cursor patch to push into the main tree, client library part (considered
stable):
- new COMmand, COM_FETCH, to fetch K rows from read-only cursor.
By design should support scrollable cursors as well.
- a few new server statuses:
SERVER_STATUS_CURSOR_EXISTS is sent by server in reply to COM_EXECUTE,
when cursor was successfully opened for this query
SERVER_STATUS_LAST_ROW_SENT is sent along with the last row to prevent one
more round trip just for finding out that all rows were fetched from
this cursor (this is server mem savier also).
- and finally, all possible values of STMT_ATTR_CURSOR_TYPE,
while now we support only CURSORT_TYPE_NO_CURSOR and
CURSOR_TYPE_READ_ONLY
libmysql/libmysql.c:
Cursor patch to push into the main tree, client library part (considered
stable):
- simple additions to mysql_stmt_fetch implementation to read data
from an opened cursor: we can read up to iteration count rows per
one request; read rows are buffered in the same way as rows of
mysql_stmt_store_result.
- now send stmt->flags to server to let him now if we wish to have
a cursor for this statement.
- support for setting/getting statement cursor type.
libmysqld/examples/Makefile.am:
Testing cursors was originally implemented in C++. Now when these tests
go into client_test, it's time to convert it to C++ as well.
libmysqld/lib_sql.cc:
- cleanup: send_fields flags are now named.
sql/ha_innodb.cc:
- cleanup: send_fields flags are now named.
sql/mysql_priv.h:
- cursors support: declaration for server-side handler of COM_FETCH
sql/protocol.cc:
- cleanup: send_fields flags are now named.
- we can't anymore assert that field_types[field_pos] is sensible:
if we have COM_EXCUTE(stmt1), COM_EXECUTE(stmt2), COM_FETCH(stmt1)
field_types[field_pos] will point to fields of stmt2.
sql/protocol.h:
- cleanup: send_fields flag_s_ are now named.
sql/protocol_cursor.cc:
- cleanup: send_fields flags are now named.
sql/repl_failsafe.cc:
- cleanup: send_fields flags are now named.
sql/slave.cc:
- cleanup: send_fields flags are now named.
sql/sp.cc:
- cleanup: send_fields flags are now named.
sql/sp_head.cc:
- cleanup: send_fields flags are now named.
sql/sql_acl.cc:
- cleanup: send_fields flags are now named.
sql/sql_class.cc:
- cleanup: send_fields flags are now named.
sql/sql_class.h:
- cleanup: send_fields flags are now named.
sql/sql_error.cc:
- cleanup: send_fields flags are now named.
sql/sql_handler.cc:
- cleanup: send_fields flags are now named.
sql/sql_help.cc:
- cleanup: send_fields flags are now named.
sql/sql_parse.cc:
Server side support for cursors:
- handle COM_FETCH
- enforce assumption that whenever we free thd->free_list,
we reset it to zero. This way it's much easier to handle free_list
in prepared statements implementation.
sql/sql_prepare.cc:
Server side support for cursors:
- implementation of mysql_stmt_fetch (fetch some rows from open cursor).
- management of cursors memory is quite tricky now.
- execute_stmt can't be reused anymore in mysql_stmt_execute and
mysql_sql_stmt_execute
sql/sql_repl.cc:
- cleanup: send_fields flags are now named.
sql/sql_select.cc:
Server side support for cursors:
- implementation of Cursor::open, Cursor::fetch (buggy when it comes to
non-equi joins), cursor cleanups.
- -4 -3 -0 constants indicating return value of sub_select and end_send are
to be renamed to something more readable:
it turned out to be not so simple, so it should come with the other patch.
sql/sql_select.h:
Server side support for cursors:
- declaration of Cursor class.
- JOIN::fetch_limit contains runtime value of rows fetched via cursor.
sql/sql_show.cc:
- cleanup: send_fields flags are now named.
sql/sql_table.cc:
- cleanup: send_fields flags are now named.
sql/sql_union.cc:
- if there was a cursor, don't cleanup unit: we'll need it to fetch
the rest of the rows.
tests/Makefile.am:
Now client_test is in C++.
tests/client_test.cc:
A few elementary tests for cursors.
BitKeeper/etc/ignore:
Added libmysqld/examples/client_test.cc to the ignore list
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/select.result:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.h:
Auto merged
include/my_base.h:
Auto merged
include/my_bitmap.h:
Auto merged
include/my_sys.h:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
mysys/my_bitmap.c:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_select.h:
Auto merged
include/my_base.h:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
mysql-test/r/index_merge.result:
Auto merged
mysql-test/r/index_merge_innodb.result:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/opt_range.cc:
Hand merged
sql/opt_range.h:
Hand merged
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
include/my_sys.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/myisamchk.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/null.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/rpl_server_id2.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/rpl000015.test:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
mysql-test/t/rpl_log.test:
Auto merged
mysql-test/t/rpl_log_pos.test:
Auto merged
mysql-test/t/rpl_max_relay_size.test:
Auto merged
mysql-test/t/rpl_relayrotate.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
mysql-test/t/rpl_server_id2.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
mysys/my_pthread.c:
Auto merged
netware/BUILD/compile-netware-all:
Auto merged
netware/BUILD/compile-netware-standard:
Auto merged
netware/BUILD/mwenv:
Auto merged
netware/Makefile.am:
Auto merged
netware/my_manage.c:
Auto merged
netware/my_manage.h:
Auto merged
netware/mysql_test_run.c:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_string.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/client_test.c:
Auto merged
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
libmysqld/Makefile.am:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
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/share/german/errmsg.txt:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/italian/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/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/structs.h:
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/serbian/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
include/my_sys.h:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_test.cc:
Auto merged
include/my_base.h:
Manually merged
sql/opt_range.cc:
Manually merged
sql/opt_range.h:
Manually merged
sql/sql_delete.cc:
Manually merged
sql/sql_update.cc:
Manually merged