mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
- The client gets a progress report message that triggers a callback function if requested with mysql_options(MYSQL_PROGRESS_CALLBACK, function) - Added Progress field last to 'show processlist' - Stage, Max_stage and Progress field added to information_schema.progresslist - The 'mysql' client by defaults enables progress reports when the output is a tty. - Added progress_report_time time variable to configure how often progress reports is sent to client Added read only system variable 'in_transaction' which is 1 if we have executed a BEGIN statement. client/client_priv.h: Added OPT_REPORT_PROGRESS client/mysql.cc: Added option --progress-reports (on by default if not batch mode) Progress reports is written to stdout for long running commands include/Makefile.am: Added mysql/service_progress_report.h include/myisamchk.h: Added variables to be able to do progress reporting in Aria and later in MyISAM include/mysql.h: Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK include/mysql.h.pp: Added new mysql_options() parameter: MYSQL_PROGRESS_CALLBACK include/mysql/plugin.h: Added functions for reporting progress. include/mysql/plugin_auth.h.pp: Added functions for reporting progress. include/mysql_com.h: Added CLIENT_PROGRESS mysql_real_connect() flag. include/sql_common.h: Added callback function for reporting progress mysql-test/r/old-mode.result: Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode. mysql-test/suite/funcs_1/datadict/datadict_priv.inc: Added new column mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Test all new PROCESSLIST columns mysql-test/suite/funcs_1/r/is_columns_is.result: Updated results mysql-test/suite/funcs_1/r/is_columns_is_embedded.result: Updated results mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result: Updated results mysql-test/suite/funcs_1/r/is_tables_is_embedded.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_ps.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_ps.result: Updated results mysql-test/suite/pbxt/r/pbxt_locking.result: Updated results mysql-test/suite/pbxt/r/skip_name_resolve.result: Updated results mysql-test/t/old-mode.test: Ensure that SHOW PROGRESSLIST doesn't have the Progress column in old mode. plugin/handler_socket/handlersocket/Makefile.am: Added -lmysqlservices scripts/mytop.sh: Made 'State' field width dynamic. Added 'Progress' to process list display. sql-common/client.c: Added handling of progress messages. Removed check_license() function. sql/mysql_priv.h: Added opt_progress_report_time sql/mysqld.cc: Added progress_report_time time variable to configure how often progress reports is sent to client sql/protocol.cc: Added net_send_progress_packet() sql/protocol.h: New prototypes sql/set_var.cc: Added variables progress_report_time and in_transaction sql/sql_acl.cc: Safety fix: Made client_capabilities ulonglong sql/sql_class.cc: Added interface functions for progress reporting sql/sql_class.h: Added varibles in THD for progress reporting. Added CF_REPORT_PROGRESS sql/sql_load.cc: Added progress reporting for LOAD DATA INFILE sql/sql_parse.cc: Added CF_REPORT_PROGRESS for top level commands for which it's safe to send progress reports to client sql/sql_show.cc: Added Progress field last to 'show processlist' Stage, Max_stage and Progress field added to information_schema.progresslist sql/sql_table.cc: Added progress reporting for ALTER TABLE Added THD as argument to copy_data_between_tables() storage/maria/ha_maria.cc: Added progress reporting for check table, repair table, analyze table Fixed a bug in start_bulk_insert() that caused alter table to always run with all keys enabled. storage/maria/ma_check.c: Added progress reporting Remember old state before starting repair. This removes some warnings from optimize_table if create-with-sort fails. storage/maria/ma_check_standalone.h: Added dummy reporting function for standalone Aria programs. storage/maria/ma_sort.c: Added progress reporting storage/maria/maria_chk.c: Updated version storage/maria/maria_def.h: Added new prototypes tests/mysql_client_test.c: Added test case for progress reporting
113 lines
3.5 KiB
PHP
113 lines
3.5 KiB
PHP
############## suite/funcs_1/datadict/datadict_priv.inc ################
|
|
# #
|
|
# DDL and DML operations on information_schema tables #
|
|
# #
|
|
# Creation: #
|
|
# 2007-08 hhunger Implement this test as part of #
|
|
# WL#3982 Test information_schema.processlist #
|
|
# #
|
|
# Last update: #
|
|
# 2007-08-14 mleich Some cleanup #
|
|
# #
|
|
########################################################################
|
|
|
|
# These variables have to be set before sourcing this file.
|
|
#
|
|
# information_schema table to be tested
|
|
# let $table= processlist;
|
|
#
|
|
# columns of the information_schema table e.g. to use in a select.
|
|
# let $columns= ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, PROGRESS;
|
|
#
|
|
# Where clause for an update.
|
|
# let $update_where= WHERE id=1 ;
|
|
#
|
|
# Column to be used in the SET of an update.
|
|
# let $set_column= user='any_user' ;
|
|
#
|
|
# Where clause of a delete.
|
|
# let $delete_where= WHERE id=1 ;
|
|
#
|
|
# Column to be dropped.
|
|
# let $drop_column= user;
|
|
#
|
|
# Column to be indexed
|
|
# let $index_col= user;
|
|
|
|
|
|
# data access
|
|
|
|
eval CREATE TEMPORARY TABLE test.t_$table AS SELECT * FROM $table;
|
|
|
|
eval UPDATE test.t_$table SET user='horst' $update_where ;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval INSERT INTO $table SELECT * FROM test.t_$table;
|
|
|
|
# bug#30208: CREATE TABLE ...LIKE does not accept dbname.tablename:unknown database
|
|
eval DROP TABLE test.t_$table;
|
|
|
|
--error ER_VIEW_NONUPD_CHECK
|
|
eval CREATE VIEW test.v_$table ($columns) AS SELECT * FROM $table WITH CHECK OPTION;
|
|
|
|
eval CREATE VIEW test.v_$table ($columns) AS SELECT * FROM $table;
|
|
|
|
# !!! This query returns a wrong error due to a bug in the code of mwl106
|
|
# !!! Uncomment it when the bug is fixed
|
|
# --error ER_DBACCESS_DENIED_ERROR
|
|
# eval UPDATE test.v_$TABLE SET TIME=NOW() WHERE id = 1;
|
|
|
|
eval DROP VIEW test.v_$table;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval UPDATE $table SET $set_column $update_where;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval DELETE FROM $table $delete_where;
|
|
|
|
# change privileges
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval REVOKE ALL ON $table FROM current_user;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval GRANT INSERT,UPDATE ON $table TO current_user;
|
|
|
|
SHOW GRANTS;
|
|
|
|
#----------------------------------------------------------------------
|
|
# table access
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval CREATE INDEX i_$table ON $table ($index_col);
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval DROP TABLE $table;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval ALTER TABLE $table DROP COLUMN $drop_column;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval ALTER TABLE $table ADD COLUMN (my_column INT);
|
|
|
|
--error ER_UNKNOWN_TABLE
|
|
eval RENAME TABLE $table TO new_$table;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
eval RENAME TABLE $table TO files;
|
|
|
|
--error ER_UNKNOWN_TABLE
|
|
eval CREATE TABLE new_$table AS SELECT * FROM $table;
|
|
|
|
#----------------------------------------------------------------------
|
|
# database access
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
DROP DATABASE information_schema;
|
|
|
|
--error ER_PARSE_ERROR
|
|
RENAME DATABASE information_schema TO info_schema;
|
|
|
|
--error ER_DBACCESS_DENIED_ERROR
|
|
ALTER DATABASE information_schema UPGRADE DATA DIRECTORY NAME;
|