- Use strmake, that will both protect the buffer and make sure it's terminated by a zero
- Add test case
client/mysql.cc:
Use strmake instead of strxnmov as that function will make sure the string is terminated by 0
mysql-test/r/mysql.result:
Update test result
mysql-test/t/mysql.test:
Add test case
Move that perror test to ndb_basic so it's only run when there is support for --ndb
mysql-test/r/ndb_basic.result:
Move test of "perror --ndb" to this file
mysql-test/r/perror.result:
Move test of "perror --ndb" to ndb_basic
mysql-test/t/ndb_basic.test:
Move test of "perror --ndb" to this file
mysql-test/t/perror.test:
Move test of "perror --ndb" to ndb_basic
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-merge
configure.in:
Auto merged
man/Makefile.am:
Auto merged
mysys/my_bitmap.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/field.cc:
Auto merged
sql/sql_locale.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/t/mysqlbinlog.test:
Manual merge.
sql/sql_select.cc:
Manual merge.
difference between timestamp in values of months and quarters.)
Problem: when requesting timestamp diff in months or quarters, it
would only examine the date (and not the time) for the comparison.
Solution: increased precision of comparison.
mysql-test/r/func_time.result:
Additional test results
mysql-test/t/func_time.test:
Additional tests
sql/item_timefunc.cc:
Fix for timestamp diff issue. Added microsecond precision when
comparing months or quarters; previously only examined date for
these comparisons.
Converted "udf_example.cc" to C, avoids C++ runtime lib dependency (bug#21336)
sql/Makefile.am:
"udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
mysql-test/t/udf.test:
"udf_example.cc" converted to C, avoids C++ runtime lib dependency (bug#21336)
sql/udf_example.c:
Changes to be strict ansi, except long long
into rama.(none):/home/jimw/my/mysql-5.0-16881
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/t/mysql.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
'conc_sys' test
Concurrent execution of SELECT involing at least two INFORMATION_SCHEMA
tables, DROP DATABASE statement and DROP TABLE statement could have
resulted in stalled connection for this SELECT statement.
The problem was that for the first query of a join there was a race
between select from I_S.TABLES and DROP DATABASE, and the error (no
such database) was prepared to be send to the client, but the join
processing was continued. On second query to I_S.COLUMNS there was a
race with DROP TABLE, but this error (no such table) was downgraded to
warning, and thd->net.report_error was reset. And so neither result
nor error was sent to the client.
The solution is to stop join processing once it is clear we are going
to report a error, and also to downgrade to warnings file system errors
like 'no such database' (unless we are in the 'SHOW' command), because
I_S is designed not to use locks and the query to I_S should not abort
if something is dropped in the middle.
No test case is provided since this bug is a result of a race, and is
timing dependant. But we test that plain SHOW TABLES and SHOW COLUMNS
give a error if there is no such database or a table respectively.
mysql-test/r/show_check.result:
Add result for the test that SHOW TABLES and SHOW COLUMNS give a error
if there is no such database or a table respectively.
mysql-test/t/show_check.test:
Add test case that SHOW TABLES and SHOW COLUMNS give a error
if there is no such database or a table respectively.
sql/mysql_priv.h:
Remove prototype of mysql_find_files(), which is made static under
find_files() name.
sql/sql_show.cc:
Rename mysql_find_files() to find_files() and make it static.
Return FIND_FILES_OK for success, FIND_FILES_OOM for out of memory,
and FIND_FILES_DIR for directory reading error.
Downgrade error to warning in get_all_tables() if it is a
FIND_FILES_DIR error, and we are not in the 'SHOW' command.
Once 'result' is set to 1 in get_schema_tables_result(), there's no
need in continuing iterations, as we are about to return a error.
can be not replicable.
Now CREATE statements for writing in the binlog are created as follows:
- the beginning of the statement is re-created;
- the rest of the statement is copied from the original query.
The problem appears when there is a version-specific comment (produced by
mysqldump), started in the re-created part of the statement and closed in the
copied part -- there is closing comment-parenthesis, but there is no opening
one.
The proper fix could be to re-create original statement, but we can not
implement it in 5.0. So, for 5.0 the fix is just to cut closing
comment-parenthesis. This technique is also used for SHOW CREATE PROCEDURE
statement (so we are able to reuse existing code).
mysql-test/r/rpl_sp.result:
Updated result file.
mysql-test/r/rpl_trigger.result:
Updated result file.
mysql-test/r/rpl_view.result:
Updated result file.
mysql-test/t/rpl_sp.test:
Added test case for BUG#20438.
mysql-test/t/rpl_trigger.test:
Added test case for BUG#20438.
mysql-test/t/rpl_view.test:
Added test case for BUG#20438.
sql/sp.cc:
Trim comments at the end.
sql/sp_head.cc:
Moved this code to the separate function to be re-used.
sql/sql_lex.cc:
Added a new function.
sql/sql_lex.h:
Added a new function.
sql/sql_trigger.cc:
Trim comments at the end.
sql/sql_view.cc:
Trim comments at the end.
Fix for BUG#16676: Database CHARSET not used for stored procedures
The problem in BUG#16211 is that CHARSET-clause of the return type for
stored functions is just ignored.
The problem in BUG#16676 is that if character set is not explicitly
specified for sp-variable, the server character set is used instead
of the database one.
The fix has two parts:
- always store CHARSET-clause of the return type along with the
type definition in mysql.proc.returns column. "Always" means that
CHARSET-clause is appended even if it has not been explicitly
specified in CREATE FUNCTION statement (this affects BUG#16211 only).
Storing CHARSET-clause if it is not specified is essential to avoid
changing character set if the database character set is altered in
the future.
NOTE: this change is not backward compatible with the previous releases.
- use database default character set if CHARSET-clause is not explicitly
specified (this affects both BUG#16211 and BUG#16676).
NOTE: this also breaks backward compatibility.
mysql-test/r/mysqldump.result:
Updated result file.
mysql-test/r/sp.result:
Updated result file.
mysql-test/t/sp.test:
Provided test cases for BUG#16211, BUG#16676.
sql/mysql_priv.h:
Added two convenient functions for work with databases.
sql/sp.cc:
1. Add CHARSET-clause to CREATE-statement if it has been explicitly specified.
2. Polishing -- provided some comments.
sql/sp_head.cc:
Use database charset as default charset of sp-variable.
sql/sp_head.h:
Move init_sp_name() out of init_strings().
sql/sql_db.cc:
Two new functions created:
- load_db_opt_by_name();
- check_db_dir_existence();
sql/sql_show.cc:
Eliminate duplicated code by using
check_db_dir_existence() and load_db_opt_by_name()
sql/sql_table.cc:
Eliminate duplicated code by using
check_db_dir_existence() and load_db_opt_by_name()
sql/sql_yacc.yy:
Call sp_head::init_sp_name() to initialize stored routine name.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-main
VC++Files/sql/mysqld.vcproj:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/warnings-master.opt:
Auto merged
mysql-test/t/warnings.test:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
into siva.hindu.god:/usr/home/tim/m/bk/global-50
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/field.cc:
Auto merged
When processing aggregate functions all tables values are reset
to NULLs at the end of each group.
When doing that if there are no rows found for a group
the const tables must not be reset as they are not recalculated
by do_select()/sub_select() for each group.
mysql-test/r/subselect2.result:
* Bug #20792: Incorrect results from aggregate subquery
- test suite for the bug. This is dependent on InnoDB despite
the fact that the bug and the fix are not InnoDB specific.
This is because of the table flag HA_NOT_EXACT_COUNT.
When this flag is off (as in MyISAM) both t2 and t3 become of
join type 'system' as they are estimated to have 1 record and
and this statistics can be trusted (according to the absence of
HA_NOT_EXACT_COUNT).
mysql-test/t/subselect2.test:
* Bug #20792: Incorrect results from aggregate subquery
- test suite for the bug
sql/sql_select.cc:
* Bug #20792: Incorrect results from aggregate subquery
- when clearing results if there are not rows found for group
the const tables must not be reset as they are not recalculated
for each group.
into macbook.gmz:/Users/kgeorge/mysql/work/B21019-5.0-opt
mysql-test/t/select.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/select.result:
SCCS merged
mysql-test/r/perror.result:
Add error result for 1186
Remove the result for the others
mysql-test/t/perror.test:
As it's only just interesting to see that perror doesn't crash(and as result varies across platforms), send result to /dev/null
- Since error 1186 is not found among NDB error codes, the message retuned should indicate that.
extra/perror.c:
Move the !found out one level
mysql-test/t/perror.test:
Add test case for bug#16561
ndb/src/kernel/error/ndbd_exit_codes.c:
Check not only for zero size string but also classification "unknown error" when looking for an error mesage for an error code
- Allow "query" to be used as a prefix for focing a command to be sent to server
- Add testcases
client/mysqltest.c:
To force something being sent as a query to the mysqld one can
use the prefix "query". Remove "query" from string before executing.
mysql-test/r/mysqltest.result:
Add test case for "query" command
mysql-test/t/mysqltest.test:
Add test case for "query" command
When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're
united into a single condition on the key and checked together the server must
check which value is the NULL value in a correct way : not only using ->is_null
but also check if the expression doesn't depend on any tables referenced in the
current statement.
This additional check must be performed because that optimization takes place
before the actual execution of the statement, so if the field was initialized
to NULL from a previous statement the optimization would be applied incorrectly.
mysql-test/r/select.result:
Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
- test case
mysql-test/t/select.test:
Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
- test case.
Note that ALTER TABLE is important here : it happens to
leave the Field instance for t1.b set to NULL, witch is vital for
demonstrating the problem fixed by this changeset.
sql/sql_select.cc:
Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
- check whether a value is null taking into account its table dependency.
- Modify test case to workaround the test tool problem
- (Null merge into 5.0)
mysql-test/t/mysqlbinlog.test:
Send the ouput from "mysqlbinlog" to a file and then read execute it with "mysql"
This is a workaround for a windows bug in the test tools in mysql-4.1, which makes
it impossible to use "|" to send the output from one program directly to the other.
This has been fixed in mysql-5.0.
The problem was in that opt_sum_query() replaced MIN/MAX functions
with the corresponding constant found in a key, but due to imprecise
representation of float numbers, when evaluating the where clause,
this comparison failed.
When MIN/MAX optimization detects that all tables can be removed,
also remove all conjuncts in a where clause that refer to these
tables. As a result of this fix, these conditions are not evaluated
twice, and in the case of float number comparisons we do not discard
result rows due to imprecise float representation.
As a side-effect this fix also corrects an unnoticed problem in
bug 12882.
mysql-test/r/func_group.result:
BUG#20954 - test result adjustment.
Adjusted the test result of bug 12882 which was not preperly fixed.
The current patch corrects the problem that was fully corrected by the
patch for 12882.
The problem was that opt_sum_query() indicated that the optimizer may
remove all tables because all MIN/MAX/COUNT functions are constants,
but this lead to an empty result instead of NULL because the WHERE
clause was still evaluated.
The current fix removes all conjuncts in the where clause that
reference the removed tables, and thus corrects the problem.
mysql-test/r/select.result:
BUG#20954 - added test
mysql-test/r/subselect.result:
BUG#20954 - test result adjustment.
The fix removes those conditions in a where clause that refer to
tables optimized away by MIN/MAX optimization (opt_sum_query()).
mysql-test/t/select.test:
BUG#20954 - added test
sql/sql_select.cc:
Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
When MIN/MAX optimization detects that all tables can be removed,
also remove all conjuncts in a where clause that refer to these
tables. As a result of this fix, these conditions are not evaluated
twice, and in the case of float number comparisons we do not discard
result rows due to imprecise float representation.
As a side-effect this fix also corrects an unnoticed problem in
bug 12882.
When there is no index defined filesort is used to sort the result of a
query. If there is a function in the select list and the result set should be
ordered by it's value then this function will be evaluated twice. First time to
get the value of the sort key and second time to send its value to a user.
This happens because filesort when sorts a table remembers only values of its
fields but not values of functions.
All functions are affected. But taking into account that SP and UDF functions
can be both expensive and non-deterministic a temporary table should be used
to store their results and then sort it to avoid twice SP evaluation and to
get a correct result.
If an expression referenced in an ORDER clause contains a SP or UDF
function, force the use of a temporary table.
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
mysql-test/t/udf.test:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/t/sp.test:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/sp.result:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/udf.result:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
sql/sql_select.cc:
Fixed bug#19862: Sort with filesort by function evaluates function twice
If an expression referenced in an ORDER clause contains a SP or UDF
function, force the use of a temporary table.
sql/item_func.h:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
sql/item.h:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
sql/item_func.cc:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
When executing INSERT over a view with calculated columns it was assuming all
elements of the fields collection are actually Item_field instances.
This may not be true when inserting into a view and that view has columns that are
such expressions that allow updating (like setting a collation for example).
Corrected to access field information through the filed_for_view_update() function and
retrieve correctly the field info even for "update-friendly" non-Item_field items.
mysql-test/r/view.result:
Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
- test suite
mysql-test/t/view.test:
Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
- test suite
sql/item_strfunc.h:
Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
- obvious typo fixed
sql/sql_base.cc:
Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
- must access field information through the filed_for_view_update() function to retrieve
correctly the field info even for "update-friendly" non-Item_field items.
(Re-apply a patch from the general tree to the clone.)
mysql-test/mysql-test-run.pl:
"mysql-test-run.pl" must write a "Logging:" line for the evaluation of RPM build tests.
(Re-apply a patch from the general tree to the clone.)
when calculating GROUP_CONCAT all blob fields are transformed
to varchar when making the temp table.
However a varchar has at max 2 bytes for length.
This fix makes the conversion only for blobs whose max length
is below that limit.
Otherwise blob field is created by make_string_field() call.
mysql-test/r/func_gconcat.result:
Bug#16712: group_concat returns odd srting insead of intended result
* testsuite for the bug
mysql-test/t/func_gconcat.test:
Bug#16712: group_concat returns odd srting insead of intended result
* testsuite for the bug
sql/item_sum.cc:
Bug#16712: group_concat returns odd srting insead of intended result
* force blob->varchar conversion for small enough blobs only
sql/sql_select.cc:
Bug#16712: group_concat returns odd srting insead of intended result
* force blob->varchar conversion for small enough blobs only
a non-correlated single-row subquery over information schema.
The function get_all_tables filling all information schema
tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
this the function could evaluate partial conditions related to
some columns. If these conditions contained a subquery over
information schema it led to a wrong evaluation and a wrong
result set.
This bug was already fixed in 5.1.
This patch follows the way how it was done in 5.1 where
the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
in get_all_tables only for the calls of the function
open_normal_and_derived_tables and is restored after these
calls.
mysql-test/r/information_schema.result:
Added a test case for bug #21231.
mysql-test/t/information_schema.test:
Added a test case for bug #21231.
Make mysqlcheck skip over views when processing all of the tables in a
database.
client/mysqlcheck.c:
Use SHOW TABLE STATUS to get table list, and skip over things that don't
have an engine (like a VIEW).
mysql-test/r/mysqlcheck.result:
Add new results
mysql-test/t/mysqlcheck.test:
Add new regression test
- Send confusing output to /dev/null
mysql-test/t/mysqlbinlog.test:
Send confusing error messages to /dev/null so they don't appear in erro log if test case fails
- Add test case(execute perror)
- Check if strerror has returned NULL and set msg to "Unknown Error" in that case
- Thanks to Steven Xie for pointing out how to fix.
extra/perror.c:
strerror might return NULL on Solaris 2.8
mysql-test/mysql-test-run.pl:
Add possibility to execute perror from test case
mysql-test/r/have_perror.require:
New BitKeeper file ``mysql-test/r/have_perror.require''
mysql-test/r/perror.result:
New BitKeeper file ``mysql-test/r/perror.result''
mysql-test/t/perror.test:
New BitKeeper file ``mysql-test/t/perror.test''
- The mysql-test/std_data/bug15328.cnf file was not copied to install or dist dir.
mysql-test/Makefile.am:
Add std_data/*.cnf files to dist_hook and install-data-local
scripts/make_win_src_distribution.sh:
Copy *.cnf files as well.
CREATE PROCEDURE
The bug was fixed already. This changeset adds a test case.
mysql-test/r/sp-error.result:
Add result for bug#14702: misleading error message when syntax error
in CREATE PROCEDURE.
mysql-test/t/sp-error.test:
Add test case for bug#14702: misleading error message when syntax error
in CREATE PROCEDURE.
- Add call to 'safe_exit' function when db query fails.
client/mysqldump.c:
Add a call to 'safe_exit' to remember the error code and exit unless --force was give.n
mysql-test/r/mysqldump.result:
Add test result
mysql-test/t/mysqldump.test:
Add test case
mysql-test/r/delete.result:
Fix for bug #8143: A date with value 0 is treated as a NULL value
- test result
mysql-test/t/delete.test:
Fix for bug #8143: A date with value 0 is treated as a NULL value
- test case
sql/sql_delete.cc:
Fix for bug #8143: A date with value 0 is treated as a NULL value
- during SELECT queries processing we convert 'date[time]_field is null'
conditions into 'date[time]_field = 0000-00-00[ 00:00:00]' for not null
DATE and DATETIME fields. To be consistent, we have to do the same for DELETE
queries. So we should call remove_eq_conds() in the mysql_delete() as well.
Also it may simplify and speed up DELETE queries execution.
into mysql.com:/usr/home/ram/work/5.0.b10966
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
subqueries on information schema that use MIN/MAX aggregation.
Execution of some correlated subqueries may set the value
of null_row to 1 for tables used in the subquery.
If the the subquery is on information schema it causes
rejection of any row for the following executions of
the subquery in the case when an optimization filtering
by some condition is applied.
The fix restores the value of the null_row flag for
each execution of a subquery on information schema.
mysql-test/r/information_schema.result:
Added a test case for bug #18925.
mysql-test/t/information_schema.test:
Added a test case for bug #18925.
sql/sql_show.cc:
Fixed bug #18925.
Execution of some correlated subqueries may set the value
of null_row to 1 for tables used in the subquery.
If the the subquery is on information schema it causes
rejection of any row for the following execitions of
the subquery in the case when an optimization filtering
by some condition is applied.
The fix restores the value of the null_row flag for
each execution of a subquery on information schema.
When a wildcard database name is given the mysqlshow, but that wildcard
matches one database *exactly* (it contains the wildcard character), we
list the contents of that database instead of just listing the database
name as matching the wildcard. Probably the most common instance of users
encountering this behavior would be with "mysqlshow information_schema".
client/mysqlshow.c:
Add special handling for listing a single database that has a name that
looked like it contained wildcards. In this case, we just go ahead and list
the contents of the database, since there is a very high probability that is
what the user really wanted to do. (For example, 'mysqlshow INFORMATION_SCHEMA'
will show the I_S tables instead of just the I_S database.)
mysql-test/r/mysqlshow.result:
Add new results
mysql-test/t/mysqlshow.test:
Add new regression test
into moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql
mysql-test/r/create.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
mysql-test/r/union.result:
SCCS merged
mysql-test/t/union.test:
SCCS merged
The Item::tmp_table_field_from_field_type() function creates Field_datetime
object instead of Field_timestamp object for timestamp field thus always
changing data type is a tmp table is used.
The Field_blob object constructor which is used in the
Item::tmp_table_field_from_field_type() is always setting packlength field of
newly created blob to 4. This leads to changing fields data type for example
from the blob to the longblob if a temporary table is used.
The Item::make_string_field() function always converts Field_string objects
to Field_varstring objects. This leads to changing data type from the
char/binary to varchar/varbinary.
Added appropriate Field_timestamp object constructor for using in the
Item::tmp_table_field_from_field_type() function.
Added Field_blob object constructor which sets pack length according to
max_length argument.
The Item::tmp_table_field_from_field_type() function now creates
Field_timestamp object for a timestamp field.
The Item_type_holder::display_length() now returns correct NULL length NULL
length.
The Item::make_string_field() function now doesn't change Field_string to
Field_varstring in the case of Item_type_holder.
The Item::tmp_table_field_from_field_type() function now uses the Field_blob
constructor which sets packlength according to max_length.
mysql-test/t/union.test:
Added test case for bug#12185: Data type aggregation may produce wrong result
Corrected test case after fix for bug#12185
mysql-test/t/innodb.test:
Corrected test case after fix for bug#12185
mysql-test/r/union.result:
Added test case for bug#12185: Data type aggregation may produce wrong result
Corrected test case after fix for bug#12185
mysql-test/r/innodb.result:
Corrected test case after fix for bug#12185
mysql-test/r/create.result:
Corrected the test case after fixing bug#12185
sql/field.h:
Fixed bug#12185: Data type aggregation may produce wrong result
Added Field_blob object constructor which sets packlength according to
max_length argument.
sql/item.cc:
Fixed bug#12185: Data type aggregation may produce wrong result
The Item::make_string_field() function now doesn't change Field_string to
Field_varstring in the case of Item_type_holder.
The Item::tmp_table_field_from_field_type() function now creates
Field_timestamp object for a timestamp field.
The Item::tmp_table_field_from_field_type() function now uses the Field_blob
constructor which sets packlength according to max_length.
The Item_type_holder::display_length() now returns correct NULL length NULL
length.
sql/field.cc:
Fixed bug#12185: Data type aggregation may produce wrong result
Added appropriate Field_timestamp object constructor for using in the
Item::tmp_table_field_from_field_type() function.
This was only demonstrated by the use of PASSWORD(), it was not related to
that function at all. The calculation of the size of a field in the results
of a UNION did not take into account the possible growth of a string field
when being converted to the aggregated character set.
mysql-test/r/union.result:
Add new results
mysql-test/t/union.test:
Add new regression test
sql/item.cc:
Fix calculation of max_length when figuring out the type of a column in
a UNION. It needs to take into account any expansion of field size due to
charset conversions.
into mysql.com:/home/psergey/mysql-5.0-opt
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/subselect.test:
Manual merge
sql/mysql_priv.h:
Manual merge
When making a place to store field values at the start of each group
the real item (not the reference) must be used when deciding which column
to copy.
mysql-test/r/group_by.result:
Bug #20466: a view is mixing data when there's a trigger on the table
- test suite for the bug
mysql-test/t/group_by.test:
Bug #20466: a view is mixing data when there's a trigger on the table
- test suite for the bug
sql/sql_select.cc:
Bug #20466: a view is mixing data when there's a trigger on the table
- deal correctly with references
An aggregate function reference was resolved incorrectly and
caused a crash in count_field_types.
Must use real_item() to get to the real Item instance through
the reference
mysql-test/r/func_group.result:
Bug #20868: Client connection is broken on SQL query error
* test case for the bug
mysql-test/t/func_group.test:
Bug #20868: Client connection is broken on SQL query error
* test case for the bug
sql/sql_select.cc:
Bug #20868: Client connection is broken on SQL query error
* correctly resolve aggregate function references.
into lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/time.cc:
Auto merged
The problem was that store_top_level_join_columns() incorrectly assumed
that the left/right neighbor of a nested join table reference can be only
at the same level in the join tree.
The fix checks if the current nested join table reference has no immediate
left/right neighbor, and if so chooses the left/right neighbors of the
nearest upper level, where these references are != NULL.
mysql-test/r/group_min_max.result:
Test for BUG#21007.
mysql-test/t/group_min_max.test:
Test for BUG#21007.
sql/sql_base.cc:
After computing and materializing the columns of all NATURAL joins in a FROM clause,
the procedure store_top_level_join_columns() has to change the current natural join
into a leaf table reference for name resolution. For this it needs to make the left
neighbor point to the natural join table reference, and the natural join itself point
to its left neighbor.
This fix correctly determines the left/right neighbors of a table reference, even if
the neghbors are at higher levels in the nested join tree. The rule is that if a table
reference has no immediate left/right neighbors, we recursively pick the left/right
neighbor of the level(s) above.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_class.h:
Auto merged
Fix for the bug in mysql-test-run.pl which prevents other tests succeed
after IM-test failure.
The idea of the fix of BUG#20716 is to:
1. Check each SHOW INSTANCES statement, add necessary "sleep" instruction before;
2. Move all environment checkings into the one file and include it everywhere.
mysql-test/mysql-test-run.pl:
Fix bug in mysql-test-run.pl -- kill leftovers if some
guarded mysqld-instance is still alive after IM shutdown.
mysql-test/r/im_daemon_life_cycle.result:
Updated result file.
mysql-test/r/im_life_cycle.result:
Updated result file.
mysql-test/r/im_options_set.result:
Updated result file.
mysql-test/r/im_options_unset.result:
Updated result file.
mysql-test/r/im_utils.result:
Updated result file.
mysql-test/t/im_daemon_life_cycle.imtest:
Include im_check_env.inc for the checking of environment.
mysql-test/t/im_life_cycle.imtest:
Include im_check_env.inc for the checking of environment.
mysql-test/t/im_options_set.imtest:
Include im_check_env.inc for the checking of environment.
mysql-test/t/im_options_unset.imtest:
Include im_check_env.inc for the checking of environment.
mysql-test/t/im_utils.imtest:
Include im_check_env.inc for the checking of environment.
mysql-test/include/im_check_env.inc:
A new file to be included in each IM-test.
The statements in the file ensure that starting
conditions (environment) are as expected.
into olga.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
for class Item_func_trim.
For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
if expressions with the TRIM function of two arguments were used.
For 5.0 it caused an error message when trying to select
from a view with the TRIM function of two arguments.
This unexpected error message was due to the fact that the
print method for the class Item_func_trim was inherited from
the class Item_func. Yet the TRIM function does not take a list
of its arguments. Rather it takes the arguments in the form:
[{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
[remstr FROM] str
mysql-test/r/func_str.result:
Added a test case for bug #17526: uncorrect print method
for class Item_func_trim.
mysql-test/t/func_str.test:
Added a test case for bug #17526: incorrect print method
for class Item_func_trim.
sql/item_strfunc.cc:
Fixed bug #17526: incorrect print method
for class Item_func_trim.
Added an implementation for the virtual function print
in the class Item_func_trim.
The implementation takes into account the fact the TRIM
function takes the arguments in the following forms:
[{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
[remstr FROM] str
sql/item_strfunc.h:
Fixed bug #17526: incorrect print method
for class Item_func_trim.
Added an implementation for the virtual function print
in the class Item_func_trim.
Declared a virtual method to return the mode of the TRIM
function: LEADING, TRAILING or BOTH.
Added implementations of this method for Item_func_trim and
its descendants Item_func_ltrim and Item_func_rtrim.
"real" table fails in JOINs".
This is a regression caused by the fix for Bug 18444.
This fix removed the assignment of empty_c_string to table->db performed
in add_table_to_list, as neither me nor anyone else knew what it was
there for. Now we know it and it's covered with tests: the only case
when a table database name can be empty is when the table is a derived
table. The fix puts the assignment back but makes it a bit more explicit.
Additionally, finally drop sp.result.orig which was checked in by mistake.
BitKeeper/deleted/.del-sp.result.orig:
Delete: mysql-test/r/sp.result.orig
mysql-test/r/derived.result:
Updated result file.
mysql-test/r/sp.result:
Test results fixed (Bug#21002)
mysql-test/t/derived.test:
New error return for the case when MULTI-DELETE tries to delete from
a derived table: now derived tables belong to their own db (""), and
MUTLI-DELETE can't find the correspondent table for it in the
DELETE list, as it can't resolve tables in different dbs by alias
(See Bug#21148 for details)
mysql-test/t/sp.test:
Add a test case for Bug#21002 "Derived table not selecting from a "real"
table fails in JOINs"
sql/sp.cc:
Make empty_c_string globally accessible.
sql/sql_class.cc:
Add empty_c_string definition.
sql/sql_class.h:
Add a comment for the constructor of Table_ident which is
used for derived tables. Make sure this constructor also initializes
the database name, not only the table name.
sql/sql_parse.cc:
Don't call check_db_name for empty database.
Currently the only case when a table database name can be empty
is when the table is a derived table.
Report the right error if the database name is wrong (ER_WRONG_DB_NAME,
not ER_WRONG_TABLE_NAME).
REPLACE ... SELECT would require INSERT privileges on certain tables
when SELECT really suffices. Require INSERT only on target table.
mysql-test/r/insert_select.result:
Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
Show that REPLACE ... SELECT requires INSERT privileges only on target table.
(revised test with more view-fu)
mysql-test/t/insert_select.test:
Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
Show that REPLACE ... SELECT requires INSERT privileges only on target table.
(revised test with more view-fu)
sql/sql_insert.cc:
Bug#20989: View '(null).(null)' references invalid table(s)... on SQL SECURITY INVOKER
require SELECT rather than INSERT privs on tables that constitute the views we'll read
When a default of '' was specified for TEXT/BLOB columns, the specification
was silently ignored. This is presumably to be nice to applications (or
people) who generate their column definitions in a not-very-clever fashion.
For clarity, doing this now results in a warning, or an error in strict
mode.
mysql-test/r/federated.result:
Update results
mysql-test/r/fulltext_distinct.result:
Update results
mysql-test/r/fulltext_update.result:
Update results
mysql-test/r/gis-rtree.result:
Update results
mysql-test/r/gis.result:
Update results
mysql-test/r/join_outer.result:
Update results
mysql-test/r/order_by.result:
Update results
mysql-test/r/type_blob.result:
Add new results
mysql-test/r/type_ranges.result:
Update results
mysql-test/t/type_blob.test:
Add new test
sql/field.cc:
Issue a warning when setting '' as the default on a BLOB/TEXT column,
and make it an error in strict mode. Also, clarify comments about when
NO_DEFAULT_VALUE_FLAG is set.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/time.cc:
Auto merged
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
mysql-test/r/date_formats.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
sql/time.cc:
Manual merge