summaryrefslogtreecommitdiff
path: root/sql/sql_cache.h
Commit message (Collapse)AuthorAgeFilesLines
* Query cache: removed unused THD from few functionsDaniel Black2022-11-261-3/+2
| | | | | A few query cache functions don't use THD pointer so its removed from their interface.
* MDEV-24487 Error after update to 10.5.8 on CentOS-8: DBD::mysql::st execute ↵Alexander Barkov2022-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | failed: Unknown MySQL error The problem happened because the the new client capability flag CLIENT_EXTENDED_METADATA was not put into the cache entry key. So results cached by a new client were sent to the old client (and vica versa) with a mis-matching metadata, which made the client abort the connection on an unexpected result set metadata packet format. The problem was caused by the patch for: MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY which forgot to adjust the query cache code. Fix: - Adding a new member Query_cache_query_flags::client_extended_metadata, so only clients with equal CLIENT_EXTENDED_METADATA flag values can reuse results. - Adding a new column CLIENT_EXTENDED_METADATA into INFORMATION_SCHEMA.QUERY_CACHE_INFO (privided by the qc_info plugin).
* Merge commit '10.4' into 10.5Oleksandr Byelkin2021-01-061-1/+1
|\
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-12-231-1/+1
| |\
| | * MDEV-4677 GROUP_CONCAT not showing any output with group_concat_max_len >= 4GbSergei Golubchik2020-12-101-1/+1
| | | | | | | | | | | | | | | don't allow group_concat_max_len values >= 4Gb (they never worked anyway)
* | | MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashesVladislav Vaintroub2020-04-101-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop linking plugins to the server executable on Windows. Instead, extract whole server functionality into a large DLL, called server.dll. Link both plugins, and small server "stub" exe to it. This eliminates plugin dependency on the name of the server executable. It also reduces the size of the packages (since tiny mysqld.exe and mariadbd.exe are now both linked to one big DLL) Also, simplify the functionality of exporing all symbols from selected static libraries. Rely on WINDOWS_EXPORT_ALL_SYMBOLS, rather than old self-backed solution. fix compile error replace GetProcAddress(GetModuleHandle(NULL), "variable_name") for server exported data with actual variable names. Runtime loading was never required,was error prone , since symbols could be missing at runtime, and now it actually failed, because we do not export symbols from executable anymore, but from a shared library This did require a MYSQL_PLUGIN_IMPORT decoration for the plugin, but made the code more straightforward, and avoids missing symbols at runtime (as mentioned before). The audit plugin is still doing some dynamic loading, as it aims to work cross-version. Now it won't work cross-version on Windows, as it already uses some symbols that are *not* dynamically loaded, e.g fn_format and those symbols now exported from server.dll , when earlier they were exported by mysqld.exe Windows, fixes for storage engine plugin loading after various rebranding stuff Create server.dll containing functionality of the whole server make mariadbd.exe/mysqld.exe a stub that is only calling mysqld_main() fix build
* | 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
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | 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-49/+49
|\ \ \ \
| * | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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.
* | | | | MDEV-10814: Coredumps to exclude query cache (Linux)Daniel Black2017-11-211-0/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Fix a truncations warningVladislav Vaintroub2017-10-041-1/+1
| | | |
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-041-2/+2
|\ \ \ \
| * \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-021-2/+2
| |\ \ \ \ | | |/ / /
| | * | | fix some conversion warningsVladislav Vaintroub2017-09-281-2/+2
| | | | |
* | | | | Counting hits for queries in query cache.Peter Shchuchkin2017-08-311-0/+3
|/ / / / | | | | | | | | | | | | | | | | 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 remote-tracking branch 'origin/10.2' into bb-10.2-extAlexey Botchkov2017-08-111-0/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sql/item_cmpfunc.cc storage/innobase/buf/buf0flu.cc storage/innobase/include/ut0stage.h storage/innobase/row/row0upd.cc
| * | | MDEV-13300 Query cache doesn't take in account CLIENT_DEPRECATE_EOF capabilityOleksandr Byelkin2017-08-091-0/+1
| | | | | | | | | | | | | | | | take into account new capabilty flag which has influence on result format.
* | | | Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-231-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits of this patch: - Removed a lot of calls to strlen(), especially for field_string - Strings generated by parser are now const strings, less chance of accidently changing a string - Removed a lot of calls with LEX_STRING as parameter (changed to pointer) - More uniform code - Item::name_length was not kept up to date. Now fixed - Several bugs found and fixed (Access to null pointers, access of freed memory, wrong arguments to printf like functions) - Removed a lot of casts from (const char*) to (char*) Changes: - This caused some ABI changes - lex_string_set now uses LEX_CSTRING - Some fucntions are now taking const char* instead of char* - Create_field::change and after changed to LEX_CSTRING - handler::connect_string, comment and engine_name() changed to LEX_CSTRING - Checked printf() related calls to find bugs. Found and fixed several errors in old code. - A lot of changes from LEX_STRING to LEX_CSTRING, especially related to parsing and events. - Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING* - Some changes for char* to const char* - Added printf argument checking for my_snprintf() - Introduced null_clex_str, star_clex_string, temp_lex_str to simplify code - Added item_empty_name and item_used_name to be able to distingush between items that was given an empty name and items that was not given a name This is used in sql_yacc.yy to know when to give an item a name. - select table_name."*' is not anymore same as table_name.* - removed not used function Item::rename() - Added comparision of item->name_length before some calls to my_strcasecmp() to speed up comparison - Moved Item_sp_variable::make_field() from item.h to item.cc - Some minimal code changes to avoid copying to const char * - Fixed wrong error message in wsrep_mysql_parse() - Fixed wrong code in find_field_in_natural_join() where real_item() was set when it shouldn't - ER_ERROR_ON_RENAME was used with extra arguments. - Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already give the error. TODO: - Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c - Change code to not modify LEX_CSTRING for database name (as part of lower_case_table_names)
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-291-1/+8
|\ \ \ | |/ /
| * | MDEV-10777: Server crashed due to query_cache_info pluginOleksandr Byelkin2016-09-271-1/+8
| | | | | | | | | | | | Possible fix. Make the pluging more safe.
* | | Use sql_mode_t for sql_mode.Monty2016-10-051-1/+1
|/ / | | | | | | This fixed several cases where we where using just ulong for sql_mode
* | MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-09-011-5/+5
| | | | | | | | | | Part 5: Removing calls to current_thd in net_read calls, creating fields, query_cache, acl and some other places where thd was available
* | MDEV-4786 merge 10.0-monty -> 10.0Sergei Golubchik2013-08-121-1/+1
| | | | | | | | use get_table_def_key() instead of create_table_def_key() where appropriate
* | 10.0-monty mergeSergei Golubchik2013-07-211-1/+5
|\ \ | |/ |/| | | | | | | | | | | 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
| * Fixed issues with partitions and create temporary table SELECT ...Michael Widenius2013-07-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged all ddl_logging code. Merged sql_partition.cc innodb_mysql_lock2.test and partition_cache.test now works. Changed interface to strconvert() to make it easier to use with not \0 terminated strings. sql/sql_partition.cc: Full merge with 5.6 sql/sql_table.cc: Merged all ddl_logging code sql/strfunc.cc: Added from_length argument to strconvert() to make it possible to use without end terminated strings. sql/strfunc.h: Added from_length argument to strconvert() to make it possible to use without end terminated strings.
* | MDEV-249 QUERY CACHE INFORMATIONSergei Golubchik2013-03-201-6/+6
|/
* fixed MySQL bug#53775:unknown2012-07-131-12/+19
| | | | | | | | Now partition engine adds underlying tables to the QC and ask underlying tables engine permittion to cache the query and return result of the query. Incorrect QC cleanup in case of table registration failure fixe. Unified interface for myisammrg & partitioned engnes for QC.
* Dependency of tests from ulong size removed.unknown2012-04-191-1/+1
|
* 5.3.4 mergeSergei Golubchik2012-02-151-2/+2
|\
| * Fixed typos in Query Cache.unknown2012-02-031-2/+2
| |
* | 5.3 mergeSergei Golubchik2012-01-131-0/+1
|\ \ | |/
| * Merge with 5.2.Michael Widenius2011-12-111-2/+5
| |\ | | | | | | | | | no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
| | * Merge with MariaDB 5.1Michael Widenius2011-11-241-2/+5
| | |\
* | | \ mergeSergei Golubchik2011-11-031-1/+1
|\ \ \ \
| * | | | compilation warnings on WindowsSergei Golubchik2011-11-021-1/+1
| | | | |
* | | | | mysql-5.5.18 mergeSergei Golubchik2011-11-031-2/+2
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Updated/added copyright headersKent Boortz2011-06-301-2/+5
| | |\ \ \
| | | * | | Bug#30087 Set query_cache_size, if the value is too small, get a unclear warningMarc Alff2008-07-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverting the previous patch
* | | | | | merge with 5.3Sergei Golubchik2011-10-191-27/+31
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * | | | | Fixed compile failure when we don't use system zlibMichael Widenius2011-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed crash when setting query_cache_type to 0. client/Makefile.am: Added zlib include (needed by checksum.c) sql/set_var.cc: Updated call to disable_query_cache() sql/sql_cache.cc: Don't give warning if we start mysqld with --query_cache_type=0 --query_cache-size=0 Fixed crash when setting query_cache_type to 0 (we shouldn't call query_cache.disable_query_cache() when there is no current_thd) sql/sql_cache.h: Added THD to disable_query_cache()
| * | | | | Rewritten patch of percona - switching query cache on and off, removing ↵unknown2011-05-181-10/+21
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comments. client/mysqltest.cc: Column names. mysql-test/r/grant_cache_no_prot.result: fix of text. mysql-test/r/grant_cache_ps_prot.result: Fix of test. mysql-test/r/query_cache.result: Switching on and off query cache. mysql-test/t/query_cache.test: Switching on and off query cache. mysys/charset.c: Fix of parser. sql/handler.cc: thd added to parameters. sql/log_event.cc: thd added to parameters. sql/log_event_old.cc: thd added to parameters. sql/mysql_priv.h: Fixed functions definitions. sql/mysqld.cc: Comments stripping. sql/set_var.cc: Switching on and off query cache. sql/set_var.h: Switching on and off query cache. sql/share/errmsg.txt: New errors. sql/sql_cache.cc: Switching query cache on and off, removing comments. sql/sql_cache.h: thd added to parameters. sql/sql_class.h: Comments stripping. sql/sql_db.cc: thd added to parameters. sql/sql_lex.cc: lex fixed. sql/sql_parse.cc: thd added to parameters.
* | | | | merge.Sergei Golubchik2010-11-251-3/+3
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | | | | | checkpoint. does not compile.
| * | | Change some my_bool in C++ classes and a few functions to bool to detect ↵Michael Widenius2010-09-241-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrong usage of bool/my_bool. Fix some bugs where we stored values other than 0 or 1 in my_bool Fixed some compiler warnings client/mysql.cc: Changed interrupted_query from my_bool to int, as we stored 2 in it. client/mysqladmin.cc: Changed return variable type to same type as function value type client/mysqltest.cc: Changed 'found' to int as we store other values than 0 or 1 into it Changed type for parameter of set_reconnect() to match usage. extra/libevent/evbuffer.c: Added __attribute__((unused)) extra/libevent/event.c: Added __attribute__((unused)) extra/libevent/signal.c: Added __attribute__((unused)) sql/event_data_objects.h: my_bool -> bool sql/event_db_repository.cc: my_bool -> bool sql/event_db_repository.h: my_bool -> bool sql/event_parse_data.h: my_bool -> bool sql/events.cc: my_bool -> bool sql/events.h: my_bool -> bool sql/field.cc: my_bool -> bool sql/field.h: my_bool -> bool sql/hash_filo.h: my_bool -> bool sql/item.cc: my_bool -> bool sql/item.h: my_bool -> bool sql/item_cmpfunc.h: my_bool -> bool Changed result_for_null_param from my_bool to int as we stored -1 in it. sql/item_func.cc: my_bool -> bool Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s) sql/item_func.h: my_bool -> bool sql/item_subselect.h: my_bool -> bool sql/item_sum.cc: Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s) sql/parse_file.h: my_bool -> bool sql/rpl_mi.h: my_bool -> bool sql/sp_rcontext.h: my_bool -> bool sql/sql_analyse.h: my_bool -> bool sql/sql_base.cc: Change some assignments so that we don't initialize bool variables with int's. sql/sql_bitmap.h: my_bool -> bool sql/sql_cache.cc: my_bool -> bool sql/sql_cache.h: my_bool -> bool sql/sql_class.h: my_bool -> bool sql/sql_insert.cc: Change some assignments so that we don't initialize bool variables with int's. sql/sql_prepare.cc: my_bool -> bool sql/table.h: my_bool -> bool storage/maria/ma_check.c: Removed duplicate assignment strings/decimal.c: Fixed wrong variable usage. Don't do complex arithmetic on bool when simple works.
* | | A post-fix patch for WL#4877/WL#5030:Alexander Nozdrin2010-04-121-1/+1
| | | | | | | | | | | | | | | Fix tons of warnings about mismatch struct and class usage.
* | | WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h