into bodhi.local:/opt/local/work/mysql-4.1-runtime
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
into mysql.com:/home/cps/mysql/trees/5.0-runtime-bug9191
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/timezone2.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/timezone2.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/time.cc:
Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
Auto merged
sql-common/my_time.c:
manual merge
sql/item_timefunc.cc:
manual merge
sql/tztime.cc:
manual merge
(4.1 version, with post-review fixes)
The fix for another Bug (6439) limited FROM_UNIXTIME() to
TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT,
however unix timestamp in general is not considered to be limited
by this value. All dates up to power(2,31)-1 are valid.
This patch extends allowed TIMESTAMP range so, that max
TIMESTAMP value is power(2,31)-1. It also corrects
FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that
max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME()
is fixed accordingly to allow conversion of dates up to
2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ()
function to allow extended range of dates.
The main problem solved in the patch is possible overflows
of variables, used in broken-time representation to time_t
conversion (required for UNIX_TIMESTAMP).
acinclude.m4:
Add new macro to check time_t range
configure.in:
Call the macro to check time_t range
include/my_time.h:
Move time-related defines to proper place.
Add a function to perform a rough check if
a TIMESTAMP value fits into the boundaries.
Note: it is defined as "static inline", as
otherwise libmysql won't compile (due to the
way how gcc handles "inline" directive).
mysql-test/r/func_time.result:
Update test result
mysql-test/r/timezone.result:
Update test result
mysql-test/r/timezone2.result:
Update test result
mysql-test/t/func_time.test:
Add test for Bug#9191 and update test to be consistent
with new TIMESTAMP boundaries
mysql-test/t/timezone.test:
Update old tests to be consistent
with new TIMESTAMP boundaries
mysql-test/t/timezone2.test:
Update tests for convert_tz to be consistent with new
TIMESTAMP boundaries
sql/item_timefunc.cc:
Fix convert_tz to allow dates from the new (extended)
TIMESTAMP range
sql/mysql_priv.h:
Move time handling defaults to my_time.h
sql-common/my_time.c:
Because of increased TIMESTAMP_MAX_VALUE overflows in my_system_gmt_sec()
became possible. Here we make it safe against the overflows by stepping
back from the boundary dates which are likely to trigger them.
sql/time.cc:
Update TIME_to_timestamp to allow conversion of
extended date range
sql/tztime.cc:
Fix new (4.1) implementation of broken-down time representation
to time_t conversion routine to avoid overflows during conversion
of boundary dates
mysql-test/r/timezone4.result:
New BitKeeper file ``mysql-test/r/timezone4.result''
mysql-test/t/timezone4-master.opt:
New BitKeeper file ``mysql-test/t/timezone4-master.opt''
mysql-test/t/timezone4.test:
New BitKeeper file ``mysql-test/t/timezone4.test''
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Allocation of memory for the sort buffer at each evaluation of a
subquery may take a significant amount of time if the buffer is rather big.
With the fix we allocate the buffer at the first evaluation of the
subquery and reuse it at each subsequent evaluation.
mysql-test/r/subselect.result:
Added a test case for bug #21727.
mysql-test/t/subselect.test:
Added a test case for bug #21727.
sql/item_subselect.h:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added an implementation for Item_subselect::is_uncacheable()
returning TRUE if the engine if the subselect is uncacheable.
sql/mysql_priv.h:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added a new boolean parameter to the filesort_free_buffers procedure.
If the value of this parameter is TRUE the procedure frees the sort_keys
buffpek buffers.
sql/records.cc:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added a new boolean parameter to the filesort_free_buffers procedure.
If the value of this parameter is TRUE the procedure frees the sort_keys
buffpek buffers.
sql/sql_base.cc:
Fixed bug #21727.
Made sure that st_table::pos_in_table_list would be always initialized.
sql/sql_select.cc:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added a new boolean parameter to the filesort_free_buffers procedure.
If the value of this parameter is TRUE the procedure frees the sort_keys
buffpek buffers.
sql/sql_show.cc:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added a new boolean parameter to the filesort_free_buffers procedure.
If the value of this parameter is TRUE the procedure frees the sort_keys
buffpek buffers.
sql/sql_table.cc:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Cleanup.
sql/table.cc:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added st_table_list::in_subselect() returning for a table the subselect that
contains the FROM list this table is taken from (if there is any).
sql/table.h:
Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Added fields for sort_keys and buffpek buffers to the FILESORT_INFO structure.
If the user has specified --max-connections=N or --table-open-cache=M
options to the server, a warning could be given that some values were
recalculated, and table-open-cache could be assigned greater value.
Note that both warning and increase of table-open-cache were totally
harmless.
This patch fixes recalculation code to ensure that table-open-cache will
be never increased automatically and that a warning will be given only if
some values had to be decreased due to operating system limits.
No test case is provided because we neither can't predict nor control
operating system limits for maximal number of open files.
sql/mysql_priv.h:
Add constants for table_cache minimum and default values.
sql/mysqld.cc:
Fix max_connections and table_cache_size re-computation.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/myisam.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/merge.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/view.result:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
Backport from 5.1.
Raised STACK_MIN_SIZE for Debian GNU/Linux Sid,
Linux kernel 2.6.16,
gcc version 3.3.6 (Debian 1:3.3.6-13),
libc6-dbg 2.3.6.ds1-4,
Pentium4 (x86),
BUILD/compile-pentium-debug-max
Raised about 100 Bytes above the required minimum.
into macbook.gmz:/Users/kgeorge/mysql/work/B21798-5.0-opt-merge
sql/mysql_priv.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/subselect.result:
merge fixes for bug 21798
mysql-test/t/subselect.test:
merge fixes for bug 21798
list using a function
When executing dependent subqueries they are re-inited and re-exec() for
each row of the outer context.
The cause for the bug is that during subquery reinitialization/re-execution,
the optimizer reallocates JOIN::join_tab, JOIN::table in make_simple_join()
and the local variable in 'sortorder' in create_sort_index(), which is
allocated by make_unireg_sortorder().
Care must be taken not to allocate anything into the thread's memory pool
while re-initializing query plan structures between subquery re-executions.
All such items mush be cached and reused because the thread's memory pool
is freed at the end of the whole query.
Note that they must be cached and reused even for queries that are not
otherwise cacheable because otherwise it will grow the thread's memory
pool every time a cacheable query is re-executed.
We provide additional members to the JOIN structure to store references
to the items that need to be cached.
mysql-test/r/subselect.result:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- test case
mysql-test/t/subselect.test:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- test case
sql/mysql_priv.h:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the entities allocated in the threads memory pool by
JOIN::exec ().
sql/sql_delete.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_select.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_select.h:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_table.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
sql/sql_update.cc:
Bug#21798: memory leak during query execution with subquery in column
list using a function
- cache the SORT_ORDER, TABLE * and JOIN_TAB allocated in the thread's
memory pool by JOIN::exec ().
The mysql_alter_table() was able to rename only a table.
The view/table renaming code is moved from the function rename_tables
to the new function called do_rename().
The mysql_alter_table() function calls it when it needs to rename a view.
mysql-test/t/rename.test:
Added a test case for bug#14959: ALTER TABLE isn't able to rename a view
mysql-test/r/rename.result:
Added a test case for bug#14959: ALTER TABLE isn't able to rename a view
sql/mysql_priv.h:
Bug#14959: ALTER TABLE isn't able to rename a view
Added the prototype of the do_rename() function.
sql/sql_rename.cc:
Bug#14959: ALTER TABLE isn't able to rename a view
The view/table renaming code is moved from the function rename_tables
to the new function called do_rename().
sql/sql_table.cc:
Bug#14959: ALTER TABLE isn't able to rename a view
Added handling of a view rename to the mysql_alter_table() function.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/collapsed:
auto-union
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/ps.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
into mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
into mockturtle.local:/home/dlenev/src/mysql-5.0-bg20670-2
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_update.cc:
Auto merged
into mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
BitKeeper/etc/collapsed:
auto-union
mysql-test/mysql-test-run.pl:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
into rama.(none):/home/jimw/my/mysql-5.0-clean
include/my_global.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
into rama.(none):/home/jimw/my/mysql-4.1-clean
include/my_global.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/mysqld.cc:
Resolve conflict
into rama.(none):/home/jimw/my/mysql-5.0-clean
include/m_ctype.h:
Auto merged
include/m_string.h:
Auto merged
include/my_global.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_class.h:
Auto merged
include/my_sys.h:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/mysqld.cc:
Resolve conflict
sql/opt_range.cc:
Resolve conflict
sql/sql_acl.cc:
Resolve conflict
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
include/mysql_com.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
mysql-test/r/ctype_utf8.result:
Manual merge.
mysql-test/t/ctype_utf8.test:
Manual merge.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
The STACK_MIN_SIZE is currently set to 8192, when we actually need
(emperically discovered) 9236 bytes to raise an fatal error, on Ubuntu
Dapper Drake, libc6 2.3.6-0ubuntu2, Linux kernel 2.6.15-27-686, on x86.
I'm taking that as a new lower bound, plus 100B of wiggle-room for sundry
word sizes and stack behaviors.
The added test verifies in a cross-platform way that there are no gaps
between the space that we think we need and what we actually need to report
an error.
DOCUMENTERS: This also adds "let" to the mysqltest commands that evaluate
an argument to expand variables therein. (Only right of the "=", of course.)
client/mysqltest.c:
Add "let" to the list of mysqltest commands that evaluates its arguments (only
the right-hand-side of the equals-sign expression).
mysql-test/r/mysqltest.result:
Added test to show that mysqltest "let" will evaluate the RHS correctly (and
expand the backslash test).
mysql-test/t/mysqltest.test:
Added test to show that mysqltest "let" will evaluate the RHS correctly (and
expand the backslash test).
sql/mysql_priv.h:
Increase the amount we require to be available for the stack, since
experience told us that the previous amount was too little by at least
1044 bytes.
mysql-test/r/execution_constants.result:
New BitKeeper file ``mysql-test/r/execution_constants.result''
mysql-test/t/execution_constants.test:
New BitKeeper file ``mysql-test/t/execution_constants.test''
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21414
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
Presence of a subquery in the ON expression of a join
should not block merging the view that contains this join.
Before this patch the such views were converted into
into temporary table views.
mysql-test/r/view.result:
Added a test case for bug #21646.
mysql-test/t/view.test:
Added a test case for bug #21646.
sql/mysql_priv.h:
Fixed bug #21646.
Added a new parsing state 'IN_ON', true when
the parser is in an ON expression of a join.
sql/sql_lex.cc:
Fixed bug #21646.
Presence of a subquery in the ON expression of a join
should not block merging the view that contains this join.
sql/sql_yacc.yy:
Fixed bug #21646.
Added a new parsing state 'IN_ON', true when
the parser is in an ON expression of a join.
this key does not stop" (version for 5.0 only).
UPDATE statement which WHERE clause used key and which invoked trigger
that modified field in this key worked indefinetely.
This problem occured because in cases when UPDATE statement was
executed in update-on-the-fly mode (in which row is updated right
during evaluation of select for WHERE clause) the new version of
the row became visible to select representing WHERE clause and was
updated again and again.
We already solve this problem for UPDATE statements which does not
invoke triggers by detecting the fact that we are going to update
field in key used for scanning and performing update in two steps,
during the first step we gather information about the rows to be
updated and then doing actual updates. We also do this for
MULTI-UPDATE and in its case we even detect situation when such
fields are updated in triggers (actually we simply assume that
we always update fields used in key if we have before update
trigger).
The fix simply extends this check which is done in check_if_key_used()/
QUICK_SELECT_I::check_if_keys_used() routine/method in such way that
it also detects cases when field used in key is updated in trigger.
As nice side-effect we have more precise and thus more optimal
perfomance-wise check for the MULTI-UPDATE.
Also check_if_key_used()/QUICK_SELECT_I::check_if_keys_used() were
renamed to is_key_used()/QUICK_SELECT_I::is_keys_used() in order to
better reflect that boolean predicate.
Note that this check is implemented in much more elegant way in 5.1
mysql-test/r/trigger.result:
Added test case for bug#20670 "UPDATE using key and invoking trigger that
modifies this key does not stop".
mysql-test/t/trigger.test:
Added test case for bug#20670 "UPDATE using key and invoking trigger that
modifies this key does not stop".
sql/key.cc:
Renamed check_if_key_used() to is_key_used(). Also this routine checks if
key uses field which can be updated by before update trigger defined on the
table. As result we avoid using update-on-the-fly method in cases when trigger
updates part of key which is used by select which filters rows to be updated
and thus avoid infinite updates. By doing such check here we cover both UPDATE
and MULTI-UPDATE cases.
sql/mysql_priv.h:
Renamed check_if_key_used() to is_key_used().
sql/opt_range.cc:
Renamed check_if_key_used()/QUICK_SELECT_I::check_if_keys_used() to
is_key_used()/QUICK_SELECT_I::is_keys_used().
sql/opt_range.h:
Renamed QUICK_SELECT_I::check_if_keys_used() method to is_keys_used(),
also updated comment describing it to reflect its extended semantics
(this change was caused by change in check_if_key_used()/is_key_used()
routine semantics).
sql/sql_trigger.cc:
Introduced Table_triggers_list::is_updated_in_before_update_triggers()
method which is needed for checking if field of subject table can be
changed in before update trigger.
sql/sql_trigger.h:
Table_triggers_list:
Removed has_before_update_triggers() method which is not used any longer.
Added declaration of is_updated_in_before_update_triggers() which is
needed for checking if field of subject table can be changed by before
update trigger.
sql/sql_update.cc:
safe_update_on_fly():
check_if_key_used() routine and check_if_keys_used() method were
renamed to is_key_used()/is_keys_used().
Now cases when trigger updates fields which are part of key used for
filtering rows for update are caught directly in is_key_used().
This also allows to cover both UPDATE and MULTI-UPDATE cases.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/item.h:
SCCS merged
The problem was that if after FLUSH TABLES WITH READ LOCK the user
issued DROP/ALTER PROCEDURE/FUNCTION the operation would fail (as
expected), but after UNLOCK TABLE any attempt to execute the same
operation would lead to the error 1305 "PROCEDURE/FUNCTION does not
exist", and an attempt to execute any stored function will also fail.
This happened because under FLUSH TABLES WITH READ LOCK we couldn't open
and lock mysql.proc table for update, and this fact was erroneously
remembered by setting mysql_proc_table_exists to false, so subsequent
statements believed that mysql.proc doesn't exist, and thus that there
are no functions and procedures in the database.
As a solution, we remove mysql_proc_table_exists flag completely. The
reason is that this optimization didn't work most of the time anyway.
Even if open of mysql.proc failed for some reason when we were trying to
call a function or a procedure, we were setting mysql_proc_table_exists
back to true to force table reopen for the sake of producing the same
error message (the open can fail for number of reasons). The solution
could have been to remember the reason why open failed, but that's a lot
of code for optimization of a rare case. Hence we simply remove this
optimization.
mysql-test/r/sp.result:
Add result for bug#21414: SP: Procedure undroppable, to some extent.
mysql-test/t/sp.test:
Remove no longer relevant comment.
Add test case for bug#21414: SP: Procedure undroppable, to some extent.
sql/mysql_priv.h:
Remove declaration of mysql_proc_table_exists.
sql/sp.cc:
Remove references to mysql_proc_table_exists.
sql/sql_acl.cc:
Remove reference to mysql_proc_table_exists.
sql/mysql_priv.h:
after merge fix
added charset parameter to check_string_length() function
sql/slave.h:
after merge fix
USERNAME_LENGTH const is changed to USERNAME_BYTE_LENGTH
sql/sql_parse.cc:
after merge fix
added charset parameter to check_string_length() function
sql/sql_yacc.yy:
after merge fix
added charset parameter to check_string_length() function
into macbook.gmz:/Users/kgeorge/mysql/work/B21392-5.0-opt
mysql-test/t/delete.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/delete.result:
merge 4.1->5.0
sql/sql_parse.cc:
merge 4.1->5.0
1003: Incorrect table name
in multi-table DELETE the set of tables to delete from actually
references then tables in the other list, e.g:
DELETE alias_of_t1 FROM t1 alias_of_t1 WHERE ....
is a valid statement.
So we must turn off table name syntactical validity check for alias_of_t1
because it's not a table name (even if it looks like one).
In order to do that we add a special flag (TL_OPTION_ALIAS) to
disable the name checking for the aliases in multi-table DELETE.
mysql-test/r/delete.result:
Bug #21392: multi-table delete with alias table name fails with
1003: Incorrect table name
- test case
mysql-test/t/delete.test:
Bug #21392: multi-table delete with alias table name fails with
1003: Incorrect table name
- test case
sql/mysql_priv.h:
Bug #21392: multi-table delete with alias table name fails with
1003: Incorrect table name
- add a special flag to disable the name checking for the aliases
in multi-table DELETE
sql/sql_parse.cc:
Bug #21392: multi-table delete with alias table name fails with
1003: Incorrect table name
- add a special flag to disable the name checking for the aliases
in multi-table DELETE
sql/sql_yacc.yy:
Bug #21392: multi-table delete with alias table name fails with
1003: Incorrect table name
- add a special flag to disable the name checking for the aliases
in multi-table DELETE
into bodhi.local:/opt/local/work/mysql-5.0-14897
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/share/errmsg.txt:
Auto merged
mysql-test/r/grant.result:
Manual merge.
mysql-test/r/view.result:
Manual merge.
mysql-test/t/grant.test:
Manual merge.
mysql-test/t/view.test:
Manual merge.
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.
The fix is to check length of user/host name in parser and if string is too
long, throw an error.
mysql-test/r/grant.result:
Updated result file.
mysql-test/r/sp.result:
Updated result file.
mysql-test/r/trigger.result:
Updated result file.
mysql-test/r/view.result:
Updated result file.
mysql-test/t/grant.test:
Added test for BUG#16899.
mysql-test/t/sp.test:
Added test for BUG#16899.
mysql-test/t/trigger.test:
Added test for BUG#16899.
mysql-test/t/view.test:
Added test for BUG#16899.
sql/mysql_priv.h:
Added prototype for new function.
sql/share/errmsg.txt:
Added new resources.
sql/sql_acl.cc:
Remove outdated checks.
sql/sql_parse.cc:
Add a new function for checking string length.
sql/sql_yacc.yy:
Check length of user/host name.
Corrected build issues : the build can not be conditional.
to keep a unique source .tar.gz distribution.
configure.in:
Rolling back previous change
sql/Makefile.am:
Partially rolling back previous change.
The build has to be unconditional, for the source .tar.gz distribution
sql/mysql_priv.h:
WL#3432 (Compile the Parser with a --debug --verbose option)
sql/sql_parse.cc:
WL#3432 (Compile the Parser with a --debug --verbose option)
Moved turn_parser_debug_on to sql_yacc.yy
sql/sql_yacc.yy:
WL#3432 (Compile the Parser with a --debug --verbose option)
Moved turn_parser_debug_on to sql_yacc.yy
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
__attribute__((format(...))) safely, make more use of the format attribute,
and fix some of the warnings that this turns up (plus a bonus unrelated one).
include/m_ctype.h:
Add ATTRIBUTE_FORMAT to printf-like functions.
include/m_string.h:
Add ATTRIBUTE_FORMAT to my_snprintf() declaration.
include/my_global.h:
Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers.
Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it
is available from different versions of gcc and g++.
include/my_sys.h:
Add ATTRIBUTE_FORMAT() to my_printf_error declaration
sql/item_subselect.cc:
Silence warning about members being initialized out-of-order
sql/item_timefunc.cc:
Fix format specifier in snprintf() calls with milliseconds
sql/mysql_priv.h:
Add ATTRIBUTE_FORMAT to printf-like functions.
sql/mysqld.cc:
Fix various format specifiers
Make sure that method_conv is always set by myisam_stats_method
sql/opt_range.cc:
Cast pointers to correct type for %lx
sql/set_var.cc:
Fix __attribute__((unused)) (missing inner set of parens)
sql/slave.cc:
Fix format specifier
sql/slave.h:
Add ATTRIBUTE_FORMAT to slave_print_error() declaration.
sql/sql_acl.cc:
Fix number of arguments passed for formatting, and fix acl_host_or_ip being
passed instead of just the hostname.
sql/sql_class.h:
Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
SELECT right instead of INSERT right was required for an insert into to a view.
This wrong behaviour appeared after the fix for bug #20989. Its intention was
to ask only SELECT right for all tables except the very first for a complex
INSERT query. But that patch has done it in a wrong way and lead to asking
a wrong access right for an insert into a view.
The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.
mysql-test/t/view.test:
Added a test case for bug#21261: Wrong access rights was required for an insert into a view
mysql-test/r/view.result:
Added a test case for bug#21261: Wrong access rights was required for an insert into a view
sql/sql_update.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_select.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_load.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_insert.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_delete.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_base.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.
sql/mysql_priv.h:
Fixed bug#21261: Wrong access rights was required for an insert into a view
The setup_tables_and_check_access() function now accepts two want_access
parameters.
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/udf.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
mysql-test/t/udf.test:
Manual merge.
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
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/t/sp.test:
Manual merge
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
include/mysql.h:
Auto merged
include/sql_common.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/ps.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/sql_prepare.cc:
Manual merge.
sql/table.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
'conc_sys' test
Concurrent execution of SELECT involing at least two INFORMATION_SCHEMA
tables, DROP DATABASE statement and DROP TABLE statement could have
resulted in stalled connection for this SELECT statement.
The problem was that for the first query of a join there was a race
between select from I_S.TABLES and DROP DATABASE, and the error (no
such database) was prepared to be send to the client, but the join
processing was continued. On second query to I_S.COLUMNS there was a
race with DROP TABLE, but this error (no such table) was downgraded to
warning, and thd->net.report_error was reset. And so neither result
nor error was sent to the client.
The solution is to stop join processing once it is clear we are going
to report a error, and also to downgrade to warnings file system errors
like 'no such database' (unless we are in the 'SHOW' command), because
I_S is designed not to use locks and the query to I_S should not abort
if something is dropped in the middle.
No test case is provided since this bug is a result of a race, and is
timing dependant. But we test that plain SHOW TABLES and SHOW COLUMNS
give a error if there is no such database or a table respectively.
mysql-test/r/show_check.result:
Add result for the test that SHOW TABLES and SHOW COLUMNS give a error
if there is no such database or a table respectively.
mysql-test/t/show_check.test:
Add test case that SHOW TABLES and SHOW COLUMNS give a error
if there is no such database or a table respectively.
sql/mysql_priv.h:
Remove prototype of mysql_find_files(), which is made static under
find_files() name.
sql/sql_show.cc:
Rename mysql_find_files() to find_files() and make it static.
Return FIND_FILES_OK for success, FIND_FILES_OOM for out of memory,
and FIND_FILES_DIR for directory reading error.
Downgrade error to warning in get_all_tables() if it is a
FIND_FILES_DIR error, and we are not in the 'SHOW' command.
Once 'result' is set to 1 in get_schema_tables_result(), there's no
need in continuing iterations, as we are about to return a error.
Fix for BUG#16676: Database CHARSET not used for stored procedures
The problem in BUG#16211 is that CHARSET-clause of the return type for
stored functions is just ignored.
The problem in BUG#16676 is that if character set is not explicitly
specified for sp-variable, the server character set is used instead
of the database one.
The fix has two parts:
- always store CHARSET-clause of the return type along with the
type definition in mysql.proc.returns column. "Always" means that
CHARSET-clause is appended even if it has not been explicitly
specified in CREATE FUNCTION statement (this affects BUG#16211 only).
Storing CHARSET-clause if it is not specified is essential to avoid
changing character set if the database character set is altered in
the future.
NOTE: this change is not backward compatible with the previous releases.
- use database default character set if CHARSET-clause is not explicitly
specified (this affects both BUG#16211 and BUG#16676).
NOTE: this also breaks backward compatibility.
mysql-test/r/mysqldump.result:
Updated result file.
mysql-test/r/sp.result:
Updated result file.
mysql-test/t/sp.test:
Provided test cases for BUG#16211, BUG#16676.
sql/mysql_priv.h:
Added two convenient functions for work with databases.
sql/sp.cc:
1. Add CHARSET-clause to CREATE-statement if it has been explicitly specified.
2. Polishing -- provided some comments.
sql/sp_head.cc:
Use database charset as default charset of sp-variable.
sql/sp_head.h:
Move init_sp_name() out of init_strings().
sql/sql_db.cc:
Two new functions created:
- load_db_opt_by_name();
- check_db_dir_existence();
sql/sql_show.cc:
Eliminate duplicated code by using
check_db_dir_existence() and load_db_opt_by_name()
sql/sql_table.cc:
Eliminate duplicated code by using
check_db_dir_existence() and load_db_opt_by_name()
sql/sql_yacc.yy:
Call sp_head::init_sp_name() to initialize stored routine name.
into mysql.com:/home/psergey/mysql-5.0-opt
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/subselect.test:
Manual merge
sql/mysql_priv.h:
Manual merge
- Adapt it to work with the handlerton class
sql/handler.cc:
Only create new MERGE handler if merge engine is enabled
sql/mysql_priv.h:
Use the myisammrg_hton.state field for the have_merge_db option
sql/mysqld.cc:
Handle the OPT_MERGE (--skip-merge) option case
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
BitKeeper/etc/ignore:
auto-union
libmysqld/Makefile.am:
Auto merged
myisam/mi_create.c:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_class.h:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/r/myisam.result:
Manual merge.
mysql-test/t/myisam.test:
Manual merge.
sql/set_var.cc:
Manual merge.
sql/set_var.h:
Manual merge.
sql/sql_cache.cc:
Manual merge.
sql/sql_class.cc:
Manual merge.
into bodhi.local:/opt/local/work/mysql-5.0-runtime
sql/ha_ndbcluster.cc:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_update.cc:
Manual merge.
into mysql.com:/home/dlenev/mysql-5.0-bg18437-3
mysql-test/t/federated.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/federated.result:
Manual merge.
(implemented by by Josh Chamas)
libmysqld/Makefile.am:
Adding new source file
mysql-test/r/date_formats.result:
Adding test case
mysql-test/t/date_formats.test:
Adding test case
sql/Makefile.am:
Adding new source file
BitKeeper/etc/ignore:
Added libmysqld/sql_locale.cc to the ignore list
sql/item_timefunc.cc:
Using current locale data, instead of hard coded English names.
sql/mysql_priv.h:
Adding new type MY_LOCALE, and declaring new global variables.
sql/set_var.cc:
Adding "lc_time_names" system variable.
sql/set_var.h:
Adding "lc_time_names" system variable.
sql/sql_cache.cc:
Adding lc_time_names as a query cache flag.
sql/sql_class.cc:
Setting default locale to en_US
sql/sql_class.h:
Adding locale variable into system_variables.
sql/sql_locale.cc:
Adding new file with locale data for various languages
NDB table".
SQL-layer was not marking fields which were used in triggers as such. As
result these fields were not always properly retrieved/stored by handler
layer. So one might got wrong values or lost changes in triggers for NDB,
Federated and possibly InnoDB tables.
This fix solves the problem by marking fields used in triggers
appropriately.
Also this patch contains the following cleanup of ha_ndbcluster code:
We no longer rely on reading LEX::sql_command value in handler in order
to determine if we can enable optimization which allows us to handle REPLACE
statement in more efficient way by doing replaces directly in write_row()
method without reporting error to SQL-layer.
Instead we rely on SQL-layer informing us whether this optimization
applicable by calling handler::extra() method with
HA_EXTRA_WRITE_CAN_REPLACE flag.
As result we no longer apply this optimzation in cases when it should not
be used (e.g. if we have on delete triggers on table) and use in some
additional cases when it is applicable (e.g. for LOAD DATA REPLACE).
Finally this patch includes fix for bug#20728 "REPLACE does not work
correctly for NDB table with PK and unique index".
This was yet another problem which was caused by improper field mark-up.
During row replacement fields which weren't explicity used in REPLACE
statement were not marked as fields to be saved (updated) so they have
retained values from old row version. The fix is to mark all table
fields as set for REPLACE statement. Note that in 5.1 we already solve
this problem by notifying handler that it should save values from all
fields only in case when real replacement happens.
include/my_base.h:
Added HA_EXTRA_WRITE_CAN_REPLACE, HA_EXTRA_WRITE_CANNOT_REPLACE - new
parameters for ha_extra() method. We use them to inform handler that
write_row() which tries to insert new row into the table and encounters
some already existing row with same primary/unique key can replace old
row with new row instead of reporting error.
mysql-test/r/federated.result:
Additional test for bug#18437 "Wrong values inserted with a before update
trigger on NDB table".
mysql-test/r/ndb_replace.result:
Added test for bug #20728 "REPLACE does not work correctly for NDB table
with PK and unique index". Updated wrong results from older test.
mysql-test/t/federated.test:
Additional test for bug#18437 "Wrong values inserted with a before update
trigger on NDB table".
mysql-test/t/ndb_replace.test:
Added test for bug #20728 "REPLACE does not work correctly for NDB table
with PK and unique index".
sql/ha_ndbcluster.cc:
We no longer rely on reading LEX::sql_command value in handler in order
to determine if we can enable optimization which allows us to handle REPLACE
statement in more efficient way by doing replaces directly in write_row()
method without reporting error to SQL-layer.
Instead we rely on SQL-layer informing us whether this optimization
applicable by calling handler::extra() method with
HA_EXTRA_WRITE_CAN_REPLACE flag.
As result we no longer apply this optimization in cases when it should not
be used (e.g. if we have on delete triggers on table) and use in some
additional cases when it is applicable (e.g. for LOAD DATA REPLACE).
sql/item.cc:
Item_trigger_field::setup_field():
Added comment explaining why we don't set Field::query_id in this method.
sql/mysql_priv.h:
mysql_alter_table() function no longer takes handle_duplicates argument.
Added declaration of mark_fields_used_by_triggers_for_insert_stmt() function.
sql/sql_delete.cc:
Mark fields which are used by ON DELETE triggers so handler will retrieve
values for these fields.
sql/sql_insert.cc:
Explicitly inform handler that we are doing REPLACE (using ha_extra() method)
in cases when it can promote insert operation done by write_row() to replace.
Also when we do REPLACE we want to store values for all columns so we should
inform handler about it.
Finally we should mark fields used by ON UPDATE/ON DELETE triggers as such
so handler can properly retrieve/restore values in these fields during
execution of REPLACE and INSERT ... ON DUPLICATE KEY UPDATE statements.
sql/sql_load.cc:
Explicitly inform handler that we are doing LOAD DATA REPLACE (using
ha_extra() method) in cases when it can promote insert operation done by
write_row() to replace.
Also when we do replace we want to save (replace) values for all columns
so we should inform handler about it.
Finally to properly execute LOAD DATA for table with triggers we should
mark fields used by ON INSERT triggers as such so handler can properly
store values for these fields.
sql/sql_parse.cc:
mysql_alter_table() function no longer takes handle_duplicates argument.
sql/sql_table.cc:
Got rid of handle_duplicates argument in mysql_alter_table() and
copy_data_between_tables() functions. These functions were always
called with handle_duplicates == DUP_ERROR and thus contained dead
(and probably incorrect) code.
sql/sql_trigger.cc:
Added Table_triggers_list::mark_fields_used() method which is used to mark
fields read/set by triggers as such so handlers will be able properly
retrieve/store values in these fields.
sql/sql_trigger.h:
Table_triggers_list:
Added mark_fields_used() method which is used to mark fields read/set by
triggers as such so handlers will be able properly retrieve/store values
in these fields. To implement this method added 'trigger_fields' member
which is array of lists linking items for all fields used in triggers
grouped by event and action time.
sql/sql_update.cc:
Mark fields which are used by ON UPDATE triggers so handler will retrieve
and save values for these fields.
mysql-test/r/ndb_trigger.result:
Added test for bug#18437 "Wrong values inserted with a before update trigger
on NDB table".
mysql-test/t/ndb_trigger.test:
Added test for bug#18437 "Wrong values inserted with a before update trigger
on NDB table".
user name is calculated on function execution stage instead of parse stage
mysql-test/r/sp_notembedded.result:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
test case
mysql-test/t/sp_notembedded.test:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
test case
sql/mysql_priv.h:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
new get_current_user(THD *thd, LEX_USER *user) function
sql/sql_acl.cc:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
user name is calculated using get_current_user() function
sql/sql_parse.cc:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
new get_current_user() function
user name is calculated using get_current_user() function
sql/sql_yacc.yy:
Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
empty LEX_USER struct for CURRENT USER,
user name is calculated on function execution stage
Addendum fixes after changing the condition variable
for the global read lock.
The stress test suite revealed some deadlocks. Some were
related to the new condition variable (COND_global_read_lock)
and some were general problems with the global read lock.
It is now necessary to signal COND_global_read_lock whenever
COND_refresh is signalled.
We need to wait for the release of a global read lock if one
is set before every operation that requires a write lock.
But we must not wait if we have locked tables by LOCK TABLES.
After setting a global read lock a thread waits until all
write locks are released.
mysql-test/r/lock_multi.result:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added test results.
mysql-test/t/lock_multi.test:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added tests for possible deadlocks that did not occur
with the stress test suite.
mysys/thr_lock.c:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added a protection against an infinite loop that occurs
with the test case for Bug #20662.
sql/lock.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
Added the definition of a new function that signals
COND_global_read_lock whenever COND_refresh is signalled.
sql/mysql_priv.h:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Added a declaration for a new function that signals
COND_global_read_lock whenever COND_refresh is signalled.
sql/sql_base.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
sql/sql_handler.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
sql/sql_insert.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Removed global read lock handling from inside of
INSERT DELAYED. It is handled on a higher level now.
sql/sql_parse.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Wait for the release of a global read lock if one is set
before every operation that requires a write lock.
But don't wait if locked tables exist already.
sql/sql_table.cc:
Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.
Removed global read lock handling from inside of
CREATE TABLE. It is handled on a higher level now.
Signal COND_global_read_lock whenever COND_refresh
is signalled by using the new function broadcast_refresh().
schemas
The function check_one_table_access() called to check access to tables in
SELECT/INSERT/UPDATE was doing additional checks/modifications that don't hold
in the context of setup_tables_and_check_access().
That's why the check_one_table() was split into two : the functionality needed by
setup_tables_and_check_access() into check_single_table_access() and the rest of
the functionality stays in check_one_table_access() that is made to call the new
check_single_table_access() function.
mysql-test/r/view_grant.result:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- test suite for the bug
mysql-test/t/view_grant.test:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- test suite for the bug
sql/mysql_priv.h:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- check_one_table_access split into 2
sql/sql_base.cc:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- the new sub-function called
sql/sql_parse.cc:
Bug #20482: failure on Create join view with sources views/tables in different
schemas
- check_one_table_access() split into two : check_single_table_access() to
actually check access to the table(ro) and check_one_table_access() that calls
check_single_table_access() and checks also the tables belonging to sub selects
or implicitly opened tables.
into mysql.com:/home/kgeorge/mysql/5.0/B18681
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
The check for view security was lacking several points :
1. Check with the right set of permissions : for each table ref that
participates in a view there were the right credentials to use in it's
security_ctx member, but these weren't used for checking the credentials.
This makes hard enforcing the SQL SECURITY DEFINER|INVOKER property
consistently.
2. Because of the above the security checking for views was just ruled out
in explicit ways in several places.
3. The security was checked only for the columns of the tables that are
brought into the query from a view. So if there is no column reference
outside of the view definition it was not detecting the lack of access to
the tables in the view in SQL SECURITY INVOKER mode.
The fix below tries to fix the above 3 points.
mysql-test/r/grant.result:
removed nondeterminism (unspecified order) in some test output
mysql-test/r/view_grant.result:
Somewhat extended test case for the bug and similar queries.
mysql-test/t/grant.test:
removed nondeterminism (unspecified order) in some test output
mysql-test/t/view_grant.test:
Somewhat extended test case for the bug and similar queries.
sql/mysql_priv.h:
A wrapper for setup_tables that also checks access to the tables
sql/sql_acl.cc:
removed artificial security check stop and used the table ref's credentials.
sql/sql_base.cc:
a wrapper for setup_tables to check access to the tables
sql/sql_delete.cc:
wrapper called.
sql/sql_insert.cc:
wrapper called
sql/sql_load.cc:
wrapper called
sql/sql_parse.cc:
wrapper called and artificial check stop removed
sql/sql_select.cc:
wrapper called
sql/sql_update.cc:
wrapper called
sql/table.cc:
Mask table access to the view error as well.
Replaced COND_refresh with COND_global_read_lock becasue of a bug in NTPL threads when using different mutexes as arguments to pthread_cond_wait()
The original code caused a hang in FLUSH TABLES WITH READ LOCK in some circumstances because pthread_cond_broadcast() was not delivered to other threads.
This fixes:
Bug#16986: Deadlock condition with MyISAM tables
Bug#20048: FLUSH TABLES WITH READ LOCK causes a deadlock
mysql-test/r/flush.result:
Added test case for deadlock with FLUSH TABLES WITH READ LOCK
mysql-test/r/lock_multi.result:
Test for bug in LOCK TABLE + optimize table
mysql-test/t/flush.test:
Added test case for deadlock with FLUSH TABLES WITH READ LOCK
mysql-test/t/lock_multi.test:
Test for bug in LOCK TABLE + optimize table
sql/lock.cc:
Replaced COND_refresh with COND_global_read_lock becasue of a bug in NTPL threads when using different mutexes as arguments to pthread_cond_wait()
The original code caused a hang in FLUSH TABLES WITH READ LOCK in some circumstances because pthread_cond_broadcast() was not delivered to other threads
sql/mysql_priv.h:
Added COND_global_read_lock
sql/mysqld.cc:
Added COND_global_read_lock
sql/sql_base.cc:
More DBUG statements
Added a broadcast in remove_table_from_cache() to release any threads waiting in open
Fixed compiler warnings
Fixed valgrind warning in Item_date_add_intervall::eq. (Recoding of bugfix #19490)
sql/field.cc:
remove dflt_field from field structure (not needed)
Simple cleanup of code that been copied elsewhere
sql/field.h:
remove dflt_field from field structure (not needed)
sql/item.h:
Removed compiler warnings
sql/item_timefunc.cc:
Fixed Item_date_add_intervall::eq
The problem was that when we call 'eq' 'this' is not fixed, which means we can't call const_item() or a value function.
I fixed this so that we check eq for all arguments and that the sign and type are identical.
(The original code gave a 'accessing uninitialized data' in valgrind.
sql/mysql_priv.h:
Added default fields to create_tmp_field
sql/sql_insert.cc:
New default_field parameter to create_tmp_field()
sql/sql_select.cc:
New default_field parameter to create_tmp_field()
Use this in create_tmp_table() to set right default value for a field
specific to 5.0 version of the patch is motivated by the fact that a wrapper over
MYSQLLOG::write can not help in 5.0 where query's charset is embedded into event instance in the constructor.
sql/mysql_priv.h:
this 4.1 specific code does not help in 5.0
sql/sql_base.cc:
No wrapper similar to 4.1's version is done since Query_log_event constructor
takes care of encodings in 5.0 whereas log::write method does it in 4.1.
We can introduce an additional constuctor for Query_log_event to pass desired
(i.e system_character_info) charset different from THD's version.
But I am delaying this while there are not more bugs similar to this one reported.
into mysql.com:/opt/local/work/mysql-5.0-runtime-merge
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/im_options_set.result:
Auto merged
mysql-test/r/im_options_unset.result:
Auto merged
mysql-test/r/trigger-grant.result:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
manual merge to account 5.0 specific names of TABLE class
sql/mysql_priv.h:
manual merge: changing to 5.0's TABLE class names
sql/sql_base.cc:
manual merge: whitespaces and 5.0 TABLE's names
into mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0
mysql-test/r/mysqlbinlog.result:
Auto merged
sql/mysql_priv.h:
Auto merged
mysql-test/r/drop_temp_table.result:
manual merge use local
mysql-test/r/mix_innodb_myisam_binlog.result:
manual merge use local
mysql-test/r/rpl_temporary.result:
manual merge use local
mysql-test/t/mysqlbinlog.test:
manual merge
mysql-test/t/rpl_temporary.test:
manual merge. More than the bugs fixes: using disconnect con1 from 4.1's version instead of kill con1.
sql/sql_base.cc:
manual merge, should be in sync with 4.1's version.
into mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/4.1
mysql-test/r/rpl_temporary.result:
Auto merged
mysql-test/t/rpl_temporary.test:
Auto merged
sql/sql_base.cc:
Auto merged
sql/mysql_priv.h:
manual merge, a comment added
A pattern to generate binlog for DROPped temp table in close_temporary_tables
was buggy: could not deal with a grave-accent-in-name table.
The fix exploits `append_identifier()' for quoting and duplicating accents.
mysql-test/r/rpl_temporary.result:
results changed
mysql-test/t/rpl_temporary.test:
more correct internal table emulation; typo of @@session in bug#17263.
sql/mysql_priv.h:
bool is_user_table(TABLE * table)
is added to answer wheather temporary table was created explicitly.
sql/sql_base.cc:
Utilizing `append_identifier' to quote. `close_temporary_tables' once again recoded
I hope to become much simplier than previously. No-binlog branch is separated completely the
rest that adopts String's methods.
Binlog lacks encoding info about DROPped temporary table.
Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, that automatically, but not the client, who generates the query
the binlog should be updated on the server's encoding for the coming DROP.
The `write_binlog_with_system_charset()' is introduced to replace similar problematic places in the code.
mysql-test/r/drop_temp_table.result:
results changed
mysql-test/r/mix_innodb_myisam_binlog.result:
results changed
mysql-test/r/mysqlbinlog.result:
results changed
mysql-test/r/rpl_temporary.result:
results changed
mysql-test/t/mysqlbinlog.test:
Check roll-forward recovery from binlog where there are DROP temporary tables created
in koi8r.
mysql-test/t/rpl_temporary.test:
Check slave digests binlog with DROP temporary tables created in koi8r.
sql/mysql_priv.h:
`write_binlog_with_system_charset()' is added to be called when a binlog event
is created "implicitly" like DROP temporary table is case of closing connection.
sql/sql_base.cc:
Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, not the client, who generates the query
the binlog should be updated on server's encoding for the coming DROP.
into mysql.com:/home/dlenev/mysql-5.0-bg12472
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
or implicitly uses stored function gives "Table not locked" error'
CREATE TABLE ... SELECT ... statement which was explicitly or implicitly
(through view) using stored function gave "Table not locked" error.
The actual bug resides in the current locking scheme of CREATE TABLE SELECT
code, which first opens and locks tables of the SELECT statement itself,
and then, having SELECT tables locked, creates the .FRM, opens the .FRM and
acquires lock on it. This scheme opens a possibility for a deadlock, which
was present and ignored since version 3.23 or earlier. This scheme also
conflicts with the invariant of the prelocking algorithm -- no table can
be open and locked while there are tables locked in prelocked mode.
The patch makes an exception for this invariant when doing CREATE TABLE ...
SELECT, thus extending the possibility of a deadlock to the prelocked mode.
We can't supply a better fix in 5.0.
mysql-test/r/sp.result:
Added tests for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which
explicitly or implicitly uses stored function gives "Table not locked" error'
mysql-test/t/sp.test:
Added tests for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which
explicitly or implicitly uses stored function gives "Table not locked" error'
sql/mysql_priv.h:
Added flag which can be passed to open_table() routine in order to ignore
set of locked tables and prelocked mode.
We don't need declaration of create_table_from_items() any longer as it was
moved into sql_insert.cc and made static.
sql/sql_base.cc:
open_table():
Added flag which allows open table ignoring set of locked tables and
prelocked mode.
sql/sql_insert.cc:
Moved create_table_from_items() from sql_table.cc to sql_insert.cc as it was
not used outside of sql_insert.cc and contains code which is specific for
CREATE TABLE ... SELECT.
Also now when we are executing CREATE TABLE ... SELECT ... statement which
SELECT part requires execution in prelocked mode we ignore set of locked
tables in order to get access to the table we just have created.
We probably don't want to do this if we are under real LOCK TABLES since
it will widen window for deadlock too much.
sql/sql_table.cc:
Moved create_table_from_items() routine into sql_insert.cc, since it was not
used anywhere outside of this file and contains logic which is specific for
CREATE TABLE ... SELECT statement.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/mysql_priv.h:
Auto merged
Bug #19606: ssl variables are not displayed in show variables
Bug #19616: log_queries_not_using_indexes is not listed in show variables
Make basedir, datadir, tmpdir, log_queries_not_using_indexes, ssl_ca,
ssl_capath, ssl_cert, ssl_cipher, and ssl_key all available both from
SHOW VARIABLES and as @@variables.
As a side-effect of this change, log_queries_not_using_indexes can
be changed at runtime (but only globally, not per-connection).
include/sslopt-longopts.h:
Put options in alphabetical order
include/sslopt-vars.h:
Allow define of SSL_VARS_NOT_STATIC to prevent variables from not being
made static.
mysql-test/r/variables.result:
Add new results
mysql-test/t/variables.test:
Add new regression tests
sql/mysql_priv.h:
Add extern for opt_log_queries_not_using_indexes
sql/mysqld.cc:
Handle opt_log_queries_not_using_indexes as extern, and define
SSL_VARS_NO_STATIC so they can be accessed outside of mysqld.cc
sql/set_var.cc:
Handle basedir, datadir, tmpdir, log_queries_not_using_indexes, and
various ssl settings so that they are accessible as server variables
and listed in SHOW VARIABLES.
sql/set_var.h:
Add new sys_var_constr_str_ptr class, for when we have a system variable
that is only set via the command-line that is a pointer to a string.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
mysql-test/r/subselect.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
This performance degradation was due to the fact that some
cost evaluation code added into 4.1 in the function find_best was
not merged into the code of the function best_access_path added
together with other code for greedy optimizer.
Added a parameter to the function print_plan. The parameter contains
accumulated cost for a given partial join.
The patch does not include a special test case since this performance
degradation is hard to reproduse with a simple example.
TODO: make the function find_best use the function best_access_path
in order to remove duplication of code which might result in incomplete
merges in the future.
mysql-test/r/delete.result:
Fixed bug #14292: performance degradation for a benchmark query.
Adjusted test results.
mysql-test/r/subselect.result:
Fixed bug #14292: performance degradation for a benchmark query.
Adjusted test results.
sql/mysql_priv.h:
Fixed bug #14292: performance degradation for a benchmark query.
Added a parameter to the function print_plan. The parameter contains
accumulated cost for a given partial join.
sql/sql_select.cc:
Fixed bug #14292: performance degradation for a benchmark query.
This performance degradation was due to the fact that some
cost evaluation code added into 4.1 in the function find_best was
not merged into the code of the function best_access_path added
together with other code for greedy optimizer.
sql/sql_test.cc:
Fixed bug #14292: performance degradation for a benchmark query.
Added a parameter to the function print_plan. The parameter contains
accumulated cost for a given partial join.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
client/mysql.cc:
Auto merged
include/mysql.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql-common/client.c:
SCCS merged
into mysql.com:/opt/local/work/mysql-5.0-runtime-merge
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/mysqld.cc:
SCCS merged
- Add variable "have_dynamic_loading" and use it to check if the udf test should be run.
mysql-test/include/have_udf.inc:
Use variable "have_dynamic_loading" to to determine if there is support for udf's
mysql-test/r/have_udf.require:
Use variable "have_dynamic_loading" to to determine if there is support for udf's
mysql-test/t/disabled.def:
Remove udf from disabled
sql/mysql_priv.h:
Add have_dlopen variable
sql/mysqld.cc:
Add have_dlopen variable
sql/set_var.cc:
Add have_dlopen variable and name it "have_dynamic_loading" in "SHOW VARIABLES"
into neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_acl.cc:
Auto merged
into mysql.com:/opt/local/work/mysql-4.1-16365
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
mysql-test/r/ps.result:
Manual merge
mysql-test/t/ps.test:
Manual merge
too many open statements". The patch adds a new global variable
@@max_prepared_stmt_count. This variable limits the total number
of prepared statements in the server. The default value of
@@max_prepared_stmt_count is 16382. 16382 small statements
(a select against 3 tables with GROUP, ORDER and LIMIT) consume
100MB of RAM. Once this limit has been reached, the server will
refuse to prepare a new statement and return ER_UNKNOWN_ERROR
(unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
and can accept any value from 0 to 1 million. In case
the new value of the limit is less than the current
statement count, no new statements can be added, while the old
still can be used. Additionally, the current count of prepared
statements is now available through a global read-only variable
@@prepared_stmt_count.
mysql-test/r/ps.result:
Test results fixed (a test case for Bug#16365)
mysql-test/t/ps.test:
A test case for Bug#16365 "Prepared Statements: DoS with too many
open statements". Also fix statement leaks in other tests.
sql/mysql_priv.h:
Add declarations for new global variables.
sql/mysqld.cc:
Add definitions of max_prepared_stmt_count, prepared_stmt_count.
sql/set_var.cc:
Implement support for @@prepared_stmt_count and
@@max_prepared_stmt_count. Currently these variables are queried
without acquiring LOCK_prepared_stmt_count due to limitations of
the set_var/sys_var class design. Updates are, however, protected
with a lock.
sql/set_var.h:
New declarations to add support for @@max_prepared_stmt_count.
Implement a new class, where the lock to be used when updating
a variable is a parameter.
sql/sql_class.cc:
Add accounting of the total number of prepared statements in the
server to the methods of Statement_map.
sql/sql_class.h:
Add accounting of the total number of prepared statements in the
server to the methods of Statement_map.
sql/sql_prepare.cc:
Statement_map::insert will now send a message in case of an
error.
After FLUSH STATUS max_used_connections was reset to 0, and haven't
been updated while cached threads were reused, until the moment a new
thread was created.
The first suggested fix from original bug report was implemented:
a) On flushing the status, set max_used_connections to
threads_connected, not to 0.
b) Check if it is necessary to increment max_used_connections when
taking a thread from the cache as well as when creating new threads
mysql-test/r/status.result:
Add result for bug#15933.
mysql-test/t/status.test:
Add test case for bug#15933.
Fixed typo.
sql/mysql_priv.h:
Add declaration of refresh_status(), which is now external.
sql/mysqld.cc:
Remove start_cached_thread() (code moved directly into create_new_thread()).
Add comment for create_new_thread ().
In create_new_thread() update max_used_connections when creating new thread
and when reusing the cached one.
Move refresh_status() from sql/sql_parse.cc here, on refresh set
max_used_connections to the current number of connections.
sql/sql_parse.cc:
refresh_status() moved to sql/mysqld.cc.
The GROUP_CONCAT uses its own temporary table. When ROLLUP is present
it creates the second copy of Item_func_group_concat. This copy receives the
same list of arguments that original group_concat does. When the copy is
set up the result_fields of functions from the argument list are reset to the
temporary table of this copy.
As a result of this action data from functions flow directly to the ROLLUP copy
and the original group_concat functions shows wrong result.
Since queries with COUNT(DISTINCT ...) use temporary tables to store
the results the COUNT function they are also affected by this bug.
The idea of the fix is to copy content of the result_field for the function
under GROUP_CONCAT/COUNT from the first temporary table to the second one,
rather than setting result_field to point to the second temporary table.
To achieve this goal force_copy_fields flag is added to Item_func_group_concat
and Item_sum_count_distinct classes. This flag is initialized to 0 and set to 1
into the make_unique() member function of both classes.
To the TMP_TABLE_PARAM structure is modified to include the similar flag as
well.
The create_tmp_table() function passes that flag to create_tmp_field().
When the flag is set the create_tmp_field() function will set result_field
as a source field and will not reset that result field to newly created
field for Item_func_result_field and its descendants. Due to this there
will be created copy func to copy data from old result_field to newly
created field.
mysql-test/t/func_gconcat.test:
Added test for bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
mysql-test/r/func_gconcat.result:
Added test for bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
sql/sql_table.cc:
Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
Added 0 as a last parameter to create_tmp_field() to force old behaviour.
sql/sql_select.cc:
Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
Added the flag 'make_copy_field' to create_tmp_field(), so that for Item_result_field descendants create_tmp_field() sets the item's result field as a source field and deny resetting that result field to a new value.
sql/sql_class.h:
Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
Added the flag 'force_copy_fields' to the structure TMP_TABLE_PARAM in order to make create_tmp_field() force the creation of 'copy_field' objects.
sql/mysql_priv.h:
Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
Added the bool parameter 'make_copy_field' to create_tmp_field().
sql/item_sum.cc:
Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
Added initialization of the force_copy_fields flag and passing it to create_tmp_table() through TMP_TBLE_PARAM in the Item_func_group_concat and Item_sum_count_distinct member functions.
sql/item_sum.h:
Fixed bug#15560: GROUP_CONCAT wasn't ready for WITH ROLLUP queries
Added the flag 'force_copy_fields' to the Item_func_group_concat and Item_sum_count_distinct classes.
Generating character set-independent quoting of strings for the
binary log when executing statements from inside stored procedure.
mysql-test/r/ctype_cp932_binlog.result:
Result change
mysql-test/t/ctype_cp932_binlog.test:
Adding check that string literals are written correctly for multi-byte
character sets.
sql/item.cc:
Cutting out character set-independent string escaping code and putting it
in a separate function.
sql/log_event.cc:
Adding characters set-independent code to separate function.
sql/mysql_priv.h:
Adding new function.
sql/sp_head.cc:
Escaping string value representing a string item.
¨MySQL server crashes if you try to access to InnoDB table¨
crash caused by schizophrenic mysqld - 2 memory locations for logically same function
with conflicting values.
Fixed by backporting from 5.1 changes to have_xyz_db declarations.
sql/mysql_priv.h:
Backport have_xyz_db changes from 5.1
sql/mysqld.cc:
Backport have_xyz_db changes from 5.1
if --skip-grant-tables specified.
The problem is that there is a check that prevents creating a definer
with empty host name.
In --skip-grant-tables mode this check prevents the user from creating a
trigger/view without explicitly specifying its definer. This happens, because
in --skip-grant-tables mode CURRENT_USER is ''@''. According to Sanja this
check was implemented intentionally.
However, according to the MySQL manual it is possible to specify empty host
name (as well as empty user name). Moreover, the behaviour for stored routines
is different in this aspect -- we allow them to be created with implicit
definer.
Based on this, we believe it is OK to change the behaviour for views to be
similar with the behaviour for stored routines.
mysql-test/r/skip_grants.result:
Added a test case for BUG#16777.
mysql-test/t/skip_grants.test:
Added a test case for BUG#16777.
sql/mysql_priv.h:
Do not check that strlen(host) > 0 in get_default_definer().
sql/sql_parse.cc:
Do not check that strlen(host) > 0 in get_default_definer().
sql/sql_view.cc:
Do not check that strlen(host) > 0 in get_default_definer().
The idea of the fix is to extend support of non-SUID triggers for backward
compatibility. Formerly non-SUID triggers were appeared when "new" server
is being started against "old" database. Now, they are also created when
"new" slave receives updates from "old" master.
mysql-test/r/rpl_trigger.result:
Updated the result file with the results of the test for BUG#16266.
mysql-test/t/rpl_trigger.test:
Added the test case for BUG#16266.
sql/mysql_priv.h:
Added an utility operation to be used from sql_yacc.yy.
sql/sql_parse.cc:
Add a utility operation to be used from sql_yacc.yy.
sql/sql_trigger.cc:
Extend support of non-SUID triggers.
sql/sql_view.cc:
Initialize LEX::definer if DEFINER-clause is missing.
sql/sql_yacc.yy:
Extended support of non-SUID triggers.
mysql-test/std_data/bug16266.000001:
A new binlog file for testing a patch for BUG#16266.
- Added empty constructors and virtual destructors to many classes and structs
- Removed some usage of the offsetof() macro to instead use C++ class pointers
configure.in:
Added comment
ndb/include/ndbapi/NdbDictionary.hpp:
Fixed compiler warnings from gcc 4.0.2
sql/field.cc:
Fixed compiler warnings from gcc 4.0.2
sql/handler.h:
Fixed compiler warnings from gcc 4.0.2
sql/item.h:
Fixed compiler warnings from gcc 4.0.2
sql/item_cmpfunc.h:
Fixed compiler warnings from gcc 4.0.2
sql/log_event.h:
Fixed compiler warnings from gcc 4.0.2
sql/mysql_priv.h:
Fixed compiler warnings from gcc 4.0.2
For find_table_in_list I fixed it to use proper C++ class pointers instead of C style pointers
sql/opt_range.cc:
Fixed compiler warnings from gcc 4.0.2
sql/parse_file.h:
Fixed compiler warnings from gcc 4.0.2
sql/sp_rcontext.h:
Fixed compiler warnings from gcc 4.0.2
sql/spatial.h:
Fixed compiler warnings from gcc 4.0.2
sql/sql_base.cc:
Fixed compiler warnings from gcc 4.0.2
sql/sql_cache.h:
Fixed compiler warnings from gcc 4.0.2
sql/sql_class.h:
Fixed compiler warnings from gcc 4.0.2
sql/sql_parse.cc:
Fixed compiler warnings from gcc 4.0.2
(Not pretty, but seams to work...)
sql/sql_select.h:
Fixed compiler warnings from gcc 4.0.2
sql/sql_update.cc:
Fixed compiler warnings from gcc 4.0.2
sql/table.h:
Fixed compiler warnings from gcc 4.0.2
sql/tztime.cc:
Fixed compiler warnings from gcc 4.0.2
sql/tztime.h:
Fixed compiler warnings from gcc 4.0.2
trigger starts trigger".
In short, the deadlock/crash happened when execution of statement, which used
stored functions or activated triggers, coincided with alteration of the
tables used by these functions or triggers (in highly concurrent environment).
Bug was caused by the incorrect handling of tables from prelocked set in
open_tables() functions in situations when refresh happened. This fix replaces
old smart but not very robust way of handling tables after refresh (which was
closing only old tables), with new one which simply closes all tables opened so
far and restarts open_tables().
Also fixed handling of temporary tables in close_tables_for_reopen().
No test case present since bug manifests itself only in concurrent environment.
sql/mysql_priv.h:
In order to handle correctly case when table list completely consists from tables
from prelocked set close_tables_for_reopen() have to accept table list as in/out
parameter.
sql/sql_base.cc:
open_tables():
Removed part of comment which was out of date.
Changed handling of case when refresh happens during opening of tables, now
instead of having code which decides for each table if it should be closed
we simply close all tables. Old code also incorrectly handled tables from
prelocked set in this situation which resulted in bug #16593 "Deadlock or
crash in stress test for case where triggers starting trigger".
close_tables_for_reopen():
Now we correctly handle the case when table list completely consists from
tables from prelocked set. Also now we simply close all tables instead
leaving temporary tables non-closed (such approach allows easily handle
correctly tables from prelocked set).
sql/sql_prepare.cc:
In order to handle correctly case when table list completely consists from tables
from prelocked set close_tables_for_reopen() have to accept table list as in/out
parameter.
sql/sql_update.cc:
In order to handle correctly case when table list completely consists from tables
from prelocked set close_tables_for_reopen() have to accept table list as in/out
parameter.
into mysql.com:/home/mydev/mysql-5.0-bug5390
BitKeeper/deleted/.del-ha_blackhole.cc~727c69ef7846623a:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Problem #1: INSERT...SELECT, Version for 5.0.
Extended the unique table check by a check of lock data.
Merge sub-tables cannot be detected by doing name checks only.
mysql-test/r/create.result:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/r/merge.result:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added test results.
mysql-test/t/create.test:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/t/merge.test:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added tests.
sql/lock.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added a new function to find a duplicate lock in a list of tables.
sql/mysql_priv.h:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
Added a declaration for the new function.
sql/sql_base.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
Added a call to the new mysql_lock_have_duplicate(),
which needs the thread handle, to unique_table().
sql/sql_delete.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_insert.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_load.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_parse.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_update.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
Replaced a call to find_table_in_local_list() by
the newly extended unique_table().
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.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_yacc.yy:
Auto merged
Problem #1: INSERT...SELECT, Version for 4.1.
INSERT ... SELECT with the same table on both sides (hidden
below a MERGE table) does now work by buffering the select result.
The duplicate detection works now after open_and_lock_tables()
on the locks.
I did not find a test case that failed without the change in
sql_update.cc. I made the change anyway as it should in theory
fix a possible MERGE table problem with multi-table update.
libmysqld/ha_blackhole.cc:
BUG#5390 - problems with merge tables
No idea, how the symlink change made it into my patch.
mysql-test/r/create.result:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/r/merge.result:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added test results.
mysql-test/t/create.test:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/t/merge.test:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added tests.
sql/lock.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added a new function to find a duplicate lock in a list of tables.
sql/mysql_priv.h:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added a declaration for the new function.
sql/sql_parse.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Changed the duplicate tables detection for INSERT ... SELECT
to use the new function, which does also work for MERGE tables.
sql/sql_update.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Changed the duplicate tables detection for UPDATE
to use the new function, which does also work for MERGE tables.
into mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-sp-vars-merge-2
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sp_head.cc:
Merge.
according to the standard.
The idea is to use Field-classes to implement stored routines
variables. Also, we should provide facade to Item-hierarchy
by Item_field class (it is necessary, since SRVs take part
in expressions).
The patch fixes the following bugs:
- BUG#8702: Stored Procedures: No Error/Warning shown for inappropriate data
type matching;
- BUG#8768: Functions: For any unsigned data type, -ve values can be passed
and returned;
- BUG#8769: Functions: For Int datatypes, out of range values can be passed
and returned;
- BUG#9078: STORED PROCDURE: Decimal digits are not displayed when we use
DECIMAL datatype;
- BUG#9572: Stored procedures: variable type declarations ignored;
- BUG#12903: upper function does not work inside a function;
- BUG#13705: parameters to stored procedures are not verified;
- BUG#13808: ENUM type stored procedure parameter accepts non-enumerated
data;
- BUG#13909: Varchar Stored Procedure Parameter always BINARY string (ignores
CHARACTER SET);
- BUG#14161: Stored procedure cannot retrieve bigint unsigned;
- BUG#14188: BINARY variables have no 0x00 padding;
- BUG#15148: Stored procedure variables accept non-scalar values;
mysql-test/r/ctype_ujis.result:
Explicitly specify correct charset.
mysql-test/r/schema.result:
Drop our test database to not affect this test if some test
left it cause of failure.
mysql-test/r/show_check.result:
Drop our test database to not affect this test if some test
left it cause of failure.
mysql-test/r/skip_name_resolve.result:
Ignore columns with unpredictable values.
mysql-test/r/sp-big.result:
Add cleanup statement.
mysql-test/r/sp-dynamic.result:
Add cleanup statements.
mysql-test/r/sp.result:
Update result file.
mysql-test/r/sum_distinct-big.result:
Update result file.
mysql-test/r/type_newdecimal-big.result:
Update result file.
mysql-test/t/ctype_ujis.test:
Explicitly specify correct charset.
mysql-test/t/schema.test:
Drop our test database to not affect this test if some test
left it cause of failure.
mysql-test/t/show_check.test:
Drop our test database to not affect this test if some test
left it cause of failure.
mysql-test/t/skip_name_resolve.test:
Ignore columns with unpredictable values.
mysql-test/t/sp-big.test:
Add cleanup statement.
mysql-test/t/sp-dynamic.test:
Add cleanup statements.
mysql-test/t/sp.test:
Non-scalar values prohibited for assignment to SP-vars;
polishing.
mysql-test/t/type_newdecimal-big.test:
Update type specification so that the variables
can contain the large values used in the test.
sql/field.cc:
Extract create_field::init() to initialize an existing
instance of create_field from new_create_field().
sql/field.h:
Extract create_field::init() to initialize an existing
instance of create_field from new_create_field().
sql/item.cc:
- Introduce a new class: Item_sp_variable -- a base class
of stored-routine-variables classes;
- Introduce Item_case_expr -- an Item, which is used to access
to the expression of CASE statement;
sql/item.h:
- Introduce a new class: Item_sp_variable -- a base class
of stored-routine-variables classes;
- Introduce Item_case_expr -- an Item, which is used to access
to the expression of CASE statement;
sql/item_func.cc:
Pass the Field (instead of Item) for the return value of
a function to the function execution routine.
sql/item_func.h:
Pass the Field (instead of Item) for the return value of
a function to the function execution routine.
sql/mysql_priv.h:
Move create_virtual_tmp_table() out of sql_select.h.
sql/sp.cc:
Use create_result_field() instead of make_field().
sql/sp_head.cc:
- Add a function to map enum_field_types to Item::Type;
- Add sp_instr_push_case_expr instruction -- an instruction
to push CASE expression into the active running context;
- Add sp_instr_pop_case_expr instruction -- an instruction
to pop CASE expression from the active running context;
- Adapt the SP-execution code to using Fields instead of Items
for SP-vars;
- Use create_field structure for field description instead of
a set of members.
sql/sp_head.h:
- Add a function to map enum_field_types to Item::Type;
- Add sp_instr_push_case_expr instruction -- an instruction
to push CASE expression into the active running context;
- Add sp_instr_pop_case_expr instruction -- an instruction
to pop CASE expression from the active running context;
- Adapt the SP-execution code to using Fields instead of Items
for SP-vars;
- Use create_field structure for field description instead of
a set of members.
sql/sp_pcontext.cc:
- Change rules to assign an index of SP-variable: use
transparent index;
- Add an operation to retrieve a list of defined SP-vars
from the processing context recursively.
sql/sp_pcontext.h:
- Change rules to assign an index of SP-variable: use
transparent index;
- Add an operation to retrieve a list of defined SP-vars
from the processing context recursively.
sql/sp_rcontext.cc:
- Change rules to assign an index of SP-variable: use
transparent index;
- Use a tmp virtual table to store SP-vars instead of Items;
- Provide operations to work with CASE expresion.
sql/sp_rcontext.h:
- Change rules to assign an index of SP-variable: use
transparent index;
- Use a tmp virtual table to store SP-vars instead of Items;
- Provide operations to work with CASE expresion.
sql/sql_class.cc:
- Reflect Item_splocal ctor changes;
- Item_splocal::get_offset() has been renamed to get_var_idx().
sql/sql_class.h:
Polishing.
sql/sql_parse.cc:
Extract create_field::init() to initialize an existing
instance of create_field from new_create_field().
sql/sql_select.cc:
Take care of BLOB columns in create_virtual_tmp_table().
sql/sql_select.h:
Move create_virtual_tmp_table() out of sql_select.h.
sql/sql_trigger.cc:
Use boolean constants for boolean type instead of numerical ones.
sql/sql_yacc.yy:
Provide an instance of create_field for each SP-var.
mysql-test/include/sp-vars.inc:
The definitions of common-procedures, which are created
under different circumstances.
mysql-test/r/sp-vars.result:
Result file for the SP-vars test.
mysql-test/sp-vars.test:
A new test for checking SP-vars functionality.
into mysql.com:/home/timka/mysql/src/5.0-2486
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Allow for configuration of the maximum number of indexes per table.
Added and used a configure.in macro.
Replaced fixed limits by the configurable limit.
Limited MyISAM indexes to its hard limit.
Fixed a bug in opt_range.cc for many indexes with InnoDB.
Tested for 2, 63, 64, 65, 127, 128, 129, 255, 256, and 257 indexes.
Testing this part of the bugfix requires rebuilding of the server
with different options. This cannot be done with our test suite.
Therefore I added the necessary test files to the bug report.
If you repeat the tests, please note that the ps_* tests fail for
everything but 64 indexes. This is because of differences in the
meta data, namely field lengths for index names etc.
config/ac-macros/misc.m4:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Added a macro for the new build option.
configure.in:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Added a call for the new macro.
include/myisam.h:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Limit the number of keys for MyISAM to its hard limit.
sql/mysql_priv.h:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Stick with the optimized Bitmap<64> if indexes are limited to 64
or lower. Otherwise use a bigger bitmap. It must be defined as a
multiple of 8.
sql/opt_range.cc:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Initialize an object element to avoid a crash when using InnoDB
with many indexes.
sql/unireg.h:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Replace the fixed limit by the configurable limit.
tests/mysql_client_test.c:
Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Replace the fixed limit by the configurable limit.
Post-review fixes that simplify the way access rights
are checked during name resolution and factor out all
entry points to check access rights into one single
function.
sql/item.cc:
Simplfied find_field_in_table - factored out all acces right checks
into a separate function.
sql/mysql_priv.h:
Simplified the way we control whether to perform access right
checks for columns.
sql/sql_acl.cc:
- Added new functon check_column_grant_in_table_ref that serves as a single
point of entry to check access rights during name resolution for different
kinds of table references.
- Moved check_grant_column_in_sctx to sql_acl.cc where it
logically belongs.
- Removed the parameter check_grants - it is checked before
calling the function.
sql/sql_acl.h:
- Added new function check_column_grant_in_table_ref.
- Made check_grant_column_in_sctx available to other modules.
sql/sql_base.cc:
- Factored out all code that check access rights for columns during
name resolution into one function - check_column_grant_in_table_ref.
- Moved check_grant_column_in_sctx to sql_acl.cc where it
logically belongs.
- Removed the parameter check_grants - it is checked before
calling the function.
sql/table.cc:
Removed code that duplicates the functionality of
check_column_grant_in_table_ref, and called directly
that function.
sql/table.h:
check_grants method is replaced by more general
check_column_grant_in_table_ref.
Problem #1: INSERT...SELECT
INSERT ... SELECT with the same table on both sides (hidden
below a MERGE table) does now work by buffering the select result.
The duplicate detection works now after open_and_lock_tables()
on the locks.
I did not find a test case that failed without the change in
sql_update.cc. I made the change anyway as it should in theory
fix a possible MERGE table problem with multi-table update.
mysql-test/r/create.result:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/r/merge.result:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added test results.
mysql-test/t/create.test:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/t/merge.test:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added tests.
sql/lock.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added a new function to find a duplicate lock in a list of tables.
sql/mysql_priv.h:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added a declaration for the new function.
sql/sql_parse.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Changed the duplicate tables detection for INSERT ... SELECT
to use the new function, which does also work for MERGE tables.
sql/sql_update.cc:
BUG#5390 - problems with merge tables
Changed the duplicate tables detection for UPDATE
to use the new function, which does also work for MERGE tables.
Post-review fixes according to Monty's review.
sql/item.h:
Unite all code that stores and restores the state of a name resolution context
into a class to represent the state, and methods to save/restore that
state.
sql/mysql_priv.h:
Reorder parameters so that length is after the name of a field,
and database is before table name.
sql/sql_acl.cc:
Reorder parameters so that length is after the name of a field,
and database is before table name.
sql/sql_base.cc:
* Reorder parameters so that length is after the name of a field,
and database is before table name.
* Added new method - Field_iterator_table_ref::get_natural_column_ref
to avoid unnecessary code when it is knwon that no new columns will
be created when accessing natural join columns.
sql/sql_insert.cc:
Unite all code that stores and restores the state of a name resolution context
into a class to represent the state, and methods to save/restore that
state.
sql/sql_lex.cc:
Removed obsolete comment.
sql/sql_lex.h:
Return error from push_contex() if there is no memory.
sql/sql_list.h:
Extended base_list_iterator, List_iterator, and List_iterator_fast with an
empty constructor, and init() methods, so that one doesn't have to construct
a new iterator object every time one needs to iterate over a new list.
sql/sql_parse.cc:
Moved common functionality from the parser into one function, and renamed
the function to better reflect what it does.
sql/sql_yacc.yy:
Moved common functionality from the parser into one function, and renamed
the function to better reflect what it does.
sql/table.cc:
* Extended base_list_iterator, List_iterator, and List_iterator_fast with an
empty constructor, and init() methods, so that one doesn't have to construct
a new iterator object every time one needs to iterate over a new list.
* Added new method Field_iterator_table_ref::get_natural_column_ref to be
used in cases when it is known for sure that no new columns should be
created.
sql/table.h:
- column_ref_it no longer allocated for each new list of columns
- new method get_natural_join_column for faster/simpler access
to natural join columns.
CREATE TABLE and PS/SP": make sure that 'typelib' object for
ENUM values and 'Item_string' object for DEFAULT clause are
created in the statement memory root.
mysql-test/r/ps.result:
Test results has been fixed (Bug#14410)
mysql-test/t/ps.test:
A test case for Bug#14410 "Crash in Enum or Set type in CREATE
TABLE and PS/SP"
sql/mysql_priv.h:
typelib() function declaration has been changed.
sql/sql_table.cc:
Supply the statement memory root to use in typelib() and
safe_charset_converter() functions to ensure that objects
created during the first execution of CREATE TABLE statement
are allocated in persistent memory of the statement.
sql/table.cc:
Change typelib() function to require MEM_ROOT.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Larger stack size neaded for open table on x86 64 bit
Fix failing test cases
Deleted symlink from bk
BitKeeper/etc/ignore:
added libmysqld/ha_blackhole.cc
BitKeeper/deleted/.del-ha_blackhole.cc~727c69ef7846623a:
Delete: libmysqld/ha_blackhole.cc
include/my_global.h:
Don't use PATH_MAX for FN_REFLEN as this uses too much stack space.
(With a PATH_MAX of 4096, we use 80K for opening a table as there is several objects of size FN_REFLEN on stack)
mysql-test/r/federated.result:
Update results after error message changes
mysql-test/r/grant.result:
Update results after error message changes
mysql-test/r/grant2.result:
Update results after error message changes
sql/ha_federated.cc:
Fix error messages to be more consistent
sql/mysql_priv.h:
Stack size to have when opening a table
(This was needed on x86 64 bit Linux)
sql/share/errmsg.txt:
Remove quotes around error string for federated as two quotes in the output looks strange
sql/sql_base.cc:
More correct stack size
sql/sql_parse.cc:
Set thread_stack before store_globals()
sql/unireg.h:
More correct MAX_DBKEY_LENGTH
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Version for 5.0.
It fixes three problems:
1. The cause of the bug was that we did not check the table version for
the HANDLER ... READ commands. We did not notice when a table was
replaced by a new one. This can happen during ALTER TABLE, REPAIR
TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix
for this problem "the primary bug fix".
2. mysql_ha_flush() was not always called with a locked LOCK_open.
Though the function comment clearly said it must.
I changed the code so that the locking is done when required. I call
the fix for this problem "the secondary fix".
3. In 5.0 (not in 4.1 or 4.0) DROP TABLE had a possible deadlock flaw in
concur with FLUSH TABLES WITH READ LOCK. I call the fix for this
problem "the 5.0 addendum fix".
include/my_pthread.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Added a new macro for the 5.0 addendum fix.
mysql-test/r/handler.result:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test result.
mysql-test/t/handler.test:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test case.
sql/lock.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a comment which did confuse me and which is not fully
correct anymore after the 5.0 addendum fix.
Added an assertion which would fire without the 5.0 addendum fix.
sql/mysql_priv.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a definition for the secondary fix.
sql/sql_base.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed function calls for the secondary fix.
sql/sql_class.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a function call for the secondary fix.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The first two diffs make the primary bug fix.
The rest is for the secondary fix.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The first diff (four changed places) make the 5.0 addendum fix.
The other three are changed function calls for the secondary fix.
into mysql.com:/home/mydev/mysql-4.1-4100
mysql-test/r/handler.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
mysql-test/t/handler.test:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Manual merge.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/mysql_priv.h:
Manual merge
into mysql.com:/home/alik/MySQL/devel/5.0-wl2818
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
mysql-test/r/rpl_sp.result:
Manual merge.
checks on trigger activation)
mysql-test/r/information_schema.result:
Update result file: a new column DEFINER has been added to
INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/mysqldump.result:
Update result file: a new column DEFINER has been added to
INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_ddl.result:
Update result file: a new column DEFINER has been added to
INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_sp.result:
Update result file: a new clause DEFINER has been added to
CREATE TRIGGER statement.
mysql-test/r/rpl_trigger.result:
Results for new test cases were added.
mysql-test/r/skip_grants.result:
Error message has been changed.
mysql-test/r/trigger.result:
Added DEFINER column.
mysql-test/r/view.result:
Error messages have been changed.
mysql-test/r/view_grant.result:
Error messages have been changed.
mysql-test/t/mysqldump.test:
Drop created procedure to not affect further tests.
mysql-test/t/rpl_trigger.test:
Add tests for new column in information schema.
mysql-test/t/skip_grants.test:
Error tag has been renamed.
mysql-test/t/view.test:
Error tag has been renamed.
mysql-test/t/view_grant.test:
Error tag has been changed.
sql/item_func.cc:
Fix typo in comments.
sql/mysql_priv.h:
A try to minimize copy&paste:
- introduce operations to be used from sql_yacc.yy;
- introduce an operation to be used from trigger and
view processing code.
sql/share/errmsg.txt:
- Rename ER_NO_VIEW_USER to ER_MALFORMED_DEFINER in order to
be shared for view and trigger implementations;
- Fix a typo;
- Add a new error code for trigger warning.
sql/sp.cc:
set_info() was split into set_info() and set_definer().
sql/sp_head.cc:
set_info() was split into set_info() and set_definer().
sql/sp_head.h:
set_info() was split into set_info() and set_definer().
sql/sql_acl.cc:
Add a new check: exit from the cycle if the table is NULL.
sql/sql_lex.h:
- Rename create_view_definer to definer, since it is used for views
and triggers;
- Change st_lex_user to LEX_USER, since st_lex_user is a structure.
So, formally, it should be "struct st_lex_user", which is longer
than just LEX_USER;
- Add trigger_definition_begin.
sql/sql_parse.cc:
- Add a new check: exit from the cycle if the table is NULL;
- Implement definer-related functions.
sql/sql_show.cc:
Add DEFINER column.
sql/sql_trigger.cc:
Add DEFINER support for triggers.
sql/sql_trigger.h:
Add DEFINER support for triggers.
sql/sql_view.cc:
Rename create_view_definer to definer.
sql/sql_yacc.yy:
Add support for DEFINER-clause in CREATE TRIGGER statement.
Since CREATE TRIGGER and CREATE VIEW can be similar at the start,
yacc is unable to distinguish between them. So, had to modify both
statements in order to make it parsable by yacc.
mysql-test/r/trigger-compat.result:
Result file for triggers backward compatibility test.
mysql-test/r/trigger-grant.result:
Result file of the test for WL#2818.
mysql-test/t/trigger-compat.test:
Triggers backward compatibility test: check that the server
still can load triggers w/o definer attribute and modify
tables with such triggers (add a new trigger, etc).
mysql-test/t/trigger-grant.test:
Test for WL#2818 -- check that DEFINER support in triggers
works properly
Indeed now that stored procedures CALL is not binlogged, but instead the invoked substatements are,
the restrictions applied by log-bin-trust-routine-creators=0 are superfluous for procedures.
They still need to apply to functions where function calls are written to the binlog (for example as "DO myfunc(3)").
We rename the variable to log-bin-trust-function-creators but allow the old name until some future version (and issue a warning if old name is used).
mysql-test/mysql-test-run.pl:
update to new option name
mysql-test/mysql-test-run.sh:
update to new option name
mysql-test/mysql_test_run_new.c:
update to new option name
mysql-test/r/rpl_sp.result:
result update
mysql-test/t/rpl_sp-slave.opt:
we need to skip this error to not hit BUG#14769
mysql-test/t/rpl_sp.test:
Test update:
1) as log-bin-trust-routine-creators now affects only functions, the testing of this option, which was
mainly done on procedures, is moved to functions
2) cleanup is simplified; and instead of many SHOW BINLOG EVENTS we do a big one in the end, which is more
maintainable.
3) we test a few more function and procedures cases to see how they replicate.
4) removing out-of-date comments
sql/item_func.cc:
This warning is wrong since binlogging of functions was changed in August. If a function fails
in the middle, it will be binlogged with its error code (i.e. properly).
sql/mysql_priv.h:
variable name changed
sql/mysqld.cc:
option name changes. A precision about --read-only.
sql/set_var.cc:
a new class sys_var_trust_routine_creators to be able to issue a "this is a deprecated variable" warning if used.
sql/set_var.h:
new class to be able to issue a "this is a deprecated variable" warning if used.
sql/share/errmsg.txt:
routine -> function
sql/sp.cc:
log-bin-trust-routine-creators now applies only to functions.
sql/sql_parse.cc:
1) sending ER_FAILED_ROUTINE_BREAK_BINLOG is wrong since August as we don't binlog CALL anymore but instead binlog the substatements;
the clear_error() goes away too as it was necessary only when we created a binlog event from the "CALL" statement.
2) log-bin-trust-routine-creators now applies only to functions.
sql/sql_trigger.cc:
comments.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
mysql-test/r/func_gconcat.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Version for 4.0.
It fixes two problems:
1. The cause of the bug was that we did not check the table version for
the HANDLER ... READ commands. We did not notice when a table was
replaced by a new one. This can happen during ALTER TABLE, REPAIR
TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix
for this problem "the primary bug fix".
2. mysql_ha_flush() was not always called with a locked LOCK_open.
Though the function comment clearly said it must.
I changed the code so that the locking is done when required. I call
the fix for this problem "the secondary fix".
mysql-test/r/handler.result:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test result.
mysql-test/t/handler.test:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The test case.
sql/mysql_priv.h:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a definition for the secondary fix.
sql/sql_base.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed function calls for the secondary fix.
sql/sql_class.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed a function call for the secondary fix.
sql/sql_handler.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
The first two diffs make the primary bug fix.
The rest is for the secondary fix.
sql/sql_table.cc:
Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Changed function calls for the secondary fix.
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_view.h:
Auto merged
sql/table.cc:
Auto merged
that in mysql_rm_table_part2_with_lock() previously we needed to open
same file twice. Now once is enough.
sql/mysql_priv.h:
Merged functions get_table_type() and mysql_frm_type() into one,
using the name from latter one.
sql/sql_base.cc:
Changed get_table_type() to mysql_frm_type()
sql/sql_delete.cc:
Changed get_table_type() to mysql_frm_type()
sql/sql_rename.cc:
Changed get_table_type() to mysql_frm_type()
sql/sql_show.cc:
Changed get_table_type() to mysql_frm_type()
sql/sql_table.cc:
Changed get_table_type() to mysql_frm_type()
sql/sql_view.cc:
Merged code from get_table_type() and mysql_frm_type() into the latter one.
sql/sql_view.h:
Function prototype changes.
sql/table.cc:
No longer needed.
into mysql.com:/home/psergey/mysql-5.0-oct03-push
mysql-test/r/join_nested.result:
Auto merged
mysql-test/t/join_nested.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/table.h:
Auto merged
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/information_schema.result:
error message changed
mysql-test/r/sp.result:
error message changed
mysql-test/r/sql_mode.result:
fixed test suite
mysql-test/r/view.result:
error message changed
mysql-test/r/view_grant.result:
test of underlying view tables check
mysql-test/t/sql_mode.test:
fixed test suite
mysql-test/t/view_grant.test:
test of underlying view tables check
sql/item.cc:
check of underlying tables privilege added
sql/item.h:
Name the resolution context points to the security context of view (if item belong to the view)
sql/item_func.cc:
a view error hiding for execution of prepared function belonged to a view
fixed checking privileges if stored functions belonds to some view
sql/mysql_priv.h:
refult of derived table processing functions changed to bool
Security_context added as an argument to find_field_in_table()
sql/share/errmsg.txt:
error message fixed
sql/sql_acl.cc:
Storing requested privileges of tables added
View underlying tables privilege check added
sql/sql_base.cc:
View underlying tables privilege check added
sql/sql_cache.cc:
Code cleunup: we should not register underlying tables of view second time
sql/sql_delete.cc:
ancestor -> merge_underlying_list renaming
sql/sql_derived.cc:
refult of derived table processing functions changed to bool
do not give SELECT_ACL for TEMPTABLE views
sql/sql_lex.h:
The comment added
sql/sql_parse.cc:
registration of requested privileges added
sql/sql_prepare.cc:
registration of requested privileges added
sql/sql_update.cc:
manipulation of requested privileges for underlying tables made the same as for table which we are updating
sql/sql_view.cc:
underlying tables of view security check support added
sql/table.cc:
renaming and fixing view preparation methods, methods for checking underlyoing tables security context added
sql/table.h:
storege for reuested privileges added
orders that cannot be handled by the executioner.
mysql-test/r/bigint.result:
Added mssing "drop table if exists"
mysql-test/r/join_nested.result:
Testcase for BUG#13126
mysql-test/t/bigint.test:
Added mssing "drop table if exists"
mysql-test/t/join_nested.test:
Testcase for BUG#13126
sql/mysql_priv.h:
BUG#13126: Added nested_join_map type.
sql/sql_prepare.cc:
BUG#13126: Don't set NESTED_JOIN::counter to 0 here as it is reset in other place now.
sql/sql_select.cc:
BUG#13126: When choosing join order for join with nested joins, don't produce join orders
that the executioner cannot handle. The work is done by check_interleaving_with_nj() and
restore_prev_nj_state() functions that are used from the join optimizer to avoid building
invalid join orders.
sql/sql_select.h:
BUG#13126: Added JOIN_TAB::embedding_map and JOIN::cur_embedding_map.
sql/table.h:
BUG#13126: In NESTED_JOIN: added nj_map, added comment about where counter is used.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/update.result:
Auto merged
mysql-test/t/update.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/records.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/structs.h:
Auto merged
droping trigger on InnoDB table".
Deadlock occured in cases when we were trying to create two triggers for
the same InnoDB table concurrently and both threads were able to reach
close_cached_table() simultaneously. Bugfix implements new approach to
table locking and table cache invalidation during creation/dropping
of trigger.
No testcase is supplied since bug was repeatable only under high concurrency.
sql/mysql_priv.h:
reopen_name_locked_table():
Changed function signature to make it more robust against erroneous usage.
sql/sql_base.cc:
reopen_name_locked_table():
Changed function signature to make it more robust against erroneous usage.
Obtaining LOCK_open lock is now resposibility of caller.
When searching for the table to open we should not prefer connection's current
database over database which was explicitly specified in TABLE_LIST::db member
(even if database is not explicitly specified for table in original query
TABLE_LIST::db will be set properly at parsing stage).
Fixed behavior of function in cases when error occurs during opening of table.
sql/sql_table.cc:
prepare_for_restore()/prepare_for_repair():
We should not prefer connection's current database over database which was
specified in TABLE_LIST::db member (even if database is not explicitly
specified for table in original query TABLE_LIST::db will be set properly
at parsing stage). Fixed behavior in unlikely case when we are unable
to open table which we are restoring/reparing at the end of preparation
stage.
sql/sql_trigger.cc:
mysql_create_or_drop_trigger():
Now instead of opening and locking table, creating trigger, and then trying
to invalidate all instances of this table in table cache, we obtain name
lock on table first (thus ensuring that no other thread has this table
open), open it, create trigger and then close table therefore releasing lock.
New approach is more in line with other places where change .frm files
(i.e. change table meta-data).
With this change we also get rid of deadlock which occured in cases when we
were trying to create two triggers for the same InnoDB table concurrently
and both threads were able to reach close_cached_table() simultaneously.
(Alternative was to forbid to InnoDB downgrade locks for CREATE/DROP
TRIGGER statements in one way or another but I think that proposed
solution is better long term).
allowed set functions aggregated in outer subqueries, allowed nested set functions.
mysql-test/r/func_gconcat.result:
Changed a query when fixing bug #12762.
mysql-test/r/subselect.result:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
mysql-test/t/func_gconcat.test:
Changed a query when fixing bug #12762.
mysql-test/t/subselect.test:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
sql/item.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
Changed Item_field::fix_fields to calculate attributes used when checking context conditions
for set functions.
Allowed alliases for set functions defined in outer subqueries.
sql/item.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_cmpfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_func.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_row.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_strfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_subselect.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/item_sum.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/item_sum.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/mysql_priv.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a type of bitmaps to be used for nesting constructs.
sql/sql_base.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_class.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_class.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_delete.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_lex.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_lex.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_parse.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
sql/sql_prepare.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
sql/sql_select.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_update.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_yacc.yy:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
Let pthread_mutex_init() macro return 0 on Windows
mysql_priv.h:
Return type is to be 'my_bool' for 'opt_enable_shared_memory'
sql/mysql_priv.h:
Return type is to be 'my_bool' for 'opt_enable_shared_memory'
include/my_pthread.h:
Let pthread_mutex_init() macro return 0 on Windows
Some options were declared as 'bool', but since those are being
handled in my_getopt.c, bool can be machine dependent. To make
sure it works in all circumstances, the type should be my_bool
for C (not C++) programs.
sql/mysql_priv.h:
Fixed some bools to my_bools.
sql/mysqld.cc:
Changed several bools to my_bools.
sql/slave.cc:
Changed bool to my_bool.
sql/slave.h:
Changed bool to my_bool.
into zim.(none):/home/brian/mysql/fix-5.0
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
into zim.(none):/home/brian/mysql/fix-5.0
sql/ha_blackhole.cc:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/examples/ha_example.cc:
Auto merged
sql/examples/ha_tina.cc:
Auto merged
sql/ha_archive.cc:
Auto merged
sql/ha_archive.h:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/ha_federated.cc:
Merge fix.
Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail.
sql/examples/ha_archive.cc:
Modifications for new ha_init code. The init method now checks for errors and will not start up if the errors occur.
sql/examples/ha_archive.h:
Change for new init method.
sql/examples/ha_example.cc:
New handlerton pieces.
sql/examples/ha_tina.cc:
New handlerton pieces.
sql/ha_berkeley.cc:
New handlerton pieces, plus changes for ha_init changes. I'm not happy with our current "skip" setup.
sql/ha_berkeley.h:
Change in init return.
sql/ha_blackhole.cc:
Changes for new handlerton pieces.
sql/ha_federated.cc:
Changes for new handlerton and true cleanup code.
sql/ha_heap.cc:
Changes for new handlerton returns.
sql/ha_innodb.cc:
Changes for handlerton code.
sql/ha_innodb.h:
Change in init.
sql/ha_myisam.cc:
Changes for additional handlerton bits.
sql/ha_myisammrg.cc:
Changes for new handlerton bits.
sql/ha_ndbcluster.cc:
Changes for new handlerton bits.
sql/ha_ndbcluster.h:
Changes for handlerton bits.
sql/handler.cc:
Changes for ditching show_table_type_st types, and collapsing it into a handlerton array. The ha_init now just loops through all handlers to init (much cleaner...). handlertons and sys_table_types should be merged next.
sql/handler.h:
Additions for sys_table_types
sql/log.cc:
Clean up of binlog for changes in handlerton
sql/mysql_priv.h:
Removed unneeded define for binlog_init
sql/sql_show.cc:
Changes for change in handlerton to sys_table_types
into neptunus.(none):/home/msvensson/mysql/bug13231/my50-bug13231
client/mysqltest.c:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_db.cc:
Auto merged
optimization: now can use index to find records to update/delete
when there is no WHERE clause.
mysql-test/r/update.result:
Testcase for BUG#12915
mysql-test/t/update.test:
Testcase for BUG#12915
sql/mysql_priv.h:
BUG#12915: Added init_read_record_idx function.
sql/opt_range.cc:
BUG#12915: Added get_index_for_order() - find an index that can be
used to get first N table records in given ordering cheaper then
one would with full table scan.
sql/opt_range.h:
BUG#12915: Added get_index_for_order() function
sql/records.cc:
BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan
index using init_read_record()/read_record.read_record()
sql/sql_delete.cc:
BUG#12915: Added single-table DELETE ... ORDER BY ... LIMIT optimization:
now can use index to find records to delete when there is no WHERE clause.
sql/sql_update.cc:
BUG#12915: Added single-table UPDATE ... ORDER BY ... LIMIT optimization:
now can use index to find records to update when there is no WHERE clause.
sql/structs.h:
BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan
index using init_read_record()/READ_RECORD::read_record()
- Packets out of order when reading cached data stored by a normal select from a ps or vice versa.
- Add pkt_nr to query cache flags
mysql-test/r/query_cache.result:
Update test results
Add the resultsets that wasn't there before.
mysql-test/t/query_cache.test:
Improve test to call queries from both a regular statment and a statement inside a stored procedure.
sql/mysql_priv.h:
Add pkt_nr to query cache flags
sql/sql_cache.cc:
Set pkt_nr in flags before retrieving/storing a query in the cache
cmd-line-utils/readline/complete.c:
Added a cast.
dbug/my_main.c:
Added an include to avoid implicit declaration of
my_thread_global_init()
include/my_global.h:
undef cannot be used on this predefined name.
Since it is a custom fix for gcc 2.8.0, let's make it only
effective in that case.
include/my_sys.h:
Added a new type, TYPE_NOT_SET.
myisam/ft_boolean_search.c:
Added casts.
myisam/mi_key.c:
Added cast.
myisam/mi_open.c:
Added cast.
Changed function types.
myisam/mi_test1.c:
Added cast.
myisam/myisamchk.c:
Added cast.
myisam/myisamdef.h:
Changed function type.
myisam/myisampack.c:
Added casts.
myisam/sp_key.c:
Added cast.
mysys/mf_iocache.c:
Fixed invalid use of 0 to info->type. According to comment it
should not have been set, but in earlier code by setting it
to 0 would have been same as setting it to READ_CACHE. This
probably was not desired, potential bug.
server-tools/instance-manager/instance_options.cc:
Fixed a typo.
server-tools/instance-manager/protocol.cc:
Changed enum to int.
Changed char to uchar.
Added casts.
sql/mysql_priv.h:
Bit overflow.
sql/sql_base.cc:
Removed unused label. The code below label was unused too, because
there is a return just before.
sql/sql_parse.cc:
Removed unneccessary extra argument.
Part 2 postreview fixes.
sql/ha_innodb.cc:
Renamed structure st_security_context to class Security_context
sql/item_func.cc:
Renamed structure st_security_context to class Security_context
sql/item_strfunc.cc:
fixed USER() function
sql/log.cc:
variable used to optimize access to security context
sql/mysql_priv.h:
Renamed structure st_security_context to class Security_context
sql/mysqld.cc:
main security context used direcly
sql/sp_head.cc:
Renamed structure st_security_context to class Security_context
removed unneed variable
sql/sp_head.h:
Comment inmroved
Renamed structure st_security_context to class Security_context
sql/sql_acl.cc:
Renamed structure st_security_context to class Security_context
fixed function comment and return value
variable used to optimize access to security context
Renamed method of Security_ontext
sql/sql_acl.h:
fixed return value type
sql/sql_class.cc:
Renamed structure st_security_context to class Security_context
sql/sql_class.h:
Renamed structure st_security_context to class Security_context
Method renamed
sql/sql_db.cc:
Renamed structure st_security_context to class Security_context
fixed layout
sql/sql_parse.cc:
registration of wanted access for underlying tables
sql/sql_show.cc:
Renamed structure st_security_context to class Security_context
fixed layout
sql/sql_yacc.yy:
Renamed structure st_security_context to class Security_context
into mysql.com:/home/dlenev/src/mysql-5.0-bg12704-2
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
This bug occurs when some trigger for table used by DML statement is created
or changed while statement was waiting in lock_tables(). In this situation
prelocking set which we have calculated becames invalid which can easily lead
to errors and even in some cases to crashes.
With proposed patch we no longer silently reopen tables in lock_tables(),
instead caller of lock_tables() becomes responsible for reopening tables and
recalculation of prelocking set.
mysql-test/t/trigger.test:
Added tests for bug #12704 "Server crashes during trigger execution".
Unfortunately these tests rely on the order in which tables are locked
by statement so they are non-determenistic and therefore should be disabled.
sql/lock.cc:
mysql_lock_tables():
Now instead of always reopening altered or dropped tables by itself
mysql_lock_tables() can notify upper level and rely on caller doing this.
sql/mysql_priv.h:
Now mysql_lock_tables() can either reopen deleted or altered tables by itself
or notify caller about such situation through 'need_reopen' argument and rely
on it in this.
Also lock_tables() has new 'need_reopen' out parameter through which it
notifies caller that some tables were altered or dropped so he needs to reopen
them (and rebuild prelocking set some triggers may change or simply appear).
sql/sp.cc:
sp_add_used_routine():
To be able to restore LEX::sroutines_list to its state right after parsing
we now adjust LEX::sroutines_list_own_last/sroutines_list_own_elements when
we add directly used routine.
sp_remove_not_own_routines():
Added procedure for restoring LEX::sroutines/sroutines_list to their state
right after parsing (by throwing out non-directly used routines).
sp_cache_routines_and_add_tables_for_view()/sp_update_stmt_used_routines():
We should use LEX::sroutines_list instead of LEX::sroutines as source of
routines used by view, since LEX::sroutines is not availiable for view
on second attempt to open it (see comment in open_tables() about it).
sql/sp.h:
sp_remove_not_own_routines():
Added procedure for restoring LEX::sroutines/sroutines_list to their state
right after parsing (by throwing out non-directly used routines).
sql/sp_head.cc:
Removed assert which is no longer always true.
sql/sql_base.cc:
reopen_table():
When we re-open table and do shallow copy of TABLE object we should adjust
pointers to it in associated Table_triggers_list object. Removed nil
operation.
open_tables():
Now this function is able to rebuild prelocking set for statement if it is
needed. It also correctly handles FLUSH TABLES which may occur during its
execution.
lock_tables():
Instead of allowing mysql_lock_tables() to silently reopen altered or dropped
tables let us notify caller and rely on that it will do reopen itself.
This solves the problem when trigger suddenly appears or changed during
mysq_lock_tables().
close_tables_for_reopen():
Added routine for properly preparing for reopening of tables and recalculation
of set of prelocked tables.
sql/sql_handler.cc:
Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_insert.cc:
Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_lex.cc:
LEX:
Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
which are used for keeping state in which 'sroutines_list' was right after
statement parsing (and for restoring of this list to this state).
sql/sql_lex.h:
LEX:
Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
which are used for keeping state in which 'sroutines_list' was right after
statement parsing (and for restoring of this list to this state).
Added chop_off_not_own_tables() method to simplify throwing away list
of implicitly used (prelocked) tables.
sql/sql_prepare.cc:
Now instead of silently reopening altered or dropped tables in
lock_tables() we notify caller and rely on that the caller will
reopen tables.
sql/sql_table.cc:
Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_trigger.cc:
Added Table_triggers_list::set_table() method to adjust Table_triggers_list
to new pointer to TABLE instance.
sql/sql_trigger.h:
Added Table_triggers_list::set_table() method to adjust Table_triggers_list
to new pointer to TABLE instance.
sql/sql_update.cc:
Now instead of silently reopening altered or dropped tables in
lock_tables() we notify caller and rely on that the caller will
reopen tables.
present): the problem originally was that the tables in auxilliary_tables did not have
the correct real_name, which caused problems in the second call to tables_ok().
The fix corrects the real_name problem, and also sets the updating flag properly,
which makes the second call to tables_ok() unnecessary.
mysql-test/r/rpl_multi_delete2.result:
updates for for BUG#11139
mysql-test/t/rpl_multi_delete2-slave.opt:
updates for for BUG#11139
mysql-test/t/rpl_multi_delete2.test:
updates for for BUG#11139
sql/mysql_priv.h:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
sql/slave.cc:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
sql/sql_parse.cc:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
sql/sql_yacc.yy:
fix for BUG#11139 (multi-delete with alias breaking replication if table rules are
present)
into sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
view definer information syntax/storage/replication
fixed SOURCE field of .frm
mysql-test/r/func_in.result:
definer information added to CREATE VIEW
mysql-test/r/lowercase_view.result:
definer information added to CREATE VIEW
mysql-test/r/mysqldump.result:
definer information added to CREATE VIEW
mysql-test/r/rpl_view.result:
check log of queries
mysql-test/r/skip_grants.result:
--skip-grants do not allow use user information
mysql-test/r/sql_mode.result:
definer information added to CREATE VIEW
mysql-test/r/temp_table.result:
definer information added to CREATE VIEW
mysql-test/r/view.result:
definer information added to CREATE VIEW
test of storing/restoring definer information
mysql-test/r/view_grant.result:
test of grant check of definer information
definer information added to CREATE VIEW
mysql-test/t/rpl_view.test:
check log of queries
mysql-test/t/skip_grants.test:
--skip-grants do not allow use user information
mysql-test/t/view.test:
test of storing/restoring definer information
mysql-test/t/view_grant.test:
test of grant check of definer information
sql/mysql_priv.h:
CREATE/ALTER VIEW print support
set current user as definer procedure
sql/share/errmsg.txt:
new errors/warnings
sql/sql_acl.cc:
make find_acl_user public to allow to check user
sql/sql_acl.h:
make find_acl_user public to allow to check user
sql/sql_lex.h:
storing definer information
sql/sql_parse.cc:
send CREATE/ALTER VIEW for replication with full list of options
set current user as definer procedure
sql/sql_show.cc:
new CREATE VIEW options printed
sql/sql_view.cc:
check of definer clause
changes in .frm file
definer information storage support
now we store only original SELECT in SOURCE field of .frm
sql/sql_yacc.yy:
definer information sintax support
getting SOURCE field information for .frm
sql/table.h:
definer information storage
Information_schema DB
Bug#9846 Inappropriate error displayed while
dropping table from 'INFORMATION_SCHEMA'
Bug#10734 Grant of privileges other than 'select' and
'create view' should fail on schema
Bug#10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA
cumulative fix for bugs above(after review, 2nd version)
added privilege check for information schema db & tables
into sanja.is.com.ua:/home/bell/mysql/bk/work-mrg-5.0
configure.in:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_math.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
sql/mysql_priv.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
configure.in:
merge
mysql-test/r/fulltext_var.result:
merge
sql/mysqld.cc:
merge
sql/set_var.cc:
merge
sql/mysql_priv.h:
initialisation moved to mysqld.cc
sql/mysqld.cc:
initialisation moved to mysqld.cc
sql/sql_cache.cc:
support of concurent query cache resizing:
- resizing made atomic
- check stack size after each quard mutex lock
sql/sql_cache.h:
initialisation moved to mysqld.cc
removed uneed parameter (now it is always under guard mutex protection or called from destruction)
bug#9948
changed client-charset behavior in 4.1.x libmysql, which issue BC prob
after review fixes
sql/mysql_priv.h:
bug#9948
changed client-charset behavior in 4.1.x libmysql, which issue BC prob
after review fixes
sql/mysqld.cc:
bug#9948
changed client-charset behavior in 4.1.x libmysql, which issue BC prob
after review fixes
The idea of the patch is to separate statement processing logic,
such as parsing, validation of the parsed tree, execution and cleanup,
from global query processing logic, such as logging, resetting
priorities of a thread, resetting stored procedure cache, resetting
thread count of errors and warnings.
This makes PREPARE and EXECUTE behave similarly to the rest of SQL
statements and allows their use in stored procedures.
This patch contains a change in behaviour:
until recently for each SQL prepared statement command, 2 queries
were written to the general log, e.g.
[Query] prepare stmt from @stmt_text;
[Prepare] select * from t1 <-- contents of @stmt_text
The chagne was necessary to prevent [Prepare] commands from being written
to the general log when executing a stored procedure with Dynamic SQL.
We should consider whether the old behavior is preferrable and probably
restore it.
This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs
in Dynamic SQL reported before it was disabled).
mysql-test/r/not_embedded_server.result:
Since we don't want to log Dynamic SQL in stored procedures,
now the general log gets only one log entry per SQL statement.
mysql-test/r/sp-error.result:
- remove obsolete tests
- a better error message for the case when a stored procedure that
returns a result set is called from a function
mysql-test/r/trigger.result:
- a better error message for the case when a stored procedure that
returns a result set is called from a trigger
mysql-test/t/sp-error.test:
- a better error message for the case when a stored procedure that
returns a result set is called from a function.
- move the comment to its place (end of file).
mysql-test/t/trigger.test:
- a better error message for the case when a stored procedure that
returns a result set is called from a trigger
sql/item_func.cc:
- we need to pass sql_command explicitly to get_var_with_binlog, because
when creating a query for SQL prepared statement thd->lex->sql_command
points at SQLCOM_EXECUTE, which is not listed in the list of update
queries.
sql/log_event.h:
- remove an extra copy of the previous sentence
sql/mysql_priv.h:
- fix declarations of sql_prepare.cc API
sql/share/errmsg.txt:
- a new error message, when one attempts to execute a prepared statement
which is currently being executed (this can happen only in Dynamic SQL
at the moment).
sql/sp_head.cc:
- extend sp_multi_results_command to return different flags for a
command (and rename it)
- add support for SQLCOM_PREPARE,SQLCOM_EXECUTE, SQLCOM_DEALLOCATE
to sp_get_flags_for_command
- replace multiple boolean sp_head members with uint m_flags
- a fix for a crash when user variables are used in a stored procedure
and binlog is on. A temporary fix for Bug#12637 "SP crashes the server
if it has update query with user var & binlog is enabled", which actually
stands for stored functions: now instead of a crash we break
replication if a user variable is used in a stored function which
is executed in prelocked mode.
sql/sp_head.h:
- replace multiple boolean flags of sp_head with uint m_flags;
- add flag CONTAINS_DYNAMIC_SQL
- use this flag to error if a stored procedure with Dynamic SQL is
called from a function or trigger.
sql/sql_class.cc:
- Statement_map::insert should not delete a statement if it exists,
now it's done externally to be able to handle the case when the
statement being deleted is in use.
- remove extra code (free_list is already reset in free_items)
sql/sql_lex.cc:
- add lex->stmt_prepare_mode; we can't rely on thd->command any more,
because we don't reset it any more (Dynamic SQL requirement is that
PS are as little intrusive as possible).
sql/sql_lex.h:
- declare bool LEX::stmt_prepare_mode
sql/sql_parse.cc:
- move prepared statement code to sql_prepare.cc
- change declarations (refactored code)
- better error message when one attempts to use Dynamic SQL or a
stored procedure that returns a result set in a function or trigger.
sql/sql_prepare.cc:
- major refactoring to ensure PREPARE/EXECUTE commands do not reset global THD
state and allow their use in stored procedures.
- add Prepared_statement::flags and use it to ensure no recursive execution
of a prepared statement is possible
- better comments
sql/sql_yacc.yy:
- enable PREPARE/EXECUTE/DEALLOCATE in stored procedures
- produce an error message on attempt to use PREPARE/EXECUTE/DEALLOCATE
in a stored function or trigger
mysql-test/r/sp-dynamic.result:
- sp-dynamic.test results
mysql-test/t/sp-dynamic.test:
- a new test for PREPARE/EXECUTE/DEALLOCATE in stored procedures.
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.
sql/item.cc:
Rename.
sql/item_cmpfunc.cc:
Rename.
sql/item_func.cc:
Rename.
sql/item_subselect.cc:
Rename.
sql/item_subselect.h:
Remove an unused forward declaration.
sql/item_sum.h:
Remove an unused forward declaration.
sql/mysql_priv.h:
Remove an unused forward declaration.
sql/sp.cc:
Rename.
sql/sp_head.cc:
Rename.
sql/sql_base.cc:
Rename.
sql/sql_class.cc:
Rename.
sql/sql_class.h:
Rename.
sql/sql_lex.cc:
Rename.
sql/sql_parse.cc:
Rename.
sql/sql_prepare.cc:
Rename.
sql/sql_select.cc:
Rename.
sql/sql_show.cc:
Rename.
sql/sql_union.cc:
Rename.
sql/sql_view.cc:
Rename.
sql/table.cc:
Rename.
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
BitKeeper/etc/config:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.h:
Auto merged
sql/ha_innodb.cc:
Add 'value' parameter to reset_auto_increment.
sql/ha_innodb.h:
Add 'value' parameter to reset_auto_increment.
sql/handler.h:
Add 'value' parameter to reset_auto_increment.
sql/mysql_priv.h:
Add 'reset_auto_increment' parameter to mysql_delete.
sql/sql_delete.cc:
Add 'reset_auto_increment' parameter to mysql_delete, and use it instead
of checking for SQLCOM_TRUNCATE.
mysql_truncate: Adapt to changes in mysql_delete.
sql/sql_parse.cc:
mysql_execute_command: Adapt to changes in mysql_delete.
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.
mysql-test/r/rpl_sp.result:
Fix for BUG#12335: updated test cases/results
mysql-test/t/rpl_sp.test:
Fix for BUG#12335: updated test cases/results
sql/item.cc:
Fix for BUG#12335 (SP replication):
- Added Item_name_const 'function'
- Addede 'delete reuse' to call dtor on item reuse
sql/item.h:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function' + code cleanup
sql/item_create.cc:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_create.h:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_func.cc:
Fix for BUG#12335 (SP replication) : binary log is now constrolled from within execute_function.
sql/lex.h:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/log.cc:
Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
one to temporary disable binlogging but collect a 'union' information about binlog write
calls.
sql/mysql_priv.h:
Fix for BUG#12335 (SP replication)
sql/sp_head.cc:
Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for
StoredRoutinesBinlogging for details
sql/sp_head.h:
Comments added
sql/sp_pcontext.h:
Comments added
sql/sp_rcontext.h:
Comments added
sql/sql_class.cc:
Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for
StoredRoutinesBinlogging for details
sql/sql_class.h:
Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
one to temporary disable binlogging but collect a 'union' information about binlog write
calls.
sql/sql_delete.cc:
Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_insert.cc:
Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_lex.cc:
Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
the tokenizer.
sql/sql_lex.h:
Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
the tokenizer.
sql/sql_parse.cc:
Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for
StoredRoutinesBinlogging for details
sql/sql_update.cc:
Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_yacc.yy:
Fix for BUG#12335 (SP replication) : When creating Item_splocal, remember where it is located
in the query.
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
BitKeeper/etc/config:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/view.result:
merge
mysql-test/t/view.test:
merge
sql/share/errmsg.txt:
merge
sql/sql_insert.cc:
merge
sql/table.h:
merge
(after review commit)
mysql-test/r/show_check.result:
test the extended functionality (so far not documented) of SHOW OPEN FILES
mysql-test/t/show_check.test:
test the extended functionality (so far not documented) of SHOW OPEN FILES
sql/mysql_priv.h:
pass the name of the database for checking
sql/sql_base.cc:
first check against the db if present (SHOW OPEN FILES FROM xxx)
then do wild compare but only against the table name
sql/sql_show.cc:
pass the DB if specified
into mysql.com:/home/my/mysql-5.0
sql/ha_berkeley.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_derived.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_update.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_class.cc:
Manual merge
into mysql.com:/home/timka/mysql/src/5.0-2486-merge
mysql-test/r/errors.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/fulltext_order_by.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/join_nested.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/errors.test:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/fulltext_order_by.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/join_nested.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/sql_insert.cc:
merge WL#2486
sql/sql_show.cc:
merge WL#2486
"Process NATURAL and USING joins according to SQL:2003".
* Some of the main problems fixed by the patch:
- in "select *" queries the * expanded correctly according to
ANSI for arbitrary natural/using joins
- natural/using joins are correctly transformed into JOIN ... ON
for any number/nesting of the joins.
- column references are correctly resolved against natural joins
of any nesting and combined with arbitrary other joins.
* This patch also contains a fix for name resolution of items
inside the ON condition of JOIN ... ON - in this case items must
be resolved only against the JOIN operands. To support such
'local' name resolution, the patch introduces a stack of
name resolution contexts used at parse time.
NOTICE:
- This patch is not complete in the sense that
- there are 2 test cases that still do not pass -
one in join.test, one in select.test. Both are marked
with a comment "TODO: WL#2486".
- it does not include a new test specific for the task
mysql-test/include/ps_query.inc:
Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
Adjusted according to standard JOIN ... ON semantics =>
the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
More detailed error message.
mysql-test/r/innodb.result:
Adjusted according to standard NATURAL/USING join semantics.
This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
More detailed error message.
mysql-test/r/join.result:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one test case that still fails, and it is
commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one failing test case which is commented with
WL#2486 in the test file.
mysql-test/r/subselect.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
More detailed error message.
mysql-test/t/bdb.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
Adjusted according to standard JOIN ... ON semantics =>
the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
More detailed error message.
mysql-test/t/innodb.test:
Adjusted according to standard NATURAL/USING join semantics.
This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
More detailed error message.
mysql-test/t/join.test:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one test case that still fails, and it is
commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one test case that still fails, and it is
commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
More detailed error message.
sql/item.cc:
- extra parameter to find_field_in_tables
- find_field_in_real_table renamed to find_field_in_table
- fixed comments/typos
sql/item.h:
- added [first | last]_name_resolution_table to class
Name_resolution_context
- commented old code
- standardized formatting
sql/mysql_priv.h:
- refactored the find_field_in_XXX procedures,
- added a new procedure for natural join table references,
- renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
- pass the top-most list of the FROM clause to setup_tables
- extra parameter to find_field_in_tables
sql/sql_acl.cc:
- renamed find_field_in_table => find_field_in_table_ref
- extra parameter to find_field_in_table_ref
- commented old code
sql/sql_base.cc:
This file contains the core of the implementation of the processing
of NATURAL/USING joins (WL#2486).
- added many comments to old code
- refactored the group of find_field_in_XXX procedures, and added a
new procedure for natural joins. There is one find_field_in_XXX procedure
per each type of table reference (stored table, merge view, or natural
join); one meta-procedure that selects the correct one depeneding on the
table reference; and one procedure that goes over a list of table
referenes.
- NATURAL/USING joins are processed through the procedures:
mark_common_columns, store_natural_using_join_columns,
store_top_level_join_columns, setup_natural_join_row_types.
The entry point to processing NATURAL/USING joins is the
procedure 'setup_natural_join_row_types'.
- Replaced the specialized Field_iterator_XXX iterators with one
generic iterator over the fields of a table reference.
- Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
- Commented old code.
sql/sql_delete.cc:
- Pass the FROM clause to setup_tables.
sql/sql_help.cc:
- pass the end name resolution table to find_field_in_tables
- adjust the list of tables for name resolution
sql/sql_insert.cc:
- Changed the code that saves and restores the current context to
support the list of tables for name resolution -
context->first_name_resolution_table, and
table_list->next_name_resolution_table.
Needed to support an ugly trick to resolve inserted columns only in
the first table.
- Added Name_resolution_context::[first | last]_name_resolution_table.
- Commented old code
sql/sql_lex.cc:
- set select_lex.parent_lex correctly
- set correct state of the current name resolution context
sql/sql_lex.h:
- Added a stack of name resolution contexts to support local
contexts for JOIN ... ON conditions.
- Commented old code.
sql/sql_load.cc:
- Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
- Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
- correctly set SELECT_LEX::parent_lex
- set the first table of the current name resoltion context
- added support for NATURAL/USING joins
- commented old code
sql/sql_select.cc:
- Pass the FROM clause to setup_tables.
- Pass the end table to find_field_in_tables
- Improved comments
sql/sql_show.cc:
- Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
- Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
- Added support for a stack of name resolution contexts needed to
implement name resolution for JOIN ... ON. A context is pushed
for each new JOIN ... ON, and popped afterwards.
- Added support for NATURAL/USING joins.
sql/table.cc:
- Added new class Natural_join_column to hide the heterogeneous
representation of column references for stored tables and for
views.
- Added a new list TABLE_LIST::next_name_resolution_table to
support name resolution with NATURAL/USING joins. Also added
other members to TABLE_LIST to support NATURAL/USING joins.
- Added a generic iterator over the fields of table references
of various types - class Field_iterator_table_ref
sql/table.h:
- Added new class Natural_join_column to hide the heterogeneous
representation of column references for stored tables and for
views.
- Added a new list TABLE_LIST::next_name_resolution_table to
support name resolution with NATURAL/USING joins. Also added
other members to TABLE_LIST to support NATURAL/USING joins.
- Added a generic iterator over the fields of table references
of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
Adjusted according to standard NATURAL JOIN syntax.
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/ha_berkeley.cc:
Removed not used variable (and options)
sql/ha_berkeley.h:
Removed not used argument
sql/ha_ndbcluster.cc:
Remove compiler warning
sql/init.cc:
Simplify code
sql/item_sum.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/mysql_priv.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/mysqld.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_class.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_delete.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_derived.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_lex.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_parse.cc:
Indentation fixes
sql/sql_select.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_select.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_show.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_union.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_update.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_yacc.yy:
Changed variable name i to more descriptive name
Removed compiler warning
database after failing to execute a stored procedure in an inaccessible
database. (Bug #12318)
mysql-test/r/sp-security.result:
Update results
mysql-test/t/sp-security.test:
Add regression test
sql/mysql_priv.h:
Add additional argument to mysql_change_db()
sql/sp.cc:
Use mysql_change_db(), get rid of sp_change_db().
sql/sp.h:
Get rid of sp_change_db().
sql/sql_db.cc:
Handle no_access_check flag to mysql_change_db, and remove the send_ok()
call.
sql/sql_parse.cc:
Add extra argument to mysql_change_db(), and call send_ok() after
successful calls to same (since it no longer does it for us).
into mysql.com:/home/dlenev/src/mysql-5.0-is
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/t/sp.test:
Manual merge
sql/sql_class.h:
Manual merge
result set".
To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).
mysql-test/r/alter_table.result:
Updated test results. This change was caused by the fact that now when
we build contents of I_S tables (and thus output of SHOW INDEX) we
don't use instances of tables which may be already opened and locked
by thread (we always use new instance).
mysql-test/r/information_schema.result:
Added test which checks how information about current auto-increment value for
table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/r/sp.result:
Added test for bug #10055 "Using stored function with information_schema causes
empty result set".
mysql-test/t/information_schema.test:
Added test which checks how information about current auto-increment value for
table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/t/sp.test:
Added test for bug #10055 "Using stored function with information_schema causes
empty result set".
sql/mysql_priv.h:
close_thread_tables():
Get rid of 'stopper' argument which is no longer used. Now when we need
to open and then close some table without touching tables which are already
opened we use THD::reset_n/restore_backup_open_tables_state() methods.
open_tables()/open_normal_and_derived_tables():
Added 'flags' argument to be able open tables even if some has done
a flush or hold namelock on them.
sql/sp.cc:
close_proc_table/open_proc_table_for_read/db_find_routine():
Replaced push_open_tables_state/pop_open_tables_state() methods which
were saving/restoring current open tables state in/from THD::open_state_list
with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
methods which assume that backup storage for this state is allocated on
stack (or elsewhere) by their caller.
open_proc_table_for_read():
Since now we can have several open tables states stacked up we can't rely
rely on checking whether we have some tables open in previous state.
Instead we always assume that some tables are open and we need to ignore
flush while locking mysql.proc. We don't really need
MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK in this case since we open mysql.proc table
only for reading.
sql/sp.h:
Added declarations of open_proc_table_for_read()/close_proc_table() to be
able to use them in sql_show.cc.
sql/sql_base.cc:
close_thread_tables():
Get rid of 'stopper' argument which is no longer used. Now when we need
to open and then close some table without touching tables which are already
opened we use THD::reset_n/restore_backup_open_tables_state() methods.
open_tables()/open_normal_and_derived_tables():
Added 'flags' argument to be able open tables even if some has done
a flush or hold namelock on them.
sql/sql_class.cc:
Open_tables_state, THD:
Replaced push_open_tables_state/pop_open_tables_state() methods which
were saving/restoring current open tables state in/from THD::open_state_list
with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
methods which assume that backup storage for this state is allocated on
stack (or elsewhere) by their caller.
sql/sql_class.h:
Open_tables_state, THD:
Replaced push_open_tables_state/pop_open_tables_state() methods which
were saving/restoring current open tables state in/from THD::open_state_list
with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
methods which assume that backup storage for this state is allocated on
stack (or elsewhere) by their caller.
sql/sql_handler.cc:
open_tables()/open_normal_and_derived_tables():
Added 'flags' argument to be able open tables even if some has done
a flush or hold namelock on them.
sql/sql_prepare.cc:
open_tables()/open_normal_and_derived_tables():
Added 'flags' argument to be able open tables even if some has done
a flush or hold namelock on them.
sql/sql_show.cc:
get_all_tables():
Now we use THD::reset_n_/restore_backup_open_tables_state() for
saving/restoring open tables state instead of working with it directly
(This also allows us to have proper content of I_S system tables in
statements with stored functions and in stored functions). We also
ignore possible flushes when opening tables (we may create deadlock
otherwise). Also we do all needed manipulations with LEX in this function
and not in get_schema_tables_result() now.
get_schema_tables_record():
Let us use handler::info() method with HA_STATUS_AUTO flag for obtaining
information about table's auto-increment value. This allows to avoid locking
of tables which is needed when we use handler::update_auto_increment() method.
fill_schema_proc():
Now we use open_proc_table_for_read/close_proc_table() for access to
mysql.proc table (so we won't cause deadlock if we already have some
tables open and locked, this also allows us to have proper content in
ROUTINES system table in statements using stored functions/in stored
functions).
get_schema_tables_result():
Moved all manipulations with Open_tables_state and LEX needed for
safe opening of tables to ST_SCHEMA_TABLE::fill_table functions
(i.e. get_all_tables() and fill_schema_proc()).
sql/sql_update.cc:
open_tables()/open_normal_and_derived_tables():
Added 'flags' argument to be able open tables even if some has done
a flush or hold namelock on them.
into mysql.com:/home/psergey/mysql-5.0-bug11869-part3
BitKeeper/deleted/.del-not_windows.inc:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/rpl_flush_tables.test:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_union.cc:
Auto merged
We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).
mysql-test/r/create.result:
Updated the test result
mysql-test/r/fulltext_order_by.result:
Drop all tables this test uses
mysql-test/t/fulltext_order_by.test:
Drop all tables this test uses
When creating temporary table for UNION, pass TMP_TABLE_FORCE_MYISAM flag to
create_tmp_table if we will be using fulltext function(s) when reading from the
temp. table.
mysql-test/r/fulltext_order_by.result:
Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error)
mysql-test/t/fulltext_order_by.test:
Testcase for BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error)
sql/mysql_priv.h:
BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
Added TMP_TABLE_FORCE_MYISAM flag
sql/sql_select.cc:
BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
In create_tmp_table(), honor the TMP_TABLE_FORCE_MYISAM flag
Fixed bug #12154: a query returned: Column <name> cannot be null.
The problem was due to a bug in the function setup_table_map:
the flag maybe_null was set up incorrectly for inner tables of
nested outer joins.
join_nested.result, join_nested.test:
Added a test case for bug #12154.
mysql-test/t/join_nested.test:
Added a test case for bug #12154.
mysql-test/r/join_nested.result:
Added a test case for bug #12154.
sql/mysql_priv.h:
Fixed bug #12154: a query returned: Column <name> cannot be null.
The problem was due to a bug in the function setup_table_map:
the flag maybe_null was set up incorrectly for inner tables of
nested outer joins.
frequently used command sequence replaced with inline function
BitKeeper/etc/config:
logging switching off
mysql-test/r/lowercase_view.result:
hided view underlying tables from error message
mysql-test/r/view.result:
hided view underlying tables from error message
mysql-test/t/lowercase_view.test:
hided view underlying tables from error message
mysql-test/t/view.test:
hided view underlying tables from error message
sql/mysql_priv.h:
subroutine which return correct error message
sql/share/errmsg.txt:
new error message
sql/sql_base.cc:
subroutine which issue correct error message in case of view presence for duplicated table on update
sql/sql_delete.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_insert.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_parse.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_update.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_view.cc:
frequently used command sequence replaced with inline function
sql/table.cc:
frequently used command sequence replaced with inline function
sql/table.h:
frequently used command sequence replaced with inline function
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
client/client_priv.h:
Added OPT_TRIGGERS (to get rid of compiler warning)
client/mysql.cc:
Added cast to get rid of compiler warning
client/mysqldump.c:
Added OPT_TRIGGERS (to get rid of compiler warning)
Abort if we can't write to outfile (even if --ignore-errors is given)
client/mysqltest.c:
Added --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
include/my_sys.h:
Make my_progname const
include/my_time.h:
Avoid using 'bool' in C programs
mysql-test/lib/init_db.sql:
Align with mysql_create_system_tables
(Ideally this file should be auto-generated from the above script)
mysql-test/r/mysqltest.result:
Test for --enable_parsing
mysql-test/r/variables.result:
Update results after fix for overflow checking of max_heap_table_size
mysql-test/t/information_schema.test:
USe --enable/disable parsing instead of comments
mysql-test/t/mysqltest.test:
Test for --enable_parsing
mysql-test/t/sp.test:
USe --enable/disable parsing instead of comments
mysql-test/t/variables.test:
Portability fix for 64 bit systems
mysql-test/t/view.test:
USe --enable/disable parsing instead of comments
mysys/my_init.c:
May my_progname const
mysys/my_static.c:
May my_progname const
mysys/thr_lock.c:
Remove not needed casts
sql-common/my_time.c:
Change bool -> my_bool as bool is not portable in C programs
sql/field.cc:
Test number_to_datetime() for -1 instead of < 0 (Safety fix)
New prototype for TIME_to_timestamp()
sql/item.h:
Don't have prototypes for both uint32 and ulong as these 'may' be the same thing
sql/item_timefunc.cc:
New prototype for TIME_to_timestamp()
sql/log.cc:
Remove compiler warnings
sql/mysql_priv.h:
New prototype for TIME_to_timestamp()
Added function for comparing LEX_STRING
sql/set_var.cc:
Added overflow checking when setting ulong variable
sql/sql_base.cc:
Added function is_equal()
Changed strncmp -> is_equal() as strncmp() to not match "V" (instead of "VIEW")
sql/sql_class.cc:
Added comment
sql/sql_select.cc:
Portability fixes
After review fixes
sql/sql_trigger.cc:
Use 'tables_alias_charset' for comparing database name
Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/sql_view.cc:
Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/time.cc:
New prototype for TIME_to_timestamp() to allow easyer mapping to C function
sql/tztime.cc:
bool -> my_bool (to allow calling C code from C++ code)
sql/tztime.h:
bool -> my_bool (to allow calling C code from C++ code)
into mysql.com:/home/my/mysql-5.0
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-ctype_cp932.test:
Auto merged
BitKeeper/deleted/.del-isam.test~834fb0ee8196c445:
Auto merged
include/thr_lock.h:
Auto merged
mysql-test/t/alias.test:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/archive.test:
Auto merged
mysql-test/t/backup.test:
Auto merged
mysql-test/t/bool.test:
Auto merged
mysql-test/t/connect.test:
Auto merged
mysql-test/t/count_distinct2.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ctype_many.test:
Auto merged
mysql-test/t/ctype_ucs_binlog.test:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/delayed.test:
Auto merged
mysql-test/t/derived.test:
Auto merged
mysql-test/t/distinct.test:
Auto merged
mysql-test/t/drop.test:
Auto merged
mysql-test/t/endspace.test:
Auto merged
mysql-test/t/flush.test:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/fulltext_order_by.test:
Auto merged
mysql-test/t/func_compress.test:
Auto merged
mysql-test/t/func_concat.test:
Auto merged
mysql-test/t/func_date_add.test:
Auto merged
mysql-test/t/func_equal.test:
Auto merged
mysql-test/t/func_if.test:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
mysql-test/t/func_set.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/gis.test:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/grant_cache.test:
Auto merged
mysql-test/t/heap.test:
Auto merged
mysql-test/t/heap_btree.test:
Auto merged
mysql-test/t/heap_hash.test:
Auto merged
mysql-test/t/init_connect.test:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
mysql-test/t/key.test:
Auto merged
mysql-test/t/keywords.test:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/lock.test:
Auto merged
mysql-test/t/lowercase_table.test:
Auto merged
mysql-test/t/lowercase_table3.test:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/mysqlbinlog2.test:
Auto merged
mysql-test/t/ndb_alter_table.test:
Auto merged
mysql-test/t/ndb_autodiscover.test:
Auto merged
mysql-test/t/ndb_charset.test:
Auto merged
mysql-test/t/ndb_grant.later:
Auto merged
mysql-test/t/ndb_index_ordered.test:
Auto merged
mysql-test/t/ndb_index_unique.test:
Auto merged
mysql-test/t/ndb_restore.test:
Auto merged
mysql-test/t/ndb_types.test:
Auto merged
mysql-test/t/ndb_update.test:
Auto merged
mysql-test/t/null.test:
Auto merged
mysql-test/t/null_key.test:
Auto merged
mysql-test/t/olap.test:
Auto merged
mysql-test/t/openssl_1.test:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/ps_4heap.test:
Auto merged
mysql-test/t/ps_5merge.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/replace.test:
Auto merged
mysql-test/t/row.test:
Auto merged
mysql-test/t/rpl000001.test:
Auto merged
mysql-test/t/rpl000015.test:
Auto merged
mysql-test/t/rpl000017.test:
Auto merged
mysql-test/t/rpl000018.test:
Auto merged
mysql-test/t/rpl_EE_error.test:
Auto merged
mysql-test/t/rpl_change_master.test:
Auto merged
mysql-test/t/rpl_charset.test:
Auto merged
mysql-test/t/rpl_create_database.test:
Auto merged
mysql-test/t/rpl_ddl.test:
Auto merged
mysql-test/t/rpl_deadlock.test:
Auto merged
mysql-test/t/rpl_empty_master_crash.test:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
mysql-test/t/rpl_flush_log_loop.test:
Auto merged
mysql-test/t/rpl_flush_tables.test:
Auto merged
mysql-test/t/rpl_get_lock.test:
Auto merged
mysql-test/t/rpl_heap.test:
Auto merged
mysql-test/t/rpl_loaddata.test:
Auto merged
mysql-test/t/rpl_loaddata_rule_m.test:
Auto merged
mysql-test/t/rpl_log.test:
Auto merged
mysql-test/t/rpl_log_pos.test:
Auto merged
mysql-test/t/rpl_max_relay_size.test:
Auto merged
mysql-test/t/rpl_multi_query.test:
Auto merged
mysql-test/t/rpl_openssl.test:
Auto merged
mysql-test/t/rpl_redirect.test:
Auto merged
mysql-test/t/rpl_relayrotate.test:
Auto merged
mysql-test/t/rpl_replicate_do.test:
Auto merged
mysql-test/t/rpl_reset_slave.test:
Auto merged
mysql-test/t/rpl_server_id2.test:
Auto merged
mysql-test/t/rpl_temporary.test:
Auto merged
mysql-test/t/rpl_timezone.test:
Auto merged
mysql-test/t/rpl_user_variables.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/symlink.test:
Auto merged
mysql-test/t/synchronization.test:
Auto merged
mysql-test/t/system_mysql_db.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
mysql-test/t/temp_table.test:
Auto merged
mysql-test/t/timezone2.test:
Auto merged
mysql-test/t/timezone_grant.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/type_ranges.test:
Auto merged
mysql-test/t/type_timestamp.test:
Auto merged
mysql-test/t/union.test:
Auto merged
mysql-test/t/update.test:
Auto merged
mysql-test/t/user_var-binlog.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
mysys/thr_lock.c:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8:
Simple merge
mysql-test/r/ps_grant.result:
Simple merge
mysql-test/t/analyse.test:
Simple merge
mysql-test/t/auto_increment.test:
Simple merge
mysql-test/t/bdb.test:
Simple merge
mysql-test/t/bigint.test:
Simple merge
mysql-test/t/case.test:
Simple merge
mysql-test/t/cast.test:
Simple merge
mysql-test/t/check.test:
Simple merge
mysql-test/t/count_distinct.test:
Simple merge
mysql-test/t/ctype_latin1_de.test:
Simple merge
mysql-test/t/ctype_uca.test:
Simple merge
mysql-test/t/ctype_ucs.test:
Simple merge
mysql-test/t/ctype_utf8.test:
Simple merge
mysql-test/t/delete.test:
Simple merge
mysql-test/t/flush_block_commit.test:
Simple merge
mysql-test/t/func_default.test:
Simple merge
mysql-test/t/func_gconcat.test:
Simple merge
mysql-test/t/func_group.test:
Aligned code with 4.1
mysql-test/t/func_in.test:
Simple merge
mysql-test/t/func_math.test:
Simple merge
mysql-test/t/func_misc.test:
Simple merge
mysql-test/t/func_test.test:
Simple merge
mysql-test/t/func_time.test:
Simple merge
mysql-test/t/group_by.test:
Simple merge
mysql-test/t/having.test:
Simple merge
mysql-test/t/innodb.test:
Simple merge
mysql-test/t/insert.test:
Simple merge
mysql-test/t/join_outer.test:
Simple merge
mysql-test/t/kill.test:
Simple merge
mysql-test/t/loaddata.test:
Simple merge
mysql-test/t/lock_multi.test:
Simple merge
mysql-test/t/multi_update.test:
Simple merge
mysql-test/t/mysqlbinlog.test:
Simple merge
mysql-test/t/mysqldump.test:
Aligned code with 4.1
mysql-test/t/mysqltest.test:
Simple merge
mysql-test/t/ndb_basic.test:
Simple merge
mysql-test/t/ndb_cache.test:
Simple merge
mysql-test/t/ndb_subquery.test:
Simple merge
mysql-test/t/ps_grant.test:
Simple merge
mysql-test/t/range.test:
Simple merge
mysql-test/t/rpl_drop_temp.test:
Simple merge
mysql-test/t/rpl_loaddata_rule_s.test:
Simple merge
mysql-test/t/rpl_loaddatalocal.test:
Simple merge
mysql-test/t/rpl_rotate_logs.test:
Simple merge
mysql-test/t/rpl_until.test:
Simple merge
mysql-test/t/rpl_variables.test:
Simple merge
mysql-test/t/select.test:
Simple merge
mysql-test/t/sql_mode.test:
Simple merge
mysql-test/t/type_blob.test:
Simple merge
mysql-test/t/type_decimal.test:
Simple merge
mysql-test/t/user_var.test:
Simple merge
mysql-test/t/variables.test:
Simple merge
sql/lock.cc:
Simple optimization
sql/mysql_priv.h:
Simple merge
sql/sql_table.cc:
Simple merge
sql/table.cc:
Simple merge
sql/unireg.cc:
Simple merge
into mysql.com:/home/my/mysql-4.1
BitKeeper/etc/ignore:
auto-union
include/thr_lock.h:
Auto merged
mysys/thr_lock.c:
Auto merged
sql/lock.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_base.cc:
Simple merge
Change argument order to be database, tablename for some functions
sql/lock.cc:
Remove not needed block
sql/mysql_priv.h:
Change argument order to be database, tablename (like in most other functions)
sql/sql_table.cc:
Change argument order to be database, tablename (like in most other functions)
Make 'flags' inline
sql/table.cc:
Change argument order to be database, tablename (like in most other functions)
sql/unireg.cc:
Change argument order to be database, tablename (like in most other functions)
Fixed portability problem with bool in C programs
Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
my_sleep() -> pthread_cond_timedwait()
include/thr_lock.h:
bool -> my_bool (bool is not portable in C programs)
mysys/thr_lock.c:
bool -> my_bool (bool is not portable in C programs)
sql/lock.cc:
Added comment
Don't use | on bool variable
sql/mysql_priv.h:
Added comment
sql/slave.cc:
Moved close_thread_tables out from LOCK_thread_count mutex (safety fix)
sql/sql_base.cc:
Added comments
my_sleep() -> pthread_cond_timedwait() to get less code and potentitally faster loop
BitKeeper/etc/ignore:
added ac_available_languages_fragment
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
BitKeeper/etc/config:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_cache.cc:
Auto merged
mysql-test/r/query_cache.result:
SCCS merged
mysql-test/t/query_cache.test:
SCCS merged
mysql-test/r/query_cache.result:
query in QC from normal execution and SP
mysql-test/t/query_cache.test:
environment restoring fix
layout fix
query in QC from normal execution and SP
sql/mysql_priv.h:
store SERVER_MORE_RESULTS_EXISTS
sql/sql_cache.cc:
store SERVER_MORE_RESULTS_EXISTS in key of query cache
BitKeeper/etc/config:
switching logging off
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/t/create.test:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/table.cc:
Resolve conflict
sql/unireg.cc:
Resolve conflict