into polly.(none):/home/kaa/src/opt/bug30666/my51-bug29131
mysql-test/r/select.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/sql_select.cc:
Auto merged
UNIQUE (eq-ref) lookups result in table being considered as a "constant" table.
Queries that consist of only constant tables are processed in do_select() in a
special way that doesn't invoke evaluate_join_record(), and therefore doesn't
increase the counters join->examined_rows and join->thd->row_count.
The patch increases these counters in this special case.
NOTICE:
This behavior seems to contradict what the documentation says in Sect. 5.11.4:
"Queries handled by the query cache are not added to the slow query log, nor
are queries that would not benefit from the presence of an index because the
table has zero rows or one row."
No test case in 5.0 as issue shows only in slow query log, and other counters
can give subtly different values (with regard to counting in create_sort_index(),
synthetic rows in ROLLUP, etc.).
sql/sql_class.h:
add documentation for some variables
sql/sql_select.cc:
Don't forget const tables when counting read records!
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge
sql/ha_ndbcluster.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/sql_parse.cc:
Manual merge.
sql/sql_select.cc:
Manual merge.
The bug is a regression introduced by the fix for bug30596. The problem
was that in cases when groups in GROUP BY correspond to only one row,
and there is ORDER BY, the GROUP BY was removed and the ORDER BY
rewritten to ORDER BY <group_by_columns> without checking if the
columns in GROUP BY and ORDER BY are compatible. This led to
incorrect ordering of the result set as it was sorted using the
GROUP BY columns. Additionaly, the code discarded ASC/DESC modifiers
from ORDER BY even if its columns were compatible with the GROUP BY
ones.
This patch fixes the regression by checking if ORDER BY columns form a
prefix of the GROUP BY ones, and rewriting ORDER BY only in that case,
preserving the ASC/DESC modifiers. That check is sufficient, since the
GROUP BY columns contain a unique index.
mysql-test/r/group_by.result:
Added a test case for bug #32202.
mysql-test/t/group_by.test:
Added a test case for bug #32202.
sql/sql_select.cc:
In cases when groups in GROUP BY correspond to only one row and there
is ORDER BY, rewrite the query to ORDER BY <group_by_columns> only if
the columns in ORDER BY and GROUP BY are compatible, i.e. either one
forms a prefix for another.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysql_upgrade.c:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlimport.c:
Auto merged
client/mysqlshow.c:
Auto merged
client/mysqlslap.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
mysys/mf_keycache.c:
Auto merged
mysys/my_init.c:
Auto merged
mysys/safemalloc.c:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_write.c:
Auto merged
sql/sql_yacc.yy:
Merged with 5.1 main tree.
and auto_increment keys
Problems:
1. ALTER TABLE ... ORDER BY... doesn't make sence if there's a
user-defined clustered index in the table.
2. using a secondary index is slower than using a clustered one
for a table scan.
Fixes:
1. raise a warning.
2. use the clustered index.
mysql-test/include/mix1.inc:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- test case.
mysql-test/r/innodb.result:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- results adjusted.
mysql-test/r/innodb_mysql.result:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- results adjusted.
mysql-test/r/join_outer_innodb.result:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- results adjusted.
sql/sql_select.cc:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- use the clustered index for a table scan (if any) as it's faster than
using a secondary index.
sql/sql_table.cc:
Fix for bug #26447: "ALTER TABLE .. ORDER" does not work with InnoDB
and auto_increment keys
- ALTER TABLE ... ORDER BY doesn't make sence if there's a
user-defined clustered index in the table. Ignore it in such cases
and raise a warning.
tables or more
The problem was that the optimizer used the join buffer in cases when
the result set is ordered by filesort. This resulted in the ORDER BY
clause being ignored, and the records being returned in the order
determined by the order of matching records in the last table in join.
Fixed by relaxing the condition in make_join_readinfo() to take
filesort-ordered result sets into account, not only index-ordered ones.
mysql-test/r/select.result:
Added a test case for bug #30666.
mysql-test/t/select.test:
Added a test case for bug #30666.
sql/sql_select.cc:
Relaxed the condition to determine when the join buffer usage must be
disabled. The condition is now true for cases when the result set is
ordered by filesort, that is when 'join->order &&
!join->skip_sort_order' is true.
The fix for bug 31148 is not correct. It does not
have a relation to the problem described in this bug.
And removing the fix will not make the bug to re-appear.
Fixed the bug #31974 by removing the fix for bug 31148
and adding a test case.
mysql-test/r/key.result:
Bug #31974: test case
mysql-test/t/key.test:
Bug #31974: test case
sql/sql_select.cc:
Bug #31974: revert the fix for bug 31148
added 'in_rows' column value for 'describe extended' for the case
when 'describe' handles I_S table
mysql-test/r/information_schema.result:
test result
mysql-test/t/information_schema.test:
test case
sql/sql_select.cc:
added 'in_rows' column value for 'describe extended' for the case
when 'describe' handles I_S table
into magare.gmz:/home/kgeorge/mysql/work/B31794-5.1-opt
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/sql_select.cc:
Auto merged
The HAVING clause is subject to the same rules as the SELECT list
about using aggregated and non-aggregated columns.
But this was not enforced when processing implicit grouping from
using aggregate functions.
Fixed by performing the same checks for HAVING as for SELECT.
mysql-test/r/func_group.result:
Bug #31794: test case
mysql-test/t/func_group.test:
Bug #31794: test case
sql/sql_select.cc:
Bug #31794: Check HAVING in addition to SELECT list
in evaluate_join_record().
A minor cleanup required for the fix for Bug#12713.
sql/sql_select.cc:
Use thd->is_error() instead of direct access to thd->net.report_error
in evaluate_join_record()
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1
client/mysqlcheck.c:
Auto merged
configure.in:
Auto merged
include/config-win.h:
Auto merged
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.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_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
sql/sql_lex.h:
SCCS merged
into lambda.weblab:/home/malff/TREE/mysql-5.1-rt-merge
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/select.result:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/protocol.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
client/client_priv.h:
Auto merged
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/protocol.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/query_cache.result:
manual merge
mysql-test/include/mix1.inc:
manual merge
mysql-test/r/innodb_mysql.result:
manual merge
mysql-test/r/type_datetime.result:
manual merge
mysql-test/r/type_decimal.result:
manual merge
mysql-test/t/query_cache.test:
manual merge
mysql-test/t/type_datetime.test:
manual merge
mysql-test/t/type_decimal.test:
manual merge
sql/item.cc:
manual merge
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/type_datetime.result:
manual merge
mysql-test/r/type_decimal.result:
manual merge
mysql-test/t/type_datetime.test:
manual merge
mysql-test/t/type_decimal.test:
manual merge
sql/item.cc:
manual merge
myisam/mi_write.c:
type conversion fixed
myisam/sort.c:
type conversion fixed
sql/ha_federated.cc:
type conversion fixed
sql/ha_heap.cc:
type conversion fixed
sql/ha_innodb.cc:
type conversion fixed
sql/ha_myisam.cc:
type conversion fixed
sql/opt_range.cc:
type conversion fixed
sql/sql_map.cc:
type conversion fixed
sql/sql_select.cc:
type conversion fixed
sql/sql_update.cc:
type conversion fixed
Assertion `table->key_read == 0' failed.
The problem was that key_read on a table in a sub-select was not
properly reset. That happens because the code responsible for that
is copy&pasted all around the server. In some place, it was obviously
forgotten to be pasted.
The fix is to reset key_read properly.
mysql-test/r/key.result:
Update result file.
mysql-test/t/key.test:
A test case for BUG#31148: bool close_thread_table(THD*, TABLE**):
Assertion `table->key_read == 0' failed.
sql/sql_select.cc:
Reset key_read before closing index.
into lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
client/mysqlcheck.c:
Auto merged
client/mysqltest.c:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
into polly.(none):/home/kaa/src/maint/mysql-5.1-maint
include/my_sys.h:
Auto merged
libmysql/Makefile.shared:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/records.cc:
Auto merged
sql/sql_array.h:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_select.cc:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
storage/myisam/ft_nlq_search.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
mysys/mf_keycache.c:
Manual merge.
mysys/mf_sort.c:
Manual merge.
mysys/my_lib.c:
Manual merge.
mysys/queues.c:
Manual merge.
sql/sql_acl.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
storage/csv/ha_tina.cc:
Manual merge.
storage/myisam/sort.c:
Manual merge.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmerge
BitKeeper/deleted/.del-ha_berkeley.cc:
Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
Auto merged
BitKeeper/triggers/post-commit:
Auto merged
client/mysqlcheck.c:
Auto merged
include/config-win.h:
Auto merged
include/my_dbug.h:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/structs.h:
Auto merged
sql/table.h:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
storage/ndb/src/common/util/File.cpp:
Auto merged
configure.in:
Manual merge.
sql/CMakeLists.txt:
Manual merge.
sql/mysql_priv.h:
Manual merge.
sql/mysqld.cc:
Manual merge.
sql/set_var.cc:
Manual merge.
sql/slave.cc:
Manual merge.
sql/sql_cache.cc:
Manual merge.
sql/sql_class.cc:
Manual merge.
sql/sql_lex.h:
Manual merge.
sql/sql_parse.cc:
Manual merge.
sql/sql_select.cc:
Manual merge.
sql/sql_show.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_update.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
CPUs / Intel's ICC compile
The bug is a combination of two problems:
1. IA64/ICC MySQL binaries use glibc's qsort(), not the one in mysys.
2. The order relation implemented by join_tab_cmp() is not transitive,
i.e. it is possible to choose such a, b and c that (a < b) && (b < c)
but (c < a). This implies that result of a sort using the relation
implemented by join_tab_cmp() depends on the order in which
elements are compared, i.e. the result is implementation-specific. Since
choose_plan() uses qsort() to pre-sort the
join tables using join_tab_cmp() as a compare function, the results of
the sorting may vary depending on qsort() implementation.
It is neither possible nor important to implement a better ordering
algorithm in join_tab_cmp(). Therefore the only way to fix it is to
force our own qsort() to be used by renaming it to my_qsort(), so we don't depend
on linker to decide that.
This patch also "fixes" bug #20530: qsort redefinition violates the
standard.
include/my_sys.h:
Renamed qsort() and qsort2() to my_qsort() and my_qsort2(). Since
previously we relied on stdlib.h to provide a declaration for qsort(), a
separate declaration for my_qsort() is now required.
libmysql/Makefile.shared:
Added mf_qsort.c to libmysql, since my_lib.c now uses my_qsort() instead of qsort().
myisam/ft_boolean_search.c:
Replaced qsort2() with my_qsort2().
myisam/ft_nlq_search.c:
Replaced qsort2() with my_qsort2().
myisam/myisampack.c:
Replaced qsort() with my_qsort().
myisam/sort.c:
Replaced qsort2() with my_qsort2().
mysys/mf_keycache.c:
Replaced qsort() with my_qsort().
mysys/mf_qsort.c:
Renamed qsort() to my_qsort() and qsort2() to my_qsort2().
mysys/mf_sort.c:
Replaced qsort2() with my_qsort2().
mysys/my_lib.c:
Replaced qsort() with my_qsort().
mysys/queues.c:
Replaced qsort2() with my_qsort2().
sql/item_cmpfunc.cc:
Replaced qsort2() with my_qsort2().
sql/item_cmpfunc.h:
Replaced qsort2() with my_qsort2().
sql/opt_range.cc:
Replaced qsort() with my_qsort().
sql/records.cc:
Replaced qsort() with my_qsort().
sql/sql_acl.cc:
Replaced qsort() with my_qsort().
sql/sql_array.h:
Replaced qsort() with my_qsort().
sql/sql_help.cc:
Replaced qsort() with my_qsort().
sql/sql_select.cc:
Replaced qsort() with my_qsort().
sql/examples/ha_tina.cc:
Replaced qsort() with my_qsort().
sql/sql_table.cc:
Replaced qsort() with my_qsort().
- Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options
- Added syncing of directory when creating .frm files
- Portability fixes
- Added missing cast that could cause bugs
- Code cleanups
- Made some bit functions inline
- Moved things out of myisam.h to my_handler.h to make them more accessable
- Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM)
- Fixed bugs in error conditions
- Use compiler time asserts instead of run time
- Fixed indentation
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong
(Added a define for old value to ensure we don't break any old code)
Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong)
- Initialize error messages early to get better errors when mysqld or an engine fails to start
- Fix windows bug that query_performance_frequency was not initialized if registry code failed
- thread_stack -> my_thread_stack_size
BitKeeper/etc/ignore:
added libmysqld/scheduler.cc libmysqld/sql_connect.cc libmysqld/sql_tablespace.cc
include/Makefile.am:
Added my_bit.h
include/m_string.h:
Added bzero_if_purify() to simplify code
include/my_base.h:
Reserve options for the future
Added HA_OPTION_NULL_FIELDS, HA_OPTION_PAGE_CHECKSUM, HA_CREATE_PAGE_CHECKSUM
Added new error message HA_ERR_NEW_FILE
Added optional new row type BLOCK_RECORD
Renamed HA_EXTRA_PREPARE_FOR_DELETE to HA_EXTRA_PREPARE_FOR_DROP
Added HA_EXTRA_PREARE_FOR_RENAME to inform handler we will do a rename
(Added define to make things compatible until 6.0)
Moved invalidator_by_filename form myisam.h
include/my_dbug.h:
Poirtablity fix
include/my_global.h:
Added helper macros STATIC_INLINE and MY_ERRPTR
Added NEED_EXPLICIT_SYNC_DIR
include/my_handler.h:
Added missing casts
Moved some constants and macros out from myisam.h to make these generally available
Renamed mi_compare_text() to ha_compare_text() as this function is not myisam specific
Renamed mi_portable_sizeof_char_ptr to portable_sizeof_char_ptr
Added registering of handler messages for better error reporting during startup
include/my_sys.h:
Added my_sync_dir() and my_sync_dir_by_file()
More comments
Some indentation fixes
Moved bit functions to my_bit.h
Added prototype for crc32()
include/myisam.h:
Moved things from here to my_handler.h to make them more accessable
libmysql/Makefile.shared:
Added my_sync
mysys/array.c:
Fixed indentation and spelling errors
Split set_dynamic() to two functions
Added allocate_dynamic() as a new visiable function
(no new code, only refactoring)
mysys/mf_iocache.c:
More DBUG
mysys/mf_keycache.c:
More explicite ASSERT
Removed some casts
Fixed indentation
mysys/mf_tempfile.c:
Fixed bug with possible dangling file descriptor
mysys/my_atomic.c:
Use compile time asserts instead of run time
mysys/my_bit.c:
Make most bit functions inline
mysys/my_bitmap.c:
Added my_bit.h
mysys/my_compress.c:
Fixed indentation
mysys/my_create.c:
Added my_sync_by_dir()
mysys/my_delete.c:
Added my_sync_by_dir()
mysys/my_error.c:
init_glob_errs() is now done in my_init()
mysys/my_handler.c:
mi_compare_text() -> ha_compare_text() as this is not MyISAM specific
Added functions to initialize handler error messages
Fixed indentation
More clear usage of include files
mysys/my_init.c:
Added my_thread_stack_size to be used by other programs
Ensure that global error messages are always initialized
Fix windows bug that query_performance_frequency was not initialized if registry code failed
mysys/my_open.c:
More comments
Removed duplicate code
mysys/my_pread.c:
Ensure that my_errno is set even if errno is 0
mysys/my_realloc.c:
Added comment
mysys/my_rename.c:
Added syncing of directories
mysys/my_symlink.c:
Added my_sync_by_dir()
mysys/my_sync.c:
Added my_sync_dir()
On recent Mac OS X, fcntl(F_FULLFSYNC) is recommended over fsync()
(see "man fsync" on Mac OS X 10.3).
my_sync_dir(): to sync a directory after a file creation/deletion/
renaming; can be called directly or via MY_SYNC_DIR in my_create/
my_delete/my_rename(). No-op except on Linux (see "man fsync" on Linux).
my_sync_dir_from_file(): same as above, just more practical when the
caller has a file name but no directory name ready.
Should the #warning even be a #error? I mean do we want to release
binaries which don't guarantee any durability?
mysys/safemalloc.c:
Added sf_malloc_report_allocated() (Debugging aid)
sql/gen_lex_hash.cc:
Remove inline for big function
sql/ha_partition.cc:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
prepare_for_delete -> prepare_for_rename() as this is the the time this function is called
sql/ha_partition.h:
prepare_for_delete -> prepare_for_rename() as this is the the time this function is called
sql/handler.cc:
ha_init_errors() is now called at startup before plugins
This allows us to get better error messages
sql/handler.h:
Reserve enum value for Maria
Add future proof enum for page checksums
sql/item_func.cc:
Include my_bit.h
sql/lex.h:
Added future proof CREATE table options
sql/log.cc:
Added comment
sql/mysql_priv.h:
thread_stack moved to mysys
sql/mysqld.cc:
thread_stack moved to mysys
thread_stack -> my_thread_stack_size
Initialize myisam key caches before plugins starts
Initialize error to allow storage engine to give better error messages if init failes.
Fixed indentation
Group all MyISAM options together
Added new status variable 'Opened_table_definitions' to allow one to monitor if table definition cache is too small
Clarified some option help messages
sql/opt_range.cc:
Removed wrong usage of SAFE_MODE (this disabled key usage for UPDATES, which was never the intention)
Removed print if total cost in a place where it didn't have any usable value
sql/set_var.cc:
thread_stack -> my_thread_stack
sql/sql_class.cc:
Intialize transaction object properly
sql/sql_parse.cc:
thread_stack -> my_thread_stack
sql/sql_select.cc:
Include my_bit.h
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
sql/sql_show.cc:
Simplify handling of ha_choice variables
Added future safe PAGE_CHECKSUM option
Addid missing 'transactional=#' in information schema
sql/sql_table.cc:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_FORCE_REOPEN when doing reopen
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_RENAME when doing rename
Removed not needed initialization
sql/sql_test.cc:
thread_stack -> my_thread_stack
sql/sql_yacc.yy:
Simplify handling of ha_choice variables
Added future proof create table options TABLE_CHECKSUM=# & PAGE_CHECKSUM=#
sql/table.cc:
Save page_checksum in .frm
sql/table.h:
Added variable to hold create table option PAGE_CHECKSUM
sql/unireg.cc:
Added syncing of directories
storage/myisam/ft_boolean_search.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_eval.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_nlq_search.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_parser.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_stopwords.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ft_test1.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/ft_update.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/ha_myisam.cc:
Include my_bit.h
storage/myisam/mi_check.c:
MI_MAX_POSSIBLE_KEY_BUFF -> HA_MAX_POSSIBLE_KEY_BUFF
mi_compare_text() -> ha_compare_text()
Added BLOCK_RECORD to avoid compiler warnings
storage/myisam/mi_checksum.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_create.c:
MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_dynrec.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_extra.c:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
storage/myisam/mi_open.c:
MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_packrec.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_range.c:
mi_compare_text -> ha_compare_text
storage/myisam/mi_test1.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_test2.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/mi_unique.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/mi_write.c:
mi_compare_text() -> ha_compare_text()
storage/myisam/myisamchk.c:
Include my_bit.h
storage/myisam/myisamdef.h:
Moved store_key_length_inc to handler.h
storage/myisam/myisampack.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisam/sp_test.c:
mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
storage/myisammrg/ha_myisammrg.cc:
HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
include/my_bit.h:
New BitKeeper file ``include/my_bit.h''
into mysql.com:/home/ram/work/b31249/b31249.5.1
sql/item_timefunc.h:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/type_datetime.result:
manual merge.
mysql-test/t/type_datetime.test:
manual merge.
bitmap_is_set(table->write_set, fiel
Problem: creating a temporary table we allocate the group buffer if needed
followed by table bitmaps (see create_tmp_table()). Reserving less memory for
the group buffer than actually needed (used) for values retrieval may lead
to overlapping with followed bitmaps in the memory pool that in turn leads
to unpredictable consequences.
As we use Item->max_length sometimes to calculate group buffer size,
it must be set to proper value. In this particular case
Item_datetime_typecast::max_length is too small.
Another problem is that we use max_length to calculate the group buffer
key length for items represented as DATE/TIME fields which is superfluous.
Fix: set Item_datetime_typecast::max_length properly,
accurately calculate the group buffer key length for items
represented as DATE/TIME fields in the buffer.
mysql-test/r/type_datetime.result:
Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel
- test result.
mysql-test/t/type_datetime.test:
Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel
- test case.
sql/item_timefunc.h:
Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel
- set Item_datetime_typecast::max_length properly.
sql/sql_select.cc:
Fix for bug #31249: Assertion `!table || (!table->write_set ||
bitmap_is_set(table->write_set, fiel
- the group buffer key length for items represented as
DATE/TIME fields in the buffer should be calculated using
the maximum pack length of such fields (== 8), using
max_length here is redundant.
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
libmysql/libmysql.c:
Manual merge.
A rule was introduced by the 5.1 part of the fix for bug 27531 to
prefer filesort over indexed ORDER BY when accessing all of the rows of a
table (because it's faster). This new rule was not accounting for the
presence of a LIMIT clause.
Fixed the condition for this rule so it will prefer filesort over
indexed ORDER BY only if no LIMIT.
mysql-test/r/compress.result:
Bug #31094: LIMIT is not considered a full index scan
mysql-test/r/join.result:
Bug #31094: test case
mysql-test/r/select.result:
Bug #31094: LIMIT is not considered a full index scan
mysql-test/r/ssl.result:
Bug #31094: LIMIT is not considered a full index scan
mysql-test/r/ssl_compress.result:
Bug #31094: LIMIT is not considered a full index scan
mysql-test/t/join.test:
Bug #31094: test case
sql/sql_select.cc:
Bug #31094: prefer filesort over indexed ORDER BY only if no LIMIT
when used in a VIEW.
The problem was that wrong function (create_tmp_from_item())
was used to create a temporary field for Item_func_sp.
The fix is to use create_tmp_from_field().
mysql-test/r/sp.result:
Update result file.
mysql-test/t/sp.test:
Add a test case for BUG#20550.
sql/item_func.h:
Add a getter for Item_func_sp::sp_result_field.
sql/sql_select.cc:
Use create_tmp_from_field() to create a temporary field
for Item_func_sp.
mysql-test/r/func_math.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.cc:
Auto merged
The change_to_use_tmp_fields function leaves the orig_table member of an
expression's tmp table field filled for the new Item_field being created.
Later orig_table is used by the Field::make_field function to provide some
info about original table and field name to a user. This is ok for a field
but for an expression it should be empty.
The change_to_use_tmp_fields function now resets orig_table member of
an expression's tmp table field to prevent providing a wrong info to a user.
The Field::make_field function now resets the table_name and the org_col_name
variables when the orig_table is set to 0.
sql/field.cc:
Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
The Field::make_field function now resets the table_name and the org_col_name
variables when the orig_table is set to 0.
sql/sql_select.cc:
Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
The change_to_use_tmp_fields function now resets orig_table member of
an expression's tmp table field to prevent providing a wrong info to a user.
tests/mysql_client_test.c:
The test case for the bug#21635 is altered to test behavior on both const and
non-const tables.
The optimizer takes different execution paths during EXPLAIN than SELECT,
this fix relates only to EXPLAIN, hence no behavior changes.
The test of sort keys for ORDER BY was prohibited from considering keys
that were mentioned in IGNORE KEYS FOR ORDER BY. This led to two
inconsistencies: One was that IGNORE INDEX FOR GROUP BY and
IGNORE INDEX FOR ORDER BY gave apparently different EXPLAINs; the latter
erroneously claimed to do filesort. The second inconsistency
is that the test of sort keys is called twice, finding a sort key the first
time but not the second time, leading to the mentioned filesort.
Fixed by making the test of sort keys consider all enabled
keys on the table. This test rejects keys that are not covering, and for
covering keys the hint should be ignored anyway.
mysql-test/r/group_by.result:
Bug#30665: Changed test result. The plan gets more efficient here.
The output is included in order to show that it is still correct.
mysql-test/r/order_by.result:
Bug#30665: Test result
mysql-test/t/group_by.test:
Bug#30665: Changed test case to show correctness of changed plan
mysql-test/t/order_by.test:
Bug#30665: Test case
sql/sql_select.cc:
Bug#30665:
- the fix: Give test_if_skip_sort_order all keys not the subset of non-disabled keys.
- Added comment to test_if_skip_sort_order
mysql-test/r/view.result:
merge of the fix for bug 27802 to 5.1
sql/item_cmpfunc.h:
merge of the fix for bug 27216 to 5.1
sql/sql_insert.cc:
merge of the fix for bug 27216 to 5.1
sql/sql_lex.h:
merge of the fix for bug 27802 to 5.1
sql/sql_select.cc:
merge of the fix for bug 27802 to 5.1
sql/table.h:
merge of the fix for bug 27802 to 5.1
When storing the VIEW the CREATE VIEW command is reconstructed
from the parse tree. While constructing the command string
the index hints specified should also be printed.
Fixed by adding code to print the index hints when printing a
table in the FROM clause.
mysql-test/r/view.result:
Bug #28702: test case
mysql-test/t/view.test:
Bug #28702: test case
sql/sql_select.cc:
Bug #28702: preserve index hints in a VIEW definition.
sql/table.h:
Bug #28702: preserve index hints in a VIEW definition.
into sita.local:/Users/tsmith/m/bk/maint/50
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
sql/sql_select.cc:
Auto merged
The optimizer sets index traversal in reverse order only if there are
used key parts that are not compared to a constant.
However using the primary key as an ORDER BY suffix rendered the check
incomplete : going in reverse order must still be used even if
all the parts of the secondary key are compared to a constant.
Fixed by relaxing the check and set reverse traversal even when all
the secondary index keyparts are compared to a const.
Also account for the case when all the primary keys are compared to a
constant.
mysql-test/r/innodb_mysql.result:
Bug #31001: test case
mysql-test/t/innodb_mysql.test:
Bug #31001: test case
sql/sql_select.cc:
Bug #31001:
- account for the case when all the primary key parts are compared
to a constant
- force test_if_skip_sort_order to go backwards over the key even
when the number of keyparts used is the same as the number of
keyparts equal to a constant. (because of the primary key
suffix).
into linux-st28.site:/home/martin/mysql/src/bugx/my50-bugx
mysql-test/t/innodb_mysql.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
SCCS merged
into magare.gmz:/home/kgeorge/mysql/work/B30377-5.1-opt
mysql-test/t/status.test:
Auto merged
mysql-test/r/status.result:
merge 5.0->5.1 of the fix for bug 30377
sql/sql_lex.h:
merge 5.0->5.1 of the fix for bug 30377
sql/sql_select.cc:
merge 5.0->5.1 of the fix for bug 30377
The optimization that uses a unique index to remove GROUP BY did not
ensure that the index was actually used, thus violating the ORDER BY
that is implied by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index over non-nullable field(s). In case GROUP BY ... ORDER BY
null is used, GROUP BY is simply removed.
mysql-test/include/mix1.inc:
Bug#30596: Test case for InnoDB
Here, as opposed to for MyISAM, row lookup is done using index
whenever the index covers the group list.
mysql-test/r/distinct.result:
Bug#30596: Changed test case.
Prior to Bug#16458, These queries use temp table and filesort. The
bug was that they used a temp table. However, that patch removed
filesort also, in which case we can no longer gurantee correct ordering.
mysql-test/r/group_by.result:
Bug#30596: Correct result
The test case for IGNORE INDEX FOR GROUP BY gets degraded performance
(unneccesary filesort). This is due to Bug#30665, which will be fixed separately.
mysql-test/r/innodb_mysql.result:
Bug#30596: Test result
mysql-test/t/group_by.test:
Bug#30596: Test case
sql/sql_select.cc:
Bug#30596: The fix:
- replace GROUP BY with ORDER BY unless ORDER BY [NULL|<constant>]
- make sure to use the keys for GROUP BY in this ORDER BY.
Currently the Last_query_cost session status variable shows
only the cost of a single flat subselect. For complex queries
(with subselects or unions etc) Last_query_cost is not valid
as it was showing the cost for the last optimized subselect.
Fixed by reseting to zero Last_query_cost when the complete
cost of the query cannot be determined.
Last_query_cost will be non-zero only for single flat queries.
mysql-test/r/status.result:
Bug #30377: test case
mysql-test/t/status.test:
Bug #30377: test case
sql/sql_lex.h:
Bug #30377: helper function
sql/sql_select.cc:
Bug #30377: don't assign cost if not on single level statement
The optimization that uses a unique index to remove GROUP BY, did not
ensure that the index was actually used, thus violating the ORDER BY
that is impled by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
simply removed.
BitKeeper/etc/ignore:
Added support-files/mysqld_multi.server tests/bug25714 cscope.in.out cscope.out cscope.po.out to the ignore list
mysql-test/r/distinct.result:
Bug#30596: Changed test case.
Prior to Bug#16458, These queries use temp table and filesort. The
bug was that they used a temp table. However, that patch removed
filesort also, in which case we can no longer gurantee correct ordering.
mysql-test/r/group_by.result:
Bug#30596: Correct result
mysql-test/r/innodb_mysql.result:
Bug#30596: Test case for innodb. Here, as opposed to for MyISAM, row
lookup is done using index whenever the index covers the group list.
mysql-test/t/group_by.test:
Bug#30596: Test case
mysql-test/t/innodb_mysql.test:
Bug#30596: Test case
sql/sql_select.cc:
Bug#30596: The fix, replacing GROUP BY with ORDER BY unless
ORDER BY [NULL|<constant>]
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/type_bit.result:
Auto merged
mysql-test/t/type_bit.test:
Auto merged
sql/sql_select.cc:
Merge with 5.0-opt.
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
libmysql/libmysql.c:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
libmysql/libmysql.c:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
into bk-internal.mysql.com:/users/gshchepa/mysql-5.1-opt
sql/item.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
client/mysqldump.c:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_yacc.yy:
Manual merge.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
client/mysqldump.c:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_yacc.yy:
Manual merge with 5.1 main tree.
into trift2.:/MySQL/M51/push-5.1
Includes manual merges.
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/suite/ndb/r/ndb_dd_basic.result:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event_old.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/unireg.h:
Auto merged
mysql-test/r/status.result:
Manual merge of two incompatible fixes to test "status".
mysql-test/t/status.test:
Manual merge of two incompatible fixes to test "status".
sql/log_event.cc:
Manual merge.
sql/log_event.h:
Manual merge.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
mysql-test/mysql-test-run.pl:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event_old.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/status.result:
Manual merge with main 5.0 tree.
mysql-test/t/status.test:
Manual merge with main 5.0 tree.
sql/log_event.cc:
Manual merge with main 5.0 tree.
sql/log_event.h:
Manual merge with main 5.0 tree.
The server created temporary tables for filesort in the working directory
instead of the specified tmpdir directory.
sql/item.cc:
Fixed bug #30287.
The Item_field::set_field method has been modified to reset the any_privileges
flag to false in case of system temporary table. This modification prevents the
server from unnecessary checking of user privileges to access system temporary
tables.
sql/sql_select.cc:
Fixed bug #30287.
Bugfix for #29015 has been removed: TABLE_SHARE::table_name of system
temporary tables contains full path to table file basename again.
sql/sql_view.cc:
Fixed bug #30287.
Commentary has been added.
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/log_event.h:
Auto merged
sql/rpl_record.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
HEAP tables can't index BIT fields. Due to this when grouping by such fields is
needed they are converted to a fields of the LONG type when temporary table
is being created. But a side effect of this is that a wrong type of BIT
fields is returned to a client.
Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
mysql-test/t/type_bit.test:
Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it.
mysql-test/r/type_bit.result:
Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it.
sql/sql_select.cc:
Bug#30245: A wrong type of a BIT field is reported when grouped by it.
Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
into olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-bug30396
libmysql/libmysql.c:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Manual merge
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
mysql-test/r/select.result:
Added a test case for bug #30396.
mysql-test/t/select.test:
Added a test case for bug #30396.
sql/item_cmpfunc.h:
Removed max_members from the COND_EQUAL class as not useful anymore.
sql/sql_base.cc:
Added the max_equal_elems field to the st_select_lex structure.
sql/sql_lex.cc:
Added the max_equal_elems field to the st_select_lex structure.
sql/sql_lex.h:
Added the max_equal_elems field to the st_select_lex structure.
The field contains the maximal number of elements in multiple equalities
built for the query conditions.
sql/sql_select.cc:
Fixed bug #30396.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
The max_equal_elems field to the st_select_lex structure is used now
to calculate the above mentioned upper bound. The field contains the
maximal number of elements in multiple equalities built for the query
conditions.
into mysql.com:/home/my/mysql-5.1
configure.in:
Auto merged
client/mysql.cc:
Auto merged
include/m_ctype.h:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
storage/myisam/mi_rkey.c:
Auto merged
client/mysqldump.c:
Manual merge (trivial)
scripts/mysql_install_db.sh:
Complex merge (parital rewrite of new code)
sql/sql_show.cc:
Manual merge
tests/mysql_client_test.c:
then
if ! test -x "$print_defaults"
then
missing_in_basedir my_print_defaults
exit 1
fi
else
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db
I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read() -> index_read_map()
index_read_idx() -> index_read_idx_map()
index_read_last() -> index_read_last_map()
BUILD/compile-solaris-sparc-forte:
Updated script to current Solaris installations
Now we compile by default for 64 bits
client/mysql.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
client/mysql_upgrade.c:
Fixed compiler warning (on Forte)
client/mysqladmin.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
client/mysqlcheck.c:
Fixed compiler warning (on Forte)
client/mysqldump.c:
Fixed compiler warning (on Forte)
client/mysqlslap.c:
Fixed compiler warning (on Forte)
client/mysqltest.c:
Fixed compiler warning (on Forte)
client/sql_string.cc:
Avoid compiler warnings when using C function pointers in C++
configure.in:
Added detection of mtmalloc and ieeefp.h
extra/replace.c:
Fixed compiler warning (on Forte)
include/m_ctype.h:
Added some typedef's to make it easy to use C function pointers in C++
include/my_sys.h:
Added my_file_total_opened (counter for calls to my_open())
include/myisam.h:
Fixed compiler warning (on Forte)
libmysql/libmysql.c:
Fixed compiler warning (on Forte) by adding casts and change types
libmysql/manager.c:
Fixed compiler warning (on Forte) by adding casts and change types
mysql-test/r/ctype_cp932_binlog_stm.result:
Updated positions
(Needed because we didn't before correctly restore collation_database after running stored procedure
mysys/my_fopen.c:
Count number of opened files
mysys/my_open.c:
Count number of opened files
mysys/my_static.c:
Count number of opened files
mysys/thr_alarm.c:
Optimization to do less alarm() and pthread_sigmask() calls.
Idea is to remember time for next pending alarm and not reschedule a new alarm if it's after the current one.
Before we only did this if there was other pending alarms.
We don't have to use pthread_sigmask() in case of 'USE_ONE_SIGNAL_HAND' as the alarm()
signal will be blocked for the calling thread anyway and no other thread will have the alarm() signal enabled to call process_alarm()
regex/regcomp.c:
Fixed compiler warning (on Forte) by adding casts and change types
scripts/mysql_install_db.sh:
Added option --source-install to allow one to create a mysql database from the source tree without installing MySQL
Don't give (unnecessary) warnings
server-tools/instance-manager/angel.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
server-tools/instance-manager/thread_registry.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/event_db_repository.cc:
index_read() -> index_read_map()
sql/event_queue.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/field.cc:
Fixed compiler warnings about hidden fields
sql/ha_partition.cc:
Fixed compiler warnings about hidden fields
index_read() -> index_read_map()
sql/ha_partition.h:
index_read() -> index_read_map()
sql/handler.cc:
Added PAGE option to row types (to prepare for future)
index_read() -> index_read_map()
sql/handler.h:
Added ROW_TYPE_PAGE (for future)
Added flag to signal if table was to be created transactionally
I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read() -> index_read_map()
index_read_idx() -> index_read_idx_map()
index_read_last() -> index_read_last_map()
sql/item.cc:
Fixed indentation
Renamed local variable to avoid hiding class variable
sql/item_cmpfunc.cc:
Renamed local variable to avoid hiding class variable
sql/item_cmpfunc.h:
Removed not used variable
sql/item_func.cc:
Renamed local variable to avoid hiding class variable
sql/item_strfunc.cc:
Moved functions from Item_strfunc.cc
sql/item_strfunc.h:
Move functions to item_strfunc.cc
Use C function pointer type to avoid compiler warnings (with Forte)
sql/item_subselect.cc:
index_read() -> index_read_map()
sql/item_xmlfunc.cc:
Renamed local variable to avoid hiding class variable
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/key.cc:
Fixed indentation
sql/log.cc:
Renamed local variable to avoid hiding class variable
sql/log_event.cc:
Removed call to my_time() when creating class instance of Log_event() as this may have static instances.
(One can't call my_time() before my_init())
index_read() -> index_read_map()
Renamed local variable to avoid hiding class variable
sql/log_event_old.cc:
Renamed local variable to avoid hiding class variable
sql/mysql_priv.h:
Made all create_backup_ctx() declarations identical.
This lifted up a bug where wrong create_backup_ctx() was called in some cases.
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/mysqld.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
Fixed indentation
Don't call end_thr_alarm() when calling unireg_abort() as unireg_abort() already calls end_thr_alarm()
Added variable 'Opened_files' (number of calls to my_open() or my_fopen())
Don't print 'loose' warnings when using --bootstrap (to avoid warnings when running mysql_install_db)
Fixed compiler warnings
sql/opt_range.cc:
index_read() -> index_read_map()
sql/opt_sum.cc:
index_read() -> index_read_map()
sql/partition_info.cc:
Renamed local variable to avoid hiding class variable
sql/rpl_filter.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/set_var.cc:
Renamed local variable to avoid hiding class variable
Added 'process_key_cache_t' type to avoid compiler warning (on Forte)
sql/set_var.h:
Added 'process_key_cache_t' type to avoid compiler warning (on Forte)
sql/sp.cc:
More debugging
index_read() -> index_read_map()
sql/sp_cache.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sp_head.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
Moved 'saved_creation_ctx' higher up to be able to free objects allocated by create_backup_ctx()
sql/sql_acl.cc:
index_read() -> index_read_map()
sql/sql_class.cc:
Renamed local variable to avoid hiding class variable
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sql_class.h:
Renamed local variable to avoid hiding class variable
sql/sql_db.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sql_delete.cc:
Renamed local variable to avoid hiding class variable
sql/sql_handler.cc:
index_read() -> index_read_map()
sql/sql_help.cc:
index_read() -> index_read_map()
sql/sql_insert.cc:
index_read() -> index_read_map()
Renamed local variable to avoid hiding class variable
sql/sql_lex.cc:
Renamed local variable to avoid hiding class variable
sql/sql_plugin.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
index_read() -> index_read_map()
Don't give warnings about not used plugins if we are using --warnings=0
sql/sql_select.cc:
index_read() -> index_read_map()
sql-common/client.c:
Fixed compiler warning (on Forte)
sql-common/my_time.c:
Removed never accessed code
Fixed compiler warning (on Forte)
sql/sql_servers.cc:
index_read() -> index_read_map()
sql/sql_show.cc:
Added TRANSACTIONAL to SHOW CREATE
Fixed ROW_TYPE_PAGE
sql/sql_string.cc:
Avoid compiler warnings when using C function pointers in C++
sql/sql_table.cc:
Set create_info->transactional if we used TRANSACTIONAL=1
sql/sql_udf.cc:
index_read() -> index_read_map()
sql/sql_yacc.yy:
Added TRANSACTIONAL=0|1 to CREATE (for future)
Added row type PAGE (was only partionally handled before)
sql/strfunc.cc:
Avoid compiler warnings when using C function pointers in C++
sql/table.cc:
More DBUG statements
Declare all create_backup_ctx() functions identically
Remember if table was created with TRANSACTIONAL flag or not (future safe)
Renamed local variable to avoid hiding class variable
sql/table.h:
Remember if table was created with TRANSACTIONAL=1
sql/tztime.cc:
index_read() -> index_read_map()
sql-common/pack.c:
Fixed compiler warning (on Forte)
storage/archive/archive_reader.c:
Fixed compiler warning (on Forte)
storage/archive/azio.c:
Fixed compiler warning (on Forte)
storage/blackhole/ha_blackhole.cc:
index_read() -> index_read_map()
storage/blackhole/ha_blackhole.h:
index_read() -> index_read_map()
storage/csv/ha_tina.cc:
Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
storage/example/ha_example.cc:
index_read() -> index_read_map()
storage/example/ha_example.h:
index_read() -> index_read_map()
storage/heap/ha_heap.cc:
index_read() -> index_read_map()
storage/heap/ha_heap.h:
index_read() -> index_read_map()
storage/heap/hp_test1.c:
Fixed compiler warning (on Forte)
storage/heap/hp_test2.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_boolean_search.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_nlq_search.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_parser.c:
Fixed compiler warning (on Forte)
storage/myisam/ft_stopwords.c:
Fixed compiler warning (on Forte)
storage/myisam/ha_myisam.cc:
index_read() -> index_read_map()
storage/myisam/ha_myisam.h:
index_read() -> index_read_map()
storage/myisam/mi_check.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_delete.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_dynrec.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_extra.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_key.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_keycache.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_locking.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_log.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_open.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_packrec.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_page.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_rkey.c:
Added comment
storage/myisam/mi_search.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_statrec.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_test1.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_test2.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_test3.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_update.c:
Fixed compiler warning (on Forte)
storage/myisam/mi_write.c:
Fixed compiler warning (on Forte)
storage/myisam/myisamdef.h:
Fixed that file_read/file_write returns type size_t
Changed some functions to use uchar * as argument/return value instead of char*
This fixed some compiler warnings on Forte
storage/myisam/myisamlog.c:
Fixed compiler warning (on Forte)
storage/myisam/myisampack.c:
Fixed compiler warning (on Forte)
storage/myisam/rt_test.c:
Fixed compiler warning (on Forte)
storage/myisam/sort.c:
Fixed compiler warning (on Forte) by adding casts or changing variables to uchar*
storage/myisam/sp_test.c:
Fixed compiler warning (on Forte) by adding casts or changing variables to uchar*
storage/myisammrg/ha_myisammrg.cc:
index_read() -> index_read_map()
storage/myisammrg/ha_myisammrg.h:
index_read() -> index_read_map()
storage/myisammrg/myrg_create.c:
Fixed compiler warning (on Forte) by adding casts or changing variable types
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
Tdummy -> align (as in other part of cluster code)
storage/ndb/src/kernel/vm/DynArr256.cpp:
Removed not used variable
storage/ndb/src/ndbapi/Ndb.cpp:
Removed not used variable
strings/strtod.c:
Include ieeefp.h to avoid compiler warning
tests/bug25714.c:
Fixed compiler warning
tests/mysql_client_test.c:
Remove not used variable
Fixed indentation
Removed never reached code
Fixed compiler warning (on Forte) by adding casts or changing variable types
vio/viosocket.c:
Fixed compiler warning (on Forte) by adding casts or changing variable types
into gleb.loc:/home/uchum/work/bk/5.1-opt
sql/field.cc:
Auto merged
BitKeeper/deleted/.del-readme.txt~3:
Auto merged
sql/field.h:
Auto merged
sql/handler.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/unireg.h:
Auto merged
sql/sql_select.cc:
Merge with main tree.
into olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-merge
mysql-test/include/read_many_rows.inc:
Auto merged
mysql-test/r/events_bugs.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/read_many_rows_innodb.result:
Auto merged
sql/handler.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_rcontext.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_class.h:
Manual merge.
storage/innobase/handler/ha_innodb.cc:
Manual merge.
into olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-bug28404
mysql-test/r/group_by.result:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-marvel-engines
BitKeeper/etc/ignore:
auto-union
configure.in:
Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~99a50df6:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqldump.c:
Auto merged
include/mysql.h:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
sql/sql_parse.cc:
merge fix
sql/sql_select.cc:
merge fix
client/mysqldump.c:
table type compare is changed to case insensitive
mysql-test/r/information_schema.result:
test result
mysql-test/r/information_schema_db.result:
result fix
mysql-test/suite/ndb/r/ndb_alter_table.result:
result fix
mysql-test/suite/ndb/r/ndb_temporary.result:
result fix
mysql-test/t/information_schema.test:
test case
sql/ha_ndbcluster.cc:
char* variables are changed to LEX_STRING
sql/ha_ndbcluster.h:
char* variables are changed to LEX_STRING
sql/ha_ndbcluster_binlog.cc:
char* variables are changed to LEX_STRING
sql/handler.cc:
char* variables are changed to LEX_STRING
sql/handler.h:
char* variables are changed to LEX_STRING
sql/sql_base.cc:
Modified functions which are used during open table process
according to table opening method and requested_object.
sql/sql_select.cc:
Add support for I_S tables into select_describe() function
sql/sql_show.cc:
1. Added initialization of 'open_method' to 'st_field_info' structs.
2. Added initialization of 'i_s_requested_object' to 'ST_SCHEMA_TABLE' structs.
3. New function which calculates database name and table name values
from 'where' condition if it's possible
void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *table,
LOOKUP_FIELD_VALUES *lookup_field_vals);
4. New function which set table open method
setup_table_open_method(TABLE_LIST *tables,
ST_SCHEMA_TABLE *schema_table,
enum enum_schema_tables schema_table_idx)
5. New function
int make_db_list(THD *thd, List<LEX_STRING> *files,
LOOKUP_FIELD_VALUES *lookup_field_vals,
bool *with_i_schema)
6. New function
int make_table_name_list(THD *thd, List<LEX_STRING> *files, LEX *lex,
LOOKUP_FIELD_VALUES *lookup_field_vals,
bool with_i_schema, LEX_STRING *db_name)
7. Modified 'get_all_tables' function according to new schema(see wl#3732).
sql/sql_show.h:
char* variables are changed to LEX_STRING
sql/table.cc:
Modified functions which are used during open table process
according to table opening method and requested_object.
sql/table.h:
1. added new constants(open_method)
#define SKIP_OPEN_TABLE 0
#define OPEN_FRM_ONLY 1
#define OPEN_FULL_TABLE 2
2. Added new field 'open_method' into struct st_field_info;
uint open_method;
3. Added new field into ST_SCHEMA_TABLE struct
uint i_s_requested_object; /* the object we need to open(TABLE | VIEW) */.
4. Added new field to TABLE_LIST struct.
uint i_s_requested_object;
This field is set from ST_SCHEMA_TABLE.i_s_requested_object
for processed table before opening.
5. Added new fields to TABLE_LIST struct, used for 'explain select' for I_S table
bool has_db_lookup_value;
bool has_table_lookup_value;
uint table_open_method;
sql/unireg.h:
added new constants
This patch adds cost estimation for the queries with ORDER BY / GROUP BY
and LIMIT.
If there was a ref/range access to the table whose rows were required
to be ordered in the result set the optimizer always employed this access
though a scan by a different index that was compatible with the required
order could be cheaper to produce the first L rows of the result set.
Now for such queries the optimizer makes a choice between the cheapest
ref/range accesses not compatible with the given order and index scans
compatible with it.
mysql-test/r/distinct.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/endspace.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/group_by.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/group_min_max.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/innodb.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/innodb_mysql.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/merge.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/order_by.result:
Added a test case for bug #28404.
mysql-test/r/select_found.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/r/subselect.result:
Adjusted results for test cases affected fy the fix for bug #28404.
mysql-test/t/distinct.test:
Changed a test case after adding the fix for bug #28404.
mysql-test/t/order_by.test:
Added a test case for bug #28404.
sql/sql_select.cc:
Fixed bug#28404.
This patch adds cost estimation for the queries with ORDER BY / GROUP BY
and LIMIT.
Now for such queries the optimizer makes a choice between the cheapest
ref/range accesses not compatible with the given order and index scans
compatible with it.
Modified the function test_if_skip_sort_order to make the above mentioned
choice cost based.
sql/sql_select.h:
Fixed bug#28404.
This patch adds cost estimation for the queries with ORDER BY / GROUP BY
and LIMIT.
Added a new field fot the JOIN_TAB structure.
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
sql/handler.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_rcontext.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_union.cc:
Auto merged
mysql-test/include/read_many_rows.inc:
Manually merged
mysql-test/r/read_many_rows_innodb.result:
Manually merged
sql/sql_class.cc:
Manually merged
sql/sql_class.h:
Manually merged
storage/innobase/handler/ha_innodb.cc:
Manually merged
into mysql.com:/home/my/mysql-5.1
client/client_priv.h:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlslap.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_cache.cc:
Manual merge
Removed comment about bug in old code (not relevant)
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_rcontext.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
mysql-test/include/read_many_rows.inc:
Manual merge
mysql-test/r/read_many_rows_innodb.result:
Manual merge
sql/sql_class.cc:
Manual merge
sql/sql_class.h:
Manual merge
storage/innobase/handler/ha_innodb.cc:
Manual merge
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/show_check.test:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/log.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
into ramayana.hindu.god:/home/tsmith/m/bk/maint/jul31/51
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/federated/ha_federated.h:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
mysql-test/include/mix1.inc:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
Use size_t instead of uint when calculating join buffer size, because uint can be overflown on 64-bit platforms and join_buffer_size > 4 GB.
The test case for this bug is a part of the test suite for bug #5731.
sql/sql_select.cc:
Use size_t instead of uint when calculating join buffer size, because uint can be overflown on 64-bit platforms and join_buffer_size > 4G.
- Don't call mysql_select() several times for the select that enumerates
a temporary table with the results of the UNION. Making this call for
every subquery execution caused O(#enumerated-rows-in-the-outer-query)
memory allocations.
- Instead, call join->reinit() and join->exec(), and
= disable constant table detection for such joins,
= provide special handling for table-less constant subqueries.
sql/sql_select.cc:
BUG#29582: huge memory consumption with union, subselect, joins:
- Don't mark tables as constant if JOIN::no_const_tables flag is set
sql/sql_select.h:
BUG#29582: huge memory consumption with union, subselect, joins:
- Don't mark tables as constant if JOIN::no_const_tables flag is set
sql/sql_union.cc:
BUG#29582: huge memory consumption with union, subselect, joins:
- Don't call mysql_select() several times for the select that enumerates
a temporary table with UNION results.
- Instead, call join->reinit() and join->exec().
- Provide special handling for table-less constant subqueries.
into mysql.com:/home/hf/work/29717/my51-29717
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/t/group_by.test:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
SELECT statement itself returns empty.
As a result of this bug 'SELECT AGGREGATE_FUNCTION(fld) ... GROUP BY'
can return one row instead of an empty result set.
When GROUP BY only has fields of constant tables
(with a single row), the optimizer deletes the group_list.
After that we lose the information about whether we had an
GROUP BY statement. Though it's important
as SELECT min(x) from empty_table; and
SELECT min(x) from empty_table GROUP BY y; have to return
different results - the first query should return one row,
second - an empty result set.
So here we add the 'group_optimized_away' flag to remember this case
when GROUP BY exists in the query and is removed
by the optimizer, and check this flag in end_send_group()
mysql-test/r/group_by.result:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
test result
mysql-test/r/insert_select.result:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
test result
mysql-test/t/group_by.test:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
This is additional testcase that is more basic than the
original bug's testcase and has the same reason.
mysql-test/t/insert_select.test:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
test case
sql/sql_select.cc:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
Remember the 'GROUP BY was optimized away' case in the JOIN::group_optimized
and check this in the end_send_group()
sql/sql_select.h:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
JOIN::group_optimized member added to remember the 'GROUP BY optimied away'
case
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime() (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init()
include/my_getopt.h:
Added support for double arguments
include/my_sys.h:
Fixed wrong type to packfrm()
Added new my_time functions
include/mysql/plugin.h:
Added support for DOUBLE
libmysql/CMakeLists.txt:
Added new time functions
libmysql/Makefile.shared:
Added new time functions
mysql-test/r/variables.result:
Testing of long_query_time
mysql-test/t/variables.test:
Testing of long_query_time
mysys/charset.c:
Fixed compiler warnings
mysys/default_modify.c:
Fixed compiler warnings
mysys/hash.c:
Fixed compiler warnings
mysys/mf_getdate.c:
Use my_time()
mysys/mf_iocache2.c:
Fixed compiler warnings
mysys/mf_pack.c:
Fixed compiler warnings
mysys/mf_path.c:
Fixed compiler warnings
mysys/my_append.c:
Fixed compiler warnings
mysys/my_compress.c:
Fixed compiler warnings
mysys/my_copy.c:
Fixed compiler warnings
mysys/my_gethwaddr.c:
Fixed compiler warnings
mysys/my_getopt.c:
Added support for double arguments
mysys/my_getsystime.c:
Added functions to get time in microseconds.
Added faster time() functions for system that has gethrtime() (Solaris)
Moved windows initialization code to my_init()
mysys/my_init.c:
Added initializing of variables needed for windows time functions
mysys/my_static.c:
Added variables needed for windows time functions
mysys/my_static.h:
Added variables needed for windows time functions
mysys/my_thr_init.c:
Added THR_LOCK_time, used for faster my_time()
mysys/mysys_priv.h:
Added THR_LOCK_time, used for faster my_time()
mysys/thr_alarm.c:
time() -> my_time()
sql/event_data_objects.cc:
end_time() -> set_current_time()
sql/event_queue.cc:
end_time() -> set_current_time()
sql/event_scheduler.cc:
Fixed compiler warnings
sql/field.h:
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
sql/item.h:
Added decimal to Item_float(double)
sql/item_cmpfunc.h:
Added decimal to Item_float(double)
sql/item_timefunc.cc:
time() -> my_time()
sql/item_xmlfunc.cc:
Fixed compiler warning
sql/lock.cc:
lock_time() -> set_time_after_lock()
sql/log.cc:
Timing in slow query log to file is now done in microseconds
Changed some while() loops to for() loops.
Fixed indentation
time() -> my_time()
sql/log.h:
Slow query logging is now done based on microseconds
sql/log_event.cc:
time() -> my_time()
Fixed arguments to new Item_float()
sql/mysql_priv.h:
Fixed compiler warnings
Added opt_log_slow_slave_statements
sql/mysqld.cc:
Added --log_slow_slave_statements and --min_examined_row_limit
--long-query-time now takes a double argument with microsecond resolution
Don't write shutdown message when using --help
Removed not needed \n
Thread create time and connect time is now done in microseconds
time() -> my_time()
Avoid some time() calls
sql/net_serv.cc:
Fixed compiler warnings
sql/parse_file.cc:
time() -> my_time()
sql/set_var.cc:
Added support for DOUBLE variables
Added support for variables that are given in seconds with microsecond resolution
sql/set_var.h:
Added support for variables that are given in seconds with microsecond resolution
sql/slave.cc:
Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given
time() -> my_time()
sql/sql_cache.h:
Fixed compiler warning()
sql/sql_class.cc:
Initialize new THD variables
sql/sql_class.h:
long_query_time is now in microseconds
Added min_examined_row_limit
Reordered some THD elements for higher efficency
Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock)
Start of query is now recorded both in seconds and in microseconds.
Following renames was made for more clarity and avoid merge problems from earlier versions:
connect_time -> connect_utime
thr_create_time -> thr_create_utime
end_time() -> set_current_time()
lock_time() -> set_time_after_lock()
Added THD::start_utime, which is start of query in microseconds from some arbitary time
Added function THD::current_utime()
Removed safe_time() as retry's are handled in my_time()
sql/sql_connect.cc:
User resources are now using microsecond resolution
sql/sql_insert.cc:
end_time() -> set_current_time()
sql-common/client.c:
time() -> my_time()
sql/sql_parse.cc:
Testing if we should print to slow_query_log() is now done with microsecond precission.
If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this.
sql/sql_select.cc:
Simplify code now that Item_float() takes decimals as argument
sql/sql_show.cc:
time() -> my_time()
Added support for SYS_DOUBLE
sql/sql_table.cc:
Added debug function for stopping in mysql_admin_table() when tables are locked
sql/structs.h:
intime -> reset_utime
Use size_t instead of uint when calculating join buffer size, because uint can be overflown on 64-bit platforms and join_buffer_size > 4 GB.
The test case for this bug is a part of the test suite for bug #5731.
sql/sql_select.cc:
Use size_t instead of uint when calculating join buffer size, because uint can be overflown on 64-bit platforms and join_buffer_size > 4G.
into gleb.loc:/home/uchum/work/bk/5.1-opt
sql/sql_insert.cc:
Auto merged
BitKeeper/deleted/.del-bdb.result:
Auto merged
BitKeeper/deleted/.del-ha_berkeley.cc:
Auto merged
BitKeeper/deleted/.del-rpl_insert_delayed.result:
Auto merged
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
Auto merged
sql/sql_select.cc:
Merge with 5.0-opt.
sql/table.cc:
Merge with 5.0-opt.
- make ha_berkeley::cmp_ref() take into account that auto-generated PKs
are stored in LSB-first order.
- Remove the temporary code that made the bugfix work for innodb only
mysql-test/r/bdb.result:
Adjust test-results.
sql/ha_berkeley.cc:
BUG#28591: make the fix work for BDB tables too:
- make ha_berkeley::cmp_ref() take into account that auto-generated PKs
are stored in LSB-first order.
sql/sql_select.cc:
BUG#28591: Remove "innodb only" clause as the fix now works for BDB too
sql/table.cc:
BUG#28591: Remove "innodb only" clause as the fix now works for BDB too
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/having.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/having.test:
Auto merged
sql/field.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/include/mix1.inc:
Merge with 5.0-opt.
mysql-test/r/create.result:
Merge with 5.0-opt.
mysql-test/r/innodb_mysql.result:
Merge with 5.0-opt.
mysql-test/r/type_enum.result:
Merge with 5.0-opt.
mysql-test/t/type_enum.test:
Merge with 5.0-opt.
sql/filesort.cc:
Merge with 5.0-opt.
sql/sql_base.cc:
Merge with 5.0-opt.
sql/table.cc:
Merge with 5.0-opt.
storage/innobase/handler/ha_innodb.cc:
Merge with 5.0-opt.
Now we don't take any mutexes when creating or dropping internal HEAP tables during SELECT.
Change buffer sizes to size_t to make keycache 64 bit safe on platforms where sizeof(ulong) != sizeof(size_t)
BitKeeper/etc/ignore:
added support-files/mysqld_multi.server
include/heap.h:
Added 'internal_table' to HP_CREATE_INFO
include/keycache.h:
Change buffer sizes to size_t to make keycache 64 bit safe
include/my_base.h:
Added HA_OPEN_INTERNAL_TABLE to mark temporary tables that should be deleted on close
mysys/mf_keycache.c:
Change buffer sizes to size_t to make keycache 64 bit safe
sql/sql_select.cc:
Added HA_OPEN_INTERNAL_TABLE to mark temporary tables that should be deleted on close
Removed not anymore needed call to delete_table()
storage/heap/ha_heap.cc:
Added support for internal temporary tables that should be deleted on close.
Internal tables now use dedicated open and close calls to avoid taking mutexes.
If heap_open() failes, now delete the newly created table. (This fixes a possible memory leak)
Remove never executed info() in create()
storage/heap/ha_heap.h:
Added slots needed to handle internal temporary tables
storage/heap/heapdef.h:
Protect against C++ inclusion
storage/heap/hp_close.c:
Don't call list_delete() for internal temporary tables (They are not in the list)
storage/heap/hp_create.c:
Added HP_SHARE ** element to heap_create() to store the SHARE of the newly created table.
For internal temporary tables: Don't take any mutex and don't put them into the open table list.
storage/heap/hp_open.c:
Split heap_open() into sub functions to be able to create internal temporary tables without putting them in the heap_share_list.
Add faster open() functions for when we already know the 'share'.
storage/heap/hp_test1.c:
Update call to heap_create()
Initialize all keyinfo members.
storage/heap/hp_test2.c:
Update call to heap_create()
Limit the fix for bug 28591 to InnoDB only
sql/sql_select.cc:
Limit the fix for bug 28591 to InnoDB only
sql/table.cc:
Limit the fix for bug 28591 to InnoDB only
into magare.gmz:/home/kgeorge/mysql/autopush/B28951-5.0-opt
mysql-test/t/innodb_mysql.test:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
merge of 5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29911
mysql-test/t/having.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/having.result:
SCCS merged
This bug manifested itself for join queries with GROUP BY and HAVING clauses
whose SELECT lists contained DISTINCT. It occurred when the optimizer could
deduce that the result set would have not more than one row.
The bug could lead to wrong result sets for queries of this type because
HAVING conditions were erroneously ignored in some cases in the function
remove_duplicates.
mysql-test/r/having.result:
Added a test case for bug #29911.
mysql-test/t/having.test:
Added a test case for bug #29911.
ORDER BY primary_key on InnoDB table
Queries that use an InnoDB secondary index to retrieve
data don't need to sort in case of ORDER BY primary key
if the secondary index is compared to constant(s).
They can also skip sorting if ORDER BY contains both the
the secondary key parts and the primary key parts (in
that order).
This is because InnoDB returns the rows in order of the
primary key for rows with the same values of the secondary
key columns.
Fixed by preventing temp table sort for the qualifying
queries.
mysql-test/r/innodb_mysql.result:
Bug #28591: test case
mysql-test/t/innodb_mysql.test:
Bug #28591: test case
sql/sql_select.cc:
Bug #28591: Use the primary key as suffix when testing
if the key can be used for ORDER BY on supporting engines.
sql/table.cc:
Bug #28591: can use the primary key
as a suffix for the secondary keys
into gleb.loc:/home/uchum/work/bk/5.1-opt
client/mysqldump.c:
Auto merged
include/my_base.h:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/create_not_windows.result:
Auto merged
mysql-test/r/join_nested.result:
Auto merged
mysql-test/r/symlink.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/type_time.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/create_not_windows.test:
Auto merged
mysql-test/t/symlink.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/create.result:
Merge with 5.0-opt.
mysql-test/r/type_enum.result:
Merge with 5.0-opt.
mysql-test/t/type_enum.test:
Merge with 5.0-opt.
sql/field_conv.cc:
Merge with 5.0-opt.
A bug in the restore_prev_nj_state function allowed interleaving
inner tables of outer join operations with outer tables. With the
current implementation of the nested loops algorithm it could lead
to wrong result sets for queries with nested outer joins.
Another bug in this procedure effectively blocked evaluation of some
valid execution plans for queries with nested outer joins.
mysql-test/r/join_nested.result:
Added a test case for bug #29604.
mysql-test/t/join_nested.test:
Added a test case for bug #29604.
The need arose when working on Bug 26141, where it became
necessary to replace TABLE_LIST with its forward declaration in a few
headers, and this involved a lot of s/TABLE_LIST/st_table_list/.
Although other workarounds exist, this patch is in line
with our general strategy of moving away from typedef-ed names.
Sometime in future we might also rename TABLE_LIST to follow the
coding style, but this is a huge change.
sql/item.cc:
st_table_list -> TABLE_LIST
sql/item.h:
st_table_list -> TABLE_LIST
sql/mysql_priv.h:
st_table_list -> TABLE_LIST
sql/sql_base.cc:
st_table_list -> TABLE_LIST
sql/sql_lex.cc:
st_table_list -> TABLE_LIST
sql/sql_lex.h:
st_table_list -> TABLE_LIST
sql/sql_select.cc:
st_table_list -> TABLE_LIST
sql/sql_show.cc:
st_table_list -> TABLE_LIST
sql/sql_udf.h:
Was not needed.
sql/table.cc:
st_table_list -> TABLE_LIST
sql/table.h:
st_table_list -> TABLE_LIST
into olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt
mysql-test/r/binary.result:
Auto merged
mysql-test/r/ctype_collate.result:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/binary.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_select.h:
Auto merged
sql/table.cc:
Auto merged
storage/myisam/mi_open.c:
Auto merged
strings/ctype-simple.c:
Auto merged
mysql-test/r/create.result:
Manual merge.
mysql-test/r/subselect.result:
Manual merge.
mysql-test/r/type_enum.result:
Manual merge.
mysql-test/t/type_enum.test:
Manual merge.
mysql-test/include/mix1.inc:
Manual merge.
mysql-test/r/innodb_mysql.result:
Manual merge.
mysql-test/t/subselect.test:
Manual merge.
sql/sql_parse.cc:
Manual merge.
storage/myisam/mi_key.c:
Manual merge.
query / no aggregate of subquery
The optimizer counts the aggregate functions that
appear as top level expressions (in all_fields) in
the current subquery. Later it makes a list of these
that it uses to actually execute the aggregates in
end_send_group().
That count is used in several places as a flag whether
there are aggregates functions.
While collecting the above info it must not consider
aggregates that are not aggregated in the current
context. It must treat them as normal expressions
instead. Not doing that leads to incorrect data about
the query, e.g. running a query that actually has no
aggregate functions as if it has some (and hence is
expected to return only one row).
Fixed by ignoring the aggregates that are not aggregated
in the current context.
One other smaller omission discovered and fixed in the
process : the place of aggregation was not calculated for
user defined functions. Fixed by calling
Item_sum::init_sum_func_check() and
Item_sum::check_sum_func() as it's done for the rest of
the aggregate functions.
mysql-test/r/subselect.result:
Bug #27333: test case
mysql-test/t/subselect.test:
Bug #27333: test case
sql/item_subselect.cc:
Bug#27333: need select_lex to filter out
aggregates that are not aggregated in
the current select.
sql/item_sum.cc:
Bug#27333: need select_lex to filter out
aggregates that are not aggregated in
the current select.
sql/item_sum.h:
Bug#27333: calculate the place of
aggregation for user defined functions.
sql/sql_select.cc:
Bug#27333: When counting the aggregated functions
and collecting a list of them we must not consider
the aggregates that are not aggregated in the local
context as "local" : i.e. we must treat them as
normal functions and not add them to the aggregate
functions list.
sql/sql_select.h:
Bug#27333: need select_lex to filter out
aggregates that are not aggregated in
the current select.
into olga.mysql.com:/home/igor/mysql-5.1-opt
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into gleb.loc:/home/uchum/work/bk/5.1-opt
sql/item.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
mysql-test/r/rpl_change_master.result:
Merge with 5.1.
mysql-test/t/rpl_change_master.test:
Merge with 5.1.
sql/sql_acl.cc:
Merge with 5.1.
the loose scan optimization for grouping queries was applied returned
a wrong result set when the query was used with the SQL_BIG_RESULT
option.
The SQL_BIG_RESULT option forces to use sorting algorithm for grouping
queries instead of employing a suitable index. The current loose scan
optimization is applied only for one table queries when the suitable
index is covering. It does not make sense to use sort algorithm in this
case. However the create_sort_index function does not take into account
the possible choice of the loose scan to implement the DISTINCT operator
which makes sorting unnecessary. Moreover the current implementation of
the loose scan for queries with distinct assumes that sorting will
never happen. Thus in this case create_sort_index should not call
the function filesort.
mysql-test/r/group_min_max.result:
Added a test case for bug #25602.
mysql-test/t/group_min_max.test:
Added a test case for bug #25602.
into gleb.loc:/home/uchum/work/bk/5.1-opt
libmysql/libmysql.c:
Merge with 5.0-opt.
mysql-test/r/insert_select.result:
Merge with 5.0-opt.
mysql-test/r/mysqlbinlog.result:
Merge with 5.0-opt.
mysql-test/r/rpl_change_master.result:
Merge with 5.0-opt.
mysql-test/r/view.result:
Merge with 5.0-opt.
mysql-test/t/insert_select.test:
Merge with 5.0-opt.
mysql-test/t/mysqlbinlog.test:
Merge with 5.0-opt.
mysql-test/t/rpl_change_master.test:
Merge with 5.0-opt.
mysql-test/t/view.test:
Merge with 5.0-opt.
sql/item.cc:
Merge with 5.0-opt.
sql/item.h:
Merge with 5.0-opt.
sql/log_event.cc:
Merge with 5.0-opt.
sql/sql_select.cc:
Merge with 5.0-opt.
INSERT into table from SELECT from the same table
with ORDER BY and LIMIT was inserting other data
than sole SELECT ... ORDER BY ... LIMIT returns.
One part of the patch for bug #9676 improperly pushed
LIMIT to temporary table in the presence of the ORDER BY
clause.
That part has been removed.
sql/sql_select.cc:
Fixed bug #29095.
One part of the patch for bug #9676 improperly pushed
LIMIT to temporary table in the presence of the ORDER BY
clause.
That part has been removed.
mysql-test/t/insert_select.test:
Expanded the test case for bug #9676.
Created a test case for bug #29095.
mysql-test/r/insert_select.result:
Expanded the test case for bug #9676.
Created a test case for bug #29095.
For a join query with GROUP BY and/or ORDER BY and a view reference
in the FROM list the metadata erroneously showed empty table aliases
and database names for the view columns.
sql/item.h:
Fixed bug #28898.
Body of Item_ref::get_tmp_table_item method has been moved
to item.cc file.
mysql-test/t/metadata.test:
Updated test case for bug #28898.
sql/item.cc:
Fixed bug #28898.
The Item_ref::get_tmp_table_item method has been modified
to copy pointers to the table alias and database name to the new
Item_field object created for a field stored in the temporary
table.
mysql-test/r/metadata.result:
Updated test case for bug #28898.
sql/sql_select.cc:
Fixed bug #28898.
The change_to_use_tmp_fields function has been modified to
to copy pointers to the table alias and database name from
the Item_ref objects to the new Item_field objects created
for fields stored in the temporary table.
mysql-test/r/sp.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
The method select_insert::send_error does two things, it rolls back a statement
being executed and outputs an error message. But when a
nonexistent column is referenced, an error message has been published already and
there is no need to publish another.
Fixed by moving all functionality beyond publishing an error message into
select_insert::abort() and calling only that function.
mysql-test/r/errors.result:
Bug#28677: test result
mysql-test/t/errors.test:
Bug#28677: test case
sql/sql_class.h:
Bug#28677: overriding abort()
sql/sql_insert.cc:
Bug#28677:
- moved everything beyond producing an error message out of select_insert::send_error
and into new override select_insert::abort()
- made corresponding move of code from select_create::send_error to select_create::abort
sql/sql_select.cc:
Bug#28677: No need to pusblish an error here
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun14/51
configure.in:
Auto merged
BitKeeper/deleted/.del-ctype_cp932_notembedded.test~3047e508460cef42:
Auto merged
mysql-test/extra/binlog_tests/binlog.test:
Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
Auto merged
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
Auto merged
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
Auto merged
mysql-test/extra/binlog_tests/drop_temp_table.test:
Auto merged
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/binlog_stm_binlog.result:
Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
mysql-test/r/have_log_bin.require:
Auto merged
mysql-test/t/flush_block_commit_notembedded.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
mysql-test/t/mysqlbinlog-cp932.test:
Auto merged
mysql-test/t/mysqlbinlog2.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/date_formats.result:
Use local
mysql-test/r/partition.result:
SCCS merged
mysql-test/t/date_formats.test:
Use local
mysql-test/t/ndb_basic.test:
manual merge
mysql-test/t/partition.test:
manual merge
mysql-test/t/user_var-binlog.test:
use local
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun14/50
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/binlog.result:
Auto merged
mysql-test/r/have_log_bin.require:
Auto merged
BitKeeper/deleted/.del-ctype_cp932_notembedded.test:
Auto merged
mysql-test/t/binlog.test:
Auto merged
mysql-test/t/ctype_cp932_binlog.test:
Auto merged
mysql-test/t/ctype_ucs_binlog.test:
Auto merged
mysql-test/t/flush_block_commit_notembedded.test:
Auto merged
mysql-test/t/insert_select-binlog.test:
Auto merged
mysql-test/t/mysqlbinlog-cp932.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/mix_innodb_myisam_binlog.result:
Use local
mysql-test/t/blackhole.test:
manual merge
mysql-test/t/drop_temp_table.test:
manual merge
mysql-test/t/mix_innodb_myisam_binlog.test:
Use local
mysql-test/t/mysqlbinlog.test:
Use local
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
client/mysqltest.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/include/mix1.inc:
merging
mysql-test/r/innodb_mysql.result:
merging
sql/sql_select.cc:
merging
into mysql.com:/d2/hf/mrg/mysql-5.0-opt
client/mysqltest.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/innodb_mysql.result:
merging
mysql-test/t/innodb_mysql.test:
merging
sql/sql_select.cc:
merging
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
In create_tmp_table() don't set full table path as a table name. Other code assumes table names to not exceed NAME_LEN bytes.
sql/sql_select.cc:
In create_tmp_table() don't set full table path as a table name. Other code assumes table names to not exceed NAME_LEN bytes.
mysql-test/r/long_tmpdir.result:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
mysql-test/t/long_tmpdir-master.opt:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
mysql-test/t/long_tmpdir-master.sh:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
mysql-test/t/long_tmpdir.test:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
a temporary table has grown out of heap memory reserved for it and
the remaining disk space is not big enough to store the table as
a MyISAM table.
The crash happens because the function create_myisam_from_heap
does not handle safely the mem_root structure associated
with the converted table in the case when an error has occurred.
sql/sql_select.cc:
Fixed bug #28449: a crash may happen at some rare conditions when
a temporary table has grown out of heap memory reserved for it and
the remaining disk space is not big enough to store the table as
a MyISAM table.
The crash happens because the function create_myisam_from_heap
does not handle safely the mem_root structure associated
with the converted table in the case when an error has occurred.
As it's hard to create a sitiation that would throw an error
a special code has been added that raises an error for a newly
created test called error_simulation.
mysql-test/r/error_simulation.result:
New BitKeeper file ``mysql-test/r/error_simulation.result''
Added a test case for bug #28449.
mysql-test/t/error_simulation-master.opt:
New BitKeeper file ``mysql-test/t/error_simulation-master.opt''
mysql-test/t/error_simulation.test:
New BitKeeper file ``mysql-test/t/error_simulation.test''
Added a test case for bug #28449.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
client/mysqldump.c:
Auto merged
include/m_string.h:
Auto merged
include/mysql_com.h:
Auto merged
include/violite.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysys/my_init.c:
Auto merged
server-tools/instance-manager/mysql_connection.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
strings/strtod.c:
Auto merged
vio/vio_priv.h:
Auto merged
vio/viosocket.c:
Auto merged
client/mysqltest.c:
SCCS merged
include/my_global.h:
SCCS merged
sql/field.h:
SCCS merged
sql/sql_table.cc:
Manual merge
strings/ctype-bin.c:
Manual merge
into olga.mysql.com:/home/igor/mysql-5.1-opt-merge
include/thr_lock.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/udf_example.c:
Auto merged
mysql-test/r/subselect.result:
Manual merge.
mysql-test/t/subselect.test:
Manual merge.
sql/sql_view.cc:
Manual merge.
into olga.mysql.com:/home/igor/mysql-5.1-opt-merge
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
sql/field.h:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/ps_2myisam.result:
Manual merge.
mysql-test/r/ps_3innodb.result:
Manual merge.
mysql-test/r/ps_4heap.result:
Manual merge.
mysql-test/r/ps_5merge.result:
Manual merge.
mysql-test/r/ps_7ndb.result:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_view.cc:
Manual merge.
using a derived table over a grouping subselect.
This crash happens only when materialization of the derived tables
requires creation of auxiliary temporary table, for example when
a grouping operation is carried out with usage of a temporary table.
The crash happened because EXPLAIN EXTENDED when printing the query
expression made an attempt to use the objects created in the mem_root
of the temporary table which has been already freed by the moment
when printing is called.
This bug appeared after the method Item_field::print() had been
introduced.
mysql-test/r/subselect.result:
Added a test case for bug #28728.
mysql-test/t/subselect.test:
Added a test case for bug #28728.
sql/sql_select.cc:
Fixed bug #28728: a crash when executing EXPLAIN EXTENDED for a query
using a derived table over a grouping subselect.
The crash happened because EXPLAIN EXTENDED when printing the query
expression made an attempt to use the objects created in the mem_root
of the temporary table which has been already freed by the moment
when printing is accomplished.
The fix in JOIN::exec() ensures using existing objects when printing
subselects for a derived tables by EXPLAIN EXTENDED.
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
client/mysqlbinlog.cc:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_xmlfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.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_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/heap/hp_hash.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/item_func.cc:
Manual merge.
sql/sp.cc:
Manual merge.
sql/sql_cache.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
strings/my_vsnprintf.c:
Manual merge.
into bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
client/mysqldump.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/field_conv.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
strings/decimal.c:
Auto merged
sql/sql_update.cc:
Manual merge
into polly.local:/home/kaa/src/maint/bug27643/my51-bug27643
mysql-test/r/ctype_ucs2_def.result:
Auto merged
mysql-test/r/heap_hash.result:
Auto merged
mysql-test/t/ctype_ucs2_def.test:
Auto merged
mysql-test/t/heap_hash.test:
Auto merged
sql/sql_select.cc:
Auto merged
strings/ctype-bin.c:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
Problem:
HASH indexes on VARCHAR columns with binary collations did not ignore trailing spaces from strings before comparisons. This could result in duplicate records being successfully inserted into a MEMORY table with unique key constraints.
As a direct consequence of the above, internal MEMORY tables used for GROUP BY calculation in testcases for bug #27643 contained duplicate rows which resulted in duplicate key errors when converting those temporary tables to MyISAM. Additionally, that error was incorrectly converted to the 'table is full' error.
Solution:
- ignore trailing spaces in VARCHAR fields with binary collations when calculating hashes.
- return a proper error from create_myisam_from_heap() when conversion fails.
mysql-test/r/ctype_ucs2_def.result:
Added a testcase for bug #27643.
mysql-test/r/heap_hash.result:
Added a testcase for bug #27643.
mysql-test/t/ctype_ucs2_def.test:
Added a testcase for bug #27643.
mysql-test/t/heap_hash.test:
Added a testcase for bug #27643.
sql/sql_select.cc:
Return an appropriate error instead of 'table is full' when conversion from MEMORY to MyISAM fails.
strings/ctype-bin.c:
Added my_hash_sort_8bit_bin() which ignores trailing spaces when calculating hashes, and is now used for VARCHAR columns instead of my_hash_sort_bin().
strings/ctype-mb.c:
Ignore trailing spaces when calculating a string hash in my_hash_sort_mb_bin().
strings/ctype-ucs2.c:
Ignore trailing spaces when calculating a string hash in my_hash_sort_ucs2_bin().
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/insert.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/insert_update.result:
Auto merged
mysql-test/r/key.result:
Auto merged
mysql-test/r/kill.result:
Auto merged
mysql-test/r/null.result:
Auto merged
mysql-test/r/null_key.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
BitKeeper/deleted/.del-ps_6bdb.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/kill.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
sql/field.cc:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item_func.cc:
Auto merged
mysql-test/r/type_enum.result:
merging
mysql-test/r/warnings.result:
merging
mysql-test/t/type_enum.test:
merging
sql/sql_select.cc:
merging
mysqld crashed when a long-running explain query was killed from
another connection.
When the current thread caught a kill signal executing the function
best_extension_by_limited_search it just silently returned to
the calling function greedy_search without initializing elements of
the join->best_positions array.
However, the greedy_search function ignored thd->killed status
after a calls to the best_extension_by_limited_search function, and
after several calls the greedy_search function used an uninitialized
data from the join->best_positions[idx] to search position in the
join->best_ref array.
That search failed, and greedy_search tried to call swap_variables
function with NULL argument - that caused a crash.
sql/sql_select.cc:
Fixed bug #28598.
choose_plan(), greedy_search(), best_extension_by_limited_search()
and find_best() functions have been changed to return TRUE in case
of fatal error.
mysql-test/t/kill.test:
Updated test case for bug #28598.
mysql-test/r/kill.result:
Updated test case for bug #28598.
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
mysql-test/r/olap.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/analyse.result:
Manual merge
mysql-test/r/sp.result:
Manual merge
sql/item_timefunc.cc:
Manual merge
Integer values with 10 digits may or may not fit into an int column
(e.g. 2147483647 vs 6147483647).
Thus when creating a temp table column for such an int we must
use bigint instead.
Fixed to use bigint.
Also subsituted a "magic number" with a named constant.
mysql-test/r/analyse.result:
Bug #28492: Adjusted the results after having fixed the bug
mysql-test/r/metadata.result:
Bug #28492: test case
mysql-test/r/olap.result:
Bug #28492: Adjusted the results after having fixed the bug
mysql-test/r/sp.result:
Bug #28492: Adjusted the results after having fixed the bug
mysql-test/r/view.result:
Bug #28492: Adjusted the results after having fixed the bug
mysql-test/t/metadata.test:
Bug #28492: test case
sql/field.h:
Bug #28492: Replaced a magic number with a constant
sql/sql_select.cc:
Bug #28492: Treat integers with 10 and more digits as
bigint.
- Renamed "Using join cache" to "Using join buffer".
- "Using join buffer" is now printed on the last
table that "reads" from the join buffer cache.
mysql-test/r/archive_gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/compress.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ctype_utf8.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/derived.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/distinct.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/func_group.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/func_group_innodb.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/greedy_optimizer.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/group_by.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/group_min_max.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/index_merge_myisam.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/information_schema.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/innodb_gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/innodb_mysql.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/join.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/join_nested.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/key_diff.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/myisam.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ndb_condition_pushdown.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ndb_gis.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/range.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/row.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/select.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ssl.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/ssl_compress.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/subselect.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/subselect3.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/union.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
mysql-test/r/view.result:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
sql/sql_select.cc:
Bug #27531: renamed "Using join cache" to "Using join buffer"
and moved to the last table in the batch.
into gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
client/mysqldump.c:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/kill.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
mysql-test/t/kill.test:
Auto merged
sql/field.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
mysql-test/r/mysqldump.result:
Merge with 5.0-opt
mysql-test/t/mysqldump.test:
Merge with 5.0-opt
mysql-test/t/view.test:
Merge with 5.0-opt
sql/sql_select.cc:
Merge with 5.0-opt
constant outer tables did not return null complemented
rows when conditions were evaluated to FALSE.
Wrong results were returned because the conditions over constant
outer tables, when being pushed down, were erroneously enclosed
into the guard function used for WHERE conditions.
mysql-test/r/join_outer.result:
Added a test case for bug #28571.
mysql-test/t/join_outer.test:
Added a test case for bug #28571.
sql/sql_select.cc:
Fixed bug #28571. Outer join queries with ON conditions over
constant outer tables did not return null complemented
rows when conditions were evaluated to FALSE.
Wrong results were returned because the conditions over constant
outer tables, when being pushed down, were erroneously enclosed
into the guard function used for WHERE conditions.
The problem is fixed in the function make_join_select. Now the
conditions over constant tables from ON expressions are pushed
down after the conditions from WHERE has been pushed down.
into vajra.(none):/opt/local/work/mysql-5.1-runtime
include/my_global.h:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.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_7ndb.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/type_date.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
BitKeeper/etc/ignore:
auto-union
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/comp_err.c:
Auto merged
include/decimal.h:
Auto merged
include/my_getopt.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql.h:
Auto merged
mysys/array.c:
Auto merged
mysys/hash.c:
Auto merged
mysys/typelib.c:
Auto merged
sql/derror.cc:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
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_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/my_decimal.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/rpl_utility.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/structs.h:
Auto merged
sql/table.h:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/example/ha_example.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
storage/heap/ha_heap.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
strings/decimal.c:
Auto merged
strings/strtod.c:
Auto merged
include/hash.h:
Manual merge with 5.1 main tree.
mysys/my_getopt.c:
Manual merge with 5.1 main tree.
sql/field.h:
Manual merge with 5.1 main tree.
sql/ha_ndbcluster.cc:
Manual merge with 5.1 main tree.
sql/item_cmpfunc.h:
Manual merge with 5.1 main tree.
sql/item_create.cc:
Manual merge with 5.1 main tree.
sql/item_func.h:
Manual merge with 5.1 main tree.
sql/key.cc:
Manual merge with 5.1 main tree.
sql/lock.cc:
Manual merge with 5.1 main tree.
sql/mysqld.cc:
Manual merge with 5.1 main tree.
sql/set_var.cc:
Manual merge with 5.1 main tree.
sql/set_var.h:
Manual merge with 5.1 main tree.
sql/sql_base.cc:
Manual merge with 5.1 main tree.
sql/sql_handler.cc:
Manual merge with 5.1 main tree.
sql/sql_insert.cc:
Manual merge with 5.1 main tree.
sql/sql_plugin.cc:
Manual merge with 5.1 main tree.
sql/sql_table.cc:
Manual merge with 5.1 main tree.
sql/sql_yacc.yy:
Manual merge with 5.1 main tree.
sql/table.cc:
Manual merge with 5.1 main tree.
storage/innobase/handler/ha_innodb.cc:
Manual merge with 5.1 main tree.
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
Manual merge with 5.1 main tree.
storage/ndb/tools/restore/restore_main.cpp:
Manual merge with 5.1 main tree.
CHECK OPTION and a subquery in WHERE condition.
The abort was triggered by setting the value of join->tables for
subqueries in the function JOIN::cleanup. This function was called
after an invocation of the JOIN::join_free method for subqueries
used in WHERE condition.
mysql-test/r/view.result:
Added a test case for bug #28561.
mysql-test/t/view.test:
Added a test case for bug #28561.
sql/sql_select.cc:
Fixed bug #28561: assertion abort for update on multi-table view with
CHECK OPTION and a subquery in WHERE condition.
The abort was triggered by setting the value of join->tables for
subqueries in the function JOIN::cleanup. This function was called
after an invocation of the JOIN::join_free method for subqueries
used in WHERE condition.
Setting the value of join->tables to for a subquery created serious
problems for checking WHERE condition after update of the multi-table
view as this check is performed in the do_select function right
after a call of the JOIN::join_free method.
In fact setting join->tables to 0 in JOIN::cleanup is not needed
anywhere in the current code.
The problem reported is a compile bug,
reported by the development GCC team with GCC 4.2.
The original issue can no longer be reproduced in MySQL 5.1,
since the configure script no longer define HAVE_ATOMIC_ADD,
which caused the Linux atomic functions to be used (and cause a problem
with an invalid cast).
This patch implements some code cleanup for 5.1 only, which was identified
during the investigation of this issue.
With this patch, statistics maintained in THD::status_var are by definition
owned by the running thread, and do not need to be protected against race
conditions. These statistics are maintained by the status_var_* helpers,
which do not require any lock.
include/my_global.h:
General cleanup of thread_safe_increment / statistic_increment
include/my_pthread.h:
General cleanup of thread_safe_increment / statistic_increment
sql/filesort.cc:
General cleanup of thread_safe_increment / statistic_increment
sql/handler.cc:
General cleanup of thread_safe_increment / statistic_increment
sql/sql_insert.cc:
General cleanup of thread_safe_increment / statistic_increment
sql/sql_parse.cc:
General cleanup of thread_safe_increment / statistic_increment
sql/sql_prepare.cc:
General cleanup of thread_safe_increment / statistic_increment
sql/sql_select.cc:
General cleanup of thread_safe_increment / statistic_increment
When processing the USE/FORCE index hints
the optimizer was not checking if the indexes
specified are enabled (see ALTER TABLE).
Fixed by:
Backporting the fix for bug 20604 to 5.0
mysql-test/r/key.result:
Test for BUG 20604.
The important part of the test is the explain output that
tests what indexes are used.
mysql-test/r/myisam.result:
Bug #28476: test cases
mysql-test/t/key.test:
Bug 20604:
The minimal test case that reveals the bug. The optimizer for
aggregates relies on keys disabled with ALTER TABLE ... DISABLE KEYS
not being in the set TABLE::keys_in_use_for_query.
When the execution engine tries to use a disabled index, MyISAM
returns an error.
mysql-test/t/myisam.test:
Bug #28476: test cases
sql/sql_base.cc:
Bug #28476:
- Ignore disabled indexes in USE/FORCE index
sql/sql_select.cc:
Bug 20604 : The intersection operation between table->s->keys_in_use
and table->keys_in_use_for_query is no longer necessary.
We can trust that the latter is a subset of the former.
sql/table.h:
Bug 20604:
Added comments to TABLE_SHARE::keys_in_use and
TABLE::keys_in_use_for_query.
into dl145s.mysql.com:/users/mhansson/mysql/push/bug23856/mysql-5.1o-pushee
sql/item_sum.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/func_gconcat.result:
Bug#23856: Manually merged test case.
mysql-test/t/func_gconcat.test:
Bug#23856: Manually merged test case.
into dl145s.mysql.com:/users/mhansson/mysql/push/bug23856/my51-bug23856
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/field.h:
Auto merged
sql/field_conv.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/item_sum.cc:
Bug#23856: Manual merge 5.0->5.1. Changed comparison to strict inequality between
convert_blob_length and UINT_MAX16. Replaced UINT_MAX16 with Field_varstring::MAX_SIZE.
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
mysql-test/r/ps.result:
merging
mysql-test/r/subselect.result:
merging
mysql-test/r/type_datetime.result:
SCCS merged
mysql-test/t/ps.test:
merging
mysql-test/t/subselect.test:
merging
mysql-test/t/type_datetime.test:
merging
sql/opt_sum.cc:
SCCS merged
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
sql/sql_select.cc:
Manual merge
mysql-test/r/compress.result:
result fix
mysql-test/r/information_schema.result:
result fix
mysql-test/r/openssl_1.result:
result fix
mysql-test/r/rpl_packet.result:
result fix
mysql-test/r/status.result:
result fix
for a query over an empty table right after its creation.
The crash is the result of an attempt made by JOIN::optimize to evaluate
the WHERE condition when no records have been actually read.
The added test case can reproduce the crash only with InnoDB tables and
only with 5.0.x.
mysql-test/r/innodb_mysql.result:
Added a test case for bug #28272.
mysql-test/t/innodb_mysql.test:
Added a test case for bug #28272.
sql/sql_select.cc:
Fixed bug #28272: crash that occurs when running an EXPLAIN command
for a query over an empty table right after its creation.
The crash is the result of an attempt made by JOIN::optimize to evaluate
the WHERE condition when no records have been actually read.
Such attempts could be observed only with EXPLAIN commands.
Now at the optimization phase the WHERE condition is never evaluated if
there is no record previously read from the table.
into mysql.com:/home/hf/work/27957/my51-27957
mysql-test/r/insert_update.result:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
mysql-test/include/mix1.inc:
merging
mysql-test/r/innodb_mysql.result:
SCCS merged
sql/sql_select.cc:
merging
The following type conversions was done:
- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t
Removed declaration of byte, gptr, my_string, my_size_t and size_s.
Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
as this requires fewer casts in the code and is more in line with how the
standard functions work.
- Added extra length argument to dirname_part() to return the length of the
created string.
- Changed (at least) following functions to take uchar* as argument:
- db_dump()
- my_net_write()
- net_write_command()
- net_store_data()
- DBUG_DUMP()
- decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
argument to my_uncompress() from a pointer to a value as we only return
one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.
Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
explicitely as this conflict was often hided by casting the function to
hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
size_t. This was needed to properly detect errors (which are
returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
(portability fix)
- Removed windows specific code to restore cursor position as this
causes slowdown on windows and we should not mix read() and pread()
calls anyway as this is not thread safe. Updated function comment to
reflect this. Changed function that depended on original behavior of
my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
m_size is the number of elements in the array, not a string/memory
length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
- Replaced some calls to alloc_root + memcpy to use
strmake_root()/strdup_root().
- Changed some calls from memdup() to strmake() (Safety fix)
- Simpler loops in client-simple.c
BitKeeper/etc/ignore:
added libmysqld/ha_ndbcluster_cond.cc
---
added debian/defs.mk debian/control
client/completion_hash.cc:
Remove not needed casts
client/my_readline.h:
Remove some old types
client/mysql.cc:
Simplify types
client/mysql_upgrade.c:
Remove some old types
Update call to dirname_part
client/mysqladmin.cc:
Remove some old types
client/mysqlbinlog.cc:
Remove some old types
Change some buffers to be uchar to avoid casts
client/mysqlcheck.c:
Remove some old types
client/mysqldump.c:
Remove some old types
Remove some not needed casts
Change some string lengths to size_t
client/mysqlimport.c:
Remove some old types
client/mysqlshow.c:
Remove some old types
client/mysqlslap.c:
Remove some old types
Remove some not needed casts
client/mysqltest.c:
Removed some old types
Removed some not needed casts
Updated hash-get-key function arguments
Updated parameters to dirname_part()
client/readline.cc:
Removed some old types
Removed some not needed casts
Changed some string lengths to use size_t
client/sql_string.cc:
Removed some old types
dbug/dbug.c:
Removed some old types
Changed some string lengths to use size_t
Changed some prototypes to avoid casts
extra/comp_err.c:
Removed some old types
extra/innochecksum.c:
Removed some old types
extra/my_print_defaults.c:
Removed some old types
extra/mysql_waitpid.c:
Removed some old types
extra/perror.c:
Removed some old types
extra/replace.c:
Removed some old types
Updated parameters to dirname_part()
extra/resolve_stack_dump.c:
Removed some old types
extra/resolveip.c:
Removed some old types
include/config-win.h:
Removed some old types
include/decimal.h:
Changed binary strings to be uchar* instead of char*
include/ft_global.h:
Removed some old types
include/hash.h:
Removed some old types
include/heap.h:
Removed some old types
Changed records_under_level to be 'ulong' instead of 'uint' to clarify usage of variable
include/keycache.h:
Removed some old types
include/m_ctype.h:
Removed some old types
Changed some string lengths to use size_t
Changed character length functions to return uint
unsigned char -> uchar
include/m_string.h:
Removed some old types
Changed some string lengths to use size_t
include/my_alloc.h:
Changed some string lengths to use size_t
include/my_base.h:
Removed some old types
include/my_dbug.h:
Removed some old types
Changed some string lengths to use size_t
Changed db_dump() to take uchar * as argument for memory to reduce number of casts in usage
include/my_getopt.h:
Removed some old types
include/my_global.h:
Removed old types:
my_size_t -> size_t
byte -> uchar
gptr -> uchar *
include/my_list.h:
Removed some old types
include/my_nosys.h:
Removed some old types
include/my_pthread.h:
Removed some old types
include/my_sys.h:
Removed some old types
Changed MY_FILE_ERROR to be in line with new definitions of my_write()/my_read()
Changed some string lengths to use size_t
my_malloc() / my_free() now uses void *
Updated parameters to dirname_part() & my_uncompress()
include/my_tree.h:
Removed some old types
include/my_trie.h:
Removed some old types
include/my_user.h:
Changed some string lengths to use size_t
include/my_vle.h:
Removed some old types
include/my_xml.h:
Removed some old types
Changed some string lengths to use size_t
include/myisam.h:
Removed some old types
include/myisammrg.h:
Removed some old types
include/mysql.h:
Removed some old types
Changed byte streams to use uchar* instead of char*
include/mysql_com.h:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
include/queues.h:
Removed some old types
include/sql_common.h:
Removed some old types
include/sslopt-longopts.h:
Removed some old types
include/violite.h:
Removed some old types
Changed some string lengths to use size_t
libmysql/client_settings.h:
Removed some old types
libmysql/libmysql.c:
Removed some old types
libmysql/manager.c:
Removed some old types
libmysqld/emb_qcache.cc:
Removed some old types
libmysqld/emb_qcache.h:
Removed some old types
libmysqld/lib_sql.cc:
Removed some old types
Removed some not needed casts
Changed some buffers to be uchar* to avoid casts
true -> TRUE, false -> FALSE
mysys/array.c:
Removed some old types
mysys/charset.c:
Changed some string lengths to use size_t
mysys/checksum.c:
Include zlib to get definition for crc32
Removed some old types
mysys/default.c:
Removed some old types
Changed some string lengths to use size_t
mysys/default_modify.c:
Changed some string lengths to use size_t
Removed some not needed casts
mysys/hash.c:
Removed some old types
Changed some string lengths to use size_t
Note: Prototype of hash_key() has changed which may cause problems if client uses hash_init() with a cast for the hash-get-key function.
hash_element now takes 'ulong' as the index type (cleanup)
mysys/list.c:
Removed some old types
mysys/mf_cache.c:
Changed some string lengths to use size_t
mysys/mf_dirname.c:
Removed some old types
Changed some string lengths to use size_t
Added argument to dirname_part() to avoid calculation of length for 'to'
mysys/mf_fn_ext.c:
Removed some old types
Updated parameters to dirname_part()
mysys/mf_format.c:
Removed some old types
Changed some string lengths to use size_t
mysys/mf_getdate.c:
Removed some old types
mysys/mf_iocache.c:
Removed some old types
Changed some string lengths to use size_t
Changed calculation of 'max_length' to be done the same way in all functions
mysys/mf_iocache2.c:
Removed some old types
Changed some string lengths to use size_t
Clean up comments
Removed not needed indentation
mysys/mf_keycache.c:
Removed some old types
mysys/mf_keycaches.c:
Removed some old types
mysys/mf_loadpath.c:
Removed some old types
mysys/mf_pack.c:
Removed some old types
Changed some string lengths to use size_t
Removed some not needed casts
Removed very old VMS code
Updated parameters to dirname_part()
Use result of dirnam_part() to remove call to strcat()
mysys/mf_path.c:
Removed some old types
mysys/mf_radix.c:
Removed some old types
mysys/mf_same.c:
Removed some old types
mysys/mf_sort.c:
Removed some old types
mysys/mf_soundex.c:
Removed some old types
mysys/mf_strip.c:
Removed some old types
mysys/mf_tempdir.c:
Removed some old types
mysys/mf_unixpath.c:
Removed some old types
mysys/mf_wfile.c:
Removed some old types
mysys/mulalloc.c:
Removed some old types
mysys/my_alloc.c:
Removed some old types
Changed some string lengths to use size_t
Use void* as type for allocated memory area
Removed some not needed casts
Changed argument 'Size' to 'length' according coding guidelines
mysys/my_chsize.c:
Changed some buffers to be uchar* to avoid casts
mysys/my_compress.c:
More comments
Removed some old types
Changed string lengths to use size_t
Changed arguments to my_uncompress() to make them easier to understand
Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix)
Changed type of 'pack_data' argument to packfrm() to avoid casts.
mysys/my_conio.c:
Changed some string lengths to use size_t
mysys/my_create.c:
Removed some old types
mysys/my_div.c:
Removed some old types
mysys/my_error.c:
Removed some old types
mysys/my_fopen.c:
Removed some old types
mysys/my_fstream.c:
Removed some old types
Changed some string lengths to use size_t
writen -> written
mysys/my_getopt.c:
Removed some old types
mysys/my_getwd.c:
Removed some old types
More comments
mysys/my_init.c:
Removed some old types
mysys/my_largepage.c:
Removed some old types
Changed some string lengths to use size_t
mysys/my_lib.c:
Removed some old types
mysys/my_lockmem.c:
Removed some old types
mysys/my_malloc.c:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed all functions to use size_t
mysys/my_memmem.c:
Indentation cleanup
mysys/my_once.c:
Removed some old types
Changed malloc(), free() and related functions to use void *
mysys/my_open.c:
Removed some old types
mysys/my_pread.c:
Removed some old types
Changed all functions to use size_t
Added comment for how my_pread() / my_pwrite() are supposed to work.
Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe.
(If we ever would really need this, it should be enabled only with a flag argument)
mysys/my_quick.c:
Removed some old types
Changed all functions to use size_t
mysys/my_read.c:
Removed some old types
Changed all functions to use size_t
mysys/my_realloc.c:
Removed some old types
Use void* as type for allocated memory area
Changed all functions to use size_t
mysys/my_static.c:
Removed some old types
mysys/my_static.h:
Removed some old types
mysys/my_vle.c:
Removed some old types
mysys/my_wincond.c:
Removed some old types
mysys/my_windac.c:
Removed some old types
mysys/my_write.c:
Removed some old types
Changed all functions to use size_t
mysys/ptr_cmp.c:
Removed some old types
Changed all functions to use size_t
mysys/queues.c:
Removed some old types
mysys/safemalloc.c:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed all functions to use size_t
mysys/string.c:
Removed some old types
Changed all functions to use size_t
mysys/testhash.c:
Removed some old types
mysys/thr_alarm.c:
Removed some old types
mysys/thr_lock.c:
Removed some old types
mysys/tree.c:
Removed some old types
mysys/trie.c:
Removed some old types
mysys/typelib.c:
Removed some old types
plugin/daemon_example/daemon_example.cc:
Removed some old types
regex/reginit.c:
Removed some old types
server-tools/instance-manager/buffer.cc:
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/buffer.h:
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/commands.cc:
Removed some old types
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/instance_map.cc:
Removed some old types
Changed some string lengths to use size_t
Changed buffer to be of type uchar*
server-tools/instance-manager/instance_options.cc:
Changed buffer to be of type uchar*
Replaced alloc_root + strcpy() with strdup_root()
server-tools/instance-manager/mysql_connection.cc:
Changed buffer to be of type uchar*
server-tools/instance-manager/options.cc:
Removed some old types
server-tools/instance-manager/parse.cc:
Changed some string lengths to use size_t
server-tools/instance-manager/parse.h:
Removed some old types
Changed some string lengths to use size_t
server-tools/instance-manager/protocol.cc:
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
server-tools/instance-manager/protocol.h:
Changed some string lengths to use size_t
server-tools/instance-manager/user_map.cc:
Removed some old types
Changed some string lengths to use size_t
sql/derror.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
sql/discover.cc:
Changed in readfrm() and writefrom() the type for argument 'frmdata' to uchar** to avoid casts
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
sql/event_data_objects.cc:
Removed some old types
Added missing casts for alloc() and sprintf()
sql/event_db_repository.cc:
Changed some buffers to be uchar* to avoid casts
Added missing casts for sprintf()
sql/event_queue.cc:
Removed some old types
sql/field.cc:
Removed some old types
Changed memory buffers to be uchar*
Changed some string lengths to use size_t
Removed a lot of casts
Safety fix in Field_blob::val_decimal() to not access zero pointer
sql/field.h:
Removed some old types
Changed memory buffers to be uchar* (except of store() as this would have caused too many other changes).
Changed some string lengths to use size_t
Removed some not needed casts
Changed val_xxx(xxx, new_ptr) to take const pointers
sql/field_conv.cc:
Removed some old types
Added casts required because memory area pointers are now uchar*
sql/filesort.cc:
Initalize variable that was used unitialized in error conditions
sql/gen_lex_hash.cc:
Removed some old types
Changed memory buffers to be uchar*
Changed some string lengths to use size_t
Removed a lot of casts
Safety fix in Field_blob::val_decimal() to not access zero pointer
sql/gstream.h:
Added required cast
sql/ha_ndbcluster.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some buffers to be uchar* to avoid casts
Added required casts
Removed some not needed casts
sql/ha_ndbcluster.h:
Removed some old types
sql/ha_ndbcluster_binlog.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Replaced sql_alloc() + memcpy() + set end 0 with sql_strmake()
Changed some string lengths to use size_t
Added missing casts for alloc() and sprintf()
sql/ha_ndbcluster_binlog.h:
Removed some old types
sql/ha_ndbcluster_cond.cc:
Removed some old types
Removed some not needed casts
sql/ha_ndbcluster_cond.h:
Removed some old types
sql/ha_partition.cc:
Removed some old types
Changed prototype for change_partition() to avoid casts
sql/ha_partition.h:
Removed some old types
sql/handler.cc:
Removed some old types
Changed some string lengths to use size_t
sql/handler.h:
Removed some old types
Changed some string lengths to use size_t
Changed type for 'frmblob' parameter for discover() and ha_discover() to get fewer casts
sql/hash_filo.h:
Removed some old types
Changed all functions to use size_t
sql/hostname.cc:
Removed some old types
sql/item.cc:
Removed some old types
Changed some string lengths to use size_t
Use strmake() instead of memdup() to create a null terminated string.
Updated calls to new Field()
sql/item.h:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed some buffers to be uchar* to avoid casts
sql/item_cmpfunc.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/item_cmpfunc.h:
Removed some old types
sql/item_create.cc:
Removed some old types
sql/item_func.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
Added test for failing alloc() in init_result_field()
Remove old confusing comment
Fixed compiler warning
sql/item_func.h:
Removed some old types
sql/item_row.cc:
Removed some old types
sql/item_row.h:
Removed some old types
sql/item_strfunc.cc:
Include zlib (needed becasue we call crc32)
Removed some old types
sql/item_strfunc.h:
Removed some old types
Changed some types to match new function prototypes
sql/item_subselect.cc:
Removed some old types
sql/item_subselect.h:
Removed some old types
sql/item_sum.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/item_sum.h:
Removed some old types
sql/item_timefunc.cc:
Removed some old types
Changed some string lengths to use size_t
sql/item_timefunc.h:
Removed some old types
sql/item_xmlfunc.cc:
Changed some string lengths to use size_t
sql/item_xmlfunc.h:
Removed some old types
sql/key.cc:
Removed some old types
Removed some not needed casts
sql/lock.cc:
Removed some old types
Added some cast to my_multi_malloc() arguments for safety
sql/log.cc:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
Changed usage of pwrite() to not assume it holds the cursor position for the file
Made usage of my_read() safer
sql/log_event.cc:
Removed some old types
Added checking of return value of malloc() in pack_info()
Changed some buffers to be uchar* to avoid casts
Removed some 'const' to avoid casts
Added missing casts for alloc() and sprintf()
Added required casts
Removed some not needed casts
Added some cast to my_multi_malloc() arguments for safety
sql/log_event.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/log_event_old.cc:
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/log_event_old.h:
Changed some buffers to be uchar* to avoid casts
sql/mf_iocache.cc:
Removed some old types
sql/my_decimal.cc:
Changed memory area to use uchar*
sql/my_decimal.h:
Changed memory area to use uchar*
sql/mysql_priv.h:
Removed some old types
Changed malloc(), free() and related functions to use void *
Changed some string lengths to use size_t
Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid long overflow
Changed some buffers to be uchar* to avoid casts
sql/mysqld.cc:
Removed some old types
sql/net_serv.cc:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
Ensure that vio_read()/vio_write() return values are stored in a size_t variable
Removed some not needed casts
sql/opt_range.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/opt_range.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/opt_sum.cc:
Removed some old types
Removed some not needed casts
sql/parse_file.cc:
Removed some old types
Changed some string lengths to use size_t
Changed alloc_root + memcpy + set end 0 -> strmake_root()
sql/parse_file.h:
Removed some old types
sql/partition_info.cc:
Removed some old types
Added missing casts for alloc()
Changed some buffers to be uchar* to avoid casts
sql/partition_info.h:
Changed some buffers to be uchar* to avoid casts
sql/protocol.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/protocol.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
sql/records.cc:
Removed some old types
sql/repl_failsafe.cc:
Removed some old types
Changed some string lengths to use size_t
Added required casts
sql/rpl_filter.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some string lengths to use size_t
sql/rpl_filter.h:
Changed some string lengths to use size_t
sql/rpl_injector.h:
Removed some old types
sql/rpl_record.cc:
Removed some old types
Removed some not needed casts
Changed some buffers to be uchar* to avoid casts
sql/rpl_record.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/rpl_record_old.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/rpl_record_old.h:
Removed some old types
Changed some buffers to be uchar* to avoid cast
sql/rpl_rli.cc:
Removed some old types
sql/rpl_tblmap.cc:
Removed some old types
sql/rpl_tblmap.h:
Removed some old types
sql/rpl_utility.cc:
Removed some old types
sql/rpl_utility.h:
Removed some old types
Changed type of m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length
sql/set_var.cc:
Removed some old types
Updated parameters to dirname_part()
sql/set_var.h:
Removed some old types
sql/slave.cc:
Removed some old types
Changed some string lengths to use size_t
sql/slave.h:
Removed some old types
sql/sp.cc:
Removed some old types
Added missing casts for printf()
sql/sp.h:
Removed some old types
Updated hash-get-key function arguments
sql/sp_cache.cc:
Removed some old types
Added missing casts for printf()
Updated hash-get-key function arguments
sql/sp_head.cc:
Removed some old types
Added missing casts for alloc() and printf()
Added required casts
Updated hash-get-key function arguments
sql/sp_head.h:
Removed some old types
sql/sp_pcontext.cc:
Removed some old types
sql/sp_pcontext.h:
Removed some old types
sql/sql_acl.cc:
Removed some old types
Changed some string lengths to use size_t
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
Added required casts
sql/sql_analyse.cc:
Changed some buffers to be uchar* to avoid casts
sql/sql_analyse.h:
Changed some buffers to be uchar* to avoid casts
sql/sql_array.h:
Removed some old types
sql/sql_base.cc:
Removed some old types
Updated hash-get-key function arguments
sql/sql_binlog.cc:
Removed some old types
Added missing casts for printf()
sql/sql_cache.cc:
Removed some old types
Updated hash-get-key function arguments
Removed some not needed casts
Changed some string lengths to use size_t
sql/sql_cache.h:
Removed some old types
Removed reference to not existing function cache_key()
Updated hash-get-key function arguments
sql/sql_class.cc:
Removed some old types
Updated hash-get-key function arguments
Added missing casts for alloc()
Updated hash-get-key function arguments
Moved THD::max_row_length() to table.cc (as it's not depending on THD)
Removed some not needed casts
sql/sql_class.h:
Removed some old types
Changed malloc(), free() and related functions to use void *
Removed some not needed casts
Changed some string lengths to use size_t
Moved max_row_length and max_row_length_blob() to table.cc, as they are not depending on THD
sql/sql_connect.cc:
Removed some old types
Added required casts
sql/sql_db.cc:
Removed some old types
Removed some not needed casts
Added some cast to my_multi_malloc() arguments for safety
Added missing casts for alloc()
sql/sql_delete.cc:
Removed some old types
sql/sql_handler.cc:
Removed some old types
Updated hash-get-key function arguments
Added some cast to my_multi_malloc() arguments for safety
sql/sql_help.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/sql_insert.cc:
Removed some old types
Added missing casts for alloc() and printf()
sql/sql_lex.cc:
Removed some old types
sql/sql_lex.h:
Removed some old types
Removed some not needed casts
sql/sql_list.h:
Removed some old types
Removed some not needed casts
sql/sql_load.cc:
Removed some old types
Removed compiler warning
sql/sql_manager.cc:
Removed some old types
sql/sql_map.cc:
Removed some old types
sql/sql_map.h:
Removed some old types
sql/sql_olap.cc:
Removed some old types
sql/sql_parse.cc:
Removed some old types
Trivial move of code lines to make things more readable
Changed some string lengths to use size_t
Added missing casts for alloc()
sql/sql_partition.cc:
Removed some old types
Removed compiler warnings about not used functions
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/sql_partition.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/sql_plugin.cc:
Removed some old types
Added missing casts for alloc()
Updated hash-get-key function arguments
sql/sql_prepare.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Added missing casts for alloc() and printf()
sql-common/client.c:
Removed some old types
Changed some memory areas to use uchar*
sql-common/my_user.c:
Changed some string lengths to use size_t
sql-common/pack.c:
Changed some buffers to be uchar* to avoid casts
sql/sql_repl.cc:
Added required casts
Changed some buffers to be uchar* to avoid casts
Changed some string lengths to use size_t
sql/sql_select.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some old types
sql/sql_select.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
sql/sql_servers.cc:
Removed some old types
Updated hash-get-key function arguments
sql/sql_show.cc:
Removed some old types
Added missing casts for alloc()
Removed some not needed casts
sql/sql_string.cc:
Removed some old types
Added required casts
sql/sql_table.cc:
Removed some old types
Removed compiler warning about not used variable
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
sql/sql_test.cc:
Removed some old types
sql/sql_trigger.cc:
Removed some old types
Added missing casts for alloc()
sql/sql_udf.cc:
Removed some old types
Updated hash-get-key function arguments
sql/sql_union.cc:
Removed some old types
sql/sql_update.cc:
Removed some old types
Removed some not needed casts
sql/sql_view.cc:
Removed some old types
sql/sql_yacc.yy:
Removed some old types
Changed some string lengths to use size_t
Added missing casts for alloc()
sql/stacktrace.c:
Removed some old types
sql/stacktrace.h:
Removed some old types
sql/structs.h:
Removed some old types
sql/table.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some buffers to be uchar* to avoid casts
Removed setting of LEX_STRING() arguments in declaration
Added required casts
More function comments
Moved max_row_length() here from sql_class.cc/sql_class.h
sql/table.h:
Removed some old types
Changed some string lengths to use size_t
sql/thr_malloc.cc:
Use void* as type for allocated memory area
Changed all functions to use size_t
sql/tzfile.h:
Changed some buffers to be uchar* to avoid casts
sql/tztime.cc:
Changed some buffers to be uchar* to avoid casts
Updated hash-get-key function arguments
Added missing casts for alloc()
Removed some not needed casts
sql/uniques.cc:
Removed some old types
Removed some not needed casts
sql/unireg.cc:
Removed some old types
Changed some buffers to be uchar* to avoid casts
Removed some not needed casts
Added missing casts for alloc()
storage/archive/archive_reader.c:
Removed some old types
storage/archive/azio.c:
Removed some old types
Removed some not needed casts
storage/archive/ha_archive.cc:
Removed some old types
Changed type for 'frmblob' in archive_discover() to match handler
Updated hash-get-key function arguments
Removed some not needed casts
storage/archive/ha_archive.h:
Removed some old types
storage/blackhole/ha_blackhole.cc:
Removed some old types
storage/blackhole/ha_blackhole.h:
Removed some old types
storage/csv/ha_tina.cc:
Removed some old types
Updated hash-get-key function arguments
Changed some buffers to be uchar* to avoid casts
storage/csv/ha_tina.h:
Removed some old types
Removed some not needed casts
storage/csv/transparent_file.cc:
Removed some old types
Changed type of 'bytes_read' to be able to detect read errors
Fixed indentation
storage/csv/transparent_file.h:
Removed some old types
storage/example/ha_example.cc:
Removed some old types
Updated hash-get-key function arguments
storage/example/ha_example.h:
Removed some old types
storage/federated/ha_federated.cc:
Removed some old types
Updated hash-get-key function arguments
Removed some not needed casts
storage/federated/ha_federated.h:
Removed some old types
storage/heap/_check.c:
Changed some buffers to be uchar* to avoid casts
storage/heap/_rectest.c:
Removed some old types
storage/heap/ha_heap.cc:
Removed some old types
storage/heap/ha_heap.h:
Removed some old types
storage/heap/heapdef.h:
Removed some old types
storage/heap/hp_block.c:
Removed some old types
Changed some string lengths to use size_t
storage/heap/hp_clear.c:
Removed some old types
storage/heap/hp_close.c:
Removed some old types
storage/heap/hp_create.c:
Removed some old types
storage/heap/hp_delete.c:
Removed some old types
storage/heap/hp_hash.c:
Removed some old types
storage/heap/hp_info.c:
Removed some old types
storage/heap/hp_open.c:
Removed some old types
storage/heap/hp_rfirst.c:
Removed some old types
storage/heap/hp_rkey.c:
Removed some old types
storage/heap/hp_rlast.c:
Removed some old types
storage/heap/hp_rnext.c:
Removed some old types
storage/heap/hp_rprev.c:
Removed some old types
storage/heap/hp_rrnd.c:
Removed some old types
storage/heap/hp_rsame.c:
Removed some old types
storage/heap/hp_scan.c:
Removed some old types
storage/heap/hp_test1.c:
Removed some old types
storage/heap/hp_test2.c:
Removed some old types
storage/heap/hp_update.c:
Removed some old types
storage/heap/hp_write.c:
Removed some old types
Changed some string lengths to use size_t
storage/innobase/handler/ha_innodb.cc:
Removed some old types
Updated hash-get-key function arguments
Added missing casts for alloc() and printf()
Removed some not needed casts
storage/innobase/handler/ha_innodb.h:
Removed some old types
storage/myisam/ft_boolean_search.c:
Removed some old types
storage/myisam/ft_nlq_search.c:
Removed some old types
storage/myisam/ft_parser.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/ft_static.c:
Removed some old types
storage/myisam/ft_stopwords.c:
Removed some old types
storage/myisam/ft_update.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/ftdefs.h:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/fulltext.h:
Removed some old types
storage/myisam/ha_myisam.cc:
Removed some old types
storage/myisam/ha_myisam.h:
Removed some old types
storage/myisam/mi_cache.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/mi_check.c:
Removed some old types
storage/myisam/mi_checksum.c:
Removed some old types
storage/myisam/mi_close.c:
Removed some old types
storage/myisam/mi_create.c:
Removed some old types
storage/myisam/mi_delete.c:
Removed some old types
storage/myisam/mi_delete_all.c:
Removed some old types
storage/myisam/mi_dynrec.c:
Removed some old types
storage/myisam/mi_extra.c:
Removed some old types
storage/myisam/mi_key.c:
Removed some old types
storage/myisam/mi_locking.c:
Removed some old types
storage/myisam/mi_log.c:
Removed some old types
storage/myisam/mi_open.c:
Removed some old types
Removed some not needed casts
Check argument of my_write()/my_pwrite() in functions returning int
Added casting of string lengths to size_t
storage/myisam/mi_packrec.c:
Removed some old types
Changed some buffers to be uchar* to avoid casts
storage/myisam/mi_page.c:
Removed some old types
storage/myisam/mi_preload.c:
Removed some old types
storage/myisam/mi_range.c:
Removed some old types
storage/myisam/mi_rfirst.c:
Removed some old types
storage/myisam/mi_rkey.c:
Removed some old types
storage/myisam/mi_rlast.c:
Removed some old types
storage/myisam/mi_rnext.c:
Removed some old types
storage/myisam/mi_rnext_same.c:
Removed some old types
storage/myisam/mi_rprev.c:
Removed some old types
storage/myisam/mi_rrnd.c:
Removed some old types
storage/myisam/mi_rsame.c:
Removed some old types
storage/myisam/mi_rsamepos.c:
Removed some old types
storage/myisam/mi_scan.c:
Removed some old types
storage/myisam/mi_search.c:
Removed some old types
storage/myisam/mi_static.c:
Removed some old types
storage/myisam/mi_statrec.c:
Removed some old types
storage/myisam/mi_test1.c:
Removed some old types
storage/myisam/mi_test2.c:
Removed some old types
storage/myisam/mi_test3.c:
Removed some old types
storage/myisam/mi_unique.c:
Removed some old types
storage/myisam/mi_update.c:
Removed some old types
storage/myisam/mi_write.c:
Removed some old types
storage/myisam/myisam_ftdump.c:
Removed some old types
storage/myisam/myisamchk.c:
Removed some old types
storage/myisam/myisamdef.h:
Removed some old types
storage/myisam/myisamlog.c:
Removed some old types
Indentation fix
storage/myisam/myisampack.c:
Removed some old types
storage/myisam/rt_index.c:
Removed some old types
storage/myisam/rt_split.c:
Removed some old types
storage/myisam/sort.c:
Removed some old types
storage/myisam/sp_defs.h:
Removed some old types
storage/myisam/sp_key.c:
Removed some old types
storage/myisammrg/ha_myisammrg.cc:
Removed some old types
storage/myisammrg/ha_myisammrg.h:
Removed some old types
storage/myisammrg/myrg_close.c:
Removed some old types
storage/myisammrg/myrg_def.h:
Removed some old types
storage/myisammrg/myrg_delete.c:
Removed some old types
storage/myisammrg/myrg_open.c:
Removed some old types
Updated parameters to dirname_part()
storage/myisammrg/myrg_queue.c:
Removed some old types
storage/myisammrg/myrg_rfirst.c:
Removed some old types
storage/myisammrg/myrg_rkey.c:
Removed some old types
storage/myisammrg/myrg_rlast.c:
Removed some old types
storage/myisammrg/myrg_rnext.c:
Removed some old types
storage/myisammrg/myrg_rnext_same.c:
Removed some old types
storage/myisammrg/myrg_rprev.c:
Removed some old types
storage/myisammrg/myrg_rrnd.c:
Removed some old types
storage/myisammrg/myrg_rsame.c:
Removed some old types
storage/myisammrg/myrg_update.c:
Removed some old types
storage/myisammrg/myrg_write.c:
Removed some old types
storage/ndb/include/util/ndb_opts.h:
Removed some old types
storage/ndb/src/cw/cpcd/main.cpp:
Removed some old types
storage/ndb/src/kernel/vm/Configuration.cpp:
Removed some old types
storage/ndb/src/mgmclient/main.cpp:
Removed some old types
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
Removed some old types
Removed old disabled code
storage/ndb/src/mgmsrv/main.cpp:
Removed some old types
storage/ndb/src/ndbapi/NdbBlob.cpp:
Removed some old types
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
Removed not used variable
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
Added required casts
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
Added required casts
storage/ndb/tools/delete_all.cpp:
Removed some old types
storage/ndb/tools/desc.cpp:
Removed some old types
storage/ndb/tools/drop_index.cpp:
Removed some old types
storage/ndb/tools/drop_tab.cpp:
Removed some old types
storage/ndb/tools/listTables.cpp:
Removed some old types
storage/ndb/tools/ndb_config.cpp:
Removed some old types
storage/ndb/tools/restore/consumer_restore.cpp:
Changed some buffers to be uchar* to avoid casts with new defintion of packfrm()
storage/ndb/tools/restore/restore_main.cpp:
Removed some old types
storage/ndb/tools/select_all.cpp:
Removed some old types
storage/ndb/tools/select_count.cpp:
Removed some old types
storage/ndb/tools/waiter.cpp:
Removed some old types
strings/bchange.c:
Changed function to use uchar * and size_t
strings/bcmp.c:
Changed function to use uchar * and size_t
strings/bmove512.c:
Changed function to use uchar * and size_t
strings/bmove_upp.c:
Changed function to use uchar * and size_t
strings/ctype-big5.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-bin.c:
Changed functions to use size_t
strings/ctype-cp932.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-czech.c:
Fixed indentation
Changed functions to use size_t
strings/ctype-euc_kr.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-eucjpms.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-gb2312.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-gbk.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-latin1.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-mb.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-simple.c:
Changed functions to use size_t
Simpler loops for caseup/casedown
unsigned int -> uint
unsigned char -> uchar
strings/ctype-sjis.c:
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-tis620.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-uca.c:
Changed functions to use size_t
unsigned char -> uchar
strings/ctype-ucs2.c:
Moved inclusion of stdarg.h to other includes
usigned char -> uchar
Changed functions to use size_t
Changed character length functions to return uint
strings/ctype-ujis.c:
Changed functions to use size_t
Changed character length functions to return uint
unsigned char -> uchar
strings/ctype-utf8.c:
Changed functions to use size_t
unsigned char -> uchar
Indentation fixes
strings/ctype-win1250ch.c:
Indentation fixes
Changed functions to use size_t
strings/ctype.c:
Changed functions to use size_t
strings/decimal.c:
Changed type for memory argument to uchar *
strings/do_ctype.c:
Indentation fixes
strings/my_strtoll10.c:
unsigned char -> uchar
strings/my_vsnprintf.c:
Changed functions to use size_t
strings/r_strinstr.c:
Removed some old types
Changed functions to use size_t
strings/str_test.c:
Removed some old types
strings/strappend.c:
Changed functions to use size_t
strings/strcont.c:
Removed some old types
strings/strfill.c:
Removed some old types
strings/strinstr.c:
Changed functions to use size_t
strings/strlen.c:
Changed functions to use size_t
strings/strmake.c:
Changed functions to use size_t
strings/strnlen.c:
Changed functions to use size_t
strings/strnmov.c:
Changed functions to use size_t
strings/strto.c:
unsigned char -> uchar
strings/strtod.c:
Changed functions to use size_t
strings/strxnmov.c:
Changed functions to use size_t
strings/xml.c:
Changed functions to use size_t
Indentation fixes
tests/mysql_client_test.c:
Removed some old types
tests/thread_test.c:
Removed some old types
vio/test-ssl.c:
Removed some old types
vio/test-sslclient.c:
Removed some old types
vio/test-sslserver.c:
Removed some old types
vio/vio.c:
Removed some old types
vio/vio_priv.h:
Removed some old types
Changed vio_read()/vio_write() to work with size_t
vio/viosocket.c:
Changed vio_read()/vio_write() to work with size_t
Indentation fixes
vio/viossl.c:
Changed vio_read()/vio_write() to work with size_t
Indentation fixes
vio/viosslfactories.c:
Removed some old types
vio/viotest-ssl.c:
Removed some old types
win/README:
More explanations
ref access to a less expensive range access.
This occurred only with InnoDB tables.
mysql-test/r/innodb_mysql.result:
Added a test case for bug #28189.
mysql-test/t/innodb_mysql.test:
Added a test case for bug #28189.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-comeng-unification
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
support-files/mysql.spec.sh:
Auto merged
sql/Makefile.am:
SCCS merged
into xiphis.org:/home/antony/work2/mysql-5.1-merge
mysql-test/mysql-test-run.pl:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
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/sql_select.cc:
Auto merged
mysql-test/r/sp-vars.result:
merging
mysql-test/r/type_datetime.result:
SCCS merged
mysql-test/t/type_datetime.test:
SCCS merged
sql/item_func.h:
merging
sql/mysql_priv.h:
merging
into xiphis.org:/home/antony/work2/mysql-5.1-engines.merge
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
storage/innobase/handler/ha_innodb.cc:
manual change to new api
- added join cache indication in EXPLAIN (Extra column).
- prefer filesort over full scan over
index for ORDER BY (because it's faster).
- when switching from REF to RANGE because
RANGE uses longer key turn off sort on
the head table only as the resulting
RANGE access is a candidate for join cache
and we don't want to disable it by sorting
on the first table only.
mysql-test/r/archive_gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/compress.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/ctype_utf8.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/derived.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/distinct.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/func_group.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/func_group_innodb.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/greedy_optimizer.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/group_by.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/group_min_max.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/index_merge_myisam.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/information_schema.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/innodb_gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/innodb_mysql.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/join.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/join_nested.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/key_diff.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/myisam.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/ndb_condition_pushdown.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/ndb_gis.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/range.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/row.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/select.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/ssl.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/ssl_compress.result:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over index for ORDER BY.
mysql-test/r/subselect.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/subselect3.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/union.result:
bug #27531: join cache in EXPLAIN
mysql-test/r/view.result:
bug #27531: join cache in EXPLAIN
sql/sql_select.cc:
bug #27531:
- join cache in EXPLAIN.
- prefer filesort over full scan over
index for ORDER BY.
- disable sorting on the first table only
when switching from REF to RANGE.
into magare.gmz:/home/kgeorge/mysql/work/B27531-5.1-opt-after-merge
mysql-test/r/join.result:
Auto merged
mysql-test/t/join.test:
Auto merged
sql/sql_select.cc:
Auto merged
into magare.gmz:/home/kgeorge/mysql/work/B27531-5.0-opt
mysql-test/t/join.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/join.result:
SCCS merged