summaryrefslogtreecommitdiff
path: root/mysql-test/suite/funcs_1
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-11952 Oracle-style packages: stage#5mariadb-10.3.5bb-10.3-compatibilityAlexander Barkov2018-02-256-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-1516-42/+618
|\
| * Added Max_index_length and Temporary to SHOW TABLE STATUSMonty2018-02-1216-42/+612
| | | | | | | | | | | | | | | | | | - Max_index_length is supported by MyISAM and Aria tables. - Temporary is a placeholder to signal that a table is a temporary table. For the moment this is always "N", except "Y" for generated information_schema tables and NULL for views. Full temporary table support will be done in another task. (No reason to have to update a lot of result files twice in a row)
| * Post-merge fix: Adjust message codes in resultsMarko Mäkelä2017-12-123-9/+9
| |
* | rename mysql.user and mysql.db columnSergei Golubchik2018-02-123-41/+41
| | | | | | | | | | | | Truncate_versioning_priv->Delete_history_priv because the command and the privilege were renamed
* | MDEV-13417 UPDATE produces wrong values if an updated column is later used ↵Jerome Brauge2018-02-122-8/+8
| | | | | | | | | | | | | | | | as an update source Standard compatible behavior for UPDATE: all assignments in SET are executed "simultaneously", not left-to-right. And `SET a=b,b=a` will swap the values.
* | Tests: full test results [#387]Aleksey Midenkov2017-12-213-7/+0
| |
* | Scripts: VTMD_TEMPLATE removed [#286]Aleksey Midenkov2017-12-1710-91/+0
| |
* | System Versioning 1.0 pre4Eugene Kosov2017-12-143-9/+9
|\ \ | | | | | | | | | Merge branch '10.3' into trunk
| * \ Merge bb-10.2-ext into 10.3Marko Mäkelä2017-12-123-9/+9
| |\ \ | | |/
| | * Fix failing mtr testsMonty2017-12-081-3/+3
| | | | | | | | | | | | | | | - Changed rocksdb.2pcgroup_commit.test to print information on error - Updated myisam_views-big.result
* | | Tests: regenerate funcs_1.is_columns_mysql_embedded [#387]Eugene Kosov2017-12-121-2/+2
| | |
* | | System Versioning 1.0 pre3Aleksey Midenkov2017-12-116-37/+41
|\ \ \ | |/ / | | | | | | Merge branch '10.3' into trunk
| * | MDEV-7773: Aggregate stored functionsVarun Gupta2017-12-043-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements aggregate stored functions. The basic idea behind the feature is: * Implement a special instruction FETCH GROUP NEXT ROW that will pause the execution of the stored function. When the instruction is reached, execution of the initial query resumes "as if" the function returned. This gives the server the opportunity to advance to the next row in the result set. * Stored aggregates behave like regular aggregate functions. The implementation of thus resides in the class Item_sum_sp. Because it is an aggregate function, for each new row in the group, the Item_sum_sp::add() method will be called. This is when execution resumes and the function does another iteration to "add" one extra element to the final result. * When the end of group is reached, val_xxx() method will be called for the item. This case is handled by another execute step for the stored function, only with a special flag to force a call to the return handler. See Item_sum_sp::execute() for details. To allow this pause and resume semantic, we must preserve the function context across executions. This is stored in Item_sp::sp_query_arena only for aggregate stored functions, but has no impact for regular functions. We also enforce aggregate functions to include the "FETCH GROUP NEXT ROW" instruction. Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
| * | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-11-304-10/+10
| |\ \ | | |/
| | * Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-11-203-7/+7
| | |\
* | | | s/Delete_versioning_rows_priv/Truncate_versioning_priv/Sergei Golubchik2017-12-083-41/+41
| | | | | | | | | | | | | | | | because the statement is TRUNCATE, not DELETE
* | | | Tests: TRT-related results [#305]Aleksey Midenkov2017-11-218-1/+47
| | | |
* | | | Tests: regenerate embedded [#302]Eugene Kosov2017-11-175-16/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys_vars.sysvars_server_embedded funcs_1.is_key_column_usage_embedded funcs_1.is_statistics_mysql_embedded funcs_1.is_table_constraints_mysql_embedded funcs_1.is_tables_mysql_embedded funcs_1.is_columns_mysql_embedded innodb.monitor
* | | | Tests: better 'near' place fixAleksey Midenkov2017-11-171-6/+5
| | | | | | | | | | | | | | | | Related to ecde299c3b7afd71f16181b6bd0bc8dda31fad5f
* | | | Tests: result updatesEugene Kosov2017-11-131-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | encryption.innodb_lotoftables encryption.innodb_encryption funcs_1.is_columns_mysql
* | | | System Versioning pre1.0Aleksey Midenkov2017-11-1328-319/+352
|\ \ \ \ | |/ / / | | | | | | | | Merge branch '10.3' into trunk
| * | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-11-108-242/+252
| |\ \ \ | | |/ /
| | * | Fixed failing test case as part of adding MAX_MEMORY_USEDMonty2017-11-091-4/+6
| | | |
| | * | Add more execution stages (commit, rollback, etc)Monty2017-11-054-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done to get more information about where time is spent. Now we can get proper timing for time spent in commit, rollback, binlog write etc. Following stages was added: - Commit - Commit_implicit - Rollback - Rollback implicit - Binlog write - Init for update - This is used instead of "Init" for insert, update and delete. - Staring cleanup Following stages where changed: - "Unlocking tables" stage reset stage to previous stage at end - "binlog write" stage resets stage to previous stage at end - "end" -> "end of update loop" - "cleaning up" -> "Reset for next command" - Added stage_searching_rows_for_update when searching for rows to be deleted. Other things: - Renamed all stages to start with big letter (before there was no consitency) - Increased performance_schema_max_stage_classes from 150 to 160. - Most of the test changes in performance schema comes from renaming of stages. - Removed duplicate output of variables and inital state in a lot of performance schema tests. This was done to make it easier to change a default value for a performance variable without affecting all tests. - Added start_server_variables.test to check configuration - Removed some duplicate "closing tables" stages - Updated position for "stage_init_update" and "stage_updating" for delete, insert and update to be just before update loop (for more exact timing). - Don't set "Checking permissions" twice in a row. - Remove stage_end stage from creating views (not done for create table either). - Updated default performance history size from 10 to 20 because of new stages - Ensure that ps_enabled is correct (to be used in a later patch)
| | * | Reducing memory when using information schemaMonty2017-11-027-204/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The background is that one user had a lot of views and using some complex queries on information schema temporary memory of more than 2G was used. - Added new element 'total_alloc' to MEM_ROOT for easier debugging. - Added MAX_MEMORY_USED to information_schema.processlist. - Added new status variable "Memory_used_initial" that shows how much MariaDB uses at startup. This gives the base value for "Memory_used". - Reuse memory continuously for information schema queries instead of only freeing memory at query end. Other things - Removed some not needed set_notnull() calls for not null columns.
| * | | Post-merge fixes for mdev-12172, mdev-12176.Igor Babaev2017-11-031-6/+7
| | | |
| * | | (Part#2) MDEV-13049 Querying INFORMATION_SCHEMA becomes slow in MariaDB 10.1Alexander Barkov2017-10-3119-71/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a 10.3 specific part of MDEV-13049. It disables automatic sorting for "SELECT .. FROM INFORMATION_SCHEMA.{SCHEMATA|TABLES}" and adjusts the affected tests accordingly.
* | | | System Versioning pre0.12Aleksey Midenkov2017-11-0723-61/+131
|\ \ \ \ | |/ / / |/| | | | | | | Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3
| * | | SQL: truncate syntax and privilege [closes #229]Eugene Kosov2017-09-0813-59/+104
| | | |
| * | | Tests: results update in sys_vars, funcs_1 suitesEugene Kosov2017-09-062-3/+4
| | | |
| * | | Scripts: VTMD table [closes #122]kevg2017-05-248-0/+39
| | | |
| * | | 0.1: SQL-level System VersioningDaniel Fiala2017-05-054-18/+17
| | | |
* | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-10-302-8/+8
|\ \ \ \ | | |/ / | |/| | | | | | TODO: enable MDEV-13049 optimization for 10.3
| * | | MDEV-14013 : sql_mode=EMPTY_STRING_IS_NULLhalfspawn2017-10-142-8/+8
| | | |
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-213-9/+9
|\ \ \ \ | |/ / /
| * | | After-merge fix: Adjust one more resultMarko Mäkelä2017-09-211-3/+3
| | | |
| * | | After-merge fix: Adjust some results.Marko Mäkelä2017-09-212-6/+6
| | | |
* | | | after merge: remove innodb_file_format from merged testsSergei Golubchik2017-08-261-3/+3
| | | |
* | | | Merge branch 'bb-10.2-ext' into 10.3Sergei Golubchik2017-08-2632-385/+509
|\ \ \ \ | |/ / /
| * | | update test results after 988a9daa945cSergei Golubchik2017-08-251-3/+3
| | | |
| * | | Merge branch '10.2' into bb-10.2-extSergei Golubchik2017-08-2532-385/+509
| |\ \ \ | | | |/ | | |/|
| | * | un-disable a bunch of funcs_1 testsSergei Golubchik2017-08-1430-355/+505
| | | |
| | * | MDEV-11114 Cannot drop column referenced by CHECK constraintSergei Golubchik2017-08-144-30/+4
| | | | | | | | | | | | | | | | | | | | | | | | SQL Standard behavior for DROP COLUMN xxx RESTRICT: * If a constraint (UNIQUE or CHECK) uses only the dropped column, it's automatically dropped too. If it uses many columns - an error.
* | | | Affected rows for a SP now includes affected rows for all statementsMichael Widenius2017-08-243-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old behavior of returning the affected rows for the last statement in a stored procedure was more an accident than design. Having the number of affected rows for all sub statements is more useful and will not change just because on changes the order of statements in the stored procedure.
* | | | MDEV-13518 funcs_1.myisam_views-big failed in buildbotElena Stepanova2017-08-141-3/+3
|/ / /
* | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-08-072-6/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mysql-test/r/func_json.result mysql-test/r/win.result mysql-test/t/func_json.test mysql-test/t/win.test sql/share/errmsg-utf8.txt storage/rocksdb/ha_rocksdb.cc storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result
* | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-07-079-789/+789
|\ \ \ | |/ /
| * | MDEV-13132 Information Schema does not show whether column default is ↵Sergei Golubchik2017-07-059-789/+789
| | | | | | | | | | | | | | | | | | | | | expression or literal Fix INFORMATION_SCHEMA.COLUMNS.COLUMN_DEFAULT to be standard-compliant, but keep SHOW COLUMNS backward-compatibly unchanged.
* | | Improved warning "xxx is not BASE TABLE/SEQUENCE"Monty2017-06-026-24/+24
| | | | | | | | | | | | | | | - Changed warning to "'%-.192s.%-.192s' is not of type '%s'" to make the english a bit more correct