summaryrefslogtreecommitdiff
path: root/sql/sql_cmd.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.8 into 10.9Marko Mäkelä2023-02-161-4/+2
|\
| * Merge 10.6 into 10.8Marko Mäkelä2023-02-101-4/+2
| |\
| | * Merge 10.4 into 10.5Marko Mäkelä2023-02-101-4/+2
| | |\
| | | * Apply clang-tidy to remove empty constructors / destructorsVicențiu Ciorbaru2023-02-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of running run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' . Code style changes have been done on top. The result of this change leads to the following improvements: 1. Binary size reduction. * For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by ~400kb. * A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb. 2. Compiler can better understand the intent of the code, thus it leads to more optimization possibilities. Additionally it enabled detecting unused variables that had an empty default constructor but not marked so explicitly. Particular change required following this patch in sql/opt_range.cc result_keys, an unused template class Bitmap now correctly issues unused variable warnings. Setting Bitmap template class constructor to default allows the compiler to identify that there are no side-effects when instantiating the class. Previously the compiler could not issue the warning as it assumed Bitmap class (being a template) would not be performing a NO-OP for its default constructor. This prevented the "unused variable warning".
* | | | MDEV-27021 Implement SHOW ANALYZE commandOleg Smirnov2022-04-291-1/+2
|/ / /
* | | Removed CREATE/DROP TABLESPACE and related commandsMonty2021-09-141-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | - DISCARD/IMPORT TABLESPACE are the only tablespace commands left - TABLESPACE arguments for CREATE TABLE and ALTER ... ADD PARTITION are ignored. - Tablespace names are not shown anymore in .frm and not shown in information schema Other things - Removed end spaces from sql/CMakeList.txt
* | MDEV-21743 Split up SUPER privilege to smaller privilegesAlexander Barkov2020-03-101-1/+1
| |
* | MDEV-19855: Create "Sql_cmd_show_slave_status" class for "SHOW SLAVE STATUS" ↵Sujatha2019-07-011-0/+20
|/ | | | | | command. Create "Sql_cmd_show_slave_status" class for "SHOW SLAVE STATUS" command.
* Merge branch '10.3' into 10.4Oleksandr Byelkin2019-06-141-0/+51
|\
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2019-06-141-0/+51
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2019-06-121-0/+41
| | |\
| | | * MDEV-19653 Add class Sql_cmd_create_tableAlexander Barkov2019-05-311-0/+41
| | | |
* | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\ \ | | | |/
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | |
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-03-201-14/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MDEV-17262 commit 26432e49d37a37d09b862bb49a021e44bdf4789c was skipped. In Galera 4, the implementation would seem to require changes to the streaming replication. In the tests archive.rnd_pos main.profiling, disable_ps_protocol for SHOW STATUS and SHOW PROFILE commands until MDEV-18974 has been fixed.
| * | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-171-14/+0
| |\ \ \ | | |/ /
| | * | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-151-15/+0
| | |\ \ | | | |/
| | | * pass the slow logging information in thd->query_plan_flagsSergei Golubchik2019-03-121-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves the following issues: * unlike lex->m_sql_cmd and lex->sql_command, thd->query_plan_flags is not reset in Prepared_statement::execute, it survives till the log_slow_statement(), so slow logging behaves correctly in --ps * using thd->query_plan_flags for both slow_log_filter and log_slow_admin_statements means the definition of "admin" statements for the slow log is the same no matter how it is filtered out.
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-03-061-0/+13
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-03-051-0/+13
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | FIXME: Properly resolve conflicts between MDEV-18883 and MDEV-7742/MDEV-8305, and record the correct result for main.log_slow
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-03-041-0/+15
| | |\ \ | | | |/
| | | * MDEV-18333 Slow_queries count doesn't increase when slow_query_log is turned offAlexander Barkov2019-03-041-0/+15
| | | |
* | | | Added support for BACKUP LOCK / BACKUP UNLOCKMichael Widenius2019-01-141-1/+1
| | | |
* | | | Added syntax and implementation for BACKUP STAGE'sMonty2018-12-091-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()
* | | MDEV-11952 Oracle-style packages: stage#5mariadb-10.3.5bb-10.3-compatibilityAlexander Barkov2018-02-251-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CREATE PACKAGE [BODY] statements are now entirely written to mysql.proc with type='PACKAGE' and type='PACKAGE BODY'. - CREATE PACKAGE BODY now supports IF NOT EXISTS - DROP PACKAGE BODY now supports IF EXISTS - CREATE OR REPLACE PACKAGE [BODY] is now supported - CREATE PACKAGE [BODY] now support the DEFINER clause: CREATE DEFINER user@host PACKAGE pkg ... END; CREATE DEFINER user@host PACKAGE BODY pkg ... END; - CREATE PACKAGE [BODY] now supports SQL SECURITY and COMMENT clauses, e.g.: CREATE PACKAGE p1 SQL SECURITY INVOKER COMMENT "comment" AS ... END; - Package routines are now created from the package CREATE PACKAGE BODY statement and don't produce individual records in mysql.proc. - CREATE PACKAGE BODY now supports package-wide variables. Package variables can be read and set inside package routines. Package variables are stored in a separate sp_rcontext, which is cached in THD on the first packate routine call. - CREATE PACKAGE BODY now supports the initialization section. - All public routines (i.e. declared in CREATE PACKAGE) must have implementations in CREATE PACKAGE BODY - Only public package routines are available outside of the package - {CREATE|DROP} PACKAGE [BODY] now respects CREATE ROUTINE and ALTER ROUTINE privileges - "GRANT EXECUTE ON PACKAGE BODY pkg" is now supported - SHOW CREATE PACKAGE [BODY] is now supported - SHOW PACKAGE [BODY] STATUS is now supported - CREATE and DROP for PACKAGE [BODY] now works for non-current databases - mysqldump now supports packages - "SHOW {PROCEDURE|FUNCTION) CODE pkg.routine" now works for package routines - "SHOW PACKAGE BODY CODE pkg" now works (the package initialization section) - A new package body level MDL was added - Recursive calls for package procedures are now possible - Routine forward declarations in CREATE PACKATE BODY are now supported. - Package body variables now work as SP OUT parameters - Package body variables now work as SELECT INTO targets - Package body variables now support ROW, %ROWTYPE, %TYPE
* | | MDEV-13529 Add class Sql_cmd_callAlexander Barkov2017-08-151-0/+29
| | |
* | | MDEV-10139 Support for SEQUENCE objectsMonty2017-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - SETVAL(sequence_name, next_value, is_used, round) - ALTER SEQUENCE, including RESTART WITH Other things: - Added handler::extra() option HA_EXTRA_PREPARE_FOR_ALTER_TABLE to signal ha_sequence() that it should allow write_row statments. - ALTER ONLINE TABLE now works with SEQUENCE:s
* | | MDEV-10139 Support for SEQUENCE objectsMonty2017-04-071-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working features: CREATE OR REPLACE [TEMPORARY] SEQUENCE [IF NOT EXISTS] name [ INCREMENT [ BY | = ] increment ] [ MINVALUE [=] minvalue | NO MINVALUE ] [ MAXVALUE [=] maxvalue | NO MAXVALUE ] [ START [ WITH | = ] start ] [ CACHE [=] cache ] [ [ NO ] CYCLE ] ENGINE=xxx COMMENT=".." SELECT NEXT VALUE FOR sequence_name; SELECT NEXTVAL(sequence_name); SELECT PREVIOUS VALUE FOR sequence_name; SELECT LASTVAL(sequence_name); SHOW CREATE SEQUENCE sequence_name; SHOW CREATE TABLE sequence_name; CREATE TABLE sequence-structure ... SEQUENCE=1 ALTER TABLE sequence RENAME TO sequence2; RENAME TABLE sequence TO sequence2; DROP [TEMPORARY] SEQUENCE [IF EXISTS] sequence_names Missing features - SETVAL(value,sequence_name), to be used with replication. - Check replication, including checking that sequence tables are marked not transactional. - Check that a commit happens for NEXT VALUE that changes table data (may already work) - ALTER SEQUENCE. ANSI SQL version of setval. - Share identical sequence entries to not add things twice to table list. - testing insert/delete/update/truncate/load data - Run and fix Alibaba sequence tests (part of mysql-test/suite/sql_sequence) - Write documentation for NEXT VALUE / PREVIOUS_VALUE - NEXTVAL in DEFAULT - Ensure that NEXTVAL in DEFAULT uses database from base table - Two NEXTVAL for same row should give same answer. - Oracle syntax sequence_table.nextval, without any FOR or FROM. - Sequence tables are treated as 'not read constant tables' by SELECT; Would be better if we would have a separate list for sequence tables so that select doesn't know about them, except if refereed to with FROM. Other things done: - Improved output for safemalloc backtrack - frm_type_enum changed to Table_type - Removed lex->is_view and replaced with lex->table_type. This allows use to more easy check if item is view, sequence or table. - Added table flag HA_CAN_TABLES_WITHOUT_ROLLBACK, needed for handlers that want's to support sequences - Added handler calls: - engine_name(), to simplify getting engine name for partition and sequences - update_first_row(), to be able to do efficient sequence implementations. - Made binlog_log_row() global to be able to call it from ha_sequence.cc - Added handler variable: row_already_logged, to be able to flag that the changed row is already logging to replication log. - Added CF_DB_CHANGE and CF_SCHEMA_CHANGE flags to simplify deny_updates_if_read_only_option() - Added sp_add_cfetch() to avoid new conflicts in sql_yacc.yy - Moved code for add_table_options() out from sql_show.cc::show_create_table() - Added String::append_longlong() and used it in sql_show.cc to simplify code. - Added extra option to dd_frm_type() and ha_table_exists to indicate if the table is a sequence. Needed by DROP SQUENCE to not drop a table.
* | MDEV-10585 EXECUTE IMMEDIATE statementAlexander Barkov2016-10-081-0/+1
| |
* | [MDEV-7978] Updated syntax for SHOW CREATE USERVicențiu Ciorbaru2016-03-081-0/+1
| |
* | [MDEV-7978] Update grammar for new syntaxVicențiu Ciorbaru2016-03-081-0/+1
|/ | | | | Extend the syntax accepted by the grammar to account for the new create user and alter user syntax.
* small cleanupSergei Golubchik2015-06-271-1/+1
| | | | | | * keep all com_xxx constants together in struct system_status_var * fix an outdated comment in sql_cmd.h * fix an off-by-one bug in mysqld.cc
* SHOW and FLUSH for I_S tables.Sergei Golubchik2014-10-111-4/+2
| | | | | | | | | | Extend existing plugins to support * SHOW QUERY_RESPONSE_TIME * FLUSH QUERY_RESPONSE_TIME * SHOW LOCALE move userstat tables to use the new API instead of hand-coded syntax
* MDEV-5317 Compound statement / anonymous blocksSergei Golubchik2014-10-101-0/+1
| | | | originally based on the patch by Antony T Curtis
* 10.0-base merge (roles)Sergei Golubchik2013-10-291-0/+1
|
* 10.0-monty mergeSergei Golubchik2013-07-211-0/+1
|\ | | | | | | | | | | | | | | includes: * remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING" * introduce LOCK_share, now LOCK_ha_data is strictly for engines * rea_create_table() always creates .par file (even in "frm-only" mode) * fix a 5.6 bug, temp file leak on dummy ALTER TABLE
| * Applied all changes from Igor and SanjaMichael Widenius2013-06-151-0/+1
| |
* | 10.0-base mergeSergei Golubchik2013-07-181-1/+1
|/
* 10.0-base -> 10.0-montySergei Golubchik2012-10-191-0/+2
|
* Next part of merge. See TODO for detailsMichael Widenius2012-08-141-0/+161