Browse Source
Updated documentation files to reflect MariaDB and not the Maria storage engine or MySQL
Updated documentation files to reflect MariaDB and not the Maria storage engine or MySQL
Added (rewritten) patch from Percona to get extended statistics in slow.log: - Added handling of 'set' variables to set_var.cc. Changed sql_mode to use this - Added extra logging to slow log of 'Thread_id, Schema, Query Cache hit, Rows sent and Rows examined' - Added optional logging to slow log, through log_slow_verbosity, of query plan statistics - Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter - Added log-slow-file as synonym for 'slow-log-file', as most slow-log variables starts with 'log-slow' - Added log-slow-time as synonym for long-query-time Some trivial MyISAM optimizations: - In prepare for drop, flush key blocks - Don't call mi_lock_database if my_disable_locking is used KNOWN_BUGS.txt: Updated file to reflect MariaDB and not the Maria storage engine README: Updated file to reflect MariaDB mysql-test/r/log_slow.result: Test new options for slow query log mysql-test/r/variables.result: Updated result (old version cut of things at 79 characters) mysql-test/t/log_slow.test: Test new options for slow query log sql/Makefile.am: Added log_slow.h sql/event_data_objects.cc: Removed not needed test for enable_slow_log (is done when the flag is tested elsewhere) sql/events.cc: Use the general make_set() function instead of 'symbolic_mode_representation' sql/filesort.cc: Added status for used query plans sql/log.cc: Reset counters if no query_length (from Percona's patch; Not sure if needed, but can do no harm) Added extra logging to slow log of 'Thread_id, Schema, Query Cache hit, Rows sent and Rows examined' Added optional logging to slow log, through log_slow_verbosity, of query plan statistics Fixed wrong test of error condition sql/log_slow.h: Defines and variables for log_slow_verbosity and log_slow_filter sql/mysql_priv.h: Include log_slow.h sql/mysqld.cc: Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter Added log-slow-file as synonym for 'slow-log-file', as most slow-log variables starts with 'log-slow' Added log-slow-time as synonym for long-query-time Added note that one should use log-slow-filter instead of log-slow-admin-statements Updated comment from 'slow_query_log_file' sql/set_var.cc: Added long_slow_time as synonym for long_query_time Added new user variables log_slow_rate_limit, log_slow_verbosity, log_slow_filter dded handling of 'set' variables to set_var.cc. Changed sql_mode to use this sql/set_var.h: - Added handling of 'set' variables. Changed sql_mode to use this sql/slave.cc: Use global filter also for slaves sql/sp_head.cc: Simplify saving of general_slow_log state Use the general make_set() function instead of 'symbolic_mode_representation' sql/sql_cache.cc: Added status for used query plans sql/sql_class.cc: Remember/restore query_plan_flags over complex statements sql/sql_class.h: Added variables to handle extended slow log statistics sql/sql_parse.cc: Added status for used query plans Added test for filtering slow_query_log sql/sql_select.cc: Added status for used query plans sql/sql_show.cc: Use the general make_set() function instead of 'symbolic_mode_representation' sql/strfunc.cc: Report first error (not last) if something is wrong in a set Removed compiler warning storage/myisam/mi_extra.c: In prepare for drop, flush key blocks (speed optimization) storage/myisam/mi_locking.c: Don't call mi_lock_database if my_disable_locking is used (speed optimization)pull/843/head
26 changed files with 546 additions and 204 deletions
-
89KNOWN_BUGS.txt
-
41README
-
60mysql-test/r/log_slow.result
-
2mysql-test/r/variables.result
-
42mysql-test/t/log_slow.test
-
2sql/Makefile.am
-
3sql/event_data_objects.cc
-
3sql/events.cc
-
3sql/filesort.cc
-
41sql/log.cc
-
107sql/log_slow.h
-
1sql/mysql_priv.h
-
58sql/mysqld.cc
-
164sql/set_var.cc
-
36sql/set_var.h
-
1sql/slave.cc
-
12sql/sp_head.cc
-
5sql/sql_cache.cc
-
2sql/sql_class.cc
-
7sql/sql_class.h
-
25sql/sql_parse.cc
-
8sql/sql_select.cc
-
10sql/sql_show.cc
-
17sql/strfunc.cc
-
7storage/myisam/mi_extra.c
-
4storage/myisam/mi_locking.c
@ -1,86 +1,35 @@ |
|||
This file should contain all know fatal bugs in the Maria storage |
|||
engine for the last source or binary release. Minor bugs, extensions |
|||
and feature request and bugs found since this release can be find in the |
|||
MySQL bugs databases at: http://bugs.mysql.com/ (category "Maria |
|||
storage engine"). |
|||
This file should contain all know fatal bugs in the Mariadb and the |
|||
Maria storage engine for the last source or binary release. Minor |
|||
bugs, extensions and feature request and bugs found since this release |
|||
can be find in the MariaDB bugs database at: |
|||
https://bugs.launchpad.net/maria and in the MySQL bugs databases at: |
|||
http://bugs.mysql.com/ (category "Maria storage engine"). |
|||
|
|||
There shouldn't normally be any bugs that affects normal operations in |
|||
any Maria release. Still, there are always exceptions and edge cases |
|||
any MariaDB release. Still, there are always exceptions and edge cases |
|||
and that's what this file is for. |
|||
|
|||
For the first few Alpha releases of Maria there may be some edge cases |
|||
that crashes during recovery; We don't like that but we think it's |
|||
better to get the Maria alpha out early to get things tested and get |
|||
more developers on the code early than wait until these are fixed. We |
|||
do however think that the bugs are not seriously enough to stop anyone |
|||
from starting to test and even use Maria for real (as long as they are |
|||
prepared to upgrade to next MySQL-Maria release ASAP). |
|||
|
|||
If you have found a bug that is not listed here, please add it to |
|||
http://bugs.mysql.com/ so that we can either fix it for next release |
|||
or in the worst case add it here for others to know! |
|||
http://bugs.launchpad.net/maria so that we can either fix it for next |
|||
release or in the worst case add it here for others to know! |
|||
|
|||
IMPORTANT: |
|||
|
|||
If you have been using a MySQL-5.1-Maria-alpha build and upgrading to |
|||
MySQL-5.1-Maria-beta you MUST run maria_chk --recover on all your |
|||
Maria tables. This is because we made an incompatible change of how |
|||
transaction id is stored and old transaction id's must be reset! |
|||
If you have been using the Maria storage engine with |
|||
MySQL-5.1-Maria-alpha build and upgrading to a newer MariaDB you MUST |
|||
run maria_chk --recover on all your Maria tables. This is because we |
|||
made an incompatible change of how transaction id is stored and old |
|||
transaction id's must be reset! |
|||
|
|||
cd mysql-data-directory |
|||
maria_chk --recover */*.MAI |
|||
|
|||
As the Maria-1.5 engine is now in beta we will do our best to not |
|||
As the Maria storage engine is now in beta we will do our best to not |
|||
introduce any incompatible changes in the data format for the Maria |
|||
tables; If this would be ever be needed, we will, if possible, support |
|||
both the old and the new version to make upgrades as easy as possible. |
|||
|
|||
Known bugs that we are working on and will be fixed shortly |
|||
=========================================================== |
|||
|
|||
- We have some time ago some instabilities in log writing that is was |
|||
under investigation but we haven't been able to repeat in a while. |
|||
This causes mainly assert to triggers in the code and sometimes |
|||
the log handler doesn't start up after restart. |
|||
Most of this should now be fixed. |
|||
|
|||
- INSERT on a duplicate key against a key inserted by another connection |
|||
that has not yet ended will give a duplicate key error instead of |
|||
waiting for the other statement to end. |
|||
|
|||
|
|||
Known bugs that are planned to be fixed before Gamma/RC |
|||
======================================================= |
|||
|
|||
- If we get a write failure on disk (disk full or disk error) for the |
|||
log, we should stop all usage of transactional tables and mark all |
|||
transactional tables that are changed as crashed. |
|||
For the moment, if this happens, you have to take down mysqld, |
|||
remove all logs, restart mysqld and repair your tables. |
|||
|
|||
If you get the related error: |
|||
"Disk is full writing '/usr/local/mysql/var/maria_log.????????' (Errcode: 28) |
|||
Waiting for someone to free space..." |
|||
you should either free disk space, in which Maria will continue as before |
|||
or kill mysqld, remove logs and repair tables. |
|||
|
|||
|
|||
Known bugs that are planned to be fixed later |
|||
============================================= |
|||
|
|||
LOCK TABLES .. WRITE CONCURRENT is mainly done for testing MVCC. Don't |
|||
use this in production. |
|||
|
|||
Missing features that is planned to fix before Beta |
|||
=================================================== |
|||
|
|||
None |
|||
|
|||
Features planned for future releases |
|||
==================================== |
|||
|
|||
Most notable is full transaction support and multiple reader/writers |
|||
in Maria 2.0 |
|||
|
|||
http://forge.mysql.com/worklog/ |
|||
(you can enter "maria" in the "quick search" field there). |
|||
Note that for the MariaDB 5.1 release the Maria storage engine is |
|||
classified as 'beta'; It should work, but use it with caution. Please |
|||
report all bugs to https://bugs.launchpad.net/maria so that we can fix |
|||
them! |
|||
@ -1,35 +1,44 @@ |
|||
This is a release of MySQL, a dual-license SQL database server. |
|||
MySQL is brought to you by the MySQL team at MySQL AB. |
|||
This is a release of MariaDB, a branch of MySQL. |
|||
|
|||
MariaDB is a drop-in replacement of MySQL, with more features, less |
|||
bugs and better performance. |
|||
|
|||
MariaDB is brought to you by many of the original developers of MySQL, |
|||
that now work for Monty Program Ab, and by many people in the |
|||
community. |
|||
|
|||
MySQL, which is the base of MariaDB, is brought to you by Sun. |
|||
|
|||
License information can be found in these files: |
|||
- For GPL (free) distributions, see the COPYING file and |
|||
the EXCEPTIONS-CLIENT file. |
|||
- For commercial distributions, see the LICENSE.mysql file. |
|||
|
|||
A description of the MariaDB project can be found at: |
|||
http://askmonty.org/wiki/index.php/MariaDB |
|||
|
|||
The differences between MariaDB and MySQL can be found at: |
|||
http://askmonty.org/wiki/index.php/MariaDB_versus_MySQL |
|||
|
|||
Documentation about MySQL can be found at: |
|||
http://dev.mysql.com/doc |
|||
|
|||
For further information about MySQL or additional documentation, see: |
|||
- The latest information about MySQL: http://www.mysql.com |
|||
- The current MySQL documentation: http://dev.mysql.com/doc |
|||
For further information about MySQL documentation, see: |
|||
- The current MySQL documentation: |
|||
|
|||
Some manual sections of special interest: |
|||
|
|||
- If you are migrating from an older version of MySQL, please read the |
|||
"Upgrading from..." section first! |
|||
- To see what MySQL can do, take a look at the features section. |
|||
- For installation instructions, see the Installing and Upgrading chapter. |
|||
- For the new features/bugfix history, see the Change History appendix. |
|||
- For the currently known bugs/misfeatures (known errors) see the Problems |
|||
and Common Errors appendix. |
|||
- For a list of developers and other contributors, see the Credits |
|||
appendix. |
|||
|
|||
A local copy of the MySQL Reference Manual can be found in the Docs |
|||
directory in GNU Info format. You can also browse the manual online or |
|||
download it in any of several formats at the URL given earlier in this |
|||
file. |
|||
download it in any of several formats from |
|||
http://dev.mysql.com/doc |
|||
|
|||
************************************************************ |
|||
|
|||
IMPORTANT: |
|||
|
|||
Bug or error reports should be sent to http://bugs.mysql.com. |
|||
Bug or error reports regarding MariaDB should be sent to |
|||
https://bugs.launchpad.net/maria |
|||
Bugs in the MySQL code can also be sent to http://bugs.mysql.com |
|||
@ -0,0 +1,60 @@ |
|||
select @@log_slow_filter; |
|||
@@log_slow_filter |
|||
|
|||
select @@log_slow_rate_limit; |
|||
@@log_slow_rate_limit |
|||
1 |
|||
select @@log_slow_verbosity; |
|||
@@log_slow_verbosity |
|||
|
|||
show variables like "log_slow%"; |
|||
Variable_name Value |
|||
log_slow_filter |
|||
log_slow_queries ON |
|||
log_slow_rate_limit 1 |
|||
log_slow_time 10.000000 |
|||
log_slow_verbosity |
|||
set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin"; |
|||
select @@log_slow_filter; |
|||
@@log_slow_filter |
|||
admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk |
|||
set @@log_slow_filter="admin,admin"; |
|||
select @@log_slow_filter; |
|||
@@log_slow_filter |
|||
admin |
|||
set @@log_slow_filter=7; |
|||
select @@log_slow_filter; |
|||
@@log_slow_filter |
|||
admin,filesort,filesort_on_disk |
|||
set @@log_slow_filter= "filesort,impossible,impossible2,admin"; |
|||
ERROR 42000: Variable 'log_slow_filter' can't be set to the value of 'impossible' |
|||
set @@log_slow_filter= "filesort, admin"; |
|||
ERROR 42000: Variable 'log_slow_filter' can't be set to the value of ' admin' |
|||
set @@log_slow_filter= 1<<31; |
|||
ERROR 42000: Variable 'log_slow_filter' can't be set to the value of '2147483648' |
|||
select @@log_slow_filter; |
|||
@@log_slow_filter |
|||
admin,filesort,filesort_on_disk |
|||
set @@log_slow_verbosity= "query_plan,innodb"; |
|||
select @@log_slow_verbosity; |
|||
@@log_slow_verbosity |
|||
innodb,query_plan |
|||
set @@log_slow_verbosity=1; |
|||
select @@log_slow_verbosity; |
|||
@@log_slow_verbosity |
|||
innodb |
|||
show fields from mysql.slow_log; |
|||
Field Type Null Key Default Extra |
|||
start_time timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP |
|||
user_host mediumtext NO NULL |
|||
query_time time NO NULL |
|||
lock_time time NO NULL |
|||
rows_sent int(11) NO NULL |
|||
rows_examined int(11) NO NULL |
|||
db varchar(512) NO NULL |
|||
last_insert_id int(11) NO NULL |
|||
insert_id int(11) NO NULL |
|||
server_id int(10) unsigned NO NULL |
|||
sql_text mediumtext NO NULL |
|||
set @@log_slow_filter=default; |
|||
set @@log_slow_verbosity=default; |
|||
@ -0,0 +1,42 @@ |
|||
# |
|||
# Testing of slow log query options |
|||
# |
|||
|
|||
select @@log_slow_filter; |
|||
select @@log_slow_rate_limit; |
|||
select @@log_slow_verbosity; |
|||
show variables like "log_slow%"; |
|||
|
|||
# Some simple test to set log_slow_filter |
|||
set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin"; |
|||
select @@log_slow_filter; |
|||
set @@log_slow_filter="admin,admin"; |
|||
select @@log_slow_filter; |
|||
set @@log_slow_filter=7; |
|||
select @@log_slow_filter; |
|||
|
|||
# Test of wrong values |
|||
--error 1231 |
|||
set @@log_slow_filter= "filesort,impossible,impossible2,admin"; |
|||
--error 1231 |
|||
set @@log_slow_filter= "filesort, admin"; |
|||
--error 1231 |
|||
set @@log_slow_filter= 1<<31; |
|||
select @@log_slow_filter; |
|||
|
|||
# Some simple test to set log_slow_verbosity |
|||
set @@log_slow_verbosity= "query_plan,innodb"; |
|||
select @@log_slow_verbosity; |
|||
set @@log_slow_verbosity=1; |
|||
select @@log_slow_verbosity; |
|||
|
|||
# |
|||
# Check which fields are in slow_log table |
|||
# |
|||
|
|||
show fields from mysql.slow_log; |
|||
|
|||
# Reset used variables |
|||
|
|||
set @@log_slow_filter=default; |
|||
set @@log_slow_verbosity=default; |
|||
@ -0,0 +1,107 @@ |
|||
/* Copyright (C) 2009 Monty Program Ab |
|||
|
|||
This program is free software; you can redistribute it and/or modify |
|||
it under the terms of the GNU General Public License as published by |
|||
the Free Software Foundation; version 2 or later of the License. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License |
|||
along with this program; if not, write to the Free Software |
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
|||
|
|||
/* Defining what to log to slow log */ |
|||
|
|||
#define LOG_SLOW_VERBOSITY_INIT 0 |
|||
#define LOG_SLOW_VERBOSITY_INNODB 1 << 0 |
|||
#define LOG_SLOW_VERBOSITY_QUERY_PLAN 1 << 1 |
|||
|
|||
#ifdef DEFINE_VARIABLES_LOG_SLOW |
|||
|
|||
/* Names here must be in same order as the bit's above */ |
|||
static const char *log_slow_verbosity_names[]= |
|||
{ |
|||
"innodb","query_plan", |
|||
NullS |
|||
}; |
|||
|
|||
static const unsigned int log_slow_verbosity_names_len[]= |
|||
{ |
|||
sizeof("innodb") -1, |
|||
sizeof("query_plan")-1 |
|||
}; |
|||
|
|||
TYPELIB log_slow_verbosity_typelib= |
|||
{ array_elements(log_slow_verbosity_names)-1,"", log_slow_verbosity_names, |
|||
(unsigned int *) log_slow_verbosity_names_len }; |
|||
|
|||
#else |
|||
extern TYPELIB log_slow_verbosity_typelib; |
|||
#endif /* DEFINE_VARIABLES_LOG_SLOW */ |
|||
|
|||
/* Defines for what kind of query plan was used and what to log */ |
|||
|
|||
/* |
|||
We init the used query plan with a bit that is alwyas set and all 'no' bits |
|||
to enable easy testing of what to log in sql_log.cc |
|||
*/ |
|||
#define QPLAN_INIT (QPLAN_ALWAYS_SET | QPLAN_QC_NO) |
|||
|
|||
#define QPLAN_ADMIN 1 << 0 |
|||
#define QPLAN_FILESORT 1 << 1 |
|||
#define QPLAN_FILESORT_DISK 1 << 2 |
|||
#define QPLAN_FULL_JOIN 1 << 3 |
|||
#define QPLAN_FULL_SCAN 1 << 4 |
|||
#define QPLAN_QC 1 << 5 |
|||
#define QPLAN_QC_NO 1 << 6 |
|||
#define QPLAN_TMP_DISK 1 << 7 |
|||
#define QPLAN_TMP_TABLE 1 << 8 |
|||
/* ... */ |
|||
#define QPLAN_MAX ((ulong) 1) << 31 /* reserved as placeholder */ |
|||
#define QPLAN_ALWAYS_SET QPLAN_MAX |
|||
#define QPLAN_VISIBLE_MASK (~(QPLAN_ALWAYS_SET)) |
|||
|
|||
#ifdef DEFINE_VARIABLES_LOG_SLOW |
|||
/* Names here must be in same order as the bit's above */ |
|||
static const char *log_slow_filter_names[]= |
|||
{ |
|||
"admin", |
|||
"filesort", |
|||
"filesort_on_disk", |
|||
"full_join", |
|||
"full_scan", |
|||
"query_cache", |
|||
"query_cache_miss", |
|||
"tmp_table", |
|||
"tmp_table_on_disk", |
|||
NullS |
|||
}; |
|||
|
|||
static const unsigned int log_slow_filter_names_len[]= |
|||
{ |
|||
sizeof("admin")-1, |
|||
sizeof("filesort")-1, |
|||
sizeof("filesort_on_disk")-1, |
|||
sizeof("full_join")-1, |
|||
sizeof("full_scan")-1, |
|||
sizeof("query_cache")-1, |
|||
sizeof("query_cache_miss")-1, |
|||
sizeof("tmp_table")-1, |
|||
sizeof("tmp_table_on_disk")-1 |
|||
}; |
|||
|
|||
TYPELIB log_slow_filter_typelib= |
|||
{ array_elements(log_slow_filter_names)-1,"", log_slow_filter_names, |
|||
(unsigned int *) log_slow_filter_names_len }; |
|||
|
|||
#else |
|||
extern TYPELIB log_slow_filter_typelib; |
|||
#endif /* DEFINE_VARIABLES_LOG_SLOW */ |
|||
|
|||
static inline ulong fix_log_slow_filter(ulong org_filter) |
|||
{ |
|||
return org_filter ? org_filter : QPLAN_ALWAYS_SET; |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue