summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix various spelling errors still found in codeOtto Kekäläinen2021-03-221-6/+6
| | | | | | | | | | | | | | | Reseting -> Resetting Unknow -> Unknown capabilites -> capabilities choosen -> chosen direcory -> directory informations -> information openned -> opened refered -> referred to access -> one to access missmatch -> mismatch succesfully -> successfully dont -> don't
* Merge commit '10.4' into 10.5Oleksandr Byelkin2021-01-061-2/+2
|\
| * Merge branch '10.3' into 10.4bb-10.4-MDEV-23468Oleksandr Byelkin2020-12-251-2/+2
| |\
| | * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-12-231-2/+2
| | |\
| | | * MDEV-4677 GROUP_CONCAT not showing any output with group_concat_max_len >= 4GbSergei Golubchik2020-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | don't allow group_concat_max_len values >= 4Gb (they never worked anyway)
* | | | Cleanup's and more DBUG_PRINT'sMonty2020-06-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rewrote bool Query_compressed_log_event::write() to make it more readable (no logic changes). - Changed DBUG_PRINT of 'is_error:' to 'is_error():' to make it easier to find error: in traces. - Ensure that 'db' is never null in Query_log_event (Simplified code).
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-06-141-3/+13
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-06-131-3/+13
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-06-131-3/+13
| | |\ \ | | | |/
| | | * Merge branch '10.1' into 10.2Vicențiu Ciorbaru2020-06-111-3/+13
| | | |\
| | | | * MDEV-5924: MariaDB could crash after changing the query_cache sizeOleksandr Byelkin2020-06-101-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | The real problem was that attempt to roll back cahnes after end of memory in QC was made incorrectly and lead to using uninitialized memory. (bug has nothing to do with resize operation, it is just lack of resources erro processed incorrectly)
* | | | | cleanup: PSI key is *always* the first argumentSergei Golubchik2020-03-101-9/+7
| | | | |
* | | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-3/+3
|/ / / /
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-10-101-5/+2
|\ \ \ \ | |/ / /
| * | | Cleanup mman.h includesSergey Vojtovich2019-10-021-3/+0
| | | | | | | | | | | | | | | | As it is included from my_global.h already.
| * | | MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSDDaniel Black2019-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies to large allocations. This maps to the way Linux does it in MDEV-10814 except FreeBSD uses different constants. Adjust error string to match to implementation. Tested on FreeBSD-12.0
* | | | 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
| | |\ \ | | | |/
| | | * Update FSF addressVicențiu Ciorbaru2019-05-111-1/+1
| | | |
* | | | Simple cleanups (no logic changes)Monty2018-12-091-2/+2
| | | |
* | | | Call alloc() instead of realloc()Monty2018-07-131-2/+1
| | | | | | | | | | | | | | | | | | | | Use alloc() if we don't need original string (avoid copy) Removed not needed test of str_length in sql_string.cc
* | | | MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operationsOleksandr Byelkin2018-07-041-4/+4
|/ / /
* | | Add likely/unlikely to speed up executionMonty2018-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added to: - if (error) - Lex - sql_yacc.yy and sql_yacc_ora.yy - In header files to alloc() calls - Added thd argument to thd_net_is_killed()
* | | MDEV-10814: Don't coredump query cacheDaniel Black2018-02-261-1/+1
| | | | | | | | | | | | merge fix: additional_data_size is a size_t class Query_cache member.
* | | Merge branch '10.3' into 10.2-MDEV-10814-dont-dump-query-cacheDaniel Black2018-02-251-149/+169
|\ \ \
| * \ \ Merge bb-10.2-ext into 10.3Marko Mäkelä2018-02-151-1/+19
| |\ \ \
| | * \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2018-02-081-1/+19
| | |\ \ \ | | | |/ /
| | | * | Merge branch 'github/10.1' into 10.2Sergei Golubchik2018-02-061-1/+19
| | | |\ \ | | | | |/
| | | | * Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-1/+19
| | | | |\
| | | | | * Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2018-01-241-1/+18
| | | | | |\
| | | | | | * MDEV-14526: MariaDB keeps crashing under load when query_cache_type is changedOleksandr Byelkin2018-01-141-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was in such scenario: T1 - starts registering query and locked QC T2 - starts disabling QC and wait for UNLOCK T1 - unlock QC T2 - disable QC and destroy signals without waiting for query unlock T1 a) - not yet unlocked query in qc and crash on attempt to unlock because QC signals are destroyed b) if above was done before destruction, it execute end_of results first time at exit on after try_lock which see QC disables and return TRUE. But it do not reset query_cache_tls->first_query_block which lead to second call of end_of_result when diagnostic arena has already inappropriate status (not is_eof()). Fix is: 1) wait for all queries unlocked before destroying them by locking and unlocking 2) remove query_cache_tls->first_query_block if QC disabled
| * | | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-129/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
| * | | | | | Changed database, tablename and alias to be LEX_CSTRINGMonty2018-01-301-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
| * | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-041-1/+1
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.2 into bb-10.2-extMarko Mäkelä2018-01-031-1/+1
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.1 into 10.2Marko Mäkelä2018-01-031-1/+1
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.0 into 10.1Marko Mäkelä2018-01-031-1/+1
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge 5.5 into 10.0Marko Mäkelä2018-01-031-1/+1
| | | | | |\ \ | | | | | | |/
| | | | | | * Silence some -Wimplicit-fallthrough by proper spellingMarko Mäkelä2018-01-031-1/+1
| | | | | | |
* | | | | | | MDEV-10814: Coredumps to exclude query cache (Linux)Daniel Black2017-11-211-1/+18
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only occurs non-DEBUG builds. Its main purpose is to save space in the core dump from elements not usually useful. Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
* | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-10-301-2/+2
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | TODO: enable MDEV-13049 optimization for 10.3
| * | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-181-2/+2
| |\ \ \ \ \ | | |/ / / /
| | * | | | Windows : Fix truncation warnings in sql/Vladislav Vaintroub2017-10-101-2/+2
| | | | | |
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-041-213/+213
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-021-213/+213
| |\ \ \ \ \ | | |/ / / /
| | * | | | Fix DBUG_PRINT formatting in query cache.Vladislav Vaintroub2017-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | some ulonglong variables were printed as %lu
| | * | | | MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.Vladislav Vaintroub2017-09-281-211/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
* | | | | | Counting hits for queries in query cache.Peter Shchuchkin2017-08-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added hit_count field to Query_cache_query and methods to get and increment it. The counter is incremented when query results are read from query cache.
* | | | | | Merge branch 'bb-10.2-ext' into 10.3Sergei Golubchik2017-08-261-3/+2
|\ \ \ \ \ \ | |/ / / / /