into mysql.com:/home/hf/work/31155/my51-31155
sql/item.h:
Auto merged
sql/item_geofunc.h:
Auto merged
sql/item.cc:
merging
sql/item_geofunc.cc:
merging
Options to mysqld were not processed correctly because switch statement
was missing some "break"s. CS adds them.
No test case; would require .opt file and server restart. Manually tested.
sql/mysqld.cc:
Add missing "break"s to switch() in mysqld to fix option processing.
Before this patch, failures to write to the log tables (mysql.slow_log
and mysql.general_log) were improperly printed (the time was printed twice),
or not printed at all.
With this patch, failures to write to the log tables is reported in the
error log, for all cases of failures.
mysql-test/r/log_tables.result:
Bug#27858 (Failing to log to a log table doesn't log anything to error log)
mysql-test/t/log_tables.test:
Bug#27858 (Failing to log to a log table doesn't log anything to error log)
sql/log.cc:
Bug#27858 (Failing to log to a log table doesn't log anything to error log)
"DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work,
but is untested for some SHOW commands and does not work for other SHOW
commands.
Since this is an un-intended feature that leaked as a result of a coding bug
(in the parser grammar), the correct fix is to fix the grammar to not accept
this construct.
In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>"
is not considered a bug, and we will not implement other features to make all
the SHOW commands usable inside a cursor just because someone exploited a bug.
mysql-test/r/sp-error.result:
Only allow declaring cursors for SELECT statements to avoid
possible further confusion/problems.
mysql-test/t/information_schema.test:
Only SELECT statements are allowed in cursors.
mysql-test/t/sp-error.test:
Add test case for Bug#29223. Non-SELECT statements in cursors now
yields a parser error.
sql/sql_yacc.yy:
Rework DECLARE CURSOR statement to not allow non-SELECT statements.
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/create.result:
Auto merged
mysql-test/r/null.result:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
mysql_change_user().
The problem was that THD::ull was not reset in THD::cleanup().
The fix is to reset it.
sql/sql_class.cc:
Reset THD::ull after cleanup to prevent memory corruption.
tests/mysql_client_test.c:
Add test case for BUG#31418.
Problem: GROUP_CONCAT(DISTINCT BIT_FIELD...) uses a tree to store keys;
which are constructed using a temporary table fields,
see Item_func_group_concat::setup().
As a) we don't store null bits in the tree where the bit fields store parts
of their data and b) there's no method to properly compare two table records
we've got problem.
Fix: convert BIT fields to INT in the temporary table used.
mysql-test/r/func_gconcat.result:
Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
- test result.
mysql-test/t/func_gconcat.test:
Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
- test case.
sql/item_sum.cc:
Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
- force the create_tmp_table() to convert BIT columns to INT
in order to be able to compare records containing BIT fields.
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_yacc.yy:
manual merge
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset
mysql-test/r/ctype_ucs.result:
test result
mysql-test/r/ctype_utf8.result:
test result
mysql-test/t/ctype_ucs.test:
test case
mysql-test/t/ctype_utf8.test:
test case
sql/item.cc:
check_well_formed_result() moved from Item_str_func
sql/item.h:
check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
check_well_formed_result moved to Item
fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
check_well_formed_result moved to Item
sql/sql_yacc.yy:
added check for well formed string
The special case with NULL as a regular expression
was handled at prepare time. But in this special case
the item was not marked as fixed. This caused an assertion
at execution time.
Fixed my marking the item as fixed even when known to
return NULL at prepare time.
mysql-test/r/func_regexp.result:
Bug #31440: test case
mysql-test/t/func_regexp.test:
Bug #31440: test case
sql/item_cmpfunc.cc:
Bug #31440: mark the item as fixed even when
known to return NULL.
static but it's still used by another compilation unit.
Remove static qualifier from do_command definition.
sql/sql_parse.cc:
do_command is also used by sql_connect.c in 5.1
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
configure.in:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
scripts/Makefile.am:
Auto merged
scripts/mysql_system_tables_data.sql:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/sql_select.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
Introduced in mark_transaction_to_rollback(), part of fix for bug 24989;
fix is to check thd for NULL before using it.
sql/sql_class.cc:
It is possible that mark_transaction_to_rollback() may be
called in rare circumstances when thd is NULL (e.g., from
some calls to convert_error_code_to_mysql()). Don't use thd
if it is NULL.
precision > 0 && scale <= precision'.
A sign of a resulting item of the IFNULL function was not
updated and the maximal length of this result was calculated
improperly. Correct algorithm was copy&pasted from the IF
function implementation.
sql/item_cmpfunc.cc:
Fixed bug #31471.
The Item_func_ifnull::fix_length_and_dec method has been
modified to update the Item_func_ifnull::unsigned_flag field
and to take this field into account when calculating the
Item_func_ifnull::max_length value.
(See Item_func_if::fix_length_and_dec for reference).
mysql-test/t/null.test:
Added test case for bug #31471.
mysql-test/r/null.result:
Added test case for bug #31471.
mysql-test/r/create.result:
Update test case after the bugfix of bug #31471.
of SQL_BIG_SELECTS.
The bug was that SQL_BIG_SELECTS was not properly set
in COM_CHANGE_USER.
The fix is to update SQL_BIG_SELECTS properly.
sql/mysql_priv.h:
Cleanup: make prepare_new_connection_state() private for module.
sql/sql_class.cc:
Update THD::options with the respect to SQL_BIG_SELECTS
in COM_CHANGE_USER.
sql/sql_connect.cc:
Cleanup: make prepare_new_connection_state() private for module.
tests/mysql_client_test.c:
Add a test case BUG#20023.
Fixed the usage of spatial data (and Point in specific) with
non-spatial indexes.
Several problems :
- The length of the Point class was not updated to include the
spatial reference system identifier. Fixed by increasing with 4
bytes.
- The storage length of the spatial columns was not accounting for
the length that is prepended to it. Fixed by treating the
spatial data columns as blobs (and thus increasing the storage
length)
- When creating the key image for comparison in index read wrong
key image was created (the one needed for and r-tree search,
not the one for b-tree/other search). Fixed by treating the
spatial data columns as blobs (and creating the correct kind of
image based on the index type).
mysql-test/r/bdb_gis.result:
Bug #30825: bdb tests
mysql-test/r/gis-rtree.result:
Bug #30825: key length changed
mysql-test/r/gis.result:
Bug #30825: MyISAM tests
mysql-test/r/innodb_gis.result:
Bug #30825: InnoDB tests
mysql-test/t/bdb_gis.test:
Bug #30825: bdb tests
mysql-test/t/gis.test:
Bug #30825: MyISAM tests
mysql-test/t/innodb_gis.test:
Bug #30825: InnoDB tests
sql/field.cc:
Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image
takes type parameter into consideration and is a superset of
Field_geom::get_key_image()
sql/field.h:
Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image
takes type parameter into consideration and is a superset of
Field_geom::get_key_image()
sql/sql_select.h:
Bug #30825: Geometry data are a blob derivate
sql/sql_table.cc:
Bug #30825: Increased key length to accomodate for
spatial reference system identifier (srid)
sql/sql_yacc.yy:
Bug #30825: Increased key length to accomodate for
spatial reference system identifier (srid)
sql/table.cc:
Bug #30825: It stores a length for spatial data
as well, so increase the storage length (as it's
done for blobs).
mysql-test/include/gis_keys.inc:
Bug #30825: Test file for spatial data and non-spatial indexes
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
libmysql/libmysql.c:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
sql/field.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES
mysql-test/r/rpl_flush_log_loop.result:
test result
mysql-test/t/rpl_flush_log_loop.test:
test case
sql/set_var.cc:
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES
Bug#29816 Syntactically wrong query fails with misleading error message
The core problem is that an SQL-invoked function name can be a <schema
qualified routine name> that contains no <schema name>, but the mysql
parser insists that all stored procedures (function, procedures and
triggers) must have a <schema name>, which is not true for functions.
This problem is especially visible when trying to create a function
or when a query contains a syntax error after a function call (in the
same query), both will fail with a "No database selected" message if
the session is not attached to a particular schema, but the first
one should succeed and the second fail with a "syntax error" message.
Part of the fix is to revamp the sp name handling so that a schema
name may be omitted for functions -- this means that the internal
function name representation may not have a dot, which represents
that the function doesn't have a schema name. The other part is
to place schema checks after the type (function, trigger or procedure)
of the routine is known.
mysql-test/r/sp-error.result:
Add test case result for Bug#29816
mysql-test/r/udf.result:
Add test case result for Bug#28318
mysql-test/t/sp-error.test:
Add test case for Bug#29816
mysql-test/t/udf.test:
Add test case for Bug#28318
sql/sp.cc:
Copy the (last) nul byte of the stored routine key and move name parsing
code to the sp_name class constructor.
sql/sp_head.cc:
Revamp routine name parsing for when no schema is specified and
omit dot from the qualified name if the routine is not associated
with a scheme name.
sql/sp_head.h:
Name parsing got bigger, uninline by moving to a single unit -- the sp_head.cc
file.
sql/sql_yacc.yy:
Only copy the schema name if one is actually set and check for schema
name presence only where it's necessary.
This deadlock occurs when a client issues a HANDLER ... OPEN statement
that tries to open a table that has a pending name-lock on it by another
client that also needs a name-lock on some other table which is already
open and associated to a HANDLER instance owned by the first client.
The deadlock happens because the open_table() function will back-off
and wait until the name-lock goes away, causing a circular wait if some
other name-lock is also pending for one of the open HANDLER tables.
Such situation, for example, can be easily repeated by issuing a RENAME
TABLE command in such a way that the existing table is already open
as a HANDLER table by another client and this client tries to open
a HANDLER to the new table name.
The solution is to allow handler tables with older versions (marked for
flush) to be closed before waiting for the name-lock completion. This is
safe because no other name-lock can be issued between the flush and the
check for pending name-locks.
The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).
sql/sql_base.cc:
Improve comments in the open_table() function, stating the importance
of the handler tables flushing for the back-off process.
sql/sql_handler.cc:
Allows handler tables flushes when opening new tables in order to avoid
potential deadlocks. Add comments explaining the importance of the flush.
Problem: creating a partitioned table during name resolution for the
partition function we search for column names in all parts of the
CREATE TABLE query. It is superfluous (and wrong) sometimes.
Fix: launch name resolution for the partition function against
the table we're creating.
mysql-test/r/partition.result:
Fix for bug #29444: crash with partition refering to table in create-select
- test result.
mysql-test/t/partition.test:
Fix for bug #29444: crash with partition refering to table in create-select
- test result.
sql/item.cc:
Fix for bug #29444: crash with partition refering to table in create-select
- LEX::use_only_table_context introduced, which is used in the
Item_field::fix_fields() to resolve names only against
context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.cc:
Fix for bug #29444: crash with partition refering to table in create-select
- LEX::use_only_table_context introduced, which is used in the
Item_field::fix_fields() to resolve names only against
context->first_name_resolution_table/last_name_resolution_table.
sql/sql_lex.h:
Fix for bug #29444: crash with partition refering to table in create-select
- LEX::use_only_table_context introduced, which is used in the
Item_field::fix_fields() to resolve names only against
context->first_name_resolution_table/last_name_resolution_table.
sql/sql_partition.cc:
Fix for bug #29444: crash with partition refering to table in create-select
- set the lex->use_only_table_context before the func_expr->fix_fields()
call to ensure we're resolving names against the table we're creating;
then restore it back after the call.
into linux-st28.site:/home/martin/mysql/src/bug31160/my51-bug31160
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
sql/item_timefunc.h:
Auto merged
mysql-test/t/func_time.test:
SCCS merged
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().
mysql-test/r/func_sapdb.result:
Bug#31160: Changed test result.
mysql-test/r/func_time.result:
Bug#31160: Test result.
mysql-test/t/func_time.test:
Bug#31160: Test case.
sql/item_timefunc.h:
Bug#31160: The fix: Initializing maybe_null to true
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.
into linux-st28.site:/home/martin/mysql/src/bug30832-again/my51-bug30832-again
mysql-test/r/func_misc.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item_func.h:
Auto merged
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.
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.
mysql-test/r/func_misc.result:
Bug#30832 completion: test result
mysql-test/t/func_misc.test:
Bug#30832 completion: test case
added negative numbers
sql/item_func.h:
Bug#30832 completion
The function that represents unary minus is considered a constant if the argument is.
Locked rows of the InnoDB storage was silently skipped in the read-committed
isolation level.
QUICK_RANGE_SELECT for unique ranges lacks second (blocking) read
of the record that was read semi-consistently and just skip it.
The handler::read_multi_range_next method has been modified
to retry previous unique range if the previous read was
semi-consistent.
sql/handler.cc:
Fixed bug #31310.
The handler::read_multi_range_next method has been modified
to retry previous unique range if the previous read was
semi-consistent.
mysql-test/include/mix1.inc:
Added test case for bug #31310.
mysql-test/r/innodb_mysql.result:
Added test case for bug #31310.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
netware/mysql_test_run.c:
Auto merged
sql/mysqld.cc:
Auto merged
storage/ndb/include/ndbapi/Ndb.hpp:
Auto merged
scripts/mysqld_safe.sh:
Manual merge.
Problem: check missed if the second updatexml() argument is valid.
Fix: check it.
mysql-test/r/xml.result:
Fix for bug #31438: updatexml still crashes
- test result.
mysql-test/t/xml.test:
Fix for bug #31438: updatexml still crashes
- test case.
sql/item_xmlfunc.cc:
Fix for bug #31438: updatexml still crashes
- check if the second argument passed to the updatexml() is valid.
Item_sum_distinct::setup(THD*): Assertion
There was an assertion to detect a bug in ROLLUP
implementation. However the assertion is not true
when used in a subquery context with non-cacheable
statements.
Fixed by turning the assertion to accepted case
(just like it's done for the other aggregate functions).
mysql-test/r/func_group.result:
Bug #31156: test case
mysql-test/t/func_group.test:
Bug #31156: test case
sql/item_sum.cc:
Bug #31156: make it OK to call setup() several times:
done for (e.g.) scalar subquery
into bodhi.(none):/opt/local/work/mysql-5.0-runtime
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sql_parse.cc:
Auto merged
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.
Our web server has been restructured several times, and references
to it in our source code has stayed the same. This patch from Paul
DuBois updates all URLs to modern semantics.
debian/po/ca.po:
Change URLs.
debian/po/cs.po:
Change URLs.
debian/po/da.po:
Change URLs.
debian/po/gl.po:
Change URLs.
debian/po/ja.po:
Change URLs.
debian/po/pt_BR.po:
Change URLs.
debian/po/sv.po:
Change URLs.
debian/po/tr.po:
Change URLs.
mysql-test/lib/mtr_report.pl:
Change URLs.
mysql-test/mysql-test-run-shell.sh:
Change URLs.
ndb/include/ndbapi/Ndb.hpp:
Change URLs.
netware/mysql_test_run.c:
Change URLs.
scripts/mysqld_safe.sh:
Change URLs.
sql/mysqld.cc:
Change URLs.
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.
into sin.intern.azundris.com:/home/tnurnberg/19828/51-19828
mysql-test/t/grant.test:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/grant.result:
manual merge
convert(<invalid time>, datetime) in WHERE caused crash as function
returned (void*)NULL, but did not flag SQL NULL. It does now.
mysql-test/r/type_datetime.result:
show that convert() to datetime in a WHERE-clause will no longer crash
the server on invalid input.
mysql-test/t/type_datetime.test:
show that convert() to datetime in a WHERE-clause will no longer crash
the server on invalid input.
sql/item.cc:
When failing to process time values, do not just return (void*)NULL,
but flag SQL NULL as well so no caller will try to process the 0x0L.
This makes behaviour for Item::Item::val_decimal_from_date() and
Item::Item::val_decimal_from_time() identical.
Reserve the space for the leading 0 (before the decimal point) in DECIMAL(a,a) ZEROFILL.
mysql-test/r/type_decimal.result:
show that we allocate a large enough buffer for output of DECIMAL(a,a) [ZEROFILL].
mysql-test/t/type_decimal.test:
show that we allocate a large enough buffer for output of DECIMAL(a,a) [ZEROFILL].
without patch for bug#31227, valgrind will complain here; so will a
debug build.
sql/my_decimal.cc:
Reserve the space for the leading 0 (before the decimal point) in DECIMAL(a,a) ZEROFILL.
Doxygenise preamble of my_decimal2string().
This bug is a symptom of the way handler's tables are managed. The
most different aspect, compared to the conventional behavior, is that
the handler's tables are long lived, meaning that their lifetimes are
not bounded by the duration of the command that opened them. For this
effect the handler code uses its own list (handler_tables instead of
open_tables) to hold open handler tables so that the tables won't be
closed at the end of the command/statement. Besides the handler_tables
list, there is a hash (handler_tables_hash) which is used to associate
handler aliases to tables and to refresh the tables upon demand (flush
tables).
The current implementation doesn't work properly with refreshed tables
-- more precisely when flush commands are issued by other initiators.
This happens because when a handler open or read statement is being
processed, the associated table has to be opened or locked and, for this
matter, the open_tables and handler_tables lists are swapped so that the
new table being opened is inserted into the handler_tables list. But when
opening or locking the table, if the refresh version is different from the
thread refresh version then all used tables in the open_tables list (now
handler_tables) are refreshed. In the "refreshing" process the handler
tables are flushed (closed) without being properly unlinked from the
handler hash.
The current implementation also fails to properly discard handlers of
dropped tables, but this and other problems are going to be addressed
in the fixes for bugs 31397 and 31409.
The chosen approach tries to properly save and restore the table state
so that no table is flushed during the table open and lock operations.
The logic is almost the same as before with the list swapping, but with
a working glue code.
The test case for this bug is going to be committed into 5.1 because it
requires a test feature only avaiable in 5.1 (wait_condition).
sql/sql_handler.cc:
Backup and reset the open_tables and handler_table lists when opening
a new handler table and merge the opened table into the handler_tables
list afterwards. When locking, do the same but possibly close the table
if a refresh is pending.
"Disabled plugin is provoking Valgrind error"
If there are any auto-alloced string plug-in options, memory is
allocated during the call for handle_options(). We must free this
memory if we are not installing the plug-in.
include/my_getopt.h:
bug31382
new function: my_cleanup_options()
mysys/my_getopt.c:
bug31382
new function: my_cleanup_options(), fini_one_value()
alter init_variables() to take an extra option.
forward declare init_one_value() and fini_one_value()
sql/sql_plugin.cc:
bug31382
after calling handle_options(), make sure to call my_cleanup_options()
if we are not installing the plug-in.
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
- used_tables() returned RAND_TABLE, which means that the item
can produce "random" results;
- but const_item() returned TRUE, which means that the item is
a constant one.
The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.
mysql-test/r/sp.result:
Update result file.
mysql-test/t/sp.test:
Add test cases for BUG-31035, BUG-31191, BUG-31226
sql/item_func.cc:
Make Item::const_item() be consistent with Item::used_tables().
Two cases in ha_partition::extra() was missing
(HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH)
which only is currently used by NDB (which not uses ha_partition)
mysql-test/r/partition.result:
Added result for test of Bug #30484
mysql-test/t/partition.test:
Added test for Bug #30484
sql/ha_partition.cc:
Added HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH
in ha_partition::extra to do nothing
(Only currently used in NDB, which is not dependent of ha_partition)
added check for hidden I_S tables for 'show columns|keys' commands
mysql-test/r/information_schema.result:
test result
mysql-test/t/information_schema.test:
test case
sql/sql_parse.cc:
added check for hidden I_S tables for 'show columns|keys' commands
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
client/mysqldump.c:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/func_misc.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/sql_view.cc:
Auto merged
client/client_priv.h:
manual merge
mysql-test/r/mysqldump.result:
manual merge
mysql-test/r/view_grant.result:
manual merge
sql/field.cc:
manual merge
sql/sql_select.cc:
manual merge
tests/mysql_client_test.c:
manual merge
into polly.(none):/home/kaa/src/maint/bug5731/my51-bug5731
mysql-test/r/variables.result:
Auto merged
mysys/my_getopt.c:
Auto merged
sql/set_var.cc:
Auto merged
mysql-test/t/variables.test:
Manual merge.
This is for bug #29446 "Specifying a myisam_sort_buffer > 4GB on 64 bit machines not possible". Support for myisam_sort_buffer_size > 4 GB on 64-bit Windows will be looked at later in 5.2.
mysql-test/r/variables.result:
Fixed the test.
mysql-test/t/variables.test:
Fixed the test.
mysys/my_getopt.c:
Print a warning to the error log if a user sets an option to a value greater than the option's maximum value.
sql/set_var.cc:
Issue an SQL warning if a user assignes a value greater than the variable's maximum value.
The function str_to_date has a field to say whether it's invoked constant
arguments. But this member was not initialized, causing the function to
think that it could use a cache of the format type when said cache was in
fact not initialized.
Fixed by initializing the field to false.
mysql-test/r/type_date.result:
Bug#30942: Test result
mysql-test/t/type_date.test:
Bug#30942: Test case
sql/item_timefunc.h:
Bug#30942: Initialized const_item to false
We use get_geometry_type() call to decide the exact type
of a geometry field to be created (POINT, POLYGON etc)
Though this function was only implemented for few items.
In the bug's case we need to call this function for the
Item_sum instance, where it was not implemented, what is
the reason of the crash.
Fixed by implementing virtual Item::get_geometry_type(),
so it can be called for any Item.
sql/item.h:
Bug #31155 gis types in union'd select cause crash.
virtual Item::geometry_type() added instead of
various geometry_type() fucntions.
sql/item.cc:
Bug #31155 gis types in union'd select cause crash.
Unified virtual ::get_geometry_type() function used
sql/item_geofunc.cc:
Bug #31155 gis types in union'd select cause crash.
virtual Item::geometry_type() implemented for geo-Items.
Mostly previous ::get_geometry_type() implementation changed
sql/item_geofunc.h:
Bug #31155 gis types in union'd select cause crash.
get_geometry_type() declarations unified
end-of-line check missed in Gis_read_stream::get_next_word,
what can lead to crashes (expecially with NULL strings).
End-of-line check added
sql/gstream.cc:
Bug #30955 geomfromtext() crasher
mysql-test/r/gis.result:
Bug #30955 geomfromtext() crasher.
test result
mysql-test/t/gis.test:
Bug #30955 geomfromtext() crasher.
test case
Add --skip-innodb-adaptive-hash-index option, which is a way to
work around the bug (by disabling the adaptive hash feature entirely).
This may be useful even once the bug is fixed, for benchmarking purposes.
There are some workloads for which the adaptive hash index is not effective.
sql/ha_innodb.cc:
Add --skip-innodb-adaptive-hash-index option.
sql/ha_innodb.h:
Add --skip-innodb-adaptive-hash-index option.
sql/mysqld.cc:
Add --skip-innodb-adaptive-hash-index option.
sql/set_var.cc:
Add --skip-innodb-adaptive-hash-index option.
The Item_func_rollup_const class is used for wrapping constants to avoid
wrong result for ROLLUP queries with DISTINCT and a constant in the select
list. This class is also used to wrap up a NULL constant but its null_value
wasn't set accordingly. This led to a server crash.
Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.
mysql-test/t/olap.test:
Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
mysql-test/r/olap.result:
Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
sql/item_func.h:
Bug#31095: Unexpected NULL constant caused server crash.
Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.
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
into linux-st28.site:/home/martin/mysql/src/bug30832/my51-bug30832
mysql-test/r/func_misc.result:
Auto merged
mysql-test/t/func_misc.test:
Auto merged
sql/item.h:
Auto merged
caused a few tests to fail because the thd->extra_lock wasn't being set to
NULL after the table was unlocked. This poses a serious problem because later
attempts to access thd->extra_lock (now a dangling pointer) will probably
result in a crash (undefined behavior) -- and that's what actually happens
in some test cases.
The solution is to set the select_create::m_plock pointee to NULL, which
means that thd->extra_lock is set to NULL when the lock data is not for a
temporary table.
sql/sql_insert.cc:
Set the m_plock pointee to NULL, thus avoiding a dangling thd->extra_lock pointer
in some cases.
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.
When CREATE TEMPORARY TABLE .. SELECT is invoked from a stored function
which in turn is called from CREATE TABLE SELECT causes a memory leak
because the inner create temporary table overrides the outter extra_lock
reference when locking the table.
The solution is to simply not overrride the extra_lock by only using the
extra_lock for a non-temporary table lock.
mysql-test/r/create.result:
Add test case result for Bug#21136
mysql-test/t/create.test:
Add test case for Bug#21136
sql/sql_insert.cc:
For temporary tables, store the lock data within the select_create class
since tmp tables contents are not replicated. For "real" tables, store
the lock data in the thread extra_lock pointer.
insert_id after succ. mysql_change_user() call.
See also WL 4066.
This bug reveals two problems:
- the problem on the client side which was described originally;
- the problem in protocol / the server side: connection context
on client and server should be like after mysql_real_connect()
and be consistent. The server however just resets character
set variables to the global defaults.
The fix seems to be as follows:
- extend the protocol so that the client be able to send
character set information in COM_CHANGE_USER command;
- change the server so that it understands client character set
in the command;
- change the client:
- reset character set to the default value (which has been
read from the configuration);
- send character set in COM_CHANGE_USER command.
client/client_priv.h:
Declare a function, used in libmysql.c and client.c.
libmysql/libmysql.c:
1. Reset character set on the client in mysql_change_user().
2. Send character set to the server in COM_CHANGE_USER command.
mysql-test/t/mysql_client_test.test:
mysql_client_test.log is used by the test suite.
Use mysql_client_test.out.log to collect mysql_client_test
real output.
sql/sql_parse.cc:
Switch character set in COM_CHANGE_USER.
tests/mysql_client_test.c:
Test case for BUG#30472.
into trift2.:/MySQL/M51/push-5.1
This is mysql-5.1.22-rc.
mysql-test/r/innodb_mysql.result:
Auto merged
scripts/mysqld_safe.sh:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_select.cc:
Manual merge - the 31001 bug is already fixed.
mysql-test/include/mix1.inc:
Manual merge - should not have conflicted at all.