mysql-test/r/view.result:
test results for rename table view1 to view2
mysql-test/t/view.test:
tests for rename table view1 to view2
sql/share/errmsg.txt:
added new errormessage (schema change not allowed in rename table view)
sql/sql_rename.cc:
added support for renaming views
sql/sql_view.cc:
added new function mysql_rename_view
sql/sql_view.h:
added prototype mysql_rename_view
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.
Fixed by making CREATE/ALTER/DROP PROCEDURE cause implicit commit.
mysql-test/r/rpl_ddl.result:
Updated results to include testing of implicit commit for
create/alter/drop procedure
mysql-test/t/rpl_ddl.test:
BUG#12870 test implicit commit for create/alter/drop procedure.
sql/sql_parse.cc:
CREATE/ALTER/DROP PROCEDURE/SPFUNCTION now causes implicit commit.
DAYOFWEEK(), and WEEKDAY().
mysql-test/r/func_time.result:
Fixed new results for testcases containing EXPLAIN EXTENDED SELECT ...
WEEKDAY ... DAYNAME. The new results are correct and correspond to
the changes in create_func_weekday() and create_func_dayname().
mysql-test/r/view.result:
Fixed some testcases results (bugs #12963, #13000).
mysql-test/t/view.test:
Added testcases for for bugs #12963, #13000.
sql/item_create.cc:
Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
Modified create_func_dayname(), create_func_dayofweek(), and
create_func_weekday(). They don´t insert Item_func_to_days
object now.
sql/item_timefunc.cc:
Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().
Modified Item_func_weekday::val_int(). The argument of weekday should
not be considered now to be Item_func_to_days object.
sql/item_timefunc.h:
Fixed bugs #12963, 13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY.
Modified Item_func_weekday::func_name(). It returns now different
names depending on the odbc_type attribute value.
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
mysql-test/r/sp.result:
Added missing drop table.
mysql-test/t/sp.test:
Added missing drop table.
sql/sp_head.h:
Post-review fix for autocommit check in SPs and triggers.
sql/sql_yacc.yy:
Post-review fix for autocommit check in SPs and triggers.
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
into mysql.com:/home/gluh/MySQL/Bugs/5.0.cml
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
Now many direct references to my_error() have been removed.
mysql-test/r/federated_archive.result:
new results with new error message
mysql-test/t/federated_archive.test:
corrected error number
sql/ha_federated.cc:
some minor 80 column formatting
corrected some error handling to be more handler print_error friendly
moved duplicate code into new "stash_remote_error" function
sql/ha_federated.h:
added error number, and places to stash error message and number
added private method to stash error
into neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/item.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/sp.result:
fix result
mysql-test/r/type_newdecimal.result:
fix result
mysql-test/t/sp.test:
add a test for the bug
mysql-test/t/type_newdecimal.test:
add a test for the bug
sql/item_func.cc:
call correct method of the item
Added flag to Field::store(longlong) to specify if value is unsigned.
This fixes bug #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
Fixed warning from valgrind in CREATE ... SELECT
Fixed double free of mysql.options if reconnect failed
mysql-test/mysql-test-run.sh:
Added option --valgrind-mysqltest to allow one to run mysqltest with valgrind
mysql-test/r/bigint.result:
Update results after fix for Field::store(longlong)
mysql-test/r/range.result:
Update results after fix for Field::store(longlong)
mysql-test/r/strict.result:
Update results after fix for Field::store(longlong)
(This fixes some wrong results when storing things into bigint columns)
mysql-test/r/type_ranges.result:
Update results after fix for Field::store(longlong)
mysql-test/t/bigint.test:
Added testing for #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
mysql-test/t/innodb.test:
Removed comments affected by this bug fix
mysql-test/t/mysqldump.test:
Fixed result to not depend on existing config files
mysql-test/t/range.test:
0xff numbers are now unsigned
mysql-test/t/strict.test:
Added errors for things that previously (wrongly) succeeded
sql-common/client.c:
Fixed double free of mysql.options if reconnect failed
sql/field.cc:
Added flag to Field::store(longlong) to specify if value is unsigned
sql/field.h:
Added flag to Field::store(longlong) to specify if value is unsigned
sql/field_conv.cc:
Fixed calls to Field::store(longlong,flag)
sql/ha_ndbcluster.cc:
Fixed calls to Field::store(longlong,flag)
sql/handler.cc:
Fixed calls to Field::store(longlong,flag)
sql/item.cc:
Fixed calls to Field::store(longlong,flag)
sql/item_sum.cc:
Fixed calls to Field::store(longlong,flag)
sql/sp.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_acl.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_help.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_show.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_table.cc:
Fixed varning from valgrind
sql/sql_udf.cc:
Fixed calls to Field::store(longlong,flag)
sql/tztime.cc:
Fixed calls to Field::store(longlong,flag)
sql/unireg.cc:
Fixed calls to Field::store(longlong,flag)
Second version after review. Allow 'set autocommit' in procedures, but not
functions or triggers. Can return error in run-time (when a function calls
a procedure).
mysql-test/r/sp-error.result:
New test case for BUG#12712.
mysql-test/t/sp-error.test:
New test case for BUG#12712.
sql/set_var.cc:
Made sys_autocommit external, to allow testing in sql_yacc.yy.
sql/set_var.h:
Made sys_autocommit external, to allow testing in sql_yacc.yy.
sql/share/errmsg.txt:
New error message for disallowing the setting of autocommit in stored functions and triggers.
sql/sp_head.h:
New flag: has 'set autocommit', and testing for this in is_not_allowed_in_function().
sql/sql_yacc.yy:
Disallow setting AUTOCOMMIT in stored function and triggers.
get strange result
according to Monty's suggestions, fixing the SELECT behaviour on errors
with SP handlers. Note that some warnings from SELECT still shows up when
the handler has caught - this is an effect of another known bug (BUG#7049).
mysql-test/r/sp.result:
New test cases for BUG#12379.
mysql-test/t/sp.test:
New test cases for BUG#12379.
sql/sql_class.cc:
Abort selects on errors more graceful with SP handlers.
sql/sql_class.h:
Abort selects on errors more graceful with SP handlers.