1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-16 00:42:55 +03:00
Commit Graph

608 Commits

Author SHA1 Message Date
430d60d1fc MDEV-24487 Error after update to 10.5.8 on CentOS-8: DBD::mysql::st execute 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).
2022-01-27 15:54:20 +04:00
cebf9ee204 Fix various spelling errors still found in code
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
2021-03-22 18:10:39 +11:00
02e7bff882 Merge commit '10.4' into 10.5 2021-01-06 10:53:00 +01:00
478b83032b Merge branch '10.3' into 10.4 2020-12-25 09:13:28 +01:00
25561435e0 Merge branch '10.2' into 10.3 2020-12-23 19:28:02 +01:00
f6e91552f0 MDEV-4677 GROUP_CONCAT not showing any output with group_concat_max_len >= 4Gb
don't allow group_concat_max_len values >= 4Gb
(they never worked anyway)
2020-12-10 08:45:20 +01:00
1a49c5eb4d Cleanup's and more DBUG_PRINT's
- 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).
2020-06-19 12:03:13 +03:00
3dbc49f075 Merge 10.4 into 10.5 2020-06-14 10:13:53 +03:00
805340936a Merge 10.3 into 10.4 2020-06-13 19:01:28 +03:00
d83a443250 Merge 10.2 into 10.3 2020-06-13 15:11:43 +03:00
8c67ffffe8 Merge branch '10.1' into 10.2 2020-06-11 22:35:30 +03:00
59717bbce4 MDEV-5924: MariaDB could crash after changing the query_cache size
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)
2020-06-10 09:35:38 +02:00
c1c5222cae cleanup: PSI key is *always* the first argument 2020-03-10 19:24:23 +01:00
7c58e97bf6 perfschema memory related instrumentation changes 2020-03-10 19:24:22 +01:00
c11e5cdd12 Merge 10.3 into 10.4 2019-10-10 11:19:25 +03:00
5b2fa078e8 Cleanup mman.h includes
As it is included from my_global.h already.
2019-10-02 20:21:30 +04:00
716c748f97 MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSD
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
2019-10-02 20:00:05 +04:00
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
c0ac0b8860 Update FSF address 2019-05-11 19:25:02 +03:00
ae58cd6b87 Simple cleanups (no logic changes) 2018-12-09 20:49:05 +02:00
a9ca819897 Call alloc() instead of realloc()
Use alloc() if we don't need original string (avoid copy)
Removed not needed test of str_length in sql_string.cc
2018-07-13 20:14:27 +03:00
de745ecf29 MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operations 2018-07-04 19:13:55 +02:00
30ebc3ee9e Add likely/unlikely to speed up execution
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()
2018-05-07 00:07:32 +03:00
31aa277768 MDEV-10814: Don't coredump query cache
merge fix: additional_data_size is a size_t class Query_cache member.
2018-02-26 18:14:58 +11:00
0805a9565f Merge branch '10.3' into 10.2-MDEV-10814-dont-dump-query-cache 2018-02-25 15:25:54 +11:00
b006d2ead4 Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
3cad31f2a7 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-02-08 19:06:25 +04:00
4771ae4b22 Merge branch 'github/10.1' into 10.2 2018-02-06 14:50:50 +01:00
6c279ad6a7 MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from '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.
2018-02-06 12:55:58 +00:00
d4df7bc9b1 Merge branch 'github/10.0' into 10.1 2018-02-02 10:09:44 +01:00
a7e352b54d Changed database, tablename and alias to be LEX_CSTRING
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 "")
2018-01-30 21:33:55 +02:00
d833bb65d5 Merge remote-tracking branch '5.5' into 10.0 2018-01-24 12:29:31 +02:00
5fe1d7d076 MDEV-14526: MariaDB keeps crashing under load when query_cache_type is changed
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
2018-01-14 10:49:56 +01:00
145ae15a33 Merge bb-10.2-ext into 10.3 2018-01-04 09:22:59 +02:00
3fcbeb4a63 Merge 10.2 into bb-10.2-ext 2018-01-03 22:42:27 +02:00
fcde91114d Merge 10.1 into 10.2 2018-01-03 20:42:09 +02:00
1e89c86dd7 Merge 10.0 into 10.1 2018-01-03 20:41:34 +02:00
8ac1982fcc Merge 5.5 into 10.0 2018-01-03 20:40:41 +02:00
84c9c8b2e9 Silence some -Wimplicit-fallthrough by proper spelling 2018-01-03 15:01:17 +02:00
3188131b15 MDEV-10814: Coredumps to exclude query cache (Linux)
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>
2017-11-21 14:35:47 +11:00
835cbbcc7b Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
TODO: enable MDEV-13049 optimization for 10.3
2017-10-30 20:47:39 +04:00
30e7d6709f Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-18 14:11:55 +04:00
dc93ce8dea Windows : Fix truncation warnings in sql/ 2017-10-10 06:19:50 +00:00
2c1067166d Merge bb-10.2-ext into 10.3 2017-10-04 08:24:06 +03:00
8ae8cd6348 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-02 22:35:13 +04:00
8e8a7f85a9 Fix DBUG_PRINT formatting in query cache.
some ulonglong variables were printed as %lu
2017-09-29 17:26:55 +00:00
eba44874ca MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- 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.
2017-09-28 17:20:46 +00:00
cf3a74eb60 Counting hits for queries in query cache.
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.
2017-08-31 13:50:25 +04:00