mysql-test/r/func_time.result:
Fixed func_time test when merging the fix for bug #11655 and bug #20927 to 5.0
sql/item_timefunc.cc:
Fixed compilation when merging the fix for bug #11655 and bug #20927 to 5.0
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced
include/my_time.h:
Added defines for the TIME limits
Added defines for the warning flags set by str_to_time() and check_time_range()
Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
Fixed testcase which relied on incorrect behaviour
Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
Added check_time_range() to be used from str_to_time() and item_timefunc.cc
Added new out-of-range flag to str_to_time() warnings
Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
Checks for 'unsigned int' overflows in Item_func_maketime
Use make_time_with_warn() instead of make_time() in Item_func_maketime
Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
Check for return value of str_to_time() along with warning flags
- Access checks are omitted when compliled without --with-embedded-privilege-control
- Patch: skip this test
mysql-test/t/lowercase_fs_off.test:
Added test to check if this embedded built in which case we just skip this test.
Provide a more extensible, easier-to-change way of reordering
test cases.
mysql-test/lib/mtr_cases.pl:
Provide a more extensible, easier-to-change way of reordering
test cases.
Zero-length variables caused failures when using the length to look
up the name in a hash. Instead, signal that no zero-length name can
ever be found and that to encounter one is a syntax error.
mysql-test/r/variables.result:
Results for test.
mysql-test/t/variables.test:
Insert tests to prove that zero-length variable names do not cause
faults.
sql/gen_lex_hash.cc:
If the length is zero, then there is nothing to look-up in the
hash.
sql/sql_lex.cc:
Names of variables must not be empty. Signal an error of that
happens.
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.
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 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
(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.)
- 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
"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
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
into rama.(none):/home/jimw/my/mysql-5.0-17608
include/my_base.h:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/t/merge.test:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/handler.cc:
Auto merged
Removed logic in ha_federated::write_row, which checks field query ids in the
loop which builds the query to run on the remote server.
mysql-test/r/federated.result:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
New test results for test that verifies that one can insert to rows using
"insert into... select * from..", delete
them by id, then immediately insert them in the same way they were originally
inserted.
mysql-test/t/federated.test:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
New test that verifies that one can insert to rows using
"insert into... select * from..", delete
them by id, then immediately insert them in the same way they were originally
inserted.
sql/ha_federated.cc:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Removed the logic in ha_federated::write_row which checked the query id of
each field and compared it to the thread query id.
Each field has a query id, and the problem used to be that if I did an insert
no fields specified, the field value would contain the last inserted value
for that field. The way to work around this was to see if the query id for
that field was the same as the current query id or of the rest of the field
query ids. If it wasn't, that told me the query didn't have the field value
specified.
Somewhere from when I wrote that code to now the problem went away, and there
was no longer the need for this logic.
Also removed the bool "has_fields", which needs not exist and using
table->s->fields is sufficient.
client/mysqldump.c:
When dumping more than one database, make sure that the proper database is selected before restoring that database's views.
Replaced hard-coded database name length with appropiate token.
mysql-test/r/mysqldump.result:
Added new result and corrected results for existing test cases.
mysql-test/t/mysqldump.test:
Added new case for dumping and restoring multiple databases each containing a view.
Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
mysql-test/t/select.test:
Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
mysql-test/r/select.result:
Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
Corrected the test case after fixing bug#10977
mysql-test/t/mysql.test:
Corrected the test case after fixing bug#10977
mysql-test/r/mysql.result:
Corrected the test case after fixing bug#10977
When an alias is set to a column leading spaces are removed from the alias.
But when this is done on aliases set by user this can lead to confusion.
Now Item::set_name() method issues the warning if leading spaces were removed
from an alias set by user.
New warning message is added.
mysql-test/t/select.test:
Added test case for bug#10977:No warning issued if a column name is truncated.
mysql-test/r/select.result:
Added test case for bug#10977:No warning issued if a column name is truncated.
sql/sql_yacc.yy:
Fixed bug#10977: No warning issued if a column name is truncated
The is_autogenerated_name flag is set before set_name() method call.
sql/item.cc:
Fixed bug#10977: No warning issued if a column name is truncated
Now Item::set_name() method issues the warning if leading spaces were removed
from an alias set by user.
The bug caused a crash of the server if a subquery with
ORDER BY DESC used the range access method.
The bug happened because the method QUICK_SELECT_DESC::reset
was not reworked after MRR interface had been introduced.
mysql-test/r/subselect.result:
Added a test case for bug #20869.
mysql-test/t/subselect.test:
Added a test case for bug #20869.
The bug was due to a loss happened during a refactoring made
on May 30 2005 that modified the function JOIN::reinit.
As a result of it for any subquery the value of offset_limit_cnt
was not restored for the following executions. Yet the first
execution of the subquery made it equal to 0.
The fix restores this value in the function JOIN::reinit.
mysql-test/r/subselect.result:
Added a test case fir bug #20519.
mysql-test/t/subselect.test:
Added a test case fir bug #20519.
into anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/merge-4.1_2_5.0
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysqldump did not select the correct database before trying to dump
views from it. this resulted in an empty result set, which in turn
startled mysql-dump into a core-dump. this only happened for views,
not for tables, and was only visible with multiple databases that
weren't by sheer luck in the order mysqldump required, anyway. this
fixes by selecting the correct database before dumping views; it also
catches the empty set-condition if it should occur for other reasons.
client/mysqldump.c:
Bug#21014: Segmentation fault of mysqldump on view
failsafe: if "select ... from information_schema.views" returns an
empty set, don't deref NULL; throw an error instead.
fix: select the correct database not only before dumping tables, but
before dumping views, as well.
mysql-test/r/mysqldump.result:
Bug#21014: Segmentation fault of mysqldump on view
show that mysqldump selects the correct database before trying to dump
views from it.
mysql-test/t/mysqldump.test:
Bug#21014: Segmentation fault of mysqldump on view
show that mysqldump selects the correct database before trying to dump
views from it.
into macbook.gmz:/Users/kgeorge/mysql/work/B17212-5.0-opt
mysql-test/r/innodb_mysql.result:
Merge 4.1->5.0 for bug #17212
mysql-test/t/innodb_mysql.test:
Merge 4.1->5.0 for bug #17212
sql/sql_select.cc:
Merge 4.1->5.0 for bug #17212