the UDF
When deleting a user defined function MySQL must remove it from both the
in-memory hash table and the mysql.proc system table.
Finding (and removal therefore) from the internal hash table is case
insensitive (or whatever the default charset is), whereas finding and
removal from the system table is case sensitive.
As a result if you supply a function name that is not in the same character
case to DROP FUNCTION the server will remove the function only from the
in-memory hash table and will keep the row in mysql.proc system table.
This will cause inconsistency between the two structures (that is fixed
only by restarting the server).
Fixed by using the name in the precise case (from the in-memory hash table)
to delete the row in the mysql.proc system table.
mysql-test/r/udf.result:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
mysql-test/t/udf.test:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
sql/sql_udf.cc:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- use the exact function name in deleting from mysql.proc.
mysql-test/r/myisam.result:
Fix results file - a test was moved from the .test file, but the results were not updated.
mysql-test/r/symlink.result:
echo End of 4.1 tests while I'm here
mysql-test/t/myisam.test:
echo End of 4.1 tests while I'm here
mysql-test/t/symlink.test:
echo End of 4.1 tests while I'm here
Problem:
When creating a temporary field for a temporary table in create_tmp_field_from_field(), a resulting field is created as an exact copy of an original one (in Field::new_field()). However, Field_enum and Field_set contain a pointer (typelib) to memory allocated in the parent table's MEM_ROOT, which under some circumstances may be deallocated later by the time a temporary table is used.
Solution:
Override the new_field() method for Field_enum and Field_set and create a separate copy of the typelib structure in there.
include/typelib.h:
Added copy_typelib() declaration
mysql-test/r/sp.result:
Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysql-test/t/sp.test:
Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysys/typelib.c:
Added copy_typelib() definition
sql/field.cc:
Create a copy of the internal 'typelib' structure when copying Field_enum of Field_set objects.
sql/field.h:
Override new_field method in Field_enum (and Field_set) to copy the typelib structure.
Merged 4.1->5.0. Updated myisam.test
mysql-test/r/myisam.result:
updated result file
mysql-test/t/myisam.test:
Removing symlink specific test from myisam test
into kpdesk.mysql.com:/home/thek/dev/bug17489/my50-bug17498
mysql-test/r/symlink.result:
Auto merged
mysql-test/t/symlink.test:
Auto merged
mysql-test/r/myisam.result:
SCCS merged
mysql-test/t/myisam.test:
SCCS merged
- When this bug was corrected it changed the behavior
for data/index directory in the myisam test case.
- This patch moves the OS depending tests to a non-windows
test file.
mysql-test/r/myisam.result:
moved test from myisam to symlink; new result file
mysql-test/r/symlink.result:
moved test from myisam to symlink; new result file
mysql-test/t/myisam.test:
moved test from myisam to symlink
mysql-test/t/symlink.test:
moved test from myisam to symlink
into mysql.com:/usr/home/bar/mysql-5.0.b22645
mysql-test/t/disabled.def:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
mysql-test/r/mysqlbinlog.result:
After merge fix
mysql-test/t/mysqlbinlog.test:
After merge fix
Blocked evaluation of constant objects of the classes
Item_func_is_null and Item_is_not_null_test at the
prepare phase in the cases when the objects used subqueries.
mysql-test/r/ps.result:
Extended test case for bug #25027.
mysql-test/t/ps.test:
Extended test case for bug #25027.
sql/sql_lex.cc:
Returned back the assertion in st_select_lex_unit::set_limit,
removed by the previous commit for this bug.
into mysql.com:/home/svoj/devel/mysql/BUG23404/mysql-5.0-engines
mysql-test/r/alter_table.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
sql/sql_parse.cc:
SCCS merged
Removed an assertion that was not valid for the cases where the query
in a prepared statement contained a single-row non-correlated
subquery that was used as an argument of the IS NULL predicate.
mysql-test/r/ps.result:
Added a test case for bug #25027.
mysql-test/t/ps.test:
Added a test case for bug #25027.
and no WHERE condition were applied for any subquery without tables.
mysql-test/r/subselect.result:
Added a test case for bug #24670.
mysql-test/t/subselect.test:
Added a test case for bug #24670.
sql/item_subselect.cc:
Fixed bug #24670: optimizations that are legal only for subqueries without tables
and no WHERE condition were applied for any subquery without tables.
Removed an assertion that caused an abort for subqueries without tables and no
WHERE condition.
Blocked substitution of a single-row subquery without tables for the constant
row from its select list when the subquery contained a WHERE condition.
This optimization is valid only for subquries without tables with no conditions.
Any subquery without tables with WHERE clause returns NULL if the WHERE condition
is FALSE. Erroneously it was always considered as non-nullable that could trigger
another optimization concerning IS NULL predicates which is applicable only for
non-nullable expressions and ultimately led to a wrong result returned by the outer
query.
Added a proper implementation of the virtual method may_be_null for class
subselect_single_select_engine.
sql/item_subselect.h:
Fixed bug #24670: optimizations that are legal only for subqueries without tables
and no WHERE condition were applied for any subquery without tables.
Made method may_by_null for class subselect_engine vvirtual.
into weblab.(none):/home/marcsql/TREE/mysql-5.0-19194
sql/sp_head.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
limitation)
Bug#24854 (Mixing Searched Case with Simple Case inside Stored Procedure
crashes Mysqld)
Implemented code review (19194) comments
mysql-test/r/sp_stress_case.result:
Implemented code review comments : use SQL instead of a shell script to
generate the code
mysql-test/t/sp_stress_case.test:
Adjusted
sql/sql_yacc.yy:
Added more explicit comments
BitKeeper/deleted/.del-sp_stress_case.sh:
Delete: mysql-test/t/sp_stress_case.sh
on altered table" and Bug#19733 "Repeated alter, or repeated
create/drop, fails"
mysql-test/r/ps.result:
Post-merge fixes: update results with new tests.
mysql-test/r/sp.result:
Post-merge fixes: update results.
mysql-test/t/ps.test:
Add more test cases for Bug#4968 and related.
mysql-test/t/sp.test:
A post-merge fix: add more testcases for Bug#4968 and related.
sql/sql_insert.cc:
Post-merge fixes: update comments, fix errors of the manual merge.
sql/sql_lex.cc:
Fix a manual merge error.
sql/sql_parse.cc:
Fix a few errors of the manual merge, style.
sql/sql_table.cc:
Post-merge fixes, fix a few errors of the manual merge, fix style.
sql/sql_yacc.yy:
A post-merge fix.
into naruto.:C:/cpp/bug17489/my50-bug17489
mysql-test/r/windows.result:
Auto merged
mysql-test/t/windows.test:
Auto merged
sql/sql_parse.cc:
Auto merged
into mysql.com:/home/bk/MERGE/mysql-5.0-merge
client/mysqldump.c:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/rpl_timezone.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysys/my_thr_init.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
mysql-test/r/func_in.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
sql/opt_range.cc:
Auto merged
mysql-test/t/kill.test:
Move the connect of second connection to just before the query to be killed are sent.
This introduces less variance since the connect time is not included in the delay
we want between send of query and kill.
into mysql.com:/home/hf/work/embt/my50-embt
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/federated.inc:
Auto merged
mysql-test/t/flush_block_commit.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/join.test:
Auto merged
mysql-test/t/status.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
mysql-test/mysql-test-run.pl:
merging
mysql-test/r/flush_block_commit.result:
SCCS merged
into quant.(none):/ext/mysql/bk/mysql-5.0-bug24507
client/mysqlbinlog.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
Bug#4968 "Stored procedure crash if cursor opened on altered table"
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from
stored procedure."
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
Test cases for bugs 4968, 19733, 6895 will be added in 5.0.
Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).
In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).
The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table were not
re-execution friendly: during their operation they used to modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc
for drop_it.remove() and similar patterns to find evidence.
The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement.
To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.
The problem of crashing bug 22060 stemmed from the fact that the above
metnioned functions were not only modifying HA_CREATE_INFO structure in
LEX, but also were changing it to point to areas in volatile memory of
the execution memory root.
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO (note that code in 5.1 already creates and
uses a copy of this structure in mysql_create_table()/alter_table(),
but this approach didn't work well for CREATE TABLE SELECT statement).
mysql-test/r/ps.result:
Update test results (Bug#19182, Bug#22060)
mysql-test/t/ps.test:
Add a test case for Bug#19182, Bug#22060 (4.1-only parts)
sql/mysql_priv.h:
LEX::key_list and LEX::create_list were moved to LEX::alter_info.
Update declarations to use LEX::alter_info instead of these two
members.
sql/sql_class.h:
Replace pair<columns, keys> with an instance of Alter_info in
select_create constructor. We create a new copy of Alter_info
each time we re-execute SELECT .. CREATE prepared statement.
sql/sql_insert.cc:
Adjust to a new signature of create_table_from_items.
sql/sql_lex.cc:
Implement Alter_info::Alter_info that would make a "deep" copy
of all definition lists (keys, columns).
sql/sql_lex.h:
Move key_list and create_list to class Alter_info. Implement
Alter_info::Alter_info that can be used with PS and SP.
sql/sql_list.h:
Implement a copy constructor of class List that makes a deep copy
of all list nodes.
sql/sql_parse.cc:
Adjust to new signatures of mysql_create_table, mysql_alter_table,
select_create. Functions mysql_create_index and mysql_drop_index has
become identical after initialization of alter_info was moved to the
parser, and were merged. Flag enable_slow_log was not updated for
SQLCOM_DROP_INDEX, which is a bug. Just like CREATE INDEX, DROP INDEX
is currently done via complete table rebuild and is rightfully a slow
administrative statement.
sql/sql_show.cc:
Adjust mysqld_show_create_db to a new signature.
sql/sql_table.cc:
Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
mysql_prepare_table to new signatures.
sql/sql_yacc.yy:
LEX::key_list and LEX::create_list moved to class Alter_info
- Using DATA/INDEX DIRECTORY option on Windows put data/index file into
default directory because the OS doesn't support readlink().
- The procedure for changing data/index file directory is
different under Windows.
- With this fix we report a warning if DATA/INDEX option is used,
but OS doesn't support readlink().
mysql-test/r/windows.result:
- updated result file.
mysql-test/t/windows.test:
- Added test case to verify we get warnings if we specify DATA/INDEX
DIRECTORY on a platform which doesn't support readlink().
sql/sql_parse.cc:
- Added warnings if DATA/INDEX DIRECTORY option is used but not supported
by the target platform.
table
ROW_FORMAT option is lost during CREATE/DROP INDEX.
This fix forces CREATE/DROP INDEX to retain ROW_FORMAT by instructing
mysql_alter_table() that ROW_FORMAT is not used during creating/dropping
indexes.
mysql-test/r/alter_table.result:
A test case for bug#23404.
mysql-test/t/alter_table.test:
A test case for bug#23404.
sql/sql_parse.cc:
CREATE/DROP INDEX must not change ROW_FORMAT. Setting create_info.row_type
to ROW_TYPE_NOT_USED informs mysql_alter_table that ROW_FORMAT was not
used during alteration, and thus must be retained.
Implementing event based replication of LC_TIME_NAMES for 5.0
(as a replacement of previously made ONE_SHOT replication)
mysql-test/r/mysqlbinlog.result:
Fixing results
mysql-test/r/rpl_locale.result:
Fixing results
mysql-test/t/disabled.def:
Enabling rpl_locale
mysql-test/t/mysqlbinlog.test:
Check "mysqlbinlog | mysql" reproduces lc_time_names correctly.
mysql-test/t/rpl_locale.test:
Adding new test: that setting lc_time_names back to en_US works fine.
sql/log_event.cc:
Implementing event based replication of LC_TIME_NAMES for 5.0
(as a replacement of previously made ONE_SHOT replication)
sql/log_event.h:
Adding new Q_*_CODE
Adding "lc_time_names_number" members into Query_log_event and PRINT_EVENT_INFO
The problem is that the GEOMETRY NOT NULL can't automatically set
any value as a default one. We always tried to complete LOAD DATA
command even if there's not enough data in file. That doesn't work
for GEOMETRY NOT NULL. Now Field_*::reset() returns an error sign
and it's checked in mysql_load()
mysql-test/r/gis.result:
test result
mysql-test/t/gis.test:
testcase
sql/field.cc:
reset() now returns error sign
sql/field.h:
Field_*::reset() now returns error sign if the field can't be reset
sql/sql_load.cc:
check if field can't be reset and return error if it's so
Problem: storing >=8 byte hexadecimal values we don't check data.
Fix: check if the data fits the {u}longlong range.
mysql-test/r/select.result:
Fix for bug #22533: Traditional: Too-long bit value not rejected.
- test result.
mysql-test/t/range.test:
Fix for bug #22533: Traditional: Too-long bit value not rejected.
- adjusted.
mysql-test/t/select.test:
Fix for bug #22533: Traditional: Too-long bit value not rejected.
- test case.
sql/item.cc:
Fix for bug #22533: Traditional: Too-long bit value not rejected.
- limit storing value to {U}LONGLONG_MAX in numeric context.
mysql-test/t/disabled.def:
Disabling test in 5.0 temporarily
sql/mysql_priv.h:
Adding number_par agrument to constructor
sql/sql_locale.cc:
Using constructor, instead of structure initialization.
into mysql.com:/usr/home/bar/mysql-5.0.b22645
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/log.cc:
Removing one_shot from 5.0.
sql/sql_locale.cc:
After merge fix
sql/set_var.cc:
After merge fix
sql/set_var.h:
After merge fix
Problem: replication of LC_TIME_NAMES didn't work.
Thus, INSERTS or UPDATES using date_format() always
worked with en_US on the slave side.
Fix: adding ONE_SHOT implementation for LC_TIME_NAMES.
mysql-test/r/variables.result:
Adding various tests with LC_TIME_NAMES and
string and numeric constants and expressions.
mysql-test/t/variables.test:
Adding various tests with LC_TIME_NAMES and
string and numeric constants and expressions.
sql/log.cc:
Adding ONE_SHOT trick for lc_time_names.
sql/mysql_priv.h:
Adding new member "number" - for unique locale IDs.
Adding prototype for my_locale_by_number().
sql/set_var.cc:
Modifying lc_time_names variable to understand both:
- string valyes (using locale name)
- number values (using locale IDs)
sql/set_var.h:
- Marking lc_time_names as ONE_SHOT capable.
- Marking lc_time_names as INT_RESULT compatible.
sql/sql_locale.cc:
- adding local IDs
- better layout for locale data declarations
(splitting long lines into short ones)
- adding DBUG_ASSERT into my_locale_by_name()
and moving this function towards the end of file -
after "my_locales" declaration
- adding my_locale_by_number() implementation
sql/sql_parse.cc:
Adding initialization of lc_time_names
to its default value (en_US)
mysql-test/r/rpl_locale.result:
Adding test case
mysql-test/t/rpl_locale.test:
Adding test case
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/ignore:
auto-union
Docs/Makefile.am:
Auto merged
Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/Makefile.am:
Auto merged
myisam/myisampack.c:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_handler.cc:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Manual merge with import of upstream yaSSL
into neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
Makefile.am:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/mysqld.cc:
Auto merged
fixed a valgrind warning
type_varchar.test:
fixed a valgrind warning
mysql-test/t/type_varchar.test:
fixed a valgrind warning
sql/item_func.cc:
fixed a valgrind warning
into kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/rpl_sp.test:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/rpl_sp.result:
- Merged
into kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
client/mysqltest.c:
Auto merged
libmysql/libmysql.c:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
- Refactoring of duplicate code
- Modified bad test cases
- Changed expected error when operating on information_schema.
mysql-test/r/information_schema.result:
- updated result file with new error code.
mysql-test/r/rpl_sp.result:
- Modified test case
mysql-test/t/information_schema.test:
- Changed error code for operations on information_schema
mysql-test/t/rpl_sp.test:
- Modified test case
sql/sql_parse.cc:
- Cleaned up code:
* replace tab with space
* simplified if/switch statements
* refactored duplicated code
Server crashes if a flush commmand is issued and binlog is closed.
- added check to prevent binlog access when binlog file isn't opened.
sql/sql_parse.cc:
- removed deprecated environment consistency check.
- added check to prevent binlog access on closed binlog.
mysql-test/t/flush2-master.opt:
- Added test case (master options)
mysql-test/t/flush2.test:
- Added test case
mysql-test/r/flush2.result:
- Added test case (resultfile)
- Post-merge cleanup.
- Disabled this bug's test for 5.x until 16861 is resolved.
mysql-test/r/distinct.result:
Bug#20836 Selecting into variables results in wrong results being returned
- Remove results for this bug. When bug number 16861 is resolved, the result
should match the 4.1 result.
mysql-test/t/distinct.test:
Bug#20836 Selecting into variables results in wrong results being returned
- Disable the test for 20836. This test should remain disabled until bug 16861
is fixed. The results for the test should be the same as in 4.1.
sql/sql_class.cc:
Bug#20836 Selecting into variables results in wrong results being returned
- Post-merge cleanup.
into example.com:/work/bug24395-v2/my50
fix for bug#24395 merged into 5.0
mysql-test/t/alter_table.test:
Auto merged
myisam/mi_open.c:
merge into 5.0 by using macroses available in 5.0
mysql-test/r/alter_table.result:
manual merge
sql/sql_table.cc:
manual merge
Added else clause of
if (new_table && !new_table->file->is_view)
This else clauses does keys management on the live table, thus we have
to force other threads to reopen the table.
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
Auto merged
ndb/tools/ndb_config.cpp:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_sum.cc:
Auto merged
disabled warnings because their order is undeterministic
mysql-test/t/func_gconcat.test:
disabled warnings because their order is undeterministic
mysql-test/r/func_gconcat.result:
disabled warnings because their order is undeterministic
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
client/mysqltest.c:
Manual merge
mysql-test/r/mysqltest.result:
Manual merge
Problem: ``SET PASSWORD FOR foo@localhost'' was written into
binary log using double quites: ``SET PASSWORD FOR "foo"@"localhost"...''.
If sql_mode was set to ANSI_QUOTES, parser on slave considered
"foo" and "localhost" as identifiers instead of strigns constants,
so it failed to parse, generated syntax error and slave then stopped.
Fix: changing binary log entries to use single quotes:
``SET PASSWORD FOR 'foo'@'localhost'...'' not to depend on ANSI_QUOTES.
mysql-test/r/rpl_do_grant.result:
Adding test case
mysql-test/t/rpl_do_grant.test:
Adding test case
sql/sql_acl.cc:
Using single quotes instead of double quotes,
not to fails when sql_mode=ANSI_QUOTES.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
sql/handler.cc:
Auto merged
client/mysqltest.c:
Manual merge
- chmod the saved files from 4.1 to make sure they are writable
mysql-test/t/varbinary.test:
As the files saved from 4.1 has been in bk they muight be readonly
Use "chmod" to make sure they are writable
fixed test to replace port to SLAVE_PORT in result file
federated.result:
new result file
mysql-test/t/federated.test:
fixed test to replace port to SLAVE_PORT in result file
mysql-test/r/federated.result:
new result file
into kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
sql/sql_parse.cc:
Auto merged
mysql-test/r/rpl_sp.result:
- merged
mysql-test/t/rpl_sp.test:
-merged
prepared statement and subquery.
When a field of a view from an outer select is resolved the find_field_in_view
function creates an Item_direct_view_ref object that references the
corresponding view underlying field. After that the view_ref is marked
as a dependent one. While resolving view underlying field it also get
marked as a dependent one due to current_select still points to the subselect.
Marking the view underlying field is wrong and lead to attaching conditions
to a wrong table and thus to the wrong result of the whole statement.
Now mark_select_range_as_dependent() function isn't called for fields from a
view underlying table.
sql/sql_base.cc:
Bug#20327: Marking of a wrong field leads to a wrong result on select with view, prepared statement and subquery.
Now mark_select_range_as_dependent() function isn't called for fields from a
view underlying table.
mysql-test/r/ps.result:
Added a test case for bug#20327: Marking of a wrong field leads to a wrong result on select with view, prepared statement and subquery.
mysql-test/t/ps.test:
Added a test case for bug#20327: Marking of a wrong field leads to a wrong result on select with view,prepared statement and subquery.
- The table_priv column of table_privs table was altered to a enum type
with fewer enums causing the SHOW/CREATE VIEW grants to be truncated.
- Improved comments and moved all declarations for table_privs, column_privs
and proc_privs to one section for each table making it easy to see hat alterations
are performed on each table
- Reduced the number of ALTER's slightly, but as this is an upgrade script we need
to take all possibilites into account.
scripts/mysql_fix_privilege_tables.sql:
Collect everything for tables_priv, columns_priv and procs_priv in one section for each table
Remove duplicate ALTERS
Remove the ALTERS that truncated "SHOW VIEW" and "CREATE VIEW" from
the enum type for Table_priv.
mysql-test/r/fix_priv_tables.result:
New BitKeeper file ``mysql-test/r/fix_priv_tables.result''
mysql-test/r/fix_priv_tabs.result:
New BitKeeper file ``mysql-test/r/fix_priv_tabs.result''
mysql-test/t/fix_priv_tables.test:
New BitKeeper file ``mysql-test/t/fix_priv_tables.test''
into mysql.com:/usr/home/ram/work/bug22229/my50-bug22229
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
into bodhi.local:/opt/local/work/mysql-5.0-runtime
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/wait_for_socket.sh:
Manual merge.
sql/sql_cache.cc:
Manual merge.
This error is displayed anytime the SELECT statement needs a temp table to
return correct results because the object (select_dumpvar) that represents
variables named in the INTO clause stored the results before the temp
table was considered. The problem was fixed by creating the necessary
Item_func_set_user_var objects once the correct data is ready.
mysql-test/r/distinct.result:
Bug#20836 Selecting into variables results in wrong results being returned
- Added results
mysql-test/t/distinct.test:
Bug#20836 Selecting into variables results in wrong results being returned
- Added various Selects that use the INTO statement and a temp table.
- Added Select Into Outfile variant tests also.
sql/sql_class.cc:
Bug#20836 Selecting into variables results in wrong results being returned
- The select_dumpvar variable created a Item_func_set_user_var too early
and once set, it was not possible to change. The Item_func_set_user_var
is now created once the final results are available.
sql/sql_class.h:
Bug#20836 Selecting into variables results in wrong results being returned
- Removed unnecessary object members.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/collapsed:
auto-union
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/rpl_deadlock.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/rpl_deadlock.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
include/my_sys.h:
Manual merge, my_getpagesize broken out of "#ifdef HAVE_SYS_MMAN_H"
ALTER TABLE DISABLE KEYS doesn't work when modifying the table
ENABLE|DISABLE KEYS combined with another ALTER TABLE option, different
than RENAME TO did nothing. Also, if the table had disabled keys
and was ALTER-ed then the end table was with enabled keys.
Fixed by checking whether the table had disabled keys and enabling them
in the copied table.
myisam/mi_open.c:
Extend mi_indexes_are_disabled to implement return value
2 - Non-unique indexes are disabled
mysql-test/r/alter_table.result:
update result
mysql-test/t/alter_table.test:
update test
sql/sql_table.cc:
When ENABLE|DISABLE index is combined with another option
different than RENAME TO, we should ENABLE|DISABLE the keys of
the modified table. Also when modifying we should preserve the
previous state of the indices.
(This problem exists in 5.0 and 5.1 but since the codebase has
diverged, this fix won't automerge, but the fix will be quite
similar).
statements
Currently the optimizer evaluates loose index scan only for top-level SELECT
statements
Extend loose index scan applicability by :
- Test the applicability of loose scan for each sub-select, instead of the
whole query. This change enables loose index scan for sub-queries.
- allow non-select statements with SELECT parts (like, e.g.
CREATE TABLE .. SELECT ...) to use loose index scan.
mysql-test/r/group_min_max.result:
Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
statements
- test case
mysql-test/t/group_min_max.test:
Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
statements
- test case
sql/opt_range.cc:
Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
statements
- loose index scan will be tried over the current subselect
(lex->current_select) instead of the whole query (lex->select_lex).
- allow non-select statements with SELECT parts (like, e.g.
CREATE TABLE .. SELECT ...) to use loose index scan.
- CREATE PROCEDURE stores database name based on query context instead
of 'current database' as set by 'USE' according to manual.
The bug reporter interpret the filtering statements as bug for
DROP PROCEDURE based on this behavior.
- Removed the code which changes db context.
- Added code to check that a valid db was supplied.
mysql-test/r/rpl_sp.result:
- Added test case (result)
mysql-test/t/rpl_sp.test:
- Added test case
sql/sp.cc:
- Removed code for changing current db context.
sql/sql_parse.cc:
- Added code to check if a valid db was supplied.
into rakia.gmz:/home/kgeorge/mysql/autopush/B11927-5.0-opt
mysql-test/r/func_gconcat.result:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/sql_string.h:
Auto merged
When implicitly converting string fields to numbers the
string-to-number conversion error was not sent to the client.
Added code to send the conversion error as warning.
We also need to prevent generation of warnings from the places
where val_xxx() methods are called for the sole purpose of updating
the Item::null_value flag.
To achieve that a special function is added (and called) :
update_null_value(). This function will set the no_errors flag and
will call val_xxx(). The warning generation in Field_string::val_xxx()
will use the flag when generating the conversion warnings.
mysql-test/r/compare.result:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- non-convertible strings in arithmetic operations
mysql-test/r/func_gconcat.result:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- non-convertible strings in arithmetic operations
mysql-test/r/func_group.result:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- non-convertible strings in arithmetic operations
mysql-test/r/type_varchar.result:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- test case
mysql-test/t/type_varchar.test:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- test case
sql/field.cc:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- send conversion warning to the client
sql/item.cc:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- send conversion warning to the client
sql/item.h:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- added a special function to explicitly update the null_value
sql/item_func.h:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- added a special function to explicitly update the null_value
sql/item_subselect.h:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- added a special function to explicitly update the null_value
sql/item_sum.cc:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- added a special function to explicitly update the null_value
sql/item_sum.h:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- added a special function to explicitly update the null_value
sql/sql_string.h:
BUG#11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
- send conversion warning to the client
Problem: when loading mysqlbinlog dumps, CREATE PROCEDURE having semicolons
in their bodies failed.
Fix: Using safe delimiter "/*!*/;" to dump log entries.
client/mysqlbinlog.cc:
- Adding PRINT_EVENT_INFO argument to dump_xxx_log_entries()
- Setting delimiter to "/*!*/;" before calling dump functions
mysql-test/r/ctype_ucs_binlog.result:
Fixing test results
mysql-test/r/mix_innodb_myisam_binlog.result:
Fixing test results
mysql-test/r/mysqlbinlog.result:
Fixing test results
Adding test case
mysql-test/r/mysqlbinlog2.result:
Fixing test results
mysql-test/r/rpl_charset.result:
Fixing test results
mysql-test/r/rpl_timezone.result:
Fixing test results
mysql-test/r/user_var-binlog.result:
Fixing test results
mysql-test/t/mix_innodb_myisam_binlog.test:
Fixing LIKE expression
mysql-test/t/mysqlbinlog.test:
Adding test case
sql/log_event.cc:
Using print_event_info->delimiter instead of
hard-coded semicolon as a query end marker.
sql/log_event.h:
Adding new member to store delimiter.
Initialize key_part->type on open. This caused key_copy() to fail for bit_fields. (key_copy is used in HANDLER and opt_range)
include/heap.h:
Increased heap max length to > 4G for 64 bit machines
mysql-test/r/show_check.result:
Updated results after heap size change
mysql-test/r/type_bit.result:
Added test for bug in bit field handling (in handler and opt_range.cc)
mysql-test/t/type_bit.test:
Added test for bug in bit field handling (in handler and opt_range.cc)
sql/ha_heap.cc:
Increased heap max length to > 4G for 64 bit machines
sql/item_sum.cc:
Increased heap max length to > 4G for 64 bit machines
sql/mysqld.cc:
Increased heap max length to > 4G for 64 bit machines
sql/set_var.cc:
Increased heap max length to > 4G for 64 bit machines
sql/sql_class.h:
Increased heap max length to > 4G for 64 bit machines
sql/sql_select.cc:
Increased heap max length to > 4G for 64 bit machines
sql/table.cc:
Initialize key_part->type ; This was used for bit fields but only set in temporary tables
sql/uniques.cc:
Increased heap max length to > 4G for 64 bit machines
into shakedown.(none):/home/jpipes/dev/mysql-5.0-maint
BitKeeper/etc/ignore:
auto-union
client/mysql.cc:
Auto merged
mysql-test/r/func_misc.result:
Auto merged
sql/item_func.h:
Auto merged
mysql-test/r/mysql.result:
Manual merge
mysql-test/t/mysql.test:
Manual merge
master_port after a "change master" will be set to the compiled in default value
i.e not always the same as what the master report as it's port number.
mysql-test/mysql-test-run.pl:
Read the master-port value from the mysqld. Used for replacing the
default compiled in port number in for example rpl000015
mysql-test/r/rpl000015.result:
Update result file
mysql-test/t/rpl000015.test:
When changing master without specifying master port, the port for master will
be set to the compiled in default. Replace with that value
When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL
mysql-test/r/func_in.result:
Added testcase for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
mysql-test/t/func_in.test:
Added testcase for bug #24261 "crash when WHERE contains NOT IN ('<negative value>') for unsigned column type"
sql/opt_range.cc:
When calculating a SEL_TREE for the "c_{i-1} < X < c_i" interval, check if the tree returned for the "-inf < X < c_0" interval is NULL
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
libmysql/libmysql.c:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/my_time.c:
Auto merged
strings/decimal.c:
Auto merged
If a view was created with the DEFINER security and later the definer user
was dropped then a SELECT from the view throws the error message saying that
there is no definer user is registered. This is ok for a root but too much
for a mere user.
Now the st_table_list::prepare_view_securety_context() function reveals
the absence of the definer only to a superuser and throws the 'access denied'
error to others.
mysql-test/t/view_grant.test:
Added a test case for bug#17254: Error for DEFINER security on VIEW provides too much info
mysql-test/r/view_grant.result:
Added a test case for bug#17254: Error for DEFINER security on VIEW provides too much info
sql/table.cc:
Bug#17254: Error for DEFINER security on VIEW provides too much info
Now the st_table_list::prepare_view_securety_context() function reveals
the absence of the definer only to a superuser and throws the 'access denied'
error to others.
into neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
mysql-test/Makefile.am:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Manual merge of changes for RPM
fails randomly.
The problem was that the test case used command line tool (mysql)
without specifying connect_timeout argument. In some cases,
this lead to hanging of the test case.
The fix is to specify --connect_timeout=1 when starting mysql.
Also, the patch contains polishing and various cleanups to simplify
analyzing of the problems further.
The patch affects only test suite, no server codebase has been
touched.
mysql-test/lib/mtr_im.pl:
Remember PID of the IM-spawner -- a process, that is
used to fork IM-angel.
mysql-test/lib/mtr_io.pl:
Trim \n from the PID.
mysql-test/lib/mtr_process.pl:
Don't complain if it was IM-spawner, who died.
mysql-test/r/im_daemon_life_cycle.result:
Update the result file.
mysql-test/r/im_life_cycle.result:
Update the result file.
mysql-test/t/im_daemon_life_cycle.imtest:
Polishing: add more comments, be more verbose.
mysql-test/t/im_life_cycle.imtest:
Polishing: be more verbose.
mysql-test/t/im_utils.imtest:
Polishing: be more verbose.
mysql-test/t/kill_n_check.sh:
Log messages to the extrenal file so that they can be analyzed
if test case failed.
mysql-test/t/wait_for_process.sh:
Log messages to the extrenal file so that they can be analyzed
if test case failed.
mysql-test/t/wait_for_socket.sh:
Log messages to the extrenal file so that they can be analyzed
if test case failed.
mysql-test/t/log.sh:
Dummy script to facilitate logging from test-scripts.
mysql-test/t/utils.sh:
A bunch of auxilary functions to facilitate logging.
Load shared libraries from zlib (fixed that mysql-test-run.pl didn't work on some Solaris boxes)
Added connect timeout to test to make im_daemon_life_cycle more predictable
mysql-test/mysql-test-run.pl:
Added option --mtr-build-thread
Load shared libraries from zlib (fixed that mysql-test-run.pl didn't work on some Solaris boxes)
mysql-test/t/wait_for_socket.sh:
Added connect timeout (to make test predictable)
into mysql.com:/usr/home/ram/work/bug22029/my41-bug22029
mysql-test/r/date_formats.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
into mysql.com:/usr/home/ram/work/bug22029/my50-bug22029
mysql-test/r/date_formats.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
- Use more appropriate test case.
mysql-test/r/mysql.result:
Bug#19799 delimiter command not working correctly when sourcing a sql file
- Alt. Result.
mysql-test/t/mysql_delimiter.sql:
Bug#19799 delimiter command not working correctly when sourcing a sql file
- Alt. Test
into mysql.com:/usr/home/ram/work/bug22029/my50-bug22029
mysql-test/r/date_formats.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
sql/item_timefunc.cc:
merging
- Client side readline functions unconditionally search for Unix '\n' line
endings. In this case, the delimiter statement was set to '//\r' instead
of the intended '//'. When removing the '\n' check for and remove
preceeding '\r' character as well.
client/readline.cc:
Bug#19799 delimiter command not working correctly when sourcing a sql file
- When removing the '\n' character, check for and remove preceeding '\r'
character as well.
mysql-test/r/mysql.result:
Bug#19799 delimiter command not working correctly when sourcing a sql file
- Added Results.
mysql-test/t/mysql_delimiter.sql:
Bug#19799 delimiter command not working correctly when sourcing a sql file
- Added Tests.
mysql-test/t/mysql_delimiter_19799.sql:
Bug#19799 delimiter command not working correctly when sourcing a sql file
- File containing delimiter statement followed by '\r\n' line ending.
mysql_fix_privilege_tables.s's ability to convert the system tables as of
3.20 to current system table format
Add similar test for 4.1.23 tables - but use "mysql < mysql_fix_privilege_tables.sql"
so it can be run on any platform.
mysql-test/t/system_mysql_db_fix30020-master.opt:
Rename: mysql-test/t/system_mysql_db_fix-master.opt -> mysql-test/t/system_mysql_db_fix30020-master.opt
mysql-test/mysql-test-run.pl:
Find mysql_fix_privilege_tables.sql and assign it's path and name to $MYSQL_FIX_PRIVILEGE_TABLES
mysql-test/t/system_mysql_db_fix30020.test:
Send output to var/log/system_mysql_db_fix30020.err
Add some more comments
mysql-test/t/system_mysql_db_fix40123-master.opt:
New BitKeeper file ``mysql-test/t/system_mysql_db_fix40123-master.opt''
mysql-test/t/system_mysql_db_fix40123.test:
New BitKeeper file ``mysql-test/t/system_mysql_db_fix40123.test''
mysql-test/r/ps.result:
Fix after manual merge: update for different error message.
mysql-test/t/ps.test:
Fix after manual merge: use right error codes.
Make Prepared_stmt_count a global status variable, accessible via
SHOW STATUS LIKE 'Prepared_stmt_count';. Documentation should be
updated.
mysql-test/r/ps.result:
Update result for bug#16365: Prepared Statements: DoS with too many
open statements, according to bug#23159: prepared_stmt_count should be
status variable.
mysql-test/t/ps.test:
Update test case for bug#16365: Prepared Statements: DoS with too many
open statements, according to bug#23159: prepared_stmt_count should be
status variable.
sql/mysqld.cc:
Add Prepared_stmt_count as global status variable.
sql/set_var.cc:
Remove prepared_stmt_count as system variable.
disable filling of I_S tables for EXPLAIN
mysql-test/r/information_schema.result:
Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
test case
mysql-test/t/information_schema.test:
Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
test case
This is the 5.0 part of the fix.
Currently TRUNCATE command will not call
delete_all_rows() in the handler (that implements
the "fast" TRUNCATE for InnoDB) when there are
triggers on the table.
As decided by the architecture team TRUNCATE must
use "fast" TRUNCATE even when there are triggers.
Thus it must ignore the triggers.
Made TRUNCATE to ignore the triggers and call
delete_all_rows() for all storage engines
to maintain engine consistency.
mysql-test/r/trigger.result:
Bug#23556: TRUNCATE TABLE still maps to DELETE
- test case
mysql-test/t/trigger.test:
Bug#23556: TRUNCATE TABLE still maps to DELETE
- test case
sql/sql_delete.cc:
Bug#23556: TRUNCATE TABLE still maps to DELETE
- We implemenent fast TRUNCATE for InnoDB even
if triggers are present.
- TRUNCATE ignores triggers.
into mysql.com:/home/my/mysql-5.0
mysql-test/t/ctype_ucs.test:
Auto merged
sql/log_event.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Do not issue a 'read-only' error in case of DROP TEMPORARY TABLE on a non-existing temporary table.
Instead produce the correct "Unknown table" error or warning (in cases when the IF EXISTS clause was specified).
To a documentor: the part of the manual describing the 'read_only' system variable should be clarified to state the following:
"When the read_only variable is set to ON, all operations which create/update/drop tables are rejected with the exceptions for:
1. Any operation performed by the replication thread on a slave server
2. Any operation performed by a user that have the SUPER privilege
3. Any operation that creates/updates/drops only temporary tables"
mysql-test/r/read_only.result:
Added testcases for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
mysql-test/t/read_only.test:
Added testcases for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
sql/sql_parse.cc:
Before issuing the 'read-only' error also check if the operation is not a DROP TEMPORARY TABLE statement
into mysql.com:/usr/home/bar/mysql-5.0.b22646
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/r/ctype_utf8.result:
After merge fix
sql/item_timefunc.cc:
After merge fix
limitation)
Note to the reviewer
====================
Warning: reviewing this patch is somewhat involved.
Due to the nature of several issues all affecting the same area,
fixing separately each issue is not practical, since each fix can not be
implemented and tested independently.
In particular, the issues with
- rule recursion
- nested case statements
- forward jump resolution (backpatch list)
are tightly coupled (see below).
Definitions
===========
The expression
CASE expr
WHEN expr THEN expr
WHEN expr THEN expr
...
END
is a "Simple Case Expression".
The expression
CASE
WHEN expr THEN expr
WHEN expr THEN expr
...
END
is a "Searched Case Expression".
The statement
CASE expr
WHEN expr THEN stmts
WHEN expr THEN stmts
...
END CASE
is a "Simple Case Statement".
The statement
CASE
WHEN expr THEN stmts
WHEN expr THEN stmts
...
END CASE
is a "Searched Case Statement".
A "Left Recursive" rule is like
list:
element
| list element
;
A "Right Recursive" rule is like
list:
element
| element list
;
Left and right recursion produces the same language, the difference only
affects the *order* in which the text is parsed.
In a descendant parser (usually written manually), right recursion works
very well, and is typically implemented with a while loop.
In an ascendant parser (yacc/bison) left recursion works very well,
and is implemented naturally by the parser stack.
In both cases, using the wrong type or recursion is very bad and should be
avoided, as it causes technical issues with the parser implementation.
Before this change
==================
The "Simple Case Expression" and "Searched Case Expression" were both
implemented by the "when_list" and "when_list2" rules, which are left
recursive (ok).
These rules, however, used lex->when_list instead of using the parser stack,
which is more complex that necessary, and potentially dangerous because
of other rules using THD::reset_lex.
The "Simple Case Statement" and "Searched Case Statements" were implemented
by the "sp_case", "sp_whens" and in part by "sp_proc_stmt" rules.
Both cases were right recursive (bad).
The grammar involved was convoluted, and is assumed to be the results of
tweaks to get the code generation to work, but is not what someone would
naturally write.
In addition, using a common rule for both "Simple" and "Searched" case
statements was implemented with sp_head::m_flags |= IN_SIMPLE_CASE,
which is a flag and not a stack, and therefore does not take into account
*nested* case statements. This leads to incorrect generated code, and either
a server crash or an incorrect result.
With regards to the backpatch mechanism, a *different* backpatch list was
created for each jump from "WHEN expr THEN stmt" to "END CASE", which
relied on the grammar to be right recursive.
This is a mis-use of the backpatch list, since this list can resolve
multiple references to the same target at once.
The optimizer algorithm used to detect dead code in the "assembly" SQL
instructions, implemented by sp_head::opt_mark(uint ip), was recursive
in some cases (a conditional jump pointing forward to another conditional
jump).
In case of specially crafted code, like
- a long list of "IF expr THEN stmt END IF"
- a long CASE statement
this would actually cause a server crash with a stack overflow.
In general, having a stack that grows proportionally with user data (the
SQL code given by the client in a CREATE PROCEDURE) is to be avoided.
In debug builds only, creating a SP / SF / Trigger which had a significant
amount of code would spend --literally-- several minutes in sp_head::create,
because of the debug code involved with DBUG_PRINT("info", ("Code %s ...
There are several issues with this code:
- in a CASE with 5 000 WHEN, there are 15 000 instructions generated,
which create a sting representation of the code which is 500 000 bytes
long,
- using a String instead of an io stream causes performances to degrade
to a total server freeze, as time is spent doing realloc of a buffer
always too short,
- Printing a 500 000 long string in the debug log is too verbose,
- Generating this string even when DBUG_PRINT is off is useless,
- Having code that potentially can affect the server behavior, used with
#ifdef / #endif is useful in some cases, but is also a bad practice.
After this change
=================
"Case Expressions" (both simple and searched) have been simplified to
not use LEX::when_list, which has been removed.
Considering all the issues affecting case statements, the grammar for these
has been totally re written.
The existing actions, used to generate "assembly" sp_inst* code, have been
preserved but moved in the new grammar, with the following changes:
a) Bison rules are no longer shared between "Simple" and "Searched" case
statements, because a stack instead of a flag is required to handle them.
Nested statements are handled naturally by the parser stack, which by
definition uses the correct rule in the correct context.
Nested statements of the opposite type (simple vs searched) works correctly.
The flag sp_head::IN_SIMPLE_CASE is no longer used.
This is a step towards resolution of WL#2999, which correctly identified
that temporary parsing flags do not belong to sp_head.
The code in the action is shared by mean of the case_stmt_action_xxx()
helpers.
b) The backpatch mechanism, used to resolve forward jumps in the generated
code, has been changed to:
- create a label for the instruction following 'END CASE',
- register each jump at the end of a "WHEN expr THEN stmt" in a *unique*
backpatch list associated with the 'END CASE' label
- resolve all the forward jumps for this label at once.
In addition, the code involving backpatch has been commented, so that a
reader can now understand by reading matching "Registering" and "Resolving"
comments how the forward jumps are resolved and what target they resolve to,
as this is far from evident when reading the code alone.
The implementation of sp_head::opt_mark() has been revised to avoid
recursive calls from jump instructions, and instead add the jump location
to the list of paths to explore during the flow analysis of the instruction
graph, with a call to sp_head::add_mark_lead().
In addition, the flow analysis will stop if an instruction has already
been marked as reachable, which the previous code failed to do in the
recursive case.
sp_head::opt_mark() is now private, to prevent new calls to this method from
being introduced.
The debug code present in sp_head::create() has been removed.
Considering that SHOW PROCEDURE CODE is also available in debug builds,
and can be used anytime regardless of the trace level, as opposed to
"CREATE PROCEDURE" time and only if the trace was on,
removing the code actually makes debugging easier (usable trace).
Tests have been written to cover the parser overflow (big CASE),
and to cover nested CASE statements.
mysql-test/r/sp-code.result:
Test cases for nested CASE statements.
mysql-test/t/sp-code.test:
Test cases for nested CASE statements.
sql/sp_head.cc:
Re factored opt_mark() to avoid recursion, clean up.
sql/sp_head.h:
Re factored opt_mark() to avoid recursion, clean up.
sql/sql_lex.cc:
Removed when_list.
sql/sql_lex.h:
Removed when_list.
sql/sql_yacc.yy:
Minor clean up for case expressions,
Major re write for case statements (Bug#19194).
mysql-test/r/sp_stress_case.result:
New test for massive CASE statements.
mysql-test/t/sp_stress_case.sh:
New test for massive CASE statements.
mysql-test/t/sp_stress_case.test:
New test for massive CASE statements.
into mysql.com:/home/hf/work/mysql-5.0-0mrg
BitKeeper/deleted/.del-mysql_client.test:
Auto merged
include/mysql.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_newdecimal.result:
Auto merged
mysql-test/t/flush.test:
Auto merged
mysql-test/t/flush_block_commit.test:
Auto merged
mysql-test/t/innodb-deadlock.test:
Auto merged
mysql-test/t/innodb-lock.test:
Auto merged
mysql-test/t/lock_multi.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/rename.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/status.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
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_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
Makefile.am:
merging
client/mysqltest.c:
merging
include/my_time.h:
merging
libmysql/libmysql.c:
merging
mysql-test/t/order_by.test:
merging
into mysql.com:/home/hf/work/mysql-4.1-mrg
include/mysql.h:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/rename.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_class.h:
Auto merged
Makefile.am:
merging
client/mysqltest.c:
merging
mysql-test/t/mysql_client.test:
merging
There was an improper order of doing chained operations.
To the documentor: ENABLE|DISABLE KEYS combined with RENAME TO, and no other
ALTER TABLE clause, leads to server crash independent of the presence of
indices and data in the table.
mysql-test/r/alter_table.result:
update result
mysql-test/t/alter_table.test:
add test for bug#24129
sql/sql_table.cc:
If there is operation on the KEYS, first do it
and then do a rename if there is such. Or, we will crash because
the underlying table has changed.
into mysql.com:/usr/home/ram/work/bug23653/my50-bug23653
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_str.result:
Add result for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
mysql-test/t/func_str.test:
Add test case for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
sql/item_strfunc.cc:
Add Item_str_func::fix_fields() implementation, and set maybe_null to
TRUE if we are in the SQL mode that requires some functions to return
null even if they normally do not.
sql/item_strfunc.h:
Add declaration of Item_str_func::fix_fields().
Do not reset maybe_null in Item_func_char::fix_length_and_dec().
The problem was that some functions (namely IN() starting with 4.1, and
CHAR() starting with 5.0) were returning NULL in certain conditions,
while they didn't set their maybe_null flag. Because of that there could
be some problems with 'IS NULL' check, and statements that depend on the
function value domain, like CREATE TABLE t1 SELECT 1 IN (2, NULL);.
The fix is to set maybe_null correctly.
mysql-test/r/func_in.result:
Add result for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
mysql-test/t/func_in.test:
Add test case for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
sql/item_cmpfunc.cc:
Remove assignment to maybe_null, as it was already set in fix_fields()
based on all arguments, not only on the first.
- Added 'SET NAMES <charset>" upon ::open
- Added test and results for simple UTF test
federated.test:
BUG #17044 Federated Storage Engine not UTF8 clean
New test. Using hex - pasting various charsets in the terminal doesn't work.
federated.result:
BUG# 17044 Federated Storage Engine not UTF8 clean
New test results
ha_federated.cc:
BUG# 17044 Federated Storage Engine not UTF8 clean
Upon ::open, set names to table's charset
sql/ha_federated.cc:
BUG# 17044 Federated Storage Engine not UTF8 clean
Upon ::open, set names to table's charset
mysql-test/t/federated.test:
BUG #17044 Federated Storage Engine not UTF8 clean
New test. Using hex - pasting various charsets in the terminal doesn't work.
federated.result:
BUG# 17044 Federated Storage Engine not UTF8 clean
New test results
mysql-test/r/federated.result:
BUG# 17044 Federated Storage Engine not UTF8 clean
New test results
Problem: When we have a really large number (between 2^63 and 2^64)
as the left side of the mod operator, it gets improperly corerced
into a signed value.
Solution: Added check to see if the "negative" number is really
positive, and if so, cast it.
mysql-test/r/bigint.result:
Added test case result
mysql-test/t/bigint.test:
Added test case
sql/item_func.cc:
Added check to see if we have an unsigned number that looks like a
signed number.
mending windows test.
mysql-test/r/rpl_packet.result:
results changed
mysql-test/t/rpl_packet.test:
removing because of the connection with windows client can be lost instead of
the error code back (source: manual).
mysql-test/r/init_connect.result:
Restore global variable to the value it's set to when server is started
mysql-test/r/key_cache.result:
Restore global variable values to original
mysql-test/r/mysqldump.result:
Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%"
mysql-test/r/rpl_deadlock.result:
Restore global variable values to original
mysql-test/r/rpl_drop_db.result:
Remove the conflicting file and drop database mysqltest1 before test exits
mysql-test/r/rpl_ignore_revoke.result:
As changes to mysql.* are ignored - explicitly delete the user on slave
mysql-test/r/rpl_init_slave.result:
Restore global variable values to original
mysql-test/r/rpl_max_relay_size.result:
Restore global variable values to original
mysql-test/r/rpl_sp.result:
Restore global variable values to original
mysql-test/r/rpl_timezone.result:
Restore global variable values to original
mysql-test/r/rpl_variables.result:
Restore global variable values to original
mysql-test/r/view_grant.result:
Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost"
mysql-test/t/init_connect.test:
Restore global variable to the value it's set to when server is started
mysql-test/t/key_cache.test:
Restore global variable values to original
mysql-test/t/mysqldump.test:
Drop the user that was created. Specifying "drop user myDB_user" is equal to "drop user myDB_user@%"
mysql-test/t/rpl_deadlock.test:
Restore global variable values to original
mysql-test/t/rpl_drop_db.test:
Remove the conflicting file and drop database mysqltest1 before test exits
mysql-test/t/rpl_ignore_revoke.test:
As changes to mysql.* are ignored - explicitly delete the user on slave
mysql-test/t/rpl_init_slave.test:
Restore global variable values to original
mysql-test/t/rpl_max_relay_size.test:
Restore global variable values to original
mysql-test/t/rpl_sp.test:
Restore global variable values to original
mysql-test/t/rpl_timezone.test:
Restore global variable values to original
mysql-test/t/rpl_variables.test:
Restore global variable values to original
mysql-test/t/view_grant.test:
Use same user in all places in the same test "readonly" is equal to "readonly@%" not "readonly@localhost"
mysql-test/r/limit.result:
Add missing drop of table t1
mysql-test/r/lowercase_fs_off.result:
Add missing drop of "sample" user
mysql-test/t/limit.test:
Add missing drop of table t1
mysql-test/t/lowercase_fs_off.test:
Add missing drop of "sample" user
The problem was that THD::row_count_func was zeroed too. It was zeroed
as a fix for bug 4905 "Stored procedure doesn't clear for "Rows affected"
However, the proper solution is not to zero, because THD::row_count_func has
been set to -1 already in mysql_execute_command(), a later fix, which obsoletes
the incorrect fix of #4095
mysql-test/r/sp.result:
update result
mysql-test/t/sp.test:
test for bug#23760 ROW_COUNT() and store procedure not owrking together
sql/sql_parse.cc:
Remove zeroing for thd->row_count_func
The fix for #4905 wasn't right. Now, it's ok without this zeroing
because if there was an error THD::
The regression is caused by the fix for bug 14767. When INSERT ... SELECT
used a view in the SELECT list that was not inlined, and there was an
active transaction, the server could crash in Query_cache::invalidate.
On INSERT ... SELECT only the table being inserted into is invalidated.
Thus views that can't be inlined are skipped from invalidation.
The bug manifests itself in two ways so there is 2 test cases.
One checks that the only the table being inserted into is invalidated.
And the second one checks that there is no crash on INSERT ... SELECT.
mysql-test/t/query_cache.test:
Added a test case for bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
mysql-test/r/query_cache.result:
Added a test case for bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
sql/sql_parse.cc:
Bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
On INSERT ... SELECT only the table being inserted into is invalidated.
This change set implements the DROP TRIGGER IF EXISTS functionality.
This fix is considered a bug and not a feature, because without it,
there is no known method to write a database creation script that can create
a trigger without failing, when executed on a database that may or may not
contain already a trigger of the same name.
Implementing this functionality closes an orthogonality gap between triggers
and stored procedures / stored functions (which do support the DROP IF
EXISTS syntax).
In sql_trigger.cc, in mysql_create_or_drop_trigger,
the code has been reordered to:
- perform the tests that do not depend on the file system (access()),
- get the locks (wait_if_global_read_lock, LOCK_open)
- call access()
- perform the operation
- write to the binlog
- unlock (LOCK_open, start_waiting_global_read_lock)
This is to ensure that all the code that depends on the presence of the
trigger file is executed in the same critical section,
and prevents race conditions similar to the case fixed by Bug 14262 :
- thread 1 executes DROP TRIGGER IF EXISTS, access() returns a failure
- thread 2 executes CREATE TRIGGER
- thread 2 logs CREATE TRIGGER
- thread 1 logs DROP TRIGGER IF EXISTS
The patch itself is based on code contributed by the MySQL community,
under the terms of the Contributor License Agreement (See Bug 18161).
mysql-test/r/rpl_trigger.result:
DROP TRIGGER IF EXISTS
mysql-test/r/trigger.result:
DROP TRIGGER IF EXISTS
mysql-test/t/rpl_trigger.test:
DROP TRIGGER IF EXISTS
mysql-test/t/trigger.test:
DROP TRIGGER IF EXISTS
sql/sql_trigger.cc:
DROP TRIGGER IF EXISTS
sql/sql_yacc.yy:
DROP TRIGGER IF EXISTS
The code that set up data to be passed to user-defined functions was very
old and analyzed the "Type" of the data that was passed into the UDF, when
it really should analyze the "return_type", which is hard-coded for simple
Items and works correctly for complex ones like functions.
---
Added test at Sergei's behest.
mysql-test/r/udf.result:
Verify that various arguments work.
---
Added test at Sergei's behest.
mysql-test/t/udf.test:
Verify that various arguments work.
---
Added test at Sergei's behest.
sql/item_func.cc:
For function-Items, test whether it is constant and set the struct members
for the UDF parameter appropriately.
Replace tabs with spaces in affected code.
sql/udf_example.c:
Include a simple function that is useful in testing.
into mysql.com:/home/bk/MERGE/mysql-5.0-merge
BitKeeper/triggers/post-commit:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/log_event.h:
Manual merge
sql/slave.cc:
Manual merge
libmysqld/lib_sql.cc:
check for bootstrap added
mysql-test/include/federated.inc:
disabled in embedded
mysql-test/mysql-test-run.pl:
we disable ssh in embedded server
mysql-test/r/bdb.result:
part moved to bdb_notembedded as it uses binlog
mysql-test/r/flush_block_commit.result:
part moved to flush_block_commit_notembedded
mysql-test/r/insert.result:
part moved to insert_notembedded as delayed works differently in embedded server
mysql-test/r/insert_select.result:
part moved to insert_notembedded as GRANTS usually disabled in embedded server
mysql-test/r/join.result:
access rights hidden in result
mysql-test/t/backup.test:
now available in embedded server
mysql-test/t/bdb.test:
part moved to bdb_notembedded as it uses binlog
mysql-test/t/delayed.test:
code trimmed
mysql-test/t/execution_constants.test:
skipped in embedded-server mode
mysql-test/t/flush_block_commit.test:
moved to flush_block_commit_notembedded
mysql-test/t/information_schema_db.test:
skipped in embedded-server
mysql-test/t/innodb.test:
directories replaced to be embedded-server compliant
mysql-test/t/insert.test:
part moved to insert_notembedded
mysql-test/t/insert_select.test:
part moved to insert_notembedded
mysql-test/t/join.test:
access rights hidden
mysql-test/t/status.test:
skipped in embedded server
mysql-test/t/trigger.test:
directories replaced to be embedded-server compliant
sql/item_strfunc.cc:
extra contexts not needed whan access checks disabled
sql/share/errmsg.txt:
bigger paths reserved to prevent test's fails
mysql-test/r/bdb_notembedded.result:
***MISSING WEAVE***
mysql-test/r/flush_block_commit_notembedded.result:
added
mysql-test/r/insert_notembedded.result:
added
mysql-test/t/bdb_notembedded.test:
***MISSING WEAVE***
mysql-test/t/flush_block_commit_notembedded.test:
added
mysql-test/t/insert_notembedded.test:
added
Add new test file mysql_upgrade.test
BitKeeper/deleted/.del-abi_check.ic:
Rename: include/abi_check.ic -> BitKeeper/deleted/.del-abi_check.ic
client/mysql_upgrade.c:
Make mysql_upgrade search also in "client" dir so it can be run from a source dist.
mysql-test/mysql-test-run.pl:
Make it possible for .test scripts to run "mysql_upgrade"
mysql-test/r/mysql_upgrade.result:
New BitKeeper file ``mysql-test/r/mysql_upgrade.result''
mysql-test/t/mysql_upgrade.test:
New BitKeeper file ``mysql-test/t/mysql_upgrade.test''
The server sends a number of columns to the client.
It uses a limited "fast" function for that instead of the
general one. This fast function cannot send numbers larger
than 2 bytes.
This causes the client to expect smaller number of columns.
The client writes outside of the allocated memory buffer
as a result.
Fixed the server to use the general function to send column
count.
Fixed the client to check the column count before writing
column data.
mysql-test/t/mysql_client.test:
Bug #19216: Client crashes on long SELECT
- test case
sql/protocol.cc:
Bug #19216: Client crashes on long SELECT
- renamed the function for bether comprehention
and made it local
- used the right (non-local) function to transfer
the column count in Protocol::send_fields
sql/protocol.h:
Bug #19216: Client crashes on long SELECT
- made optimized net_store_length local
sql-common/client.c:
Bug #19216: Client crashes on long SELECT
- fixed the client to check for older servers (without the fix).
stored function invoked from different connections".
Invocation of trigger which was using stored function from different
connections caused server crashes (for non-debug server this happened
in highly concurrent environment, but debug server failed on assertion
in relatively simple scenario).
Item_func_sp was not safe to use in triggers (in other words for
re-execution from different threads) as artificial TABLE object
pointed by Item_func_sp::dummy_table referenced incorrect THD
object. To fix the problem we force re-initialization of this
object for each re-execution of statement.
mysql-test/r/trigger.result:
Added test for bug#23651 "Server crashes when trigger which uses
stored function invoked from different connections".
mysql-test/t/trigger.test:
Added test for bug#23651 "Server crashes when trigger which uses
stored function invoked from different connections".
sql/item_func.cc:
To make Item_func_sp safe for usage in triggers (in other words safe
for re-execution in different threads) we need to ensure that artificial
TABLE object pointed by Item_func_sp::dummy_table references correct
THD object. To achieve this we simply force its re-initialization for
each re-execution of statement.
libmysqld/examples/test-run:
mysql_embedded should be run here
libmysqld/lib_sql.cc:
thd->real_id setup added
bootstrap check added
mysql-test/t/innodb.test:
paths can be different in embedded server - replace_result added
sql/item_func.cc:
we should compare real_id-s in embedded server
into bodhi.local:/opt/local/work/mysql-5.0-runtime
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/t/rename.test:
Use local (resolve a conflict)
into trift2.:/MySQL/M50/push-5.0
BitKeeper/deleted/.del-gcc.cpp~3d2e013cfac48838:
Auto merged
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/install_test_db.sh:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/rename.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql-common/my_time.c:
Auto merged
sql/time.cc:
Auto merged
myisam/sort.c:
Manual merge: "use local" (= 5.0 version).
mysql-test/mysql-test-run.pl:
Manual merge, part of the fix for bug#17194.
- Add printout of "Warning" or "Note" for non error messages in default_reporter
- Add test for the above in new mysqladmin.test
mysql-test/mysql-test-run.pl:
Add support for mysqladmin to mysql-test-run.pl
mysys/my_getopt.c:
Add printout of Warning: or Info: in 'default_reporter', this
will make the user aware of the problem but can filter it
as a warning or note.
mysql-test/r/mysqladmin.result:
New BitKeeper file ``mysql-test/r/mysqladmin.result''
mysql-test/t/mysqladmin.test:
New BitKeeper file ``mysql-test/t/mysqladmin.test''
into outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/t/rename.test:
choose one of the race problem solutions. It was solved
differently in -runtime and mainstream
specifying DEFAULT
This was not specific to datetime. When there is no default value
for a column, and the user inserted DEFAULT, we would write
uninitialized memory to the table.
Now, insist on writing a default value, a zero-ish value, the same
one that comes from inserting NULL into a not-NULL field.
(This is, at best, really strange behavior that comes from allowing
sloppy usage, and serves as a good reason always to run one's server
in a strict SQL mode.)
mysql-test/r/default.result:
Verify that all kinds of types work, even others other than datetime.
mysql-test/t/default.test:
Verify that all kinds of types work, even others other than datetime.
sql/item.cc:
Even if we warn that there is no default value in the table definition,
we have to insert /something/.
When compiling GROUP BY Item_ref instances are dereferenced in
setup_copy_fields(), i.e. replaced with the corresponding Item_field
(if they point to one) or Item_copy_string for the other cases.
Since the Item_ref (in the Item_field case) is no longer used the information
about the aliases stored in it is lost.
Fixed by preserving the column, table and DB alias on dereferencing Item_ref
mysql-test/r/metadata.result:
Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
- test case
mysql-test/t/metadata.test:
Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
- test case
sql/item.cc:
Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
- use the table and db name to fill up the metadata for columns
sql/sql_select.cc:
Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
- preserve the field, table and DB name on dereferencing an Item_ref
As get_arg0_date() in the Item_func_last_day::get_date() returns
0000-00-00 date sometimes, we have to check ltime->month for 0 after the call.
mysql-test/r/func_time.result:
Fix for bug #23653: Crash if last_day('0000-00-00')
- test result.
mysql-test/t/func_time.test:
Fix for bug #23653: Crash if last_day('0000-00-00')
- test case.
sql/item_timefunc.cc:
Fix for bug #23653: Crash if last_day('0000-00-00')
- return error if month is 0.
- Detect if a table has field of type MYSQL_TYPE_VAR_STRING while running
"CHECK TABLE t FOR UPGRADE" and indicate it need to be fixed
with "REPAIR TABLE t".
- When running a "REPAIR TABLE t" or "ALTER TABLE t FORCE" on the above
table, install a special copy function to trim off the trailing spaces
which we safely can say that the pre 5.0 mysqld didn't put there.
mysql-test/r/varbinary.result:
Add test to see that a table with varbinary from 4.1 can be REPAIRED
mysql-test/t/varbinary.test:
Add test to see that a table with varbinary from 4.1 can be REPAIRED
sql/field_conv.cc:
Add new field copy function 'do_field_varbinary_pre50' used for copying
between MYSQL_TYPE_VAR_STRING and MYSQL_TYPE_VARCHAR. It will remove trailing
spaces from the field as MySQL <= 4.1 never stores the trailing spaces for
a MYSQL_TYPE_VAR_STRING.
Install this new copy function in ALTER TABLEs list of functions to use for
copying data during and alter if from field is a <= 4.1 varbinary and to
field is 5.0 varbinary.
sql/handler.cc:
If the table has a pre 5.0 varbinary, table not to be altered so the field
type is upgraded to 5.0 version and trailing space can be trimmed.
mysql-test/std_data/bug19371.MYD:
New BitKeeper file ``mysql-test/std_data/bug19371.MYD''
mysql-test/std_data/bug19371.MYI:
New BitKeeper file ``mysql-test/std_data/bug19371.MYI''
mysql-test/std_data/bug19371.frm:
New BitKeeper file ``mysql-test/std_data/bug19371.frm''
The problem was that any VIEW columns had always implicit derivation.
Fix: derivation is now copied from the original expression
given in VIEW definition.
For example:
- a VIEW column which comes from a string constant
in CREATE VIEW definition have now coercible derivation.
- a VIEW column having COLLATE clause
in CREATE VIEW definition have now explicit derivation.
mysql-test/r/ctype_utf8.result:
Adding test case
mysql-test/t/ctype_utf8.test:
Adding test case
sql/field.cc:
Copying derivation from item to field.
sql/field.h:
Adding derivation and methods to get/set it into Field.
sql/item.cc:
Copying derivation from field to item.
sql/item.h:
Moving "enum Derivation" declaration from item.h to mysql_priv.h
sql/mysql_priv.h:
Moving "enum Derivation" declaration from item.h to mysql_priv.h
sql/sql_select.cc:
Copying derivation from item to field in
create_tmp_field_from_item() and create_tmp_field().
Problem: when embedding a character string with introducer with charset X
into a SQL query which is generally in character set Y, the string constants
were escaped according to their own character set (i.e.X), then after reading
such a "mixed" query from binlog, the string constants were unescaped
using character set of the query (i.e. Y), instead of X, which gave wrong
results or even syntax errors with tricky charsets (e.g. sjis)
Fix: when embedding a string constant of charset X into a query of charset Y,
the string constant is now escaped according to character Y, instead of
its own character set X.
mysql-test/r/ctype_cp932_binlog.result:
Fixing test results.
sql/log_event.cc:
Using character set "csinfo" instead of the string character set.
sql/sp_head.cc:
- adding "thd" argument to sp_get_item_value()
to have access to thd->variables.character_set_client
- using character_set_client for escaping, instead of
the string character set
mysql-test/r/rpl_charset_sjis.result:
Adding test case
mysql-test/t/rpl_charset_sjis.test:
Adding test case
fixing a flow of the test
mysql-test/r/rpl_packet.result:
results changed
mysql-test/t/rpl_packet.test:
fixing a flaw in the test to create a table in MAX_NAME-sized db indeed.
Upon that the `select to return 1' invariant holds.
on large length
Problem: Most (all) of the numeric inputs were being coerced into
int (32 bit) sized variables. Works OK for sane inputs; any input
larger than 2^32 (or 2^31 for signed vars) exihibited predictable
wrapping behavior (up to about 10^18) and then started having really
strange behaviour past that point (since the conversion to 64 bit int
from the DECIMAL type can do weird things on out of range numbers).
Solution: 1) Add many tests. 2) Convert input from (u)long type to
(u)longlong. 3) Do (sometimes multiple) sanity checks on input,
keeping in mind that sometimes a negative longlong is not a negative
longlong (if the unsigned_flag is set). 4) Emulate existing behavior
w/rt negative and "small" out-of-bounds values.
mysql-test/r/func_str.result:
Additional test results for #10963
mysql-test/t/func_str.test:
Additional test results for #10963
sql/item_func.cc:
Used larger type for counting, to avoid truncation.
sql/item_strfunc.cc:
Fix for #10963, including comments and cleaned up logic
into mysql.com:/usr/home/bar/mysql-5.0.b23451
mysql-test/r/func_gconcat.result:
after merge fix
mysql-test/t/func_gconcat.test:
after merge fix
sql/item_sum.cc:
after merge fix
Problem: After introducing of LC_TIME_NAMES variable, the
function date_format() can return international non-ascii
characters in month and weekday names. Thus, it cannot return
a binary string anymore, because inserting a result of date_format()
into a column with non-utf8 character set produces garbage.
Fix: date_format() now returns a character string, using
"collation_connection" to detect character set and collation
for the returned value. This allows to insert
results of date_format() properly into columns with
various character sets.
mysql-test/r/ctype_utf8.result:
Adding test case.
Fixing old result.
mysql-test/t/ctype_utf8.test:
Adding test case.
sql/item_timefunc.cc:
DATE_FORMAT() now returns a character string
instead of binary string:
- make_date_time() now converts localte data from UTF8 to
the character set of "str" argument, instead of copying as is.
- fix_dec_and_length() now uses "collation_connection"
instead of "binary" for the result, it also now
multiplies to mbmaxlen when calculating max_length
- When returning metadata for scalar subqueries the actual type of the
column was calculated based on the value type, which limits the actual
type of a scalar subselect to the set of (currently) 3 basic types :
integer, double precision or string. This is the reason that columns
of types other then the basic ones (e.g. date/time) are reported as
being of the corresponding basic type.
Fixed by storing/returning information for the column type in addition
to the result type.
mysql-test/r/subselect.result:
Bug #11032: getObject() returns a String for a sub-query of type datetime
- test case
mysql-test/t/subselect.test:
Bug #11032: getObject() returns a String for a sub-query of type datetime
- test case
sql/item_subselect.cc:
Bug #11032: getObject() returns a String for a sub-query of type datetime
- store and return the field type as well in addition to result type for
single row subqueries
sql/item_subselect.h:
Bug #11032: getObject() returns a String for a sub-query of type datetime
- store and return the field type as well in addition to result type for
single row subqueries
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
BitKeeper/etc/collapsed:
auto-union
mysql-test/r/ctype_utf8.result:
Auto merged
sql/field.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
into alik.:/mnt/raid/alik/MySQL/devel/5.0-rt
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/rename.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/time.cc:
Auto merged
into alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/rename.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
Problem: GROUP_CONCAT on a multi-byte column can truncate
in the middle of a multibyte character when applying
group_concat_max_len limit. It produces an invalid
multi-byte character in the result string.
The second, easier version - reusing old "warning_for_row" flag,
instead of introducing of "result_is_full" - which was
added in the previous commit.
mysql-test/r/func_gconcat.result:
Adding test case
mysql-test/t/func_gconcat.test:
Adding test case
sql/item_sum.cc:
Adding well_formed_len() call not to cut
in the middle of a multi-byte character.