summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
Commit message (Collapse)AuthorAgeFilesLines
* WL#2360 Performance schemaMarc Alff2010-01-061-36/+32
| | | | Part IV: sql instrumentation
* WL#4738 streamline/simplify @@variable creation processSergei Golubchik2009-12-221-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables Bug#20415 Output of mysqld --help --verbose is incomplete Bug#25430 variable not found in SELECT @@global.ft_max_word_len; Bug#32902 plugin variables don't know their names Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting! Bug#34829 No default value for variable and setting default does not raise error Bug#34834 ? Is accepted as a valid sql mode Bug#34878 Few variables have default value according to documentation but error occurs Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var. Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status Bug#40988 log_output_basic.test succeeded though syntactically false. Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails) Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled Bug#44797 plugins w/o command-line options have no disabling option in --help Bug#46314 string system variables don't support expressions Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken Bug#46586 When using the plugin interface the type "set" for options caused a crash. Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds Bug#49417 some complaints about mysqld --help --verbose output Bug#49540 DEFAULT value of binlog_format isn't the default value Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix) Bug#49644 init_connect and \0 Bug#49645 init_slave and multi-byte characters Bug#49646 mysql --show-warnings crashes when server dies
* Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-12-121-4/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - extra/comp_err.c - mysql-test/collections/default.experimental - mysql-test/r/archive.result - mysql-test/r/select.result - mysql-test/suite/binlog/r/binlog_unsafe.result - mysql-test/suite/binlog/t/binlog_unsafe.test - mysql-test/suite/rpl/t/disabled.def - mysql-test/t/archive.test - mysql-test/t/select.test - sql/item.cc - sql/item.h - sql/item_timefunc.cc - sql/sql_base.cc - sql/sql_delete.cc - sql/sql_load.cc - sql/sql_partition.cc - sql/sql_table.cc - storage/innobase/handler/ha_innodb.cc - vio/vio.c
| * Manual merge from mysql-trunk.Alexander Nozdrin2009-12-111-110/+164
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - client/mysqltest.cc - mysql-test/collections/default.experimental - mysql-test/suite/rpl/t/disabled.def - sql/mysqld.cc - sql/opt_range.cc - sql/sp.cc - sql/sql_acl.cc - sql/sql_partition.cc - sql/sql_table.cc
| * \ Manual merge from the mysql-5.1-bugteam.Alexey Kopytov2009-11-241-4/+35
| |\ \
| | * | Bug#39253 Large query cache still freezes server after fix for bug #21074Kristofer Pettersson2009-11-201-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduce a limit on the time the query cache can block with a lock on SELECTs. Other operations which causes a change in the table data will still be blocked.
* | | | Backport of:Konstantin Osipov2009-11-241-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------------------- ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0 Bug#32082 : definition of VOID in my_global.h conflicts with Windows SDK headers VOID macro is now removed. Its usage is replaced with void cast. In some cases, where cast does not make much sense (pthread_*, printf, hash_delete, my_seek), cast is ommited.
* | | | Manual merge of mysql-next-mr-runtime upstream.Davi Arnaut2009-11-191-5/+5
|\ \ \ \ | |_|_|/ |/| | |
| * | | Backport of Bug#37843 to mysql-next-mrDavi Arnaut2009-11-101-5/+5
| | | |
* | | | Auto-merge from mysql-trunk-merge.Alexander Nozdrin2009-11-061-2/+2
|\ \ \ \ | | |/ / | |/| |
| * | | Fix automerge: use 'thd->query()' instead of 'thd->query'.Alexander Nozdrin2009-11-051-2/+2
| | | |
* | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-11-051-7/+8
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | Manual merge from mysql-5.1.Alexander Nozdrin2009-11-051-7/+8
| |\ \ | | |/
| | * Bug #40877: multi statement execution fails in 5.1.30Georgi Kodinov2009-10-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented the server infrastructure for the fix: 1. Added a function LEX_STRING *thd_query_string(THD) to return a LEX_STRING structure instead of char *. This is the function that must be called in innodb instead of thd_query() 2. Did some encapsulation in THD : aggregated thd_query and thd_query_length into a LEX_STRING and made accessor and mutator methods for easy code updating. 3. Updated the server code to use the new methods where applicable.
* | | Bug#38551 query cache can still consume [very little] cpu time even when it ↵Kristofer Pettersson2009-10-291-8/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is off. When the query cache is disabled, the server shouldn't attempt to take the query cache mutex. By using the command line option --query_cache_type=0, the user can disable (backport from mysql-pe)
* | | Merge from mysql-next-mr.Alexander Nozdrin2009-10-231-1/+1
|\ \ \
| * \ \ Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-10-141-1/+1
| |\ \ \ | | |/ /
| | * | Merge from mysql-5.1.Alexander Nozdrin2009-10-131-1/+1
| | |\ \ | | | |/
| | | * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 Cleaning up warnings not present in 5.0.
* | | | Merge with next-mr-runtime.Konstantin Osipov2009-10-221-1/+1
|\ \ \ \
| * \ \ \ AutomergeKristofer Pettersson2009-10-191-97/+117
| |\ \ \ \
| * | | | | Bug#27145 EXTRA_ACL troublesKristofer Pettersson2009-10-191-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag EXTRA_ACL is used in conjugation with our access checks, yet it is not clear what impact this flag has. This is a code clean up which replaces use of EXTRA_ACL with an explicit function parameter. The patch also fixes privilege checks for: - SHOW CREATE TABLE: The new privilege requirement is any privilege on the table-level. - CHECKSUM TABLE: Requires SELECT on the table level. - SHOW CREATE VIEW: Requires SHOW_VIEW and SELECT on the table level (just as the manual claims) - SHOW INDEX: Requires any privilege on any column combination.
* | | | | Backport of revno 2630.28.10, 2630.28.31, 2630.28.26, 2630.33.1,Konstantin Osipov2009-10-221-4/+6
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2630.39.1, 2630.28.29, 2630.34.3, 2630.34.2, 2630.34.1, 2630.29.29, 2630.29.28, 2630.31.1, 2630.28.13, 2630.28.10, 2617.23.14 and some other minor revisions. This patch implements: WL#4264 "Backup: Stabilize Service Interface" -- all the server prerequisites except si_objects.{h,cc} themselves (they can be just copied over, when needed). WL#4435: Support OUT-parameters in prepared statements. (and all issues in the initial patches for these two tasks, that were discovered in pushbuild and during testing). Bug#39519: mysql_stmt_close() should flush all data associated with the statement. After execution of a prepared statement, send OUT parameters of the invoked stored procedure, if any, to the client. When using the binary protocol, send the parameters in an additional result set over the wire. When using the text protocol, assign out parameters to the user variables from the CALL(@var1, @var2, ...) specification. The following refactoring has been made: - Protocol::send_fields() was renamed to Protocol::send_result_set_metadata(); - A new Protocol::send_result_set_row() was introduced to incapsulate common functionality for sending row data. - Signature of Protocol::prepare_for_send() was changed: this operation does not need a list of items, the number of items is fully sufficient. The following backward incompatible changes have been made: - CLIENT_MULTI_RESULTS is now enabled by default in the client; - CLIENT_PS_MULTI_RESUTLS is now enabled by default in the client.
* | | | Fix a windows build failure (next-mr-runtime).Konstantin Osipov2009-10-161-4/+4
| | | |
* | | | Backport of:Konstantin Osipov2009-10-141-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------- revno: 2617.22.5 committer: Konstantin Osipov <kostja@sun.com> branch nick: mysql-6.0-runtime timestamp: Tue 2009-01-27 05:08:48 +0300 message: Remove non-prefixed use of HASH. Always use my_hash_init(), my_hash_inited(), my_hash_search(), my_hash_element(), my_hash_delete(), my_hash_free() rather than non-prefixed counterparts (hash_init(), etc). Remove the backward-compatible defines.
* | | | Introduce thd->query_cache_tls (threadKonstantin Osipov2009-10-131-71/+91
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | local storage for query cache). We need more than one pointer in a thread to represent the query cache and net->query_cache_query can not be used any more (due to ABI compatibility issues and to different life time of NET and THD). This is a backport of the following patch from 6.0: ---------------------------------------------------------- revno: 2476.1157.2 committer: kostja@bodhi.(none) timestamp: Sat 2007-06-16 13:29:24 +0400
* | | WL#2110 (SIGNAL)Marc Alff2009-09-101-2/+2
|/ / | | | | | | | | | | | | WL#2265 (RESIGNAL) Manual merge of SIGNAL and RESIGNAL to mysql-trunk-signal, plus required dependencies.
* | Undoing mikael@mysql.com-20081015100345-8tu2vmh7mzs60c23Guilhem Bichot2009-08-041-49/+3
| | | | | | | | | | | | | | | | | | | | | | "Patch to fix bug 38551": it was a manual backport (2008-10-15) of http://lists.mysql.com/commits/56418. But that was an early, non-final patch from the fixer of this bug (TheK): after that backport was made by Mikael, TheK decided to do a different fix, which was finally pushed into 6.0. Then 5.1's code was changed for some other reasons, so now we have a conflict between the old never-approved TheK patch backported to Summit and the latest 5.1. The backport cannot stay, it has to be removed due to the conflict, and then rewritten if desired.
* | Creation of mysql-trunk = {summit + "Innodb plugin replacing the builtin"}:Guilhem Bichot2009-08-041-194/+234
|\ \ | |/ | | | | | | | | | | bzr branch mysql-5.1-performance-version mysql-trunk # Summit cd mysql-trunk bzr merge mysql-5.1-innodb_plugin # which is 5.1 + Innodb plugin bzr rm innobase # remove the builtin Next step: build, test fixes.
| * Bug#43758 Query cache can lock up threads in 'freeing items' stateKristofer Pettersson2009-06-161-202/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Early patch submitted for discussion. It is possible for more than one thread to enter the condition in query_cache_insert(), but the condition predicate is to signal one thread each time the cache status changes between the following states: {NO_FLUSH_IN_PROGRESS,FLUSH_IN_PROGRESS, TABLE_FLUSH_IN_PROGRESS} Consider three threads THD1, THD2, THD3 THD2: select ... => Got a writer in ::store_query THD3: select ... => Got a writer in ::store_query THD1: flush tables => qc status= FLUSH_IN_PROGRESS; new writers are blocked. THD2: select ... => Still got a writer and enters cond in query_cache_insert THD3: select ... => Still got a writer and enters cond in query_cache_insert THD1: flush tables => finished and signal status change. THD2: select ... => Wakes up and completes the insert. THD3: select ... => Happily waiting for better times. Why hurry? This patch is a refactoring of this lock system. It introduces four new methods: Query_cache::try_lock() Query_cache::lock() Query_cache::lock_and_suspend() Query_cache::unlock() This change also deprecates wait_while_table_flush_is_in_progress(). All threads are queued and put on a conditional wait. On each unlock the queue is signalled. This resolve the issues with left over threads. To assure that no threads are spending unnecessary time waiting a signal broadcast is issued every time a lock is taken before a full cache flush.
* | Merge MySQL 5.1.35 into MySQL 5.4Mikael Ronstrom2009-06-111-2/+52
|\ \ | |/
| * fixed compilation warnings. addendum to the fix for bug 29125Georgi Kodinov2009-03-201-2/+2
| |
| * Bug#37416 When SQL_NO_CACHE is used, MySQL still lookup into the query cacheKristofer Pettersson2009-03-051-0/+47
| | | | | | | | | | | | | | | | The query cache module did not check for the SQL_NO_CACHE keyword before attempting to query the hash lookup table. This had a small performance impact. By introducing a check on the query string before obtaining the hash mutex we can gain some performance if the SQL_NO_CACHE directive is used often.
| * Bug#41098: Query Cache returns wrong result with concurrent insertDavi Arnaut2009-02-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that select queries executed concurrently with a concurrent insert on a MyISAM table could be cached if the select started after the query cache invalidation but before the unlock of tables performed by the concurrent insert. This race could happen because the concurrent insert was failing to prevent cache of select queries happening at the same time. The solution is to add a 'uncacheable' status flag to signal that a concurrent insert is being performed on the table and that queries executing at the same time shouldn't cache the results.
* | Merged Performance Version 0.2.1 with latest 5.1 tree (last push 11 feb ↵Mikael Ronstrom2009-02-171-5/+17
|\ \ | |/ | | | | 14.01.13 2009)
| * Merge test case of Bug#40264 to mysql-5.1-bugteamDavi Arnaut2009-01-221-0/+3
| |\
| | * Bug#40264: Aborted cached query causes query to hang indefinitely on next ↵Davi Arnaut2009-01-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cache hit The problem is that the query cache was storing partial results if the statement failed when sending the results to the client. This could cause clients to hang when trying to read the results from the cache as they would, for example, wait indefinitely for a eof packet that wasn't saved. The solution is to always discard the caching of a query that failed to send its results to the associated client.
| * | Merge from 5.0-bugteamDavi Arnaut2009-01-151-4/+13
| |\ \ | | |/
| | * Bug#36326: nested transaction and selectDavi Arnaut2009-01-131-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the query cache stores packets containing the server status of the time when the cached statement was run. This might lead to a wrong transaction status in the client side if a statement is cached during a transaction and is later served outside a transaction context (and vice-versa). The solution is to take into account the transaction status when storing in and serving from the query cache.
| | * Cherry-pick Bug#33362 from mysql-5.1Davi Arnaut2008-07-241-1/+1
| | |
| | * Bug#30087 Set query_cache_size, if the value is too small, get a unclear warningMarc Alff2008-07-161-29/+0
| | | | | | | | | | | | Reverting the previous patch
| | * Bug#30087 Set query_cache_size, if the value is too small, get a unclear warningKristofer Pettersson2008-06-191-0/+29
| | | | | | | | | | | | | | | | | | This bugs clarifies a warning message issued when the query cache data size becomes smaller than the minium allowed size.
| | * Bug#26243 mysql command line crash after control-ciggy@amd64.(none)2008-03-281-3/+3
| | | | | | | | | | | | | | | - Backported the 5.1 DBUG to 5.0. - Avoid memory cleanup race on Windows client for CTRL-C
| * | Added "Sun Microsystems, Inc." to copyright headers on files modifiedBuild Team2008-11-101-1/+1
| | | | | | | | | | | | since Oct 1st
* | | Merge dtrace patch with latest performance versionMikael Ronstrom2008-12-201-2/+1
|\ \ \
| * \ \ Merge latest 5.1 into performance versionMikael Ronstrom2008-12-151-2/+1
| |\ \ \ | | |/ /
| | * | Bug#34306: Can't make copy of log tables when server binary log is enabledDavi Arnaut2008-09-301-2/+1
| | | | | | | | | | | | Post-merge bug fix: lock_type is a enumeration type and not a bit mask.
* | | | Backport of DTrace patches from 6.0Mikael Ronstrom2008-12-201-0/+3
|/ / /
* | | Fixed compiler warningMikael Ronstrom2008-10-171-1/+2
| | |
* | | Patch to fix bug#38551Mikael Ronstrom2008-10-151-11/+28
|/ /