Merge lp:~sergei.glushchenko/percona-server/ps56-univ-log-archive into lp:percona-server/5.6
- ps56-univ-log-archive
- Merge into 5.6
Status: | Superseded |
---|---|
Proposed branch: | lp:~sergei.glushchenko/percona-server/ps56-univ-log-archive |
Merge into: | lp:percona-server/5.6 |
Diff against target: |
2807 lines (+1226/-318) 124 files modified
Percona-Server/mysql-test/include/default_mysqld_autosize.cnf (+3/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_check.inc (+15/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_cleanup.inc (+15/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_count.inc (+9/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_last_file.inc (+24/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_setup.inc (+49/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_stat.inc (+72/-0) Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_workload.inc (+5/-0) Percona-Server/mysql-test/suite/innodb/t/percona_innodb_log_archive_func.test (+31/-0) Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_expire_sec.test (+29/-0) Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_func.test (+19/-0) Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_before.test (+36/-0) Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_to.test (+36/-0) Percona-Server/mysql-test/suite/perfschema/r/digest_table_full.result (+2/-2) Percona-Server/mysql-test/suite/perfschema/r/ortho_iter.result (+0/-58) Percona-Server/mysql-test/suite/perfschema/r/rpl_gtid_func.result (+2/-2) Percona-Server/mysql-test/suite/perfschema/r/start_server_innodb.result (+0/-25) Percona-Server/mysql-test/suite/perfschema/r/start_server_on.result (+0/-25) Percona-Server/mysql-test/suite/perfschema/r/statement_digest.result (+37/-37) Percona-Server/mysql-test/suite/perfschema/r/statement_digest_consumers.result (+37/-37) Percona-Server/mysql-test/suite/perfschema/r/statement_digest_long_query.result (+2/-2) Percona-Server/mysql-test/suite/perfschema/t/digest_table_full.test (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/ortho_iter.test (+0/-4) Percona-Server/mysql-test/suite/perfschema/t/privilege_table_io-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/rpl_gtid_func.test (+2/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_idle-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_stages-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_statements-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_waits-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb.test (+0/-4) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_account-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_digests-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_host-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_objects-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stage_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history_long-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history_long-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_hdl-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_class-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_inst-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_user-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_off-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_on-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/start_server_on.test (+0/-4) Percona-Server/mysql-test/suite/perfschema/t/statement_digest.test (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/statement_digest_consumers.test (+2/-0) Percona-Server/mysql-test/suite/perfschema/t/statement_digest_long_query.test (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_off-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t-master.opt (+1/-0) Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t-master.opt (+1/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_arch_expire_sec_basic.result (+38/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_archive_basic.result (+38/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_dir_basic.test (+60/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_expire_sec_basic.test (+60/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_archive_basic.test (+61/-0) Percona-Server/sql/handler.cc (+42/-0) Percona-Server/sql/handler.h (+8/-0) Percona-Server/sql/lex.h (+1/-0) Percona-Server/sql/mysqld.cc (+2/-0) Percona-Server/sql/sql_cmd.h (+2/-0) Percona-Server/sql/sql_parse.cc (+43/-0) Percona-Server/sql/sql_yacc.yy (+19/-1) Percona-Server/storage/innobase/fil/fil0fil.cc (+35/-33) Percona-Server/storage/innobase/handler/ha_innodb.cc (+78/-8) Percona-Server/storage/innobase/include/fil0fil.h (+8/-6) Percona-Server/storage/innobase/include/log0log.h (+4/-0) Percona-Server/storage/innobase/include/log0recv.h (+1/-1) Percona-Server/storage/innobase/include/srv0srv.h (+13/-0) Percona-Server/storage/innobase/include/univ.i (+3/-0) Percona-Server/storage/innobase/log/log0log.cc (+44/-42) Percona-Server/storage/innobase/log/log0recv.cc (+11/-11) Percona-Server/storage/innobase/srv/srv0srv.cc (+140/-0) Percona-Server/storage/innobase/srv/srv0start.cc (+13/-16) |
To merge this branch: | bzr merge lp:~sergei.glushchenko/percona-server/ps56-univ-log-archive |
Related bugs: | |
Related blueprints: |
Log Archiving for XtraDB
(High)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Needs Fixing | ||
Review via email: mp+147563@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-03-20.
Commit message
Description of the change
Implementation of log archiving based on branch by KAlexey
which enables UNIV_LOG_ARCHIVE
* variables names and startup parameters have been changed
from InnoDB original to be same as were used in previous
implementation
* archive log files naming has been changed from original
zero-based sequence (0, 1, 2, 3) to sequence of start lsn
of archived file. Also prefix has been changed to be
the same as in previous implementation
* purge commands have been implemented
(PURGE ARCHIVED LOGS BEFORE/TO)
* innodb_
* innodb_
as not applicable
* testcase has been added (modified from original, as purge
commands do not delete current archive in progress)
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
Will post couple of questions here
1. This implementation is different from described in https:/
2. This "I would like to have corresponding binary log position for log archive.
This will allow to have point in time recovery with binary logs." has not been implemented in original implementation and there is no comments about it in previous MP. Do we need this feature?
3. Do we need variable (like have_xtra_
4. Do we really need to be able enable/disable archiving at runtime as BP above describes? We should handle partially written archives somehow in this case.
Alexey Kopytov (akopytov) wrote : | # |
Hi Sergei,
On Mon, Feb 11 2013 14:17:20 +0400, Sergei Glushchenko wrote:
> Will post couple of questions here
> 1. This implementation is different from described in https:/
I think just changing the existing one is fine.
> 2. This "I would like to have corresponding binary log position for log archive.
> This will allow to have point in time recovery with binary logs." has not been implemented in original implementation and there is no comments about it in previous MP. Do we need this feature?
Yes, was probably left out from the original implementation. How hard
would it be to implement it?
> 3. Do we need variable (like have_xtra_
> server has archiving support?
I don't think so.
> 4. Do we really need to be able enable/disable archiving at runtime as BP above describes? We should handle partially written archives somehow in this case.
I think ability to control it at runtime is good. Partially written
files and gaps in archived files are IMHO a user's problem, i.e. there's
not much _we_ can do to _handle_ them.
--
Best regards,
Alexey.
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
Alexey,
It's not clear to me how to obtain corresponding binlog position for the LSN at the start of archive. InnoDB know binlog position at transaction commit. And it possible to obtain current binlog position by invoking thd_binlog_pos, but the problem here is that at the moment when we write archived file current LSN might be much further than LSN we write into archive.
Is there any other way to get this?
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
http://
Implementation of log archiving based on branch by KAlexey
which enables UNIV_LOG_ARCHIVE
* variables and startup parameters have following names:
- innodb_log_archive = ON/OFF
- innodb_log_arch_dir = DIR
- innodb_
* archive log files naming has been changed from original
zero-based sequence (0, 1, 2, 3) to sequence of start lsn
of archived file. Also prefix has been changed to be
the same as in previous implementation
* purge commands have been implemented
(PURGE ARCHIVED LOGS BEFORE/TO)
* innodb_
* innodb_
as it is not applicable
* testcases were implemented
Vlad Lesin (vlad-lesin) wrote : | # |
Sergey, it seems percona_
Vlad Lesin (vlad-lesin) wrote : | # |
It's just partial review:
1. Unused local variable space_arch_log_no in fil_open_
2. I would use "#define IB_ARCHIVED_
3. I don't think it's a good idea to abort the server if the file name does not fit into the buffer in log_archived_
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
Vlad,
What behavior do you propose for case 3? Server obviously cannot continue operation with given settings. Should log_archiving be turned off (silently or with warning issued to error log)? How can it will be visible to DBA (logs aren't being archived)?
Vlad Lesin (vlad-lesin) wrote : | # |
> Vlad,
>
> What behavior do you propose for case 3? Server obviously cannot continue
> operation with given settings. Should log_archiving be turned off (silently or
> with warning issued to error log)? How can it will be visible to DBA (logs
> aren't being archived)?
Logs archiving - its a backup feature. I think server must not stop if backup does not work. There should be error in error log with stopped log archiving.
Vlad Lesin (vlad-lesin) wrote : | # |
I'm testing the latest xtrabackup(lp:percona-xtrabackup) with this server and I have the following issue when I try to do backup:
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /tmp/1/src/data
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
xtrabackup: innodb_
130313 0:06:46 InnoDB: Assertion failure in thread 140183767389952 in file fil0fil.c line 5519
InnoDB: Failing assertion: byte_offset % OS_FILE_
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://
InnoDB: about forcing recovery.
I use the following test script to repeat it:
#!/bin/bash
BASE_DIR=
DATA_DIR=
ARCHIVED_
BACKUP_
DST_DIR=/tmp/1/dst
XTRABACKUP_DIR=.
XTRABACKUP=
USER=some_user
EXTRA_OPTIONS=
SERVER_
LD_LIBRARY_
INSTALL_
MYSQLD=
MYSQL=$
mkdir -p $DATA_DIR $ARCHIVED_LOGS_DIR $BACKUP_DIR $DST_DIR
rm -rf $DATA_DIR/* $ARCHIVED_
$INSTALL_DB --no-defaults --basedir=$BASE_DIR --datadir=$DATA_DIR --user=$USER $EXTRA_OPTIONS
PID1=$!
sleep 2
echo '------
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
Vlad,
So we shouldn't probably fail in case if we cannot write to create new archive file (os_file_create is failed), any problems with IO and so on, which could lead to some nontrivial changes of InnoDB code. Your thoughts?
Sergei Glushchenko (sergei.glushchenko) wrote : | # |
Xtradb based version are failed with same assertion, however xtrabackup_plugin seems to able to perform backup.
Alexey Kopytov (akopytov) wrote : | # |
- multiple lines violate the 80 chars limit, try:
: bzr diff -c-1 | grep -0 '^+ ' | awk 'length > 82'
- there's still no reply in http://
We obviously cannot afford similar changes for every new statement
type, so we should do something about it. What about adding
performanc
mysql-
- the changes related to digest values is another "gift" from
performance schema. Not sure what to do about it. Probably just
"-
- please use OS_FILE_MAX_PATH instead of hard-coded (and
inconsistent) constants in log_group_archive() and
log_
sense to assert on sufficient buffer space, as a lot of things
would break if paths are longer than that. But you can keep the
assertion if you like. The rest of InnoDB code seems to assume that
never happens, but I agree we should fail *if* it does.
Preview Diff
1 | === modified file 'Percona-Server/mysql-test/include/default_mysqld_autosize.cnf' | |||
2 | --- Percona-Server/mysql-test/include/default_mysqld_autosize.cnf 2012-05-30 11:44:42 +0000 | |||
3 | +++ Percona-Server/mysql-test/include/default_mysqld_autosize.cnf 2013-03-20 16:30:32 +0000 | |||
4 | @@ -42,6 +42,9 @@ | |||
5 | 42 | log-bin=mysqld-bin | 42 | log-bin=mysqld-bin |
6 | 43 | 43 | ||
7 | 44 | # No performance schema sizing provided | 44 | # No performance schema sizing provided |
8 | 45 | # Except the max-statement-classes which is set to default value of 167 | ||
9 | 46 | # as a workaround of http://bugs.mysql.com/bug.php?id=68635 | ||
10 | 47 | loose-performance-schema-max-statement-classes=167 | ||
11 | 45 | 48 | ||
12 | 46 | # Disable everything, we only need the sizing data, | 49 | # Disable everything, we only need the sizing data, |
13 | 47 | # and also need a stable output for show engine performance_schema status | 50 | # and also need a stable output for show engine performance_schema status |
14 | 48 | 51 | ||
15 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_check.inc' | |||
16 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_check.inc 1970-01-01 00:00:00 +0000 | |||
17 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_check.inc 2013-03-20 16:30:32 +0000 | |||
18 | @@ -0,0 +1,15 @@ | |||
19 | 1 | # Check that there are no gaps in archived files | ||
20 | 2 | |||
21 | 3 | --source percona_log_archiving_stat.inc | ||
22 | 4 | |||
23 | 5 | let $lsn = `SELECT (($archived_logs_count - 1) * $LOG_FILE_LSN_STEP + $first_log_file_lsn)`; | ||
24 | 6 | |||
25 | 7 | if ($last_log_file_lsn != $lsn) | ||
26 | 8 | { | ||
27 | 9 | echo Expected last file lsn is $lsn but got $last_log_file_lsn; | ||
28 | 10 | die Test failed; | ||
29 | 11 | } | ||
30 | 12 | |||
31 | 13 | echo Check OK; | ||
32 | 14 | |||
33 | 15 | let $LAST_ARCHIVED_LSN = $last_log_file_lsn; | ||
34 | 0 | 16 | ||
35 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_cleanup.inc' | |||
36 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_cleanup.inc 1970-01-01 00:00:00 +0000 | |||
37 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_cleanup.inc 2013-03-20 16:30:32 +0000 | |||
38 | @@ -0,0 +1,15 @@ | |||
39 | 1 | # | ||
40 | 2 | # Cleanup after log archiving testing | ||
41 | 3 | # | ||
42 | 4 | |||
43 | 5 | DROP TABLE t; | ||
44 | 6 | |||
45 | 7 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
46 | 8 | --shutdown_server | ||
47 | 9 | --source include/wait_until_disconnected.inc | ||
48 | 10 | --enable_reconnect | ||
49 | 11 | --exec echo "restart: --innodb-log-file-size=1M" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
50 | 12 | --source include/wait_until_connected_again.inc | ||
51 | 13 | |||
52 | 14 | --remove_files_wildcard $MYSQLD_ARCHIVEDIR ib_log_archive_* | ||
53 | 15 | --rmdir $MYSQLD_ARCHIVEDIR | ||
54 | 0 | 16 | ||
55 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_count.inc' | |||
56 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_count.inc 1970-01-01 00:00:00 +0000 | |||
57 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_count.inc 2013-03-20 16:30:32 +0000 | |||
58 | @@ -0,0 +1,9 @@ | |||
59 | 1 | |||
60 | 2 | --source percona_log_archiving_stat.inc | ||
61 | 3 | |||
62 | 4 | let $lsn = $n_files * $LOG_FILE_LSN_STEP; | ||
63 | 5 | |||
64 | 6 | --echo $archived_logs_count | ||
65 | 7 | |||
66 | 8 | let $LAST_ARCHIVED_LSN = $last_log_file_lsn; | ||
67 | 9 | |||
68 | 0 | 10 | ||
69 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_last_file.inc' | |||
70 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_last_file.inc 1970-01-01 00:00:00 +0000 | |||
71 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_last_file.inc 2013-03-20 16:30:32 +0000 | |||
72 | @@ -0,0 +1,24 @@ | |||
73 | 1 | |||
74 | 2 | perl; | ||
75 | 3 | @files = glob($ENV{'MYSQLD_ARCHIVEDIR'}.'/ib_log_archive_*'); | ||
76 | 4 | my $filepath, $filename, $dirname; | ||
77 | 5 | foreach my $file (@files) { | ||
78 | 6 | ($dirname, $filename) = $file =~ m|^(.*[/\\])([^/\\]+?)$|; | ||
79 | 7 | $filepath = $file; | ||
80 | 8 | } | ||
81 | 9 | |||
82 | 10 | my @array = stat($filepath); | ||
83 | 11 | my $filemodifytime = $array[9]; | ||
84 | 12 | my @t = localtime $filemodifytime; | ||
85 | 13 | my $modifytime = sprintf "%04u-%02u-%02u %02u:%02u:%02u",$t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0]; | ||
86 | 14 | my $lsn = $filename =~ m/ib_log_archive_0*([1-9][0-9]+)$/; | ||
87 | 15 | open F, ">".$ENV{'MYSQLTEST_VARDIR'}.'/tmp/percona_archived_logs.tmp' or die "Cannot open file percona_archived_logs.tmp for write"; | ||
88 | 16 | printf F ("let \$last_log_file = %s;\n", $filename); | ||
89 | 17 | printf F ("let \$last_log_file_modify = %s;\n", $modifytime); | ||
90 | 18 | printf F ("let \$last_log_file_lsn = %s;\n", $lsn); | ||
91 | 19 | close F; | ||
92 | 20 | EOF | ||
93 | 21 | |||
94 | 22 | --source $MYSQLTEST_VARDIR/tmp/percona_archived_logs.tmp | ||
95 | 23 | # remove_file $MYSQLTEST_VARDIR/tmp/percona_archived_logs.tmp; | ||
96 | 24 | |||
97 | 0 | 25 | ||
98 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_setup.inc' | |||
99 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_setup.inc 1970-01-01 00:00:00 +0000 | |||
100 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_setup.inc 2013-03-20 16:30:32 +0000 | |||
101 | @@ -0,0 +1,49 @@ | |||
102 | 1 | # | ||
103 | 2 | # setup for log archive testing | ||
104 | 3 | # | ||
105 | 4 | |||
106 | 5 | |||
107 | 6 | call mtr.add_suppression("InnoDB: Resizing redo log"); | ||
108 | 7 | call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files"); | ||
109 | 8 | call mtr.add_suppression("InnoDB: New log files created"); | ||
110 | 9 | call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles"); | ||
111 | 10 | |||
112 | 11 | --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
113 | 12 | --shutdown_server | ||
114 | 13 | --source include/wait_until_disconnected.inc | ||
115 | 14 | # Do something while server is down | ||
116 | 15 | --enable_reconnect | ||
117 | 16 | --exec echo "restart: --innodb_log_archive=ON --innodb_log_arch_dir=logs_archive --innodb-log-file-size=1M" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect | ||
118 | 17 | --source include/wait_until_connected_again.inc | ||
119 | 18 | |||
120 | 19 | --disable_warnings | ||
121 | 20 | drop table if exists t; | ||
122 | 21 | --enable_warnings | ||
123 | 22 | |||
124 | 23 | let $MYSQLD_DATADIR= `SELECT @@datadir`; | ||
125 | 24 | let $MYSQLD_ARCHIVEDIR= `SELECT IF( locate('/', @@innodb_log_arch_dir) = 1, @@innodb_log_arch_dir, CONCAT(@@datadir, @@innodb_log_arch_dir))`; | ||
126 | 25 | let MYSQLD_ARCHIVEDIR = $MYSQLD_ARCHIVEDIR; | ||
127 | 26 | --mkdir $MYSQLD_ARCHIVEDIR | ||
128 | 27 | |||
129 | 28 | let $LOG_FILE_HDR_SIZE = 2048; | ||
130 | 29 | let $LOG_FILE_SIZE = `SELECT @@innodb_log_file_size`; | ||
131 | 30 | let $LOG_FILE_LSN_STEP = `SELECT $LOG_FILE_SIZE - $LOG_FILE_HDR_SIZE`; | ||
132 | 31 | |||
133 | 32 | create table t (a int not null) ENGINE=InnoDB; | ||
134 | 33 | |||
135 | 34 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
136 | 35 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
137 | 36 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
138 | 37 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
139 | 38 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
140 | 39 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
141 | 40 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
142 | 41 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
143 | 42 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
144 | 43 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
145 | 44 | insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13); | ||
146 | 45 | insert into t (a) select t1.a from t t1, t t2, t t3 LIMIT 40000; | ||
147 | 46 | |||
148 | 47 | --source percona_log_archiving_stat.inc | ||
149 | 48 | |||
150 | 49 | let $LAST_ARCHIVED_LSN = $last_log_file_lsn; | ||
151 | 0 | 50 | ||
152 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_stat.inc' | |||
153 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_stat.inc 1970-01-01 00:00:00 +0000 | |||
154 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_stat.inc 2013-03-20 16:30:32 +0000 | |||
155 | @@ -0,0 +1,72 @@ | |||
156 | 1 | # | ||
157 | 2 | # Collect information about archived log files | ||
158 | 3 | # | ||
159 | 4 | |||
160 | 5 | perl; | ||
161 | 6 | use Data::Dumper; | ||
162 | 7 | sub fn { | ||
163 | 8 | my $filepath = shift; | ||
164 | 9 | my ($dirname, $filename) = $filepath =~ m|^(.*[/\\])([^/\\]+?)$|; | ||
165 | 10 | |||
166 | 11 | return $filename; | ||
167 | 12 | } | ||
168 | 13 | |||
169 | 14 | sub get_file_stat { | ||
170 | 15 | my $filepath = shift; | ||
171 | 16 | my $prefix = shift; | ||
172 | 17 | my $filename = fn($filepath); | ||
173 | 18 | |||
174 | 19 | my @array = stat($filepath); | ||
175 | 20 | my $filemodifytime = $array[9]; | ||
176 | 21 | my @t = localtime $filemodifytime; | ||
177 | 22 | my $modifytime = sprintf "%04u-%02u-%02u %02u:%02u:%02u",$t[5]+1900,$t[4]+1,$t[3],$t[2],$t[1],$t[0]; | ||
178 | 23 | my ($lsn) = $filename =~ m/ib_log_archive_[0]*([1-9][0-9]+)$/; | ||
179 | 24 | |||
180 | 25 | my $f = { | ||
181 | 26 | 'path' => $filepath, | ||
182 | 27 | 'name' => $filename, | ||
183 | 28 | 't' => $filemodifytime, | ||
184 | 29 | 'modifytime' => $modifytime, | ||
185 | 30 | 'lsn' => $lsn | ||
186 | 31 | }; | ||
187 | 32 | |||
188 | 33 | return $f; | ||
189 | 34 | } | ||
190 | 35 | |||
191 | 36 | sub print_file_stat { | ||
192 | 37 | my %stat = %{$_[0]}; | ||
193 | 38 | my $prefix = $_[1]; | ||
194 | 39 | |||
195 | 40 | open F, ">>".$ENV{'MYSQLTEST_VARDIR'}.'/tmp/percona_archived_logs.tmp' or die "Cannot open file percona_archived_logs.tmp for write"; | ||
196 | 41 | printf F ("let \$${prefix}_log_file = %s;\n", $stat{'name'}); | ||
197 | 42 | printf F ("let \$${prefix}_log_file_modify = %s;\n", $stat{'modifytime'}); | ||
198 | 43 | printf F ("let \$${prefix}_log_file_lsn = %s;\n", $stat{'lsn'}); | ||
199 | 44 | close F; | ||
200 | 45 | } | ||
201 | 46 | |||
202 | 47 | @files = glob($ENV{'MYSQLD_ARCHIVEDIR'}.'/ib_log_archive_*'); | ||
203 | 48 | |||
204 | 49 | my @files_stat = (); | ||
205 | 50 | |||
206 | 51 | foreach my $file (@files) { | ||
207 | 52 | push(@files_stat, get_file_stat($file)); | ||
208 | 53 | } | ||
209 | 54 | |||
210 | 55 | $count = scalar(@files_stat); | ||
211 | 56 | $mid_n = 1; | ||
212 | 57 | $t = $files_stat[$mid_n]{'t'}; | ||
213 | 58 | while (($files_stat[$mid_n]{'t'} == $t) && ($mid_n < $count - 1)) {$mid_n++}; | ||
214 | 59 | print_file_stat(@files_stat[0], 'first'); | ||
215 | 60 | print_file_stat(@files_stat[-1], 'last'); | ||
216 | 61 | print_file_stat(@files_stat[$mid_n - 1], 'mid'); | ||
217 | 62 | |||
218 | 63 | open F, ">>".$ENV{'MYSQLTEST_VARDIR'}.'/tmp/percona_archived_logs.tmp' or die "Cannot open file percona_archived_logs.tmp for write"; | ||
219 | 64 | printf F ("let \$archived_logs_count = %s;\n", $count); | ||
220 | 65 | printf F ("let \$archived_logs_mid = %s;\n", $mid_n); | ||
221 | 66 | close F; | ||
222 | 67 | |||
223 | 68 | EOF | ||
224 | 69 | |||
225 | 70 | --source $MYSQLTEST_VARDIR/tmp/percona_archived_logs.tmp | ||
226 | 71 | remove_file $MYSQLTEST_VARDIR/tmp/percona_archived_logs.tmp; | ||
227 | 72 | |||
228 | 0 | 73 | ||
229 | === added file 'Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_workload.inc' | |||
230 | --- Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_workload.inc 1970-01-01 00:00:00 +0000 | |||
231 | +++ Percona-Server/mysql-test/suite/innodb/include/percona_log_archiving_workload.inc 2013-03-20 16:30:32 +0000 | |||
232 | @@ -0,0 +1,5 @@ | |||
233 | 1 | # | ||
234 | 2 | # Perform insert into table to produce some log records | ||
235 | 3 | # | ||
236 | 4 | |||
237 | 5 | insert into t (a) select t1.a from t t1, t t2, t t3 LIMIT 40000; | ||
238 | 0 | 6 | ||
239 | === added file 'Percona-Server/mysql-test/suite/innodb/t/percona_innodb_log_archive_func.test' | |||
240 | --- Percona-Server/mysql-test/suite/innodb/t/percona_innodb_log_archive_func.test 1970-01-01 00:00:00 +0000 | |||
241 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_innodb_log_archive_func.test 2013-03-20 16:30:32 +0000 | |||
242 | @@ -0,0 +1,31 @@ | |||
243 | 1 | # | ||
244 | 2 | # Test innodb_log_archive turning ON/OFF at runtime | ||
245 | 3 | # | ||
246 | 4 | |||
247 | 5 | --source include/have_innodb.inc | ||
248 | 6 | --source include/not_embedded.inc | ||
249 | 7 | |||
250 | 8 | --source ../include/percona_log_archiving_setup.inc | ||
251 | 9 | |||
252 | 10 | |||
253 | 11 | --source ../include/percona_log_archiving_workload.inc | ||
254 | 12 | |||
255 | 13 | SET GLOBAL innodb_log_archive = OFF; | ||
256 | 14 | |||
257 | 15 | --source ../include/percona_log_archiving_check.inc | ||
258 | 16 | |||
259 | 17 | let $count = $archived_logs_count; | ||
260 | 18 | |||
261 | 19 | --source ../include/percona_log_archiving_workload.inc | ||
262 | 20 | |||
263 | 21 | SET GLOBAL innodb_log_archive = ON; | ||
264 | 22 | |||
265 | 23 | --source ../include/percona_log_archiving_stat.inc | ||
266 | 24 | |||
267 | 25 | if ($count != $archived_logs_count) | ||
268 | 26 | { | ||
269 | 27 | die Test failed. Archived logs being written while innodb_log_archive being turned off.; | ||
270 | 28 | } | ||
271 | 29 | |||
272 | 30 | --source ../include/percona_log_archiving_cleanup.inc | ||
273 | 31 | |||
274 | 0 | 32 | ||
275 | === added file 'Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_expire_sec.test' | |||
276 | --- Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_expire_sec.test 1970-01-01 00:00:00 +0000 | |||
277 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_expire_sec.test 2013-03-20 16:30:32 +0000 | |||
278 | @@ -0,0 +1,29 @@ | |||
279 | 1 | # | ||
280 | 2 | # Test innodb_log_archive_expire_sec | ||
281 | 3 | # | ||
282 | 4 | |||
283 | 5 | --source include/have_innodb.inc | ||
284 | 6 | --source include/not_embedded.inc | ||
285 | 7 | |||
286 | 8 | --source ../include/percona_log_archiving_setup.inc | ||
287 | 9 | |||
288 | 10 | SET @save_log_arch_expire_sec = @@innodb_log_arch_expire_sec; | ||
289 | 11 | SET GLOBAL innodb_log_arch_expire_sec = 1; | ||
290 | 12 | |||
291 | 13 | --source ../include/percona_log_archiving_workload.inc | ||
292 | 14 | |||
293 | 15 | --source ../include/percona_log_archiving_workload.inc | ||
294 | 16 | |||
295 | 17 | SELECT sleep(4); | ||
296 | 18 | |||
297 | 19 | --source ../include/percona_log_archiving_stat.inc | ||
298 | 20 | |||
299 | 21 | if ($archived_logs_count > 1) | ||
300 | 22 | { | ||
301 | 23 | die Test failed. Archived logs have nod been purged.; | ||
302 | 24 | } | ||
303 | 25 | |||
304 | 26 | SET GLOBAL innodb_log_arch_expire_sec = @save_log_arch_expire_sec; | ||
305 | 27 | |||
306 | 28 | --source ../include/percona_log_archiving_cleanup.inc | ||
307 | 29 | |||
308 | 0 | 30 | ||
309 | === added file 'Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_func.test' | |||
310 | --- Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_func.test 1970-01-01 00:00:00 +0000 | |||
311 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_log_arch_func.test 2013-03-20 16:30:32 +0000 | |||
312 | @@ -0,0 +1,19 @@ | |||
313 | 1 | # | ||
314 | 2 | # Test that log archiving is working (produce some files at least) | ||
315 | 3 | # | ||
316 | 4 | |||
317 | 5 | --source include/have_innodb.inc | ||
318 | 6 | --source include/not_embedded.inc | ||
319 | 7 | |||
320 | 8 | --source ../include/percona_log_archiving_setup.inc | ||
321 | 9 | |||
322 | 10 | --source ../include/percona_log_archiving_workload.inc | ||
323 | 11 | --source ../include/percona_log_archiving_check.inc | ||
324 | 12 | |||
325 | 13 | if ($archived_logs_count == 0) | ||
326 | 14 | { | ||
327 | 15 | die "0 archived logs have been produced"; | ||
328 | 16 | } | ||
329 | 17 | |||
330 | 18 | --source ../include/percona_log_archiving_cleanup.inc | ||
331 | 19 | |||
332 | 0 | 20 | ||
333 | === added file 'Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_before.test' | |||
334 | --- Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_before.test 1970-01-01 00:00:00 +0000 | |||
335 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_before.test 2013-03-20 16:30:32 +0000 | |||
336 | @@ -0,0 +1,36 @@ | |||
337 | 1 | # | ||
338 | 2 | # Test PURGE ARCHIVED LOGS BEFORE | ||
339 | 3 | # | ||
340 | 4 | |||
341 | 5 | --source include/have_innodb.inc | ||
342 | 6 | --source include/not_embedded.inc | ||
343 | 7 | |||
344 | 8 | --source ../include/percona_log_archiving_setup.inc | ||
345 | 9 | |||
346 | 10 | SELECT sleep(1); | ||
347 | 11 | --source ../include/percona_log_archiving_workload.inc | ||
348 | 12 | SELECT sleep(1); | ||
349 | 13 | --source ../include/percona_log_archiving_workload.inc | ||
350 | 14 | SELECT sleep(1); | ||
351 | 15 | --source ../include/percona_log_archiving_workload.inc | ||
352 | 16 | --source ../include/percona_log_archiving_check.inc | ||
353 | 17 | |||
354 | 18 | if ($archived_logs_count == 0) | ||
355 | 19 | { | ||
356 | 20 | die "0 archived logs have been produced"; | ||
357 | 21 | } | ||
358 | 22 | |||
359 | 23 | --replace_result $mid_log_file_modify val | ||
360 | 24 | --eval PURGE ARCHIVED LOGS BEFORE '$mid_log_file_modify' | ||
361 | 25 | |||
362 | 26 | let $count = `SELECT $archived_logs_count - $archived_logs_mid`; | ||
363 | 27 | |||
364 | 28 | --source ../include/percona_log_archiving_stat.inc | ||
365 | 29 | |||
366 | 30 | if ($archived_logs_count != $count) | ||
367 | 31 | { | ||
368 | 32 | die "PURGE ARCHIVED LOGS BEFORE failed"; | ||
369 | 33 | } | ||
370 | 34 | |||
371 | 35 | --source ../include/percona_log_archiving_cleanup.inc | ||
372 | 36 | |||
373 | 0 | 37 | ||
374 | === added file 'Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_to.test' | |||
375 | --- Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_to.test 1970-01-01 00:00:00 +0000 | |||
376 | +++ Percona-Server/mysql-test/suite/innodb/t/percona_purge_archived_logs_to.test 2013-03-20 16:30:32 +0000 | |||
377 | @@ -0,0 +1,36 @@ | |||
378 | 1 | # | ||
379 | 2 | # Test PURGE ARCHIVED LOGS TO | ||
380 | 3 | # | ||
381 | 4 | |||
382 | 5 | --source include/have_innodb.inc | ||
383 | 6 | --source include/not_embedded.inc | ||
384 | 7 | |||
385 | 8 | --source ../include/percona_log_archiving_setup.inc | ||
386 | 9 | |||
387 | 10 | SELECT sleep(1); | ||
388 | 11 | --source ../include/percona_log_archiving_workload.inc | ||
389 | 12 | SELECT sleep(1); | ||
390 | 13 | --source ../include/percona_log_archiving_workload.inc | ||
391 | 14 | SELECT sleep(1); | ||
392 | 15 | --source ../include/percona_log_archiving_workload.inc | ||
393 | 16 | --source ../include/percona_log_archiving_check.inc | ||
394 | 17 | |||
395 | 18 | if ($archived_logs_count == 0) | ||
396 | 19 | { | ||
397 | 20 | die "0 archived logs have been produced"; | ||
398 | 21 | } | ||
399 | 22 | |||
400 | 23 | --replace_result $mid_log_file val | ||
401 | 24 | --eval PURGE ARCHIVED LOGS TO '$mid_log_file' | ||
402 | 25 | |||
403 | 26 | let $count = `SELECT $archived_logs_count - $archived_logs_mid + 1`; | ||
404 | 27 | |||
405 | 28 | --source ../include/percona_log_archiving_stat.inc | ||
406 | 29 | |||
407 | 30 | if ($archived_logs_count != $count) | ||
408 | 31 | { | ||
409 | 32 | die "PURGE ARCHIVED LOGS TO failed"; | ||
410 | 33 | } | ||
411 | 34 | |||
412 | 35 | --source ../include/percona_log_archiving_cleanup.inc | ||
413 | 36 | |||
414 | 0 | 37 | ||
415 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/digest_table_full.result' | |||
416 | --- Percona-Server/mysql-test/suite/perfschema/r/digest_table_full.result 2013-01-18 04:53:12 +0000 | |||
417 | +++ Percona-Server/mysql-test/suite/perfschema/r/digest_table_full.result 2013-03-20 16:30:32 +0000 | |||
418 | @@ -112,8 +112,8 @@ | |||
419 | 112 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, | 112 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, |
420 | 113 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; | 113 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; |
421 | 114 | SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS | 114 | SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS |
424 | 115 | NULL NULL NULL 55 32 1 2 | 115 | NULL ? NULL 55 32 1 2 |
425 | 116 | statements_digest e4a84a547a18a89f4708509a720def58 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 | 116 | statements_digest ? TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 |
426 | 117 | SHOW VARIABLES LIKE "performance_schema_digests_size"; | 117 | SHOW VARIABLES LIKE "performance_schema_digests_size"; |
427 | 118 | Variable_name Value | 118 | Variable_name Value |
428 | 119 | performance_schema_digests_size 2 | 119 | performance_schema_digests_size 2 |
429 | 120 | 120 | ||
430 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/ortho_iter.result' | |||
431 | --- Percona-Server/mysql-test/suite/perfschema/r/ortho_iter.result 2012-12-04 08:24:59 +0000 | |||
432 | +++ Percona-Server/mysql-test/suite/perfschema/r/ortho_iter.result 2013-03-20 16:30:32 +0000 | |||
433 | @@ -91,64 +91,6 @@ | |||
434 | 91 | signal sqlstate '01000' set message_text='Done', mysql_errno=12000; | 91 | signal sqlstate '01000' set message_text='Done', mysql_errno=12000; |
435 | 92 | end | 92 | end |
436 | 93 | $ | 93 | $ |
437 | 94 | show variables like "performance_schema%"; | ||
438 | 95 | Variable_name Value | ||
439 | 96 | performance_schema ON | ||
440 | 97 | performance_schema_accounts_size 100 | ||
441 | 98 | performance_schema_digests_size 200 | ||
442 | 99 | performance_schema_events_stages_history_long_size 1000 | ||
443 | 100 | performance_schema_events_stages_history_size 10 | ||
444 | 101 | performance_schema_events_statements_history_long_size 1000 | ||
445 | 102 | performance_schema_events_statements_history_size 10 | ||
446 | 103 | performance_schema_events_waits_history_long_size 10000 | ||
447 | 104 | performance_schema_events_waits_history_size 10 | ||
448 | 105 | performance_schema_hosts_size 100 | ||
449 | 106 | performance_schema_max_cond_classes 80 | ||
450 | 107 | performance_schema_max_cond_instances 1000 | ||
451 | 108 | performance_schema_max_file_classes 50 | ||
452 | 109 | performance_schema_max_file_handles 32768 | ||
453 | 110 | performance_schema_max_file_instances 10000 | ||
454 | 111 | performance_schema_max_mutex_classes 200 | ||
455 | 112 | performance_schema_max_mutex_instances 5000 | ||
456 | 113 | performance_schema_max_rwlock_classes 30 | ||
457 | 114 | performance_schema_max_rwlock_instances 5000 | ||
458 | 115 | performance_schema_max_socket_classes 10 | ||
459 | 116 | performance_schema_max_socket_instances 1000 | ||
460 | 117 | performance_schema_max_stage_classes 150 | ||
461 | 118 | performance_schema_max_statement_classes 167 | ||
462 | 119 | performance_schema_max_table_handles 1000 | ||
463 | 120 | performance_schema_max_table_instances 500 | ||
464 | 121 | performance_schema_max_thread_classes 50 | ||
465 | 122 | performance_schema_max_thread_instances 200 | ||
466 | 123 | performance_schema_session_connect_attrs_size 2048 | ||
467 | 124 | performance_schema_setup_actors_size 100 | ||
468 | 125 | performance_schema_setup_objects_size 100 | ||
469 | 126 | performance_schema_users_size 100 | ||
470 | 127 | show status like "performance_schema%"; | ||
471 | 128 | Variable_name Value | ||
472 | 129 | Performance_schema_accounts_lost 0 | ||
473 | 130 | Performance_schema_cond_classes_lost 0 | ||
474 | 131 | Performance_schema_cond_instances_lost 0 | ||
475 | 132 | Performance_schema_digest_lost 0 | ||
476 | 133 | Performance_schema_file_classes_lost 0 | ||
477 | 134 | Performance_schema_file_handles_lost 0 | ||
478 | 135 | Performance_schema_file_instances_lost 0 | ||
479 | 136 | Performance_schema_hosts_lost 0 | ||
480 | 137 | Performance_schema_locker_lost 0 | ||
481 | 138 | Performance_schema_mutex_classes_lost 0 | ||
482 | 139 | Performance_schema_mutex_instances_lost 0 | ||
483 | 140 | Performance_schema_rwlock_classes_lost 0 | ||
484 | 141 | Performance_schema_rwlock_instances_lost 0 | ||
485 | 142 | Performance_schema_session_connect_attrs_lost 0 | ||
486 | 143 | Performance_schema_socket_classes_lost 0 | ||
487 | 144 | Performance_schema_socket_instances_lost 0 | ||
488 | 145 | Performance_schema_stage_classes_lost 0 | ||
489 | 146 | Performance_schema_statement_classes_lost 0 | ||
490 | 147 | Performance_schema_table_handles_lost 0 | ||
491 | 148 | Performance_schema_table_instances_lost 0 | ||
492 | 149 | Performance_schema_thread_classes_lost 0 | ||
493 | 150 | Performance_schema_thread_instances_lost 0 | ||
494 | 151 | Performance_schema_users_lost 0 | ||
495 | 152 | call check_instrument("wait/synch/mutex/"); | 94 | call check_instrument("wait/synch/mutex/"); |
496 | 153 | instr_name is_wait is_stage is_statement | 95 | instr_name is_wait is_stage is_statement |
497 | 154 | wait/synch/mutex/ 1 0 0 | 96 | wait/synch/mutex/ 1 0 0 |
498 | 155 | 97 | ||
499 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/rpl_gtid_func.result' | |||
500 | --- Percona-Server/mysql-test/suite/perfschema/r/rpl_gtid_func.result 2012-11-08 21:40:31 +0000 | |||
501 | +++ Percona-Server/mysql-test/suite/perfschema/r/rpl_gtid_func.result 2013-03-20 16:30:32 +0000 | |||
502 | @@ -40,7 +40,7 @@ | |||
503 | 40 | from performance_schema.events_statements_summary_by_digest | 40 | from performance_schema.events_statements_summary_by_digest |
504 | 41 | where digest_text like "%in_%_digest%"; | 41 | where digest_text like "%in_%_digest%"; |
505 | 42 | digest digest_text count_star | 42 | digest digest_text count_star |
507 | 43 | 8d588d616712c7d8dfabf22ce262662b SELECT ? AS in_master_digest 1 | 43 | ? SELECT ? AS in_master_digest 1 |
508 | 44 | insert into test.marker values (2); | 44 | insert into test.marker values (2); |
509 | 45 | **** On Slave **** | 45 | **** On Slave **** |
510 | 46 | select * from test.marker; | 46 | select * from test.marker; |
511 | @@ -67,7 +67,7 @@ | |||
512 | 67 | from performance_schema.events_statements_summary_by_digest | 67 | from performance_schema.events_statements_summary_by_digest |
513 | 68 | where digest_text like "%in_%_digest%"; | 68 | where digest_text like "%in_%_digest%"; |
514 | 69 | digest digest_text count_star | 69 | digest digest_text count_star |
516 | 70 | 02e25175edc3b2834b9b41d58f5a8a6a SELECT ? AS in_slave_digest 1 | 70 | ? SELECT ? AS in_slave_digest 1 |
517 | 71 | **** On Master **** | 71 | **** On Master **** |
518 | 72 | delete from performance_schema.setup_objects | 72 | delete from performance_schema.setup_objects |
519 | 73 | where object_schema='master'; | 73 | where object_schema='master'; |
520 | 74 | 74 | ||
521 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/start_server_innodb.result' | |||
522 | --- Percona-Server/mysql-test/suite/perfschema/r/start_server_innodb.result 2012-12-04 08:24:59 +0000 | |||
523 | +++ Percona-Server/mysql-test/suite/perfschema/r/start_server_innodb.result 2013-03-20 16:30:32 +0000 | |||
524 | @@ -104,28 +104,3 @@ | |||
525 | 104 | performance_schema_users_size 100 | 104 | performance_schema_users_size 100 |
526 | 105 | show engine PERFORMANCE_SCHEMA status; | 105 | show engine PERFORMANCE_SCHEMA status; |
527 | 106 | show status like "performance_schema%"; | 106 | show status like "performance_schema%"; |
528 | 107 | show status like "performance_schema%"; | ||
529 | 108 | Variable_name Value | ||
530 | 109 | Performance_schema_accounts_lost 0 | ||
531 | 110 | Performance_schema_cond_classes_lost 0 | ||
532 | 111 | Performance_schema_cond_instances_lost 0 | ||
533 | 112 | Performance_schema_digest_lost 0 | ||
534 | 113 | Performance_schema_file_classes_lost 0 | ||
535 | 114 | Performance_schema_file_handles_lost 0 | ||
536 | 115 | Performance_schema_file_instances_lost 0 | ||
537 | 116 | Performance_schema_hosts_lost 0 | ||
538 | 117 | Performance_schema_locker_lost 0 | ||
539 | 118 | Performance_schema_mutex_classes_lost 0 | ||
540 | 119 | Performance_schema_mutex_instances_lost 0 | ||
541 | 120 | Performance_schema_rwlock_classes_lost 0 | ||
542 | 121 | Performance_schema_rwlock_instances_lost 0 | ||
543 | 122 | Performance_schema_session_connect_attrs_lost 0 | ||
544 | 123 | Performance_schema_socket_classes_lost 0 | ||
545 | 124 | Performance_schema_socket_instances_lost 0 | ||
546 | 125 | Performance_schema_stage_classes_lost 0 | ||
547 | 126 | Performance_schema_statement_classes_lost 0 | ||
548 | 127 | Performance_schema_table_handles_lost 0 | ||
549 | 128 | Performance_schema_table_instances_lost 0 | ||
550 | 129 | Performance_schema_thread_classes_lost 0 | ||
551 | 130 | Performance_schema_thread_instances_lost 0 | ||
552 | 131 | Performance_schema_users_lost 0 | ||
553 | 132 | 107 | ||
554 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/start_server_on.result' | |||
555 | --- Percona-Server/mysql-test/suite/perfschema/r/start_server_on.result 2012-12-04 08:24:59 +0000 | |||
556 | +++ Percona-Server/mysql-test/suite/perfschema/r/start_server_on.result 2013-03-20 16:30:32 +0000 | |||
557 | @@ -104,28 +104,3 @@ | |||
558 | 104 | performance_schema_users_size 100 | 104 | performance_schema_users_size 100 |
559 | 105 | show engine PERFORMANCE_SCHEMA status; | 105 | show engine PERFORMANCE_SCHEMA status; |
560 | 106 | show status like "performance_schema%"; | 106 | show status like "performance_schema%"; |
561 | 107 | show status like "performance_schema%"; | ||
562 | 108 | Variable_name Value | ||
563 | 109 | Performance_schema_accounts_lost 0 | ||
564 | 110 | Performance_schema_cond_classes_lost 0 | ||
565 | 111 | Performance_schema_cond_instances_lost 0 | ||
566 | 112 | Performance_schema_digest_lost 0 | ||
567 | 113 | Performance_schema_file_classes_lost 0 | ||
568 | 114 | Performance_schema_file_handles_lost 0 | ||
569 | 115 | Performance_schema_file_instances_lost 0 | ||
570 | 116 | Performance_schema_hosts_lost 0 | ||
571 | 117 | Performance_schema_locker_lost 0 | ||
572 | 118 | Performance_schema_mutex_classes_lost 0 | ||
573 | 119 | Performance_schema_mutex_instances_lost 0 | ||
574 | 120 | Performance_schema_rwlock_classes_lost 0 | ||
575 | 121 | Performance_schema_rwlock_instances_lost 0 | ||
576 | 122 | Performance_schema_session_connect_attrs_lost 0 | ||
577 | 123 | Performance_schema_socket_classes_lost 0 | ||
578 | 124 | Performance_schema_socket_instances_lost 0 | ||
579 | 125 | Performance_schema_stage_classes_lost 0 | ||
580 | 126 | Performance_schema_statement_classes_lost 0 | ||
581 | 127 | Performance_schema_table_handles_lost 0 | ||
582 | 128 | Performance_schema_table_instances_lost 0 | ||
583 | 129 | Performance_schema_thread_classes_lost 0 | ||
584 | 130 | Performance_schema_thread_instances_lost 0 | ||
585 | 131 | Performance_schema_users_lost 0 | ||
586 | 132 | 107 | ||
587 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/statement_digest.result' | |||
588 | --- Percona-Server/mysql-test/suite/perfschema/r/statement_digest.result 2013-01-18 04:53:12 +0000 | |||
589 | +++ Percona-Server/mysql-test/suite/perfschema/r/statement_digest.result 2013-03-20 16:30:32 +0000 | |||
590 | @@ -112,43 +112,43 @@ | |||
591 | 112 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, | 112 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, |
592 | 113 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; | 113 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; |
593 | 114 | SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS | 114 | SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS |
631 | 115 | statements_digest e4a84a547a18a89f4708509a720def58 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 | 115 | statements_digest ? TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0 |
632 | 116 | statements_digest ab105aea9c15b3842ad161d18349f9c4 SELECT ? FROM t1 1 0 0 0 | 116 | statements_digest ? SELECT ? FROM t1 1 0 0 0 |
633 | 117 | statements_digest 835083efbaa5d8c29d01d558abb8216b SELECT ? FROM `t1` 1 0 0 0 | 117 | statements_digest ? SELECT ? FROM `t1` 1 0 0 0 |
634 | 118 | statements_digest 6ff375c6f4b283de91711a78bd91b953 SELECT ?, ... FROM t1 2 0 0 0 | 118 | statements_digest ? SELECT ?, ... FROM t1 2 0 0 0 |
635 | 119 | statements_digest 4879fbad051c94ff76e6ad29effa4903 SELECT ? FROM t2 1 0 0 0 | 119 | statements_digest ? SELECT ? FROM t2 1 0 0 0 |
636 | 120 | statements_digest b1ea4bca7c91ebd647b6b81e80a2ef94 SELECT ?, ... FROM t2 2 0 0 0 | 120 | statements_digest ? SELECT ?, ... FROM t2 2 0 0 0 |
637 | 121 | statements_digest 14d463345df747d42a036019a5988a9b INSERT INTO t1 VALUES (?) 1 1 0 0 | 121 | statements_digest ? INSERT INTO t1 VALUES (?) 1 1 0 0 |
638 | 122 | statements_digest ff2d8aa1fd516f5e25b0faf7b1c80b04 INSERT INTO t2 VALUES (?) 1 1 0 0 | 122 | statements_digest ? INSERT INTO t2 VALUES (?) 1 1 0 0 |
639 | 123 | statements_digest 430116339c3a5bf0a1aa9a96e9cfd354 INSERT INTO t3 VALUES (...) 4 4 0 0 | 123 | statements_digest ? INSERT INTO t3 VALUES (...) 4 4 0 0 |
640 | 124 | statements_digest 01467137a1045e85119538ea248d52dd INSERT INTO t4 VALUES (...) 1 1 0 0 | 124 | statements_digest ? INSERT INTO t4 VALUES (...) 1 1 0 0 |
641 | 125 | statements_digest b201a20a2a534d2789750270b7f90fab INSERT INTO t5 VALUES (...) 1 1 0 0 | 125 | statements_digest ? INSERT INTO t5 VALUES (...) 1 1 0 0 |
642 | 126 | statements_digest b1a5f24770580f243ad6704590165d90 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0 | 126 | statements_digest ? INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0 |
643 | 127 | statements_digest bbbf619ec8ca4ec4a4da28a71eb12a2f INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0 | 127 | statements_digest ? INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0 |
644 | 128 | statements_digest de7bdb298875f4ef826383e3fce53ef9 INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0 | 128 | statements_digest ? INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0 |
645 | 129 | statements_digest f79cdc2ddca01e9ea89782b3548b01e3 INSERT INTO t1 VALUES ( NULL ) 1 1 0 0 | 129 | statements_digest ? INSERT INTO t1 VALUES ( NULL ) 1 1 0 0 |
646 | 130 | statements_digest cd4a3e419e2eaed79f66a705ff002910 INSERT INTO t6 VALUES (...) 5 5 0 0 | 130 | statements_digest ? INSERT INTO t6 VALUES (...) 5 5 0 0 |
647 | 131 | statements_digest f2d57cea9e78e7b37c4509c0564dd1cc SELECT ? + ? 3 0 0 0 | 131 | statements_digest ? SELECT ? + ? 3 0 0 0 |
648 | 132 | statements_digest 02396199eed2345830efcf00e51107ee SELECT ? 1 0 0 0 | 132 | statements_digest ? SELECT ? 1 0 0 0 |
649 | 133 | statements_digest 7c5b403e11cb8fa41954f8b81d47fb44 CREATE SCHEMA statements_digest_temp 2 2 0 0 | 133 | statements_digest ? CREATE SCHEMA statements_digest_temp 2 2 0 0 |
650 | 134 | statements_digest d5c2a9eedc964698407667a633301e69 DROP SCHEMA statements_digest_temp 2 0 0 0 | 134 | statements_digest ? DROP SCHEMA statements_digest_temp 2 0 0 0 |
651 | 135 | statements_digest add5619cd2761d01c66b68b50a4c0476 SELECT ? FROM no_such_table 1 0 0 1 | 135 | statements_digest ? SELECT ? FROM no_such_table 1 0 0 1 |
652 | 136 | statements_digest f59e7a7dbcdc342b7ea72ae24e5ef081 CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1 | 136 | statements_digest ? CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1 |
653 | 137 | statements_digest b42311b2b180ba680ebb286f671982f1 DROP TABLE dup_table 1 0 0 0 | 137 | statements_digest ? DROP TABLE dup_table 1 0 0 0 |
654 | 138 | statements_digest 8af43d157243ebdc9dcb1a9502acdd24 INSERT INTO t11 VALUES (?) 1 1 1 0 | 138 | statements_digest ? INSERT INTO t11 VALUES (?) 1 1 1 0 |
655 | 139 | statements_digest cee5b131782212e0ba1cd76ba28485c4 SHOW WARNINGS 1 0 0 0 | 139 | statements_digest ? SHOW WARNINGS 1 0 0 0 |
656 | 140 | statements_digest 438623439c3a1702203d6190795127ad PREPARE stmt FROM ? 1 0 0 0 | 140 | statements_digest ? PREPARE stmt FROM ? 1 0 0 0 |
657 | 141 | statements_digest e53b71815168ad954fd921a6ae1860c9 EXECUTE stmt 2 0 0 0 | 141 | statements_digest ? EXECUTE stmt 2 0 0 0 |
658 | 142 | statements_digest 3bccf5096186ceaf50c11c3deb4e21cf DEALLOCATE PREPARE stmt 1 0 0 0 | 142 | statements_digest ? DEALLOCATE PREPARE stmt 1 0 0 0 |
659 | 143 | statements_digest e20f8d5cb15105439af39592b79c0edd CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0 | 143 | statements_digest ? CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0 |
660 | 144 | statements_digest 10298a45c9f7114e4985de53ca99bda7 CALL p1 ( ) 2 0 0 0 | 144 | statements_digest ? CALL p1 ( ) 2 0 0 0 |
661 | 145 | statements_digest efc046c5d04acb8afa61326f759ad380 DROP PROCEDURE p1 1 0 0 0 | 145 | statements_digest ? DROP PROCEDURE p1 1 0 0 0 |
662 | 146 | statements_digest 8eaf9e776b79f24f2b8fae8efb92d8a4 CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0 | 146 | statements_digest ? CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0 |
663 | 147 | statements_digest b364c71d8c904eb9e95df4d0ca258c00 SELECT func (...) 2 0 0 0 | 147 | statements_digest ? SELECT func (...) 2 0 0 0 |
664 | 148 | statements_digest 88e7ac9784e4561d12fadccde6ea704a DROP FUNCTION func 1 0 0 0 | 148 | statements_digest ? DROP FUNCTION func 1 0 0 0 |
665 | 149 | statements_digest 15deeaae5594a691cf21abd4439ee5e6 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0 | 149 | statements_digest ? CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0 |
666 | 150 | statements_digest 074e38814943a6dce874784d21fea89d INSERT INTO t12 VALUES (?) 2 2 0 0 | 150 | statements_digest ? INSERT INTO t12 VALUES (?) 2 2 0 0 |
667 | 151 | statements_digest 2b5b02ba54b27638d5d8dbe917ff432d DROP TRIGGER trg 1 0 0 0 | 151 | statements_digest ? DROP TRIGGER trg 1 0 0 0 |
668 | 152 | #################################### | 152 | #################################### |
669 | 153 | # CLEANUP | 153 | # CLEANUP |
670 | 154 | #################################### | 154 | #################################### |
671 | 155 | 155 | ||
672 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/statement_digest_consumers.result' | |||
673 | --- Percona-Server/mysql-test/suite/perfschema/r/statement_digest_consumers.result 2013-01-18 04:53:12 +0000 | |||
674 | +++ Percona-Server/mysql-test/suite/perfschema/r/statement_digest_consumers.result 2013-03-20 16:30:32 +0000 | |||
675 | @@ -125,43 +125,43 @@ | |||
676 | 125 | #################################### | 125 | #################################### |
677 | 126 | SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest; | 126 | SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest; |
678 | 127 | schema_name digest digest_text count_star | 127 | schema_name digest digest_text count_star |
716 | 128 | statements_digest e4a84a547a18a89f4708509a720def58 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 | 128 | statements_digest ? TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 |
717 | 129 | statements_digest ab105aea9c15b3842ad161d18349f9c4 SELECT ? FROM t1 1 | 129 | statements_digest ? SELECT ? FROM t1 1 |
718 | 130 | statements_digest 835083efbaa5d8c29d01d558abb8216b SELECT ? FROM `t1` 1 | 130 | statements_digest ? SELECT ? FROM `t1` 1 |
719 | 131 | statements_digest 6ff375c6f4b283de91711a78bd91b953 SELECT ?, ... FROM t1 2 | 131 | statements_digest ? SELECT ?, ... FROM t1 2 |
720 | 132 | statements_digest 4879fbad051c94ff76e6ad29effa4903 SELECT ? FROM t2 1 | 132 | statements_digest ? SELECT ? FROM t2 1 |
721 | 133 | statements_digest b1ea4bca7c91ebd647b6b81e80a2ef94 SELECT ?, ... FROM t2 2 | 133 | statements_digest ? SELECT ?, ... FROM t2 2 |
722 | 134 | statements_digest 14d463345df747d42a036019a5988a9b INSERT INTO t1 VALUES (?) 1 | 134 | statements_digest ? INSERT INTO t1 VALUES (?) 1 |
723 | 135 | statements_digest ff2d8aa1fd516f5e25b0faf7b1c80b04 INSERT INTO t2 VALUES (?) 1 | 135 | statements_digest ? INSERT INTO t2 VALUES (?) 1 |
724 | 136 | statements_digest 430116339c3a5bf0a1aa9a96e9cfd354 INSERT INTO t3 VALUES (...) 4 | 136 | statements_digest ? INSERT INTO t3 VALUES (...) 4 |
725 | 137 | statements_digest 01467137a1045e85119538ea248d52dd INSERT INTO t4 VALUES (...) 1 | 137 | statements_digest ? INSERT INTO t4 VALUES (...) 1 |
726 | 138 | statements_digest b201a20a2a534d2789750270b7f90fab INSERT INTO t5 VALUES (...) 1 | 138 | statements_digest ? INSERT INTO t5 VALUES (...) 1 |
727 | 139 | statements_digest b1a5f24770580f243ad6704590165d90 INSERT INTO t1 VALUES (?) /* , ... */ 2 | 139 | statements_digest ? INSERT INTO t1 VALUES (?) /* , ... */ 2 |
728 | 140 | statements_digest bbbf619ec8ca4ec4a4da28a71eb12a2f INSERT INTO t3 VALUES (...) /* , ... */ 1 | 140 | statements_digest ? INSERT INTO t3 VALUES (...) /* , ... */ 1 |
729 | 141 | statements_digest de7bdb298875f4ef826383e3fce53ef9 INSERT INTO t5 VALUES (...) /* , ... */ 1 | 141 | statements_digest ? INSERT INTO t5 VALUES (...) /* , ... */ 1 |
730 | 142 | statements_digest f79cdc2ddca01e9ea89782b3548b01e3 INSERT INTO t1 VALUES ( NULL ) 1 | 142 | statements_digest ? INSERT INTO t1 VALUES ( NULL ) 1 |
731 | 143 | statements_digest cd4a3e419e2eaed79f66a705ff002910 INSERT INTO t6 VALUES (...) 5 | 143 | statements_digest ? INSERT INTO t6 VALUES (...) 5 |
732 | 144 | statements_digest f2d57cea9e78e7b37c4509c0564dd1cc SELECT ? + ? 3 | 144 | statements_digest ? SELECT ? + ? 3 |
733 | 145 | statements_digest 02396199eed2345830efcf00e51107ee SELECT ? 1 | 145 | statements_digest ? SELECT ? 1 |
734 | 146 | statements_digest 7c5b403e11cb8fa41954f8b81d47fb44 CREATE SCHEMA statements_digest_temp 2 | 146 | statements_digest ? CREATE SCHEMA statements_digest_temp 2 |
735 | 147 | statements_digest d5c2a9eedc964698407667a633301e69 DROP SCHEMA statements_digest_temp 2 | 147 | statements_digest ? DROP SCHEMA statements_digest_temp 2 |
736 | 148 | statements_digest add5619cd2761d01c66b68b50a4c0476 SELECT ? FROM no_such_table 1 | 148 | statements_digest ? SELECT ? FROM no_such_table 1 |
737 | 149 | statements_digest f59e7a7dbcdc342b7ea72ae24e5ef081 CREATE TABLE dup_table ( c CHARACTER (?) ) 2 | 149 | statements_digest ? CREATE TABLE dup_table ( c CHARACTER (?) ) 2 |
738 | 150 | statements_digest b42311b2b180ba680ebb286f671982f1 DROP TABLE dup_table 1 | 150 | statements_digest ? DROP TABLE dup_table 1 |
739 | 151 | statements_digest 8af43d157243ebdc9dcb1a9502acdd24 INSERT INTO t11 VALUES (?) 1 | 151 | statements_digest ? INSERT INTO t11 VALUES (?) 1 |
740 | 152 | statements_digest cee5b131782212e0ba1cd76ba28485c4 SHOW WARNINGS 1 | 152 | statements_digest ? SHOW WARNINGS 1 |
741 | 153 | statements_digest 438623439c3a1702203d6190795127ad PREPARE stmt FROM ? 1 | 153 | statements_digest ? PREPARE stmt FROM ? 1 |
742 | 154 | statements_digest e53b71815168ad954fd921a6ae1860c9 EXECUTE stmt 2 | 154 | statements_digest ? EXECUTE stmt 2 |
743 | 155 | statements_digest 3bccf5096186ceaf50c11c3deb4e21cf DEALLOCATE PREPARE stmt 1 | 155 | statements_digest ? DEALLOCATE PREPARE stmt 1 |
744 | 156 | statements_digest e20f8d5cb15105439af39592b79c0edd CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 | 156 | statements_digest ? CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 |
745 | 157 | statements_digest 10298a45c9f7114e4985de53ca99bda7 CALL p1 ( ) 2 | 157 | statements_digest ? CALL p1 ( ) 2 |
746 | 158 | statements_digest efc046c5d04acb8afa61326f759ad380 DROP PROCEDURE p1 1 | 158 | statements_digest ? DROP PROCEDURE p1 1 |
747 | 159 | statements_digest 8eaf9e776b79f24f2b8fae8efb92d8a4 CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 | 159 | statements_digest ? CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 |
748 | 160 | statements_digest b364c71d8c904eb9e95df4d0ca258c00 SELECT func (...) 2 | 160 | statements_digest ? SELECT func (...) 2 |
749 | 161 | statements_digest 88e7ac9784e4561d12fadccde6ea704a DROP FUNCTION func 1 | 161 | statements_digest ? DROP FUNCTION func 1 |
750 | 162 | statements_digest 15deeaae5594a691cf21abd4439ee5e6 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 | 162 | statements_digest ? CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 |
751 | 163 | statements_digest 074e38814943a6dce874784d21fea89d INSERT INTO t12 VALUES (?) 2 | 163 | statements_digest ? INSERT INTO t12 VALUES (?) 2 |
752 | 164 | statements_digest 2b5b02ba54b27638d5d8dbe917ff432d DROP TRIGGER trg 1 | 164 | statements_digest ? DROP TRIGGER trg 1 |
753 | 165 | SELECT digest, digest_text FROM performance_schema.events_statements_current; | 165 | SELECT digest, digest_text FROM performance_schema.events_statements_current; |
754 | 166 | digest digest_text | 166 | digest digest_text |
755 | 167 | #################################### | 167 | #################################### |
756 | 168 | 168 | ||
757 | === modified file 'Percona-Server/mysql-test/suite/perfschema/r/statement_digest_long_query.result' | |||
758 | --- Percona-Server/mysql-test/suite/perfschema/r/statement_digest_long_query.result 2013-01-18 04:53:12 +0000 | |||
759 | +++ Percona-Server/mysql-test/suite/perfschema/r/statement_digest_long_query.result 2013-03-20 16:30:32 +0000 | |||
760 | @@ -8,5 +8,5 @@ | |||
761 | 8 | #################################### | 8 | #################################### |
762 | 9 | SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; | 9 | SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; |
763 | 10 | schema_name digest digest_text count_star | 10 | schema_name digest digest_text count_star |
766 | 11 | performance_schema e8d937c7ecf79e105de0f9e364fa5edb TRUNCATE TABLE events_statements_summary_by_digest 1 | 11 | performance_schema ? TRUNCATE TABLE events_statements_summary_by_digest 1 |
767 | 12 | performance_schema 5d9a2f95653d8ca9d9cea3eefff7e361 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1 | 12 | performance_schema ? SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1 |
768 | 13 | 13 | ||
769 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/digest_table_full.test' | |||
770 | --- Percona-Server/mysql-test/suite/perfschema/t/digest_table_full.test 2012-10-24 14:51:05 +0000 | |||
771 | +++ Percona-Server/mysql-test/suite/perfschema/t/digest_table_full.test 2013-03-20 16:30:32 +0000 | |||
772 | @@ -19,6 +19,7 @@ | |||
773 | 19 | --echo #################################### | 19 | --echo #################################### |
774 | 20 | --echo # QUERYING PS STATEMENT DIGEST | 20 | --echo # QUERYING PS STATEMENT DIGEST |
775 | 21 | --echo #################################### | 21 | --echo #################################### |
776 | 22 | --replace_column 2 ? | ||
777 | 22 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, | 23 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, |
778 | 23 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; | 24 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; |
779 | 24 | 25 | ||
780 | 25 | 26 | ||
781 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/ortho_iter.test' | |||
782 | --- Percona-Server/mysql-test/suite/perfschema/t/ortho_iter.test 2011-10-19 21:49:22 +0000 | |||
783 | +++ Percona-Server/mysql-test/suite/perfschema/t/ortho_iter.test 2013-03-20 16:30:32 +0000 | |||
784 | @@ -120,10 +120,6 @@ | |||
785 | 120 | $ | 120 | $ |
786 | 121 | delimiter ;$ | 121 | delimiter ;$ |
787 | 122 | 122 | ||
788 | 123 | # Check the configuration is ok | ||
789 | 124 | show variables like "performance_schema%"; | ||
790 | 125 | show status like "performance_schema%"; | ||
791 | 126 | |||
792 | 127 | call check_instrument("wait/synch/mutex/"); | 123 | call check_instrument("wait/synch/mutex/"); |
793 | 128 | call check_instrument("wait/synch/rwlock/"); | 124 | call check_instrument("wait/synch/rwlock/"); |
794 | 129 | call check_instrument("wait/synch/cond/"); | 125 | call check_instrument("wait/synch/cond/"); |
795 | 130 | 126 | ||
796 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/privilege_table_io-master.opt' | |||
797 | --- Percona-Server/mysql-test/suite/perfschema/t/privilege_table_io-master.opt 1970-01-01 00:00:00 +0000 | |||
798 | +++ Percona-Server/mysql-test/suite/perfschema/t/privilege_table_io-master.opt 2013-03-20 16:30:32 +0000 | |||
799 | @@ -0,0 +1,1 @@ | |||
800 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
801 | 0 | 2 | ||
802 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/rpl_gtid_func.test' | |||
803 | --- Percona-Server/mysql-test/suite/perfschema/t/rpl_gtid_func.test 2012-11-12 10:41:04 +0000 | |||
804 | +++ Percona-Server/mysql-test/suite/perfschema/t/rpl_gtid_func.test 2013-03-20 16:30:32 +0000 | |||
805 | @@ -44,6 +44,7 @@ | |||
806 | 44 | select * from performance_schema.setup_objects | 44 | select * from performance_schema.setup_objects |
807 | 45 | order by object_type, object_schema, object_name; | 45 | order by object_type, object_schema, object_name; |
808 | 46 | 46 | ||
809 | 47 | --replace_column 1 ? | ||
810 | 47 | select digest, digest_text, count_star | 48 | select digest, digest_text, count_star |
811 | 48 | from performance_schema.events_statements_summary_by_digest | 49 | from performance_schema.events_statements_summary_by_digest |
812 | 49 | where digest_text like "%in_%_digest%"; | 50 | where digest_text like "%in_%_digest%"; |
813 | @@ -66,6 +67,7 @@ | |||
814 | 66 | select * from performance_schema.setup_objects | 67 | select * from performance_schema.setup_objects |
815 | 67 | order by object_type, object_schema, object_name; | 68 | order by object_type, object_schema, object_name; |
816 | 68 | 69 | ||
817 | 70 | --replace_column 1 ? | ||
818 | 69 | select digest, digest_text, count_star | 71 | select digest, digest_text, count_star |
819 | 70 | from performance_schema.events_statements_summary_by_digest | 72 | from performance_schema.events_statements_summary_by_digest |
820 | 71 | where digest_text like "%in_%_digest%"; | 73 | where digest_text like "%in_%_digest%"; |
821 | 72 | 74 | ||
822 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_idle-master.opt' | |||
823 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_idle-master.opt 2011-12-16 11:01:45 +0000 | |||
824 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_idle-master.opt 2013-03-20 16:30:32 +0000 | |||
825 | @@ -1,1 +1,2 @@ | |||
826 | 1 | --loose-performance-schema-instrument='idle=OFF' | 1 | --loose-performance-schema-instrument='idle=OFF' |
827 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
828 | 2 | 3 | ||
829 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_stages-master.opt' | |||
830 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_stages-master.opt 2011-12-16 11:01:45 +0000 | |||
831 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_stages-master.opt 2013-03-20 16:30:32 +0000 | |||
832 | @@ -1,1 +1,2 @@ | |||
833 | 1 | --loose-performance-schema-instrument='stage/%=OFF' | 1 | --loose-performance-schema-instrument='stage/%=OFF' |
834 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
835 | 2 | 3 | ||
836 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_statements-master.opt' | |||
837 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_statements-master.opt 2011-12-16 11:01:45 +0000 | |||
838 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_statements-master.opt 2013-03-20 16:30:32 +0000 | |||
839 | @@ -1,1 +1,2 @@ | |||
840 | 1 | --loose-performance-schema-instrument='statement/%=OFF' | 1 | --loose-performance-schema-instrument='statement/%=OFF' |
841 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
842 | 2 | 3 | ||
843 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_waits-master.opt' | |||
844 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_waits-master.opt 2011-12-16 11:01:45 +0000 | |||
845 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_disable_waits-master.opt 2013-03-20 16:30:32 +0000 | |||
846 | @@ -1,1 +1,2 @@ | |||
847 | 1 | --loose-performance-schema-instrument='wait/%=OFF' | 1 | --loose-performance-schema-instrument='wait/%=OFF' |
848 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
849 | 2 | 3 | ||
850 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb-master.opt' | |||
851 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb-master.opt 2011-02-17 18:10:56 +0000 | |||
852 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb-master.opt 2013-03-20 16:30:32 +0000 | |||
853 | @@ -1,1 +1,2 @@ | |||
854 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
855 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
856 | 2 | 3 | ||
857 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb.test' | |||
858 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb.test 2011-10-19 21:49:22 +0000 | |||
859 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_innodb.test 2013-03-20 16:30:32 +0000 | |||
860 | @@ -5,7 +5,3 @@ | |||
861 | 5 | --source include/have_innodb.inc | 5 | --source include/have_innodb.inc |
862 | 6 | 6 | ||
863 | 7 | --source ../include/start_server_common.inc | 7 | --source ../include/start_server_common.inc |
864 | 8 | |||
865 | 9 | # Expecting nothing lost with default parameters | ||
866 | 10 | |||
867 | 11 | show status like "performance_schema%"; | ||
868 | 12 | 8 | ||
869 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_account-master.opt' | |||
870 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_account-master.opt 2011-07-29 09:10:56 +0000 | |||
871 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_account-master.opt 2013-03-20 16:30:32 +0000 | |||
872 | @@ -1,2 +1,3 @@ | |||
873 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
874 | 2 | --loose-performance_schema_accounts_size=0 | 2 | --loose-performance_schema_accounts_size=0 |
875 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
876 | 3 | 4 | ||
877 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_class-master.opt' | |||
878 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_class-master.opt 2011-02-09 15:22:04 +0000 | |||
879 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_class-master.opt 2013-03-20 16:30:32 +0000 | |||
880 | @@ -1,2 +1,3 @@ | |||
881 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
882 | 2 | --loose-performance_schema_max_cond_classes=0 | 2 | --loose-performance_schema_max_cond_classes=0 |
883 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
884 | 3 | 4 | ||
885 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_inst-master.opt' | |||
886 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_inst-master.opt 2011-02-09 15:22:04 +0000 | |||
887 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_cond_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
888 | @@ -1,2 +1,3 @@ | |||
889 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
890 | 2 | --loose-performance_schema_max_cond_instances=0 | 2 | --loose-performance_schema_max_cond_instances=0 |
891 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
892 | 3 | 4 | ||
893 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_digests-master.opt' | |||
894 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_digests-master.opt 2012-04-11 11:54:50 +0000 | |||
895 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_digests-master.opt 2013-03-20 16:30:32 +0000 | |||
896 | @@ -1,1 +1,2 @@ | |||
897 | 1 | --loose-performance-schema-digests-size=0 | 1 | --loose-performance-schema-digests-size=0 |
898 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
899 | 2 | 3 | ||
900 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_class-master.opt' | |||
901 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_class-master.opt 2011-02-09 15:22:04 +0000 | |||
902 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_class-master.opt 2013-03-20 16:30:32 +0000 | |||
903 | @@ -1,2 +1,3 @@ | |||
904 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
905 | 2 | --loose-performance_schema_max_file_classes=0 | 2 | --loose-performance_schema_max_file_classes=0 |
906 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
907 | 3 | 4 | ||
908 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_inst-master.opt' | |||
909 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_inst-master.opt 2011-02-09 15:22:04 +0000 | |||
910 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_file_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
911 | @@ -1,2 +1,3 @@ | |||
912 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
913 | 2 | --loose-performance_schema_max_file_instances=0 | 2 | --loose-performance_schema_max_file_instances=0 |
914 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
915 | 3 | 4 | ||
916 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_host-master.opt' | |||
917 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_host-master.opt 2011-07-29 09:10:56 +0000 | |||
918 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_host-master.opt 2013-03-20 16:30:32 +0000 | |||
919 | @@ -1,2 +1,3 @@ | |||
920 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
921 | 2 | --loose-performance_schema_hosts_size=0 | 2 | --loose-performance_schema_hosts_size=0 |
922 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
923 | 3 | 4 | ||
924 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_class-master.opt' | |||
925 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_class-master.opt 2011-02-09 15:22:04 +0000 | |||
926 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_class-master.opt 2013-03-20 16:30:32 +0000 | |||
927 | @@ -1,2 +1,3 @@ | |||
928 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
929 | 2 | --loose-performance_schema_max_mutex_classes=0 | 2 | --loose-performance_schema_max_mutex_classes=0 |
930 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
931 | 3 | 4 | ||
932 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_inst-master.opt' | |||
933 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_inst-master.opt 2011-02-09 15:22:04 +0000 | |||
934 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_mutex_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
935 | @@ -1,2 +1,3 @@ | |||
936 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
937 | 2 | --loose-performance_schema_max_mutex_instances=0 | 2 | --loose-performance_schema_max_mutex_instances=0 |
938 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
939 | 3 | 4 | ||
940 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_class-master.opt' | |||
941 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_class-master.opt 2011-02-09 15:22:04 +0000 | |||
942 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_class-master.opt 2013-03-20 16:30:32 +0000 | |||
943 | @@ -1,2 +1,3 @@ | |||
944 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
945 | 2 | --loose-performance_schema_max_rwlock_classes=0 | 2 | --loose-performance_schema_max_rwlock_classes=0 |
946 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
947 | 3 | 4 | ||
948 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst-master.opt' | |||
949 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst-master.opt 2011-02-09 15:22:04 +0000 | |||
950 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
951 | @@ -1,2 +1,3 @@ | |||
952 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
953 | 2 | --loose-performance_schema_max_rwlock_instances=0 | 2 | --loose-performance_schema_max_rwlock_instances=0 |
954 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
955 | 3 | 4 | ||
956 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt' | |||
957 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt 2010-05-20 15:43:53 +0000 | |||
958 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_actors-master.opt 2013-03-20 16:30:32 +0000 | |||
959 | @@ -1,2 +1,3 @@ | |||
960 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
961 | 2 | --loose-performance_schema_setup_actors_size=0 | 2 | --loose-performance_schema_setup_actors_size=0 |
962 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
963 | 3 | 4 | ||
964 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_objects-master.opt' | |||
965 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_objects-master.opt 2010-09-24 18:21:22 +0000 | |||
966 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_setup_objects-master.opt 2013-03-20 16:30:32 +0000 | |||
967 | @@ -1,2 +1,3 @@ | |||
968 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
969 | 2 | --loose-performance_schema_setup_objects_size=0 | 2 | --loose-performance_schema_setup_objects_size=0 |
970 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
971 | 3 | 4 | ||
972 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_class-master.opt' | |||
973 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_class-master.opt 2011-02-27 02:07:57 +0000 | |||
974 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_class-master.opt 2013-03-20 16:30:32 +0000 | |||
975 | @@ -1,2 +1,3 @@ | |||
976 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
977 | 2 | --loose-performance_schema_max_socket_classes=0 | 2 | --loose-performance_schema_max_socket_classes=0 |
978 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
979 | 3 | 4 | ||
980 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_inst-master.opt' | |||
981 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_inst-master.opt 2011-02-27 02:07:57 +0000 | |||
982 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_socket_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
983 | @@ -1,2 +1,3 @@ | |||
984 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
985 | 2 | --loose-performance_schema_max_socket_instances=0 | 2 | --loose-performance_schema_max_socket_instances=0 |
986 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
987 | 3 | 4 | ||
988 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stage_class-master.opt' | |||
989 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stage_class-master.opt 2011-02-17 18:10:56 +0000 | |||
990 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stage_class-master.opt 2013-03-20 16:30:32 +0000 | |||
991 | @@ -1,2 +1,3 @@ | |||
992 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
993 | 2 | --loose-performance_schema_max_stage_classes=0 | 2 | --loose-performance_schema_max_stage_classes=0 |
994 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
995 | 3 | 4 | ||
996 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history-master.opt' | |||
997 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history-master.opt 2011-02-17 18:10:56 +0000 | |||
998 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history-master.opt 2013-03-20 16:30:32 +0000 | |||
999 | @@ -1,2 +1,3 @@ | |||
1000 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1001 | 2 | --loose-performance_schema_events_stages_history_size=0 | 2 | --loose-performance_schema_events_stages_history_size=0 |
1002 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1003 | 3 | 4 | ||
1004 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history_long-master.opt' | |||
1005 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history_long-master.opt 2011-02-17 18:10:56 +0000 | |||
1006 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_stages_history_long-master.opt 2013-03-20 16:30:32 +0000 | |||
1007 | @@ -1,2 +1,3 @@ | |||
1008 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1009 | 2 | --loose-performance_schema_events_stages_history_long_size=0 | 2 | --loose-performance_schema_events_stages_history_long_size=0 |
1010 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1011 | 3 | 4 | ||
1012 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history-master.opt' | |||
1013 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history-master.opt 2011-02-17 18:10:56 +0000 | |||
1014 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history-master.opt 2013-03-20 16:30:32 +0000 | |||
1015 | @@ -1,2 +1,3 @@ | |||
1016 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1017 | 2 | --loose-performance_schema_events_statements_history_size=0 | 2 | --loose-performance_schema_events_statements_history_size=0 |
1018 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1019 | 3 | 4 | ||
1020 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history_long-master.opt' | |||
1021 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history_long-master.opt 2011-02-17 18:10:56 +0000 | |||
1022 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_statements_history_long-master.opt 2013-03-20 16:30:32 +0000 | |||
1023 | @@ -1,2 +1,3 @@ | |||
1024 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1025 | 2 | --loose-performance_schema_events_statements_history_long_size=0 | 2 | --loose-performance_schema_events_statements_history_long_size=0 |
1026 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1027 | 3 | 4 | ||
1028 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_hdl-master.opt' | |||
1029 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_hdl-master.opt 2011-02-09 15:22:04 +0000 | |||
1030 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_hdl-master.opt 2013-03-20 16:30:32 +0000 | |||
1031 | @@ -1,2 +1,3 @@ | |||
1032 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1033 | 2 | --loose-performance_schema_max_table_handles=0 | 2 | --loose-performance_schema_max_table_handles=0 |
1034 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1035 | 3 | 4 | ||
1036 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt' | |||
1037 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt 2011-02-09 15:22:04 +0000 | |||
1038 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_table_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
1039 | @@ -1,2 +1,3 @@ | |||
1040 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1041 | 2 | --loose-performance_schema_max_table_instances=0 | 2 | --loose-performance_schema_max_table_instances=0 |
1042 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1043 | 3 | 4 | ||
1044 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_class-master.opt' | |||
1045 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_class-master.opt 2011-02-09 15:22:04 +0000 | |||
1046 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_class-master.opt 2013-03-20 16:30:32 +0000 | |||
1047 | @@ -1,2 +1,3 @@ | |||
1048 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1049 | 2 | --loose-performance_schema_max_thread_classes=0 | 2 | --loose-performance_schema_max_thread_classes=0 |
1050 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1051 | 3 | 4 | ||
1052 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_inst-master.opt' | |||
1053 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_inst-master.opt 2011-02-09 15:22:04 +0000 | |||
1054 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_thread_inst-master.opt 2013-03-20 16:30:32 +0000 | |||
1055 | @@ -1,2 +1,3 @@ | |||
1056 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1057 | 2 | --loose-performance_schema_max_thread_instances=0 | 2 | --loose-performance_schema_max_thread_instances=0 |
1058 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1059 | 3 | 4 | ||
1060 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_user-master.opt' | |||
1061 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_user-master.opt 2011-07-29 09:10:56 +0000 | |||
1062 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_user-master.opt 2013-03-20 16:30:32 +0000 | |||
1063 | @@ -1,2 +1,3 @@ | |||
1064 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1065 | 2 | --loose-performance_schema_users_size=0 | 2 | --loose-performance_schema_users_size=0 |
1066 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1067 | 3 | 4 | ||
1068 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt' | |||
1069 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt 2011-07-29 09:10:56 +0000 | |||
1070 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history-master.opt 2013-03-20 16:30:32 +0000 | |||
1071 | @@ -1,2 +1,3 @@ | |||
1072 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1073 | 2 | --loose-performance_schema_events_waits_history_size=0 | 2 | --loose-performance_schema_events_waits_history_size=0 |
1074 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1075 | 3 | 4 | ||
1076 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt' | |||
1077 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt 2011-07-29 09:10:56 +0000 | |||
1078 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_no_waits_history_long-master.opt 2013-03-20 16:30:32 +0000 | |||
1079 | @@ -1,2 +1,3 @@ | |||
1080 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1081 | 2 | --loose-performance_schema_events_waits_history_long_size=0 | 2 | --loose-performance_schema_events_waits_history_long_size=0 |
1082 | 3 | --loose-performance-schema-max-statement-classes=167 | ||
1083 | 3 | 4 | ||
1084 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_off-master.opt' | |||
1085 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_off-master.opt 2010-01-12 01:47:27 +0000 | |||
1086 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_off-master.opt 2013-03-20 16:30:32 +0000 | |||
1087 | @@ -1,1 +1,2 @@ | |||
1088 | 1 | --loose-disable-performance-schema | 1 | --loose-disable-performance-schema |
1089 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
1090 | 2 | 3 | ||
1091 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_on-master.opt' | |||
1092 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_on-master.opt 2010-01-12 01:47:27 +0000 | |||
1093 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_on-master.opt 2013-03-20 16:30:32 +0000 | |||
1094 | @@ -1,1 +1,2 @@ | |||
1095 | 1 | --loose-enable-performance-schema | 1 | --loose-enable-performance-schema |
1096 | 2 | --loose-performance-schema-max-statement-classes=167 | ||
1097 | 2 | 3 | ||
1098 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/start_server_on.test' | |||
1099 | --- Percona-Server/mysql-test/suite/perfschema/t/start_server_on.test 2011-10-19 21:49:22 +0000 | |||
1100 | +++ Percona-Server/mysql-test/suite/perfschema/t/start_server_on.test 2013-03-20 16:30:32 +0000 | |||
1101 | @@ -4,7 +4,3 @@ | |||
1102 | 4 | --source include/have_perfschema.inc | 4 | --source include/have_perfschema.inc |
1103 | 5 | 5 | ||
1104 | 6 | --source ../include/start_server_common.inc | 6 | --source ../include/start_server_common.inc |
1105 | 7 | |||
1106 | 8 | # Expecting nothing lost with default parameters | ||
1107 | 9 | |||
1108 | 10 | show status like "performance_schema%"; | ||
1109 | 11 | 7 | ||
1110 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/statement_digest.test' | |||
1111 | --- Percona-Server/mysql-test/suite/perfschema/t/statement_digest.test 2012-10-24 14:51:05 +0000 | |||
1112 | +++ Percona-Server/mysql-test/suite/perfschema/t/statement_digest.test 2013-03-20 16:30:32 +0000 | |||
1113 | @@ -16,6 +16,7 @@ | |||
1114 | 16 | --echo #################################### | 16 | --echo #################################### |
1115 | 17 | --echo # QUERYING PS STATEMENT DIGEST | 17 | --echo # QUERYING PS STATEMENT DIGEST |
1116 | 18 | --echo #################################### | 18 | --echo #################################### |
1117 | 19 | --replace_column 2 ? | ||
1118 | 19 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, | 20 | SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS, |
1119 | 20 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; | 21 | SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest; |
1120 | 21 | 22 | ||
1121 | 22 | 23 | ||
1122 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/statement_digest_consumers.test' | |||
1123 | --- Percona-Server/mysql-test/suite/perfschema/t/statement_digest_consumers.test 2012-10-24 14:51:05 +0000 | |||
1124 | +++ Percona-Server/mysql-test/suite/perfschema/t/statement_digest_consumers.test 2013-03-20 16:30:32 +0000 | |||
1125 | @@ -28,7 +28,9 @@ | |||
1126 | 28 | --echo #################################### | 28 | --echo #################################### |
1127 | 29 | --echo # QUERYING PS STATEMENT DIGEST | 29 | --echo # QUERYING PS STATEMENT DIGEST |
1128 | 30 | --echo #################################### | 30 | --echo #################################### |
1129 | 31 | --replace_column 2, ? | ||
1130 | 31 | SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest; | 32 | SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest; |
1131 | 33 | --replace_column 1, ? | ||
1132 | 32 | SELECT digest, digest_text FROM performance_schema.events_statements_current; | 34 | SELECT digest, digest_text FROM performance_schema.events_statements_current; |
1133 | 33 | 35 | ||
1134 | 34 | # Cleanup for Digest | 36 | # Cleanup for Digest |
1135 | 35 | 37 | ||
1136 | === modified file 'Percona-Server/mysql-test/suite/perfschema/t/statement_digest_long_query.test' | |||
1137 | --- Percona-Server/mysql-test/suite/perfschema/t/statement_digest_long_query.test 2012-10-24 14:51:05 +0000 | |||
1138 | +++ Percona-Server/mysql-test/suite/perfschema/t/statement_digest_long_query.test 2013-03-20 16:30:32 +0000 | |||
1139 | @@ -20,4 +20,5 @@ | |||
1140 | 20 | --echo #################################### | 20 | --echo #################################### |
1141 | 21 | --echo # QUERYING PS STATEMENT DIGEST | 21 | --echo # QUERYING PS STATEMENT DIGEST |
1142 | 22 | --echo #################################### | 22 | --echo #################################### |
1143 | 23 | --replace_column 2 ? | ||
1144 | 23 | SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; | 24 | SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest; |
1145 | 24 | 25 | ||
1146 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_2t-master.opt' | |||
1147 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1148 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1149 | @@ -0,0 +1,1 @@ | |||
1150 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1151 | 0 | 2 | ||
1152 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_3t-master.opt' | |||
1153 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1154 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1155 | @@ -0,0 +1,1 @@ | |||
1156 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1157 | 0 | 2 | ||
1158 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_2t-master.opt' | |||
1159 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1160 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1161 | @@ -0,0 +1,1 @@ | |||
1162 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1163 | 0 | 2 | ||
1164 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_3t-master.opt' | |||
1165 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1166 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_global_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1167 | @@ -0,0 +1,1 @@ | |||
1168 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1169 | 0 | 2 | ||
1170 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_2t-master.opt' | |||
1171 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1172 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1173 | @@ -0,0 +1,1 @@ | |||
1174 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1175 | 0 | 2 | ||
1176 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_3t-master.opt' | |||
1177 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1178 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1179 | @@ -0,0 +1,1 @@ | |||
1180 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1181 | 0 | 2 | ||
1182 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_2t-master.opt' | |||
1183 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1184 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1185 | @@ -0,0 +1,1 @@ | |||
1186 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1187 | 0 | 2 | ||
1188 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_3t-master.opt' | |||
1189 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1190 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_hist_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1191 | @@ -0,0 +1,1 @@ | |||
1192 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1193 | 0 | 2 | ||
1194 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_off-master.opt' | |||
1195 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_off-master.opt 1970-01-01 00:00:00 +0000 | |||
1196 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_off-master.opt 2013-03-20 16:30:32 +0000 | |||
1197 | @@ -0,0 +1,1 @@ | |||
1198 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1199 | 0 | 2 | ||
1200 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_2t-master.opt' | |||
1201 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1202 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1203 | @@ -0,0 +1,1 @@ | |||
1204 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1205 | 0 | 2 | ||
1206 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_3t-master.opt' | |||
1207 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1208 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1209 | @@ -0,0 +1,1 @@ | |||
1210 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1211 | 0 | 2 | ||
1212 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_2t-master.opt' | |||
1213 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1214 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1215 | @@ -0,0 +1,1 @@ | |||
1216 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1217 | 0 | 2 | ||
1218 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_3t-master.opt' | |||
1219 | --- Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1220 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_aggregate_thread_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1221 | @@ -0,0 +1,1 @@ | |||
1222 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1223 | 0 | 2 | ||
1224 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_2t-master.opt' | |||
1225 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1226 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1227 | @@ -0,0 +1,1 @@ | |||
1228 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1229 | 0 | 2 | ||
1230 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_3t-master.opt' | |||
1231 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1232 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1233 | @@ -0,0 +1,1 @@ | |||
1234 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1235 | 0 | 2 | ||
1236 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_2t-master.opt' | |||
1237 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1238 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1239 | @@ -0,0 +1,1 @@ | |||
1240 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1241 | 0 | 2 | ||
1242 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_3t-master.opt' | |||
1243 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1244 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_global_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1245 | @@ -0,0 +1,1 @@ | |||
1246 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1247 | 0 | 2 | ||
1248 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_2t-master.opt' | |||
1249 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1250 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1251 | @@ -0,0 +1,1 @@ | |||
1252 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1253 | 0 | 2 | ||
1254 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_3t-master.opt' | |||
1255 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1256 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1257 | @@ -0,0 +1,1 @@ | |||
1258 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1259 | 0 | 2 | ||
1260 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_2t-master.opt' | |||
1261 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1262 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1263 | @@ -0,0 +1,1 @@ | |||
1264 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1265 | 0 | 2 | ||
1266 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_3t-master.opt' | |||
1267 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1268 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_hist_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1269 | @@ -0,0 +1,1 @@ | |||
1270 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1271 | 0 | 2 | ||
1272 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_2t-master.opt' | |||
1273 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1274 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1275 | @@ -0,0 +1,1 @@ | |||
1276 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1277 | 0 | 2 | ||
1278 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_3t-master.opt' | |||
1279 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1280 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1281 | @@ -0,0 +1,1 @@ | |||
1282 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1283 | 0 | 2 | ||
1284 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_2t-master.opt' | |||
1285 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1286 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1287 | @@ -0,0 +1,1 @@ | |||
1288 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1289 | 0 | 2 | ||
1290 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_3t-master.opt' | |||
1291 | --- Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1292 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_io_aggregate_thread_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1293 | @@ -0,0 +1,1 @@ | |||
1294 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1295 | 0 | 2 | ||
1296 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t-master.opt' | |||
1297 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1298 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1299 | @@ -0,0 +1,1 @@ | |||
1300 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1301 | 0 | 2 | ||
1302 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t-master.opt' | |||
1303 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1304 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1305 | @@ -0,0 +1,1 @@ | |||
1306 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1307 | 0 | 2 | ||
1308 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t-master.opt' | |||
1309 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1310 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1311 | @@ -0,0 +1,1 @@ | |||
1312 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1313 | 0 | 2 | ||
1314 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t-master.opt' | |||
1315 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1316 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_global_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1317 | @@ -0,0 +1,1 @@ | |||
1318 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1319 | 0 | 2 | ||
1320 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t-master.opt' | |||
1321 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1322 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1323 | @@ -0,0 +1,1 @@ | |||
1324 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1325 | 0 | 2 | ||
1326 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t-master.opt' | |||
1327 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1328 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1329 | @@ -0,0 +1,1 @@ | |||
1330 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1331 | 0 | 2 | ||
1332 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t-master.opt' | |||
1333 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1334 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1335 | @@ -0,0 +1,1 @@ | |||
1336 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1337 | 0 | 2 | ||
1338 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t-master.opt' | |||
1339 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1340 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_hist_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1341 | @@ -0,0 +1,1 @@ | |||
1342 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1343 | 0 | 2 | ||
1344 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t-master.opt' | |||
1345 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1346 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1347 | @@ -0,0 +1,1 @@ | |||
1348 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1349 | 0 | 2 | ||
1350 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t-master.opt' | |||
1351 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1352 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_2u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1353 | @@ -0,0 +1,1 @@ | |||
1354 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1355 | 0 | 2 | ||
1356 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t-master.opt' | |||
1357 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t-master.opt 1970-01-01 00:00:00 +0000 | |||
1358 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_2t-master.opt 2013-03-20 16:30:32 +0000 | |||
1359 | @@ -0,0 +1,1 @@ | |||
1360 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1361 | 0 | 2 | ||
1362 | === added file 'Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t-master.opt' | |||
1363 | --- Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t-master.opt 1970-01-01 00:00:00 +0000 | |||
1364 | +++ Percona-Server/mysql-test/suite/perfschema/t/table_lock_aggregate_thread_4u_3t-master.opt 2013-03-20 16:30:32 +0000 | |||
1365 | @@ -0,0 +1,1 @@ | |||
1366 | 1 | --loose-performance-schema-max-statement-classes=167 | ||
1367 | 0 | 2 | ||
1368 | === added file 'Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_arch_expire_sec_basic.result' | |||
1369 | --- Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_arch_expire_sec_basic.result 1970-01-01 00:00:00 +0000 | |||
1370 | +++ Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_arch_expire_sec_basic.result 2013-03-20 16:30:32 +0000 | |||
1371 | @@ -0,0 +1,38 @@ | |||
1372 | 1 | SELECT @@GLOBAL.innodb_log_arch_expire_sec INTO @save; | ||
1373 | 2 | SELECT @@GLOBAL.innodb_log_arch_expire_sec; | ||
1374 | 3 | @@GLOBAL.innodb_log_arch_expire_sec | ||
1375 | 4 | 0 | ||
1376 | 5 | 0 Expected | ||
1377 | 6 | SET @@GLOBAL.innodb_log_arch_expire_sec=1; | ||
1378 | 7 | SELECT @@GLOBAL.innodb_log_arch_expire_sec; | ||
1379 | 8 | @@GLOBAL.innodb_log_arch_expire_sec | ||
1380 | 9 | 1 | ||
1381 | 10 | 1 Expected | ||
1382 | 11 | SELECT VARIABLE_VALUE | ||
1383 | 12 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
1384 | 13 | WHERE VARIABLE_NAME='innodb_log_arch_expire_sec'; | ||
1385 | 14 | VARIABLE_VALUE | ||
1386 | 15 | 1 | ||
1387 | 16 | 1 Expected | ||
1388 | 17 | SELECT @@innodb_log_arch_expire_sec; | ||
1389 | 18 | @@innodb_log_arch_expire_sec | ||
1390 | 19 | 1 | ||
1391 | 20 | 1 Expected | ||
1392 | 21 | SELECT @@innodb_log_arch_expire_sec; | ||
1393 | 22 | @@innodb_log_arch_expire_sec | ||
1394 | 23 | 1 | ||
1395 | 24 | 1 Expected | ||
1396 | 25 | SELECT @@local.innodb_log_arch_expire_sec; | ||
1397 | 26 | ERROR HY000: Variable 'innodb_log_arch_expire_sec' is a GLOBAL variable | ||
1398 | 27 | Expected error 'Variable is a GLOBAL variable' | ||
1399 | 28 | SELECT @@SESSION.innodb_log_arch_expire_sec; | ||
1400 | 29 | ERROR HY000: Variable 'innodb_log_arch_expire_sec' is a GLOBAL variable | ||
1401 | 30 | Expected error 'Variable is a GLOBAL variable' | ||
1402 | 31 | SELECT @@GLOBAL.innodb_log_arch_expire_sec; | ||
1403 | 32 | @@GLOBAL.innodb_log_arch_expire_sec | ||
1404 | 33 | 1 | ||
1405 | 34 | 1 Expected | ||
1406 | 35 | SELECT innodb_log_arch_expire_sec = @@SESSION.innodb_log_arch_expire_sec; | ||
1407 | 36 | ERROR 42S22: Unknown column 'innodb_log_arch_expire_sec' in 'field list' | ||
1408 | 37 | Expected error Unknown column 'innodb_log_arch_expire_sec' in 'field list' | ||
1409 | 38 | SET @@GLOBAL.innodb_log_arch_expire_sec = @save; | ||
1410 | 0 | 39 | ||
1411 | === added file 'Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_archive_basic.result' | |||
1412 | --- Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_archive_basic.result 1970-01-01 00:00:00 +0000 | |||
1413 | +++ Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_archive_basic.result 2013-03-20 16:30:32 +0000 | |||
1414 | @@ -0,0 +1,38 @@ | |||
1415 | 1 | SELECT @@GLOBAL.innodb_log_archive; | ||
1416 | 2 | @@GLOBAL.innodb_log_archive | ||
1417 | 3 | 0 | ||
1418 | 4 | 0 Expected | ||
1419 | 5 | SET @save_innodb_log_archive = @@GLOBAL.innodb_log_archive; | ||
1420 | 6 | SET @@GLOBAL.innodb_log_archive=1; | ||
1421 | 7 | SELECT @@GLOBAL.innodb_log_archive; | ||
1422 | 8 | @@GLOBAL.innodb_log_archive | ||
1423 | 9 | 1 | ||
1424 | 10 | 1 Expected | ||
1425 | 11 | SELECT VARIABLE_VALUE | ||
1426 | 12 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
1427 | 13 | WHERE VARIABLE_NAME='innodb_log_archive'; | ||
1428 | 14 | VARIABLE_VALUE | ||
1429 | 15 | ON | ||
1430 | 16 | ON Expected | ||
1431 | 17 | SET @@GLOBAL.innodb_log_archive = @save_innodb_log_archive; | ||
1432 | 18 | SELECT @@innodb_log_archive; | ||
1433 | 19 | @@innodb_log_archive | ||
1434 | 20 | 0 | ||
1435 | 21 | 0 Expected | ||
1436 | 22 | SELECT @@innodb_log_archive; | ||
1437 | 23 | @@innodb_log_archive | ||
1438 | 24 | 0 | ||
1439 | 25 | 0 Expected | ||
1440 | 26 | SELECT @@local.innodb_log_archive; | ||
1441 | 27 | ERROR HY000: Variable 'innodb_log_archive' is a GLOBAL variable | ||
1442 | 28 | Expected error 'Variable is a GLOBAL variable' | ||
1443 | 29 | SELECT @@SESSION.innodb_log_archive; | ||
1444 | 30 | ERROR HY000: Variable 'innodb_log_archive' is a GLOBAL variable | ||
1445 | 31 | Expected error 'Variable is a GLOBAL variable' | ||
1446 | 32 | SELECT @@GLOBAL.innodb_log_archive; | ||
1447 | 33 | @@GLOBAL.innodb_log_archive | ||
1448 | 34 | 0 | ||
1449 | 35 | 0 Expected | ||
1450 | 36 | SELECT innodb_log_archive = @@SESSION.innodb_log_archive; | ||
1451 | 37 | ERROR 42S22: Unknown column 'innodb_log_archive' in 'field list' | ||
1452 | 38 | Expected error Unknown column 'innodb_log_archive' in 'field list' | ||
1453 | 0 | 39 | ||
1454 | === added file 'Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_dir_basic.test' | |||
1455 | --- Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_dir_basic.test 1970-01-01 00:00:00 +0000 | |||
1456 | +++ Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_dir_basic.test 2013-03-20 16:30:32 +0000 | |||
1457 | @@ -0,0 +1,60 @@ | |||
1458 | 1 | ####################################################### | ||
1459 | 2 | # Basic test for innodb_log_arch_dir variable # | ||
1460 | 3 | ####################################################### | ||
1461 | 4 | |||
1462 | 5 | --source include/have_innodb.inc | ||
1463 | 6 | |||
1464 | 7 | #################################################################### | ||
1465 | 8 | # Displaying default value # | ||
1466 | 9 | #################################################################### | ||
1467 | 10 | SELECT @@GLOBAL.innodb_log_arch_dir; | ||
1468 | 11 | --echo NULL Expected | ||
1469 | 12 | |||
1470 | 13 | |||
1471 | 14 | #################################################################### | ||
1472 | 15 | # Check if Value can set # | ||
1473 | 16 | #################################################################### | ||
1474 | 17 | |||
1475 | 18 | --error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1476 | 19 | SET @@GLOBAL.innodb_log_arch_dir=1; | ||
1477 | 20 | --echo Expected error 'Read only variable' | ||
1478 | 21 | |||
1479 | 22 | SELECT @@GLOBAL.innodb_log_arch_dir; | ||
1480 | 23 | --echo NULL Expected | ||
1481 | 24 | |||
1482 | 25 | SELECT VARIABLE_VALUE | ||
1483 | 26 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
1484 | 27 | WHERE VARIABLE_NAME='innodb_log_arch_dir'; | ||
1485 | 28 | --echo empty string Expected | ||
1486 | 29 | |||
1487 | 30 | ############################################ | ||
1488 | 31 | # Check accessing variable without GLOBAL # | ||
1489 | 32 | ############################################ | ||
1490 | 33 | SELECT @@innodb_log_arch_dir; | ||
1491 | 34 | --echo NULL Expected | ||
1492 | 35 | |||
1493 | 36 | |||
1494 | 37 | |||
1495 | 38 | ########################################################################## | ||
1496 | 39 | # Check if innodb_log_arch_dir can be accessed without @@ sign # | ||
1497 | 40 | ########################################################################## | ||
1498 | 41 | |||
1499 | 42 | SELECT @@innodb_log_arch_dir; | ||
1500 | 43 | --echo NULL Expected | ||
1501 | 44 | |||
1502 | 45 | --Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1503 | 46 | SELECT @@local.innodb_log_arch_dir; | ||
1504 | 47 | --echo Expected error 'Variable is a GLOBAL variable' | ||
1505 | 48 | |||
1506 | 49 | --Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1507 | 50 | SELECT @@SESSION.innodb_log_arch_dir; | ||
1508 | 51 | --echo Expected error 'Variable is a GLOBAL variable' | ||
1509 | 52 | |||
1510 | 53 | SELECT @@GLOBAL.innodb_log_arch_dir; | ||
1511 | 54 | --echo NULL Expected | ||
1512 | 55 | |||
1513 | 56 | --Error ER_BAD_FIELD_ERROR | ||
1514 | 57 | SELECT innodb_log_arch_dir = @@SESSION.innodb_log_arch_dir; | ||
1515 | 58 | --echo Expected error Unknown column 'innodb_log_arch_dir' in 'field list' | ||
1516 | 59 | |||
1517 | 60 | |||
1518 | 0 | 61 | ||
1519 | === added file 'Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_expire_sec_basic.test' | |||
1520 | --- Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_expire_sec_basic.test 1970-01-01 00:00:00 +0000 | |||
1521 | +++ Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_arch_expire_sec_basic.test 2013-03-20 16:30:32 +0000 | |||
1522 | @@ -0,0 +1,60 @@ | |||
1523 | 1 | ############################################################### | ||
1524 | 2 | # Basic test for innodb_log_arch_expire_sec variable # | ||
1525 | 3 | ############################################################### | ||
1526 | 4 | |||
1527 | 5 | --source include/have_innodb.inc | ||
1528 | 6 | |||
1529 | 7 | SELECT @@GLOBAL.innodb_log_arch_expire_sec INTO @save; | ||
1530 | 8 | |||
1531 | 9 | #################################################################### | ||
1532 | 10 | # Displaying default value # | ||
1533 | 11 | #################################################################### | ||
1534 | 12 | SELECT @@GLOBAL.innodb_log_arch_expire_sec; | ||
1535 | 13 | --echo 0 Expected | ||
1536 | 14 | |||
1537 | 15 | |||
1538 | 16 | #################################################################### | ||
1539 | 17 | # Check if Value can set # | ||
1540 | 18 | #################################################################### | ||
1541 | 19 | |||
1542 | 20 | SET @@GLOBAL.innodb_log_arch_expire_sec=1; | ||
1543 | 21 | |||
1544 | 22 | SELECT @@GLOBAL.innodb_log_arch_expire_sec; | ||
1545 | 23 | --echo 1 Expected | ||
1546 | 24 | |||
1547 | 25 | SELECT VARIABLE_VALUE | ||
1548 | 26 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
1549 | 27 | WHERE VARIABLE_NAME='innodb_log_arch_expire_sec'; | ||
1550 | 28 | --echo 1 Expected | ||
1551 | 29 | |||
1552 | 30 | ############################################ | ||
1553 | 31 | # Check accessing variable without GLOBAL # | ||
1554 | 32 | ############################################ | ||
1555 | 33 | SELECT @@innodb_log_arch_expire_sec; | ||
1556 | 34 | --echo 1 Expected | ||
1557 | 35 | |||
1558 | 36 | |||
1559 | 37 | |||
1560 | 38 | ################################################################################## | ||
1561 | 39 | # Check if innodb_log_arch_expire_sec can be accessed without @@ sign # | ||
1562 | 40 | ################################################################################## | ||
1563 | 41 | |||
1564 | 42 | SELECT @@innodb_log_arch_expire_sec; | ||
1565 | 43 | --echo 1 Expected | ||
1566 | 44 | |||
1567 | 45 | --Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1568 | 46 | SELECT @@local.innodb_log_arch_expire_sec; | ||
1569 | 47 | --echo Expected error 'Variable is a GLOBAL variable' | ||
1570 | 48 | |||
1571 | 49 | --Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1572 | 50 | SELECT @@SESSION.innodb_log_arch_expire_sec; | ||
1573 | 51 | --echo Expected error 'Variable is a GLOBAL variable' | ||
1574 | 52 | |||
1575 | 53 | SELECT @@GLOBAL.innodb_log_arch_expire_sec; | ||
1576 | 54 | --echo 1 Expected | ||
1577 | 55 | |||
1578 | 56 | --Error ER_BAD_FIELD_ERROR | ||
1579 | 57 | SELECT innodb_log_arch_expire_sec = @@SESSION.innodb_log_arch_expire_sec; | ||
1580 | 58 | --echo Expected error Unknown column 'innodb_log_arch_expire_sec' in 'field list' | ||
1581 | 59 | |||
1582 | 60 | SET @@GLOBAL.innodb_log_arch_expire_sec = @save; | ||
1583 | 0 | 61 | ||
1584 | === added file 'Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_archive_basic.test' | |||
1585 | --- Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_archive_basic.test 1970-01-01 00:00:00 +0000 | |||
1586 | +++ Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_archive_basic.test 2013-03-20 16:30:32 +0000 | |||
1587 | @@ -0,0 +1,61 @@ | |||
1588 | 1 | ################################################### | ||
1589 | 2 | # Basic test for innodb_log_archive variable # | ||
1590 | 3 | ################################################### | ||
1591 | 4 | |||
1592 | 5 | --source include/have_innodb.inc | ||
1593 | 6 | |||
1594 | 7 | #################################################################### | ||
1595 | 8 | # Displaying default value # | ||
1596 | 9 | #################################################################### | ||
1597 | 10 | SELECT @@GLOBAL.innodb_log_archive; | ||
1598 | 11 | --echo 0 Expected | ||
1599 | 12 | |||
1600 | 13 | |||
1601 | 14 | #################################################################### | ||
1602 | 15 | # Check if Value can set # | ||
1603 | 16 | #################################################################### | ||
1604 | 17 | |||
1605 | 18 | SET @save_innodb_log_archive = @@GLOBAL.innodb_log_archive; | ||
1606 | 19 | SET @@GLOBAL.innodb_log_archive=1; | ||
1607 | 20 | |||
1608 | 21 | SELECT @@GLOBAL.innodb_log_archive; | ||
1609 | 22 | --echo 1 Expected | ||
1610 | 23 | |||
1611 | 24 | SELECT VARIABLE_VALUE | ||
1612 | 25 | FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES | ||
1613 | 26 | WHERE VARIABLE_NAME='innodb_log_archive'; | ||
1614 | 27 | --echo ON Expected | ||
1615 | 28 | |||
1616 | 29 | SET @@GLOBAL.innodb_log_archive = @save_innodb_log_archive; | ||
1617 | 30 | |||
1618 | 31 | ############################################ | ||
1619 | 32 | # Check accessing variable without GLOBAL # | ||
1620 | 33 | ############################################ | ||
1621 | 34 | SELECT @@innodb_log_archive; | ||
1622 | 35 | --echo 0 Expected | ||
1623 | 36 | |||
1624 | 37 | |||
1625 | 38 | |||
1626 | 39 | ########################################################################## | ||
1627 | 40 | # Check if innodb_log_archive can be accessed without @@ sign # | ||
1628 | 41 | ########################################################################## | ||
1629 | 42 | |||
1630 | 43 | SELECT @@innodb_log_archive; | ||
1631 | 44 | --echo 0 Expected | ||
1632 | 45 | |||
1633 | 46 | --Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1634 | 47 | SELECT @@local.innodb_log_archive; | ||
1635 | 48 | --echo Expected error 'Variable is a GLOBAL variable' | ||
1636 | 49 | |||
1637 | 50 | --Error ER_INCORRECT_GLOBAL_LOCAL_VAR | ||
1638 | 51 | SELECT @@SESSION.innodb_log_archive; | ||
1639 | 52 | --echo Expected error 'Variable is a GLOBAL variable' | ||
1640 | 53 | |||
1641 | 54 | SELECT @@GLOBAL.innodb_log_archive; | ||
1642 | 55 | --echo 0 Expected | ||
1643 | 56 | |||
1644 | 57 | --Error ER_BAD_FIELD_ERROR | ||
1645 | 58 | SELECT innodb_log_archive = @@SESSION.innodb_log_archive; | ||
1646 | 59 | --echo Expected error Unknown column 'innodb_log_archive' in 'field list' | ||
1647 | 60 | |||
1648 | 61 | |||
1649 | 0 | 62 | ||
1650 | === modified file 'Percona-Server/sql/handler.cc' | |||
1651 | --- Percona-Server/sql/handler.cc 2013-03-05 12:46:43 +0000 | |||
1652 | +++ Percona-Server/sql/handler.cc 2013-03-20 16:30:32 +0000 | |||
1653 | @@ -6867,6 +6867,48 @@ | |||
1654 | 6867 | return result; | 6867 | return result; |
1655 | 6868 | } | 6868 | } |
1656 | 6869 | 6869 | ||
1657 | 6870 | static my_bool purge_archive_logs_handlerton(THD *thd, plugin_ref plugin, | ||
1658 | 6871 | void *arg) | ||
1659 | 6872 | { | ||
1660 | 6873 | ulong before_timestamp= *(ulong*) arg; | ||
1661 | 6874 | handlerton *hton= plugin_data(plugin, handlerton *); | ||
1662 | 6875 | |||
1663 | 6876 | if (hton->purge_archive_logs == NULL) | ||
1664 | 6877 | return FALSE; | ||
1665 | 6878 | |||
1666 | 6879 | return hton->purge_archive_logs(hton, before_timestamp, NULL); | ||
1667 | 6880 | } | ||
1668 | 6881 | |||
1669 | 6882 | bool ha_purge_archive_logs(THD *thd, handlerton *db_type, void* args) | ||
1670 | 6883 | { | ||
1671 | 6884 | if (db_type == NULL) | ||
1672 | 6885 | return plugin_foreach(thd, purge_archive_logs_handlerton, | ||
1673 | 6886 | MYSQL_STORAGE_ENGINE_PLUGIN, args); | ||
1674 | 6887 | |||
1675 | 6888 | return false; | ||
1676 | 6889 | } | ||
1677 | 6890 | |||
1678 | 6891 | static my_bool purge_archive_logs_to_handlerton(THD *thd, plugin_ref plugin, | ||
1679 | 6892 | void *arg) | ||
1680 | 6893 | { | ||
1681 | 6894 | const char* to_filename= (const char*) arg; | ||
1682 | 6895 | handlerton *hton= plugin_data(plugin, handlerton *); | ||
1683 | 6896 | |||
1684 | 6897 | if (hton->purge_archive_logs == NULL) | ||
1685 | 6898 | return FALSE; | ||
1686 | 6899 | |||
1687 | 6900 | return hton->purge_archive_logs(hton, 0, to_filename); | ||
1688 | 6901 | } | ||
1689 | 6902 | |||
1690 | 6903 | bool ha_purge_archive_logs_to(THD *thd, handlerton *db_type, void* args) | ||
1691 | 6904 | { | ||
1692 | 6905 | if (db_type == NULL) | ||
1693 | 6906 | return plugin_foreach(thd, purge_archive_logs_to_handlerton, | ||
1694 | 6907 | MYSQL_STORAGE_ENGINE_PLUGIN, args); | ||
1695 | 6908 | |||
1696 | 6909 | return false; | ||
1697 | 6910 | } | ||
1698 | 6911 | |||
1699 | 6870 | /* | 6912 | /* |
1700 | 6871 | Function to check if the conditions for row-based binlogging is | 6913 | Function to check if the conditions for row-based binlogging is |
1701 | 6872 | correct for the table. | 6914 | correct for the table. |
1702 | 6873 | 6915 | ||
1703 | === modified file 'Percona-Server/sql/handler.h' | |||
1704 | --- Percona-Server/sql/handler.h 2013-03-05 12:46:43 +0000 | |||
1705 | +++ Percona-Server/sql/handler.h 2013-03-20 16:30:32 +0000 | |||
1706 | @@ -881,6 +881,9 @@ | |||
1707 | 881 | int (*fill_is_table)(handlerton *hton, THD *thd, TABLE_LIST *tables, | 881 | int (*fill_is_table)(handlerton *hton, THD *thd, TABLE_LIST *tables, |
1708 | 882 | class Item *cond, | 882 | class Item *cond, |
1709 | 883 | enum enum_schema_tables); | 883 | enum enum_schema_tables); |
1710 | 884 | int (*purge_archive_logs)(handlerton *hton, time_t before_date, | ||
1711 | 885 | const char* to_filename); | ||
1712 | 886 | |||
1713 | 884 | uint32 flags; /* global handler flags */ | 887 | uint32 flags; /* global handler flags */ |
1714 | 885 | /* | 888 | /* |
1715 | 886 | Those handlerton functions below are properly initialized at handler | 889 | Those handlerton functions below are properly initialized at handler |
1716 | @@ -3375,6 +3378,11 @@ | |||
1717 | 3375 | int ha_prepare(THD *thd); | 3378 | int ha_prepare(THD *thd); |
1718 | 3376 | int ha_recover(HASH *commit_list); | 3379 | int ha_recover(HASH *commit_list); |
1719 | 3377 | 3380 | ||
1720 | 3381 | /* remove old archived transaction logs files */ | ||
1721 | 3382 | bool ha_purge_archive_logs(THD *thd, handlerton *db_type, void* args); | ||
1722 | 3383 | bool ha_purge_archive_logs_to(THD *thd, handlerton *db_type, void* args); | ||
1723 | 3384 | |||
1724 | 3385 | |||
1725 | 3378 | /* | 3386 | /* |
1726 | 3379 | transactions: interface to low-level handlerton functions. These are | 3387 | transactions: interface to low-level handlerton functions. These are |
1727 | 3380 | intended to be used by the transaction coordinators to | 3388 | intended to be used by the transaction coordinators to |
1728 | 3381 | 3389 | ||
1729 | === modified file 'Percona-Server/sql/lex.h' | |||
1730 | --- Percona-Server/sql/lex.h 2013-03-05 12:46:43 +0000 | |||
1731 | +++ Percona-Server/sql/lex.h 2013-03-20 16:30:32 +0000 | |||
1732 | @@ -69,6 +69,7 @@ | |||
1733 | 69 | { "ANALYZE", SYM(ANALYZE_SYM)}, // this one is for ANALYZE TABLE etc | 69 | { "ANALYZE", SYM(ANALYZE_SYM)}, // this one is for ANALYZE TABLE etc |
1734 | 70 | { "AND", SYM(AND_SYM)}, | 70 | { "AND", SYM(AND_SYM)}, |
1735 | 71 | { "ANY", SYM(ANY_SYM)}, | 71 | { "ANY", SYM(ANY_SYM)}, |
1736 | 72 | { "ARCHIVED", SYM(ARCHIVED_SYM)}, | ||
1737 | 72 | { "AS", SYM(AS)}, | 73 | { "AS", SYM(AS)}, |
1738 | 73 | { "ASC", SYM(ASC)}, | 74 | { "ASC", SYM(ASC)}, |
1739 | 74 | { "ASCII", SYM(ASCII_SYM)}, | 75 | { "ASCII", SYM(ASCII_SYM)}, |
1740 | 75 | 76 | ||
1741 | === modified file 'Percona-Server/sql/mysqld.cc' | |||
1742 | --- Percona-Server/sql/mysqld.cc 2013-03-05 12:46:43 +0000 | |||
1743 | +++ Percona-Server/sql/mysqld.cc 2013-03-20 16:30:32 +0000 | |||
1744 | @@ -3418,6 +3418,8 @@ | |||
1745 | 3418 | {"prepare_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PREPARE]), SHOW_LONG_STATUS}, | 3418 | {"prepare_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PREPARE]), SHOW_LONG_STATUS}, |
1746 | 3419 | {"purge", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE]), SHOW_LONG_STATUS}, | 3419 | {"purge", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE]), SHOW_LONG_STATUS}, |
1747 | 3420 | {"purge_before_date", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE_BEFORE]), SHOW_LONG_STATUS}, | 3420 | {"purge_before_date", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE_BEFORE]), SHOW_LONG_STATUS}, |
1748 | 3421 | {"purge_archived", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE_ARCHIVE]), SHOW_LONG_STATUS}, | ||
1749 | 3422 | {"purge_archived_before_date", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE_ARCHIVE_BEFORE]), SHOW_LONG_STATUS}, | ||
1750 | 3421 | {"release_savepoint", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RELEASE_SAVEPOINT]), SHOW_LONG_STATUS}, | 3423 | {"release_savepoint", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RELEASE_SAVEPOINT]), SHOW_LONG_STATUS}, |
1751 | 3422 | {"rename_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RENAME_TABLE]), SHOW_LONG_STATUS}, | 3424 | {"rename_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RENAME_TABLE]), SHOW_LONG_STATUS}, |
1752 | 3423 | {"rename_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RENAME_USER]), SHOW_LONG_STATUS}, | 3425 | {"rename_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RENAME_USER]), SHOW_LONG_STATUS}, |
1753 | 3424 | 3426 | ||
1754 | === modified file 'Percona-Server/sql/sql_cmd.h' | |||
1755 | --- Percona-Server/sql/sql_cmd.h 2012-12-04 08:24:59 +0000 | |||
1756 | +++ Percona-Server/sql/sql_cmd.h 2013-03-20 16:30:32 +0000 | |||
1757 | @@ -89,6 +89,8 @@ | |||
1758 | 89 | SQLCOM_SHOW_RELAYLOG_EVENTS, | 89 | SQLCOM_SHOW_RELAYLOG_EVENTS, |
1759 | 90 | SQLCOM_GET_DIAGNOSTICS, | 90 | SQLCOM_GET_DIAGNOSTICS, |
1760 | 91 | SQLCOM_ALTER_USER, | 91 | SQLCOM_ALTER_USER, |
1761 | 92 | SQLCOM_PURGE_ARCHIVE, | ||
1762 | 93 | SQLCOM_PURGE_ARCHIVE_BEFORE, | ||
1763 | 92 | /* | 94 | /* |
1764 | 93 | When a command is added here, be sure it's also added in mysqld.cc | 95 | When a command is added here, be sure it's also added in mysqld.cc |
1765 | 94 | in "struct show_var_st status_vars[]= {" ... | 96 | in "struct show_var_st status_vars[]= {" ... |
1766 | 95 | 97 | ||
1767 | === modified file 'Percona-Server/sql/sql_parse.cc' | |||
1768 | --- Percona-Server/sql/sql_parse.cc 2013-03-05 12:46:43 +0000 | |||
1769 | +++ Percona-Server/sql/sql_parse.cc 2013-03-20 16:30:32 +0000 | |||
1770 | @@ -2655,6 +2655,49 @@ | |||
1771 | 2655 | res = purge_master_logs_before_date(thd, (ulong)it->val_int()); | 2655 | res = purge_master_logs_before_date(thd, (ulong)it->val_int()); |
1772 | 2656 | break; | 2656 | break; |
1773 | 2657 | } | 2657 | } |
1774 | 2658 | case SQLCOM_PURGE_ARCHIVE: | ||
1775 | 2659 | { | ||
1776 | 2660 | if (check_global_access(thd, SUPER_ACL)) | ||
1777 | 2661 | goto error; | ||
1778 | 2662 | /* PURGE ARCHIVED LOGS TO 'file' */ | ||
1779 | 2663 | if (!ha_purge_archive_logs_to(NULL, NULL, lex->to_log)) { | ||
1780 | 2664 | my_ok(thd); | ||
1781 | 2665 | } else { | ||
1782 | 2666 | my_error(ER_LOG_PURGE_UNKNOWN_ERR, MYF(0), "PURGE ARCHIVE LOGS TO"); | ||
1783 | 2667 | goto error; | ||
1784 | 2668 | } | ||
1785 | 2669 | |||
1786 | 2670 | break; | ||
1787 | 2671 | } | ||
1788 | 2672 | case SQLCOM_PURGE_ARCHIVE_BEFORE: | ||
1789 | 2673 | { | ||
1790 | 2674 | Item *it; | ||
1791 | 2675 | |||
1792 | 2676 | if (check_global_access(thd, SUPER_ACL)) | ||
1793 | 2677 | goto error; | ||
1794 | 2678 | /* PURGE ARCHIVE LOGS BEFORE 'data' */ | ||
1795 | 2679 | it= (Item *)lex->value_list.head(); | ||
1796 | 2680 | if ((!it->fixed && it->fix_fields(lex->thd, &it)) || | ||
1797 | 2681 | it->check_cols(1)) | ||
1798 | 2682 | { | ||
1799 | 2683 | my_error(ER_WRONG_ARGUMENTS, MYF(0), "PURGE ARCHIVE LOGS BEFORE"); | ||
1800 | 2684 | goto error; | ||
1801 | 2685 | } | ||
1802 | 2686 | it= new Item_func_unix_timestamp(it); | ||
1803 | 2687 | /* | ||
1804 | 2688 | it is OK only emulate fix_fieds, because we need only | ||
1805 | 2689 | value of constant | ||
1806 | 2690 | */ | ||
1807 | 2691 | it->quick_fix_field(); | ||
1808 | 2692 | ulong before_timestamp = (ulong)it->val_int(); | ||
1809 | 2693 | if (!ha_purge_archive_logs(NULL, NULL, &before_timestamp )) { | ||
1810 | 2694 | my_ok(thd); | ||
1811 | 2695 | } else { | ||
1812 | 2696 | my_error(ER_LOG_PURGE_UNKNOWN_ERR, MYF(0), "PURGE ARCHIVE LOGS BEFORE"); | ||
1813 | 2697 | goto error; | ||
1814 | 2698 | } | ||
1815 | 2699 | break; | ||
1816 | 2700 | } | ||
1817 | 2658 | #endif | 2701 | #endif |
1818 | 2659 | case SQLCOM_SHOW_WARNS: | 2702 | case SQLCOM_SHOW_WARNS: |
1819 | 2660 | { | 2703 | { |
1820 | 2661 | 2704 | ||
1821 | === modified file 'Percona-Server/sql/sql_yacc.yy' | |||
1822 | --- Percona-Server/sql/sql_yacc.yy 2013-03-05 12:46:43 +0000 | |||
1823 | +++ Percona-Server/sql/sql_yacc.yy 2013-03-20 16:30:32 +0000 | |||
1824 | @@ -1064,6 +1064,7 @@ | |||
1825 | 1064 | %token AND_AND_SYM /* OPERATOR */ | 1064 | %token AND_AND_SYM /* OPERATOR */ |
1826 | 1065 | %token AND_SYM /* SQL-2003-R */ | 1065 | %token AND_SYM /* SQL-2003-R */ |
1827 | 1066 | %token ANY_SYM /* SQL-2003-R */ | 1066 | %token ANY_SYM /* SQL-2003-R */ |
1828 | 1067 | %token ARCHIVED_SYM /* MYSQL */ | ||
1829 | 1067 | %token AS /* SQL-2003-R */ | 1068 | %token AS /* SQL-2003-R */ |
1830 | 1068 | %token ASC /* SQL-2003-N */ | 1069 | %token ASC /* SQL-2003-N */ |
1831 | 1069 | %token ASCII_SYM /* MYSQL-FUNC */ | 1070 | %token ASCII_SYM /* MYSQL-FUNC */ |
1832 | @@ -12942,7 +12943,8 @@ | |||
1833 | 12942 | ; | 12943 | ; |
1834 | 12943 | 12944 | ||
1835 | 12944 | purge_options: | 12945 | purge_options: |
1837 | 12945 | master_or_binary LOGS_SYM purge_option | 12946 | ARCHIVED_SYM LOGS_SYM purge_archive_option |
1838 | 12947 | | master_or_binary LOGS_SYM purge_option | ||
1839 | 12946 | ; | 12948 | ; |
1840 | 12947 | 12949 | ||
1841 | 12948 | purge_option: | 12950 | purge_option: |
1842 | @@ -12959,6 +12961,21 @@ | |||
1843 | 12959 | } | 12961 | } |
1844 | 12960 | ; | 12962 | ; |
1845 | 12961 | 12963 | ||
1846 | 12964 | purge_archive_option: | ||
1847 | 12965 | TO_SYM TEXT_STRING_sys | ||
1848 | 12966 | { | ||
1849 | 12967 | Lex->to_log = $2.str; | ||
1850 | 12968 | Lex->sql_command= SQLCOM_PURGE_ARCHIVE; | ||
1851 | 12969 | } | ||
1852 | 12970 | | BEFORE_SYM expr | ||
1853 | 12971 | { | ||
1854 | 12972 | LEX *lex= Lex; | ||
1855 | 12973 | lex->value_list.empty(); | ||
1856 | 12974 | lex->value_list.push_front($2); | ||
1857 | 12975 | lex->sql_command= SQLCOM_PURGE_ARCHIVE_BEFORE; | ||
1858 | 12976 | } | ||
1859 | 12977 | ; | ||
1860 | 12978 | |||
1861 | 12962 | /* kill threads */ | 12979 | /* kill threads */ |
1862 | 12963 | 12980 | ||
1863 | 12964 | kill: | 12981 | kill: |
1864 | @@ -14080,6 +14097,7 @@ | |||
1865 | 14080 | | AGGREGATE_SYM {} | 14097 | | AGGREGATE_SYM {} |
1866 | 14081 | | ALGORITHM_SYM {} | 14098 | | ALGORITHM_SYM {} |
1867 | 14082 | | ANALYSE_SYM {} | 14099 | | ANALYSE_SYM {} |
1868 | 14100 | | ARCHIVED_SYM {} | ||
1869 | 14083 | | ANY_SYM {} | 14101 | | ANY_SYM {} |
1870 | 14084 | | AT_SYM {} | 14102 | | AT_SYM {} |
1871 | 14085 | | AUTO_INC {} | 14103 | | AUTO_INC {} |
1872 | 14086 | 14104 | ||
1873 | === modified file 'Percona-Server/storage/innobase/fil/fil0fil.cc' | |||
1874 | --- Percona-Server/storage/innobase/fil/fil0fil.cc 2013-03-05 12:46:43 +0000 | |||
1875 | +++ Percona-Server/storage/innobase/fil/fil0fil.cc 2013-03-20 16:30:32 +0000 | |||
1876 | @@ -1211,6 +1211,39 @@ | |||
1877 | 1211 | 1211 | ||
1878 | 1212 | mutex_exit(&fil_system->mutex); | 1212 | mutex_exit(&fil_system->mutex); |
1879 | 1213 | } | 1213 | } |
1880 | 1214 | |||
1881 | 1215 | /****************************************************************//** | ||
1882 | 1216 | Check is there node in file space with given name. */ | ||
1883 | 1217 | UNIV_INTERN | ||
1884 | 1218 | ibool | ||
1885 | 1219 | fil_space_contains_node( | ||
1886 | 1220 | /*====================*/ | ||
1887 | 1221 | ulint id, /*!< in: space id */ | ||
1888 | 1222 | char* node_name) /*!< in: node name */ | ||
1889 | 1223 | { | ||
1890 | 1224 | fil_node_t* node; | ||
1891 | 1225 | fil_space_t* space; | ||
1892 | 1226 | |||
1893 | 1227 | mutex_enter(&fil_system->mutex); | ||
1894 | 1228 | |||
1895 | 1229 | space = fil_space_get_by_id(id); | ||
1896 | 1230 | |||
1897 | 1231 | ut_a(space); | ||
1898 | 1232 | |||
1899 | 1233 | for (node = UT_LIST_GET_FIRST(space->chain); node != NULL; | ||
1900 | 1234 | node = UT_LIST_GET_NEXT(chain, node)) { | ||
1901 | 1235 | |||
1902 | 1236 | if (ut_strcmp(node->name, node_name) == 0) { | ||
1903 | 1237 | mutex_exit(&fil_system->mutex); | ||
1904 | 1238 | return(TRUE); | ||
1905 | 1239 | } | ||
1906 | 1240 | |||
1907 | 1241 | } | ||
1908 | 1242 | |||
1909 | 1243 | mutex_exit(&fil_system->mutex); | ||
1910 | 1244 | return(FALSE); | ||
1911 | 1245 | } | ||
1912 | 1246 | |||
1913 | 1214 | #endif /* UNIV_LOG_ARCHIVE */ | 1247 | #endif /* UNIV_LOG_ARCHIVE */ |
1914 | 1215 | 1248 | ||
1915 | 1216 | /*******************************************************************//** | 1249 | /*******************************************************************//** |
1916 | @@ -1942,12 +1975,6 @@ | |||
1917 | 1942 | contain sensible data */ | 1975 | contain sensible data */ |
1918 | 1943 | ulint* flags, /*!< out: tablespace flags */ | 1976 | ulint* flags, /*!< out: tablespace flags */ |
1919 | 1944 | ulint* space_id, /*!< out: tablespace ID */ | 1977 | ulint* space_id, /*!< out: tablespace ID */ |
1920 | 1945 | #ifdef UNIV_LOG_ARCHIVE | ||
1921 | 1946 | ulint* min_arch_log_no, /*!< out: min of archived | ||
1922 | 1947 | log numbers in data files */ | ||
1923 | 1948 | ulint* max_arch_log_no, /*!< out: max of archived | ||
1924 | 1949 | log numbers in data files */ | ||
1925 | 1950 | #endif /* UNIV_LOG_ARCHIVE */ | ||
1926 | 1951 | lsn_t* min_flushed_lsn, /*!< out: min of flushed | 1978 | lsn_t* min_flushed_lsn, /*!< out: min of flushed |
1927 | 1952 | lsn values in data files */ | 1979 | lsn values in data files */ |
1928 | 1953 | lsn_t* max_flushed_lsn) /*!< out: max of flushed | 1980 | lsn_t* max_flushed_lsn) /*!< out: max of flushed |
1929 | @@ -1976,10 +2003,7 @@ | |||
1930 | 1976 | if (!one_read_already) { | 2003 | if (!one_read_already) { |
1931 | 1977 | *min_flushed_lsn = flushed_lsn; | 2004 | *min_flushed_lsn = flushed_lsn; |
1932 | 1978 | *max_flushed_lsn = flushed_lsn; | 2005 | *max_flushed_lsn = flushed_lsn; |
1937 | 1979 | #ifdef UNIV_LOG_ARCHIVE | 2006 | |
1934 | 1980 | *min_arch_log_no = arch_log_no; | ||
1935 | 1981 | *max_arch_log_no = arch_log_no; | ||
1936 | 1982 | #endif /* UNIV_LOG_ARCHIVE */ | ||
1938 | 1983 | return; | 2007 | return; |
1939 | 1984 | } | 2008 | } |
1940 | 1985 | 2009 | ||
1941 | @@ -1989,14 +2013,6 @@ | |||
1942 | 1989 | if (*max_flushed_lsn < flushed_lsn) { | 2013 | if (*max_flushed_lsn < flushed_lsn) { |
1943 | 1990 | *max_flushed_lsn = flushed_lsn; | 2014 | *max_flushed_lsn = flushed_lsn; |
1944 | 1991 | } | 2015 | } |
1945 | 1992 | #ifdef UNIV_LOG_ARCHIVE | ||
1946 | 1993 | if (*min_arch_log_no > arch_log_no) { | ||
1947 | 1994 | *min_arch_log_no = arch_log_no; | ||
1948 | 1995 | } | ||
1949 | 1996 | if (*max_arch_log_no < arch_log_no) { | ||
1950 | 1997 | *max_arch_log_no = arch_log_no; | ||
1951 | 1998 | } | ||
1952 | 1999 | #endif /* UNIV_LOG_ARCHIVE */ | ||
1953 | 2000 | } | 2016 | } |
1954 | 2001 | 2017 | ||
1955 | 2002 | /*================ SINGLE-TABLE TABLESPACES ==========================*/ | 2018 | /*================ SINGLE-TABLE TABLESPACES ==========================*/ |
1956 | @@ -3499,9 +3515,6 @@ | |||
1957 | 3499 | lsn_t lsn; /*!< Flushed LSN from header page */ | 3515 | lsn_t lsn; /*!< Flushed LSN from header page */ |
1958 | 3500 | ulint id; /*!< Space ID */ | 3516 | ulint id; /*!< Space ID */ |
1959 | 3501 | ulint flags; /*!< Tablespace flags */ | 3517 | ulint flags; /*!< Tablespace flags */ |
1960 | 3502 | #ifdef UNIV_LOG_ARCHIVE | ||
1961 | 3503 | ulint arch_log_no; /*!< latest archived log file number */ | ||
1962 | 3504 | #endif /* UNIV_LOG_ARCHIVE */ | ||
1963 | 3505 | }; | 3518 | }; |
1964 | 3506 | 3519 | ||
1965 | 3507 | /********************************************************************//** | 3520 | /********************************************************************//** |
1966 | @@ -3547,6 +3560,7 @@ | |||
1967 | 3547 | fsp_open_info remote; | 3560 | fsp_open_info remote; |
1968 | 3548 | ulint tablespaces_found = 0; | 3561 | ulint tablespaces_found = 0; |
1969 | 3549 | ulint valid_tablespaces_found = 0; | 3562 | ulint valid_tablespaces_found = 0; |
1970 | 3563 | ulint space_arch_log_no; | ||
1971 | 3550 | 3564 | ||
1972 | 3551 | #ifdef UNIV_SYNC_DEBUG | 3565 | #ifdef UNIV_SYNC_DEBUG |
1973 | 3552 | ut_ad(!fix_dict || rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); | 3566 | ut_ad(!fix_dict || rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); |
1974 | @@ -3637,9 +3651,6 @@ | |||
1975 | 3637 | if (def.success) { | 3651 | if (def.success) { |
1976 | 3638 | fil_read_first_page( | 3652 | fil_read_first_page( |
1977 | 3639 | def.file, FALSE, &def.flags, &def.id, | 3653 | def.file, FALSE, &def.flags, &def.id, |
1978 | 3640 | #ifdef UNIV_LOG_ARCHIVE | ||
1979 | 3641 | &space_arch_log_no, &space_arch_log_no, | ||
1980 | 3642 | #endif /* UNIV_LOG_ARCHIVE */ | ||
1981 | 3643 | &def.lsn, &def.lsn); | 3654 | &def.lsn, &def.lsn); |
1982 | 3644 | 3655 | ||
1983 | 3645 | /* Validate this single-table-tablespace with SYS_TABLES, | 3656 | /* Validate this single-table-tablespace with SYS_TABLES, |
1984 | @@ -3661,9 +3672,6 @@ | |||
1985 | 3661 | if (remote.success) { | 3672 | if (remote.success) { |
1986 | 3662 | fil_read_first_page( | 3673 | fil_read_first_page( |
1987 | 3663 | remote.file, FALSE, &remote.flags, &remote.id, | 3674 | remote.file, FALSE, &remote.flags, &remote.id, |
1988 | 3664 | #ifdef UNIV_LOG_ARCHIVE | ||
1989 | 3665 | &remote.arch_log_no, &remote.arch_log_no, | ||
1990 | 3666 | #endif /* UNIV_LOG_ARCHIVE */ | ||
1991 | 3667 | &remote.lsn, &remote.lsn); | 3675 | &remote.lsn, &remote.lsn); |
1992 | 3668 | 3676 | ||
1993 | 3669 | /* Validate this single-table-tablespace with SYS_TABLES, | 3677 | /* Validate this single-table-tablespace with SYS_TABLES, |
1994 | @@ -3686,9 +3694,6 @@ | |||
1995 | 3686 | if (dict.success) { | 3694 | if (dict.success) { |
1996 | 3687 | fil_read_first_page( | 3695 | fil_read_first_page( |
1997 | 3688 | dict.file, FALSE, &dict.flags, &dict.id, | 3696 | dict.file, FALSE, &dict.flags, &dict.id, |
1998 | 3689 | #ifdef UNIV_LOG_ARCHIVE | ||
1999 | 3690 | &dict.arch_log_no, &dict.arch_log_no, | ||
2000 | 3691 | #endif /* UNIV_LOG_ARCHIVE */ | ||
2001 | 3692 | &dict.lsn, &dict.lsn); | 3697 | &dict.lsn, &dict.lsn); |
2002 | 3693 | 3698 | ||
2003 | 3694 | /* Validate this single-table-tablespace with SYS_TABLES, | 3699 | /* Validate this single-table-tablespace with SYS_TABLES, |
2004 | @@ -3916,9 +3921,6 @@ | |||
2005 | 3916 | { | 3921 | { |
2006 | 3917 | fil_read_first_page( | 3922 | fil_read_first_page( |
2007 | 3918 | fsp->file, FALSE, &fsp->flags, &fsp->id, | 3923 | fsp->file, FALSE, &fsp->flags, &fsp->id, |
2008 | 3919 | #ifdef UNIV_LOG_ARCHIVE | ||
2009 | 3920 | &fsp->arch_log_no, &fsp->arch_log_no, | ||
2010 | 3921 | #endif /* UNIV_LOG_ARCHIVE */ | ||
2011 | 3922 | &fsp->lsn, &fsp->lsn); | 3924 | &fsp->lsn, &fsp->lsn); |
2012 | 3923 | 3925 | ||
2013 | 3924 | if (fsp->id == ULINT_UNDEFINED || fsp->id == 0) { | 3926 | if (fsp->id == ULINT_UNDEFINED || fsp->id == 0) { |
2014 | 3925 | 3927 | ||
2015 | === modified file 'Percona-Server/storage/innobase/handler/ha_innodb.cc' | |||
2016 | --- Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-03-05 12:46:43 +0000 | |||
2017 | +++ Percona-Server/storage/innobase/handler/ha_innodb.cc 2013-03-20 16:30:32 +0000 | |||
2018 | @@ -989,6 +989,32 @@ | |||
2019 | 989 | name to lower case */ | 989 | name to lower case */ |
2020 | 990 | 990 | ||
2021 | 991 | /*************************************************************//** | 991 | /*************************************************************//** |
2022 | 992 | Removes old archived transaction log files. | ||
2023 | 993 | @return non-zero if error */ | ||
2024 | 994 | static int innobase_purge_archive_logs( | ||
2025 | 995 | handlerton *hton, /*!< in: InnoDB handlerton */ | ||
2026 | 996 | time_t before_date, /*!< in: all files modified | ||
2027 | 997 | before timestamp should be removed */ | ||
2028 | 998 | const char* to_filename) /*!< in: this and earler files | ||
2029 | 999 | should be removed */ | ||
2030 | 1000 | { | ||
2031 | 1001 | ulint err= DB_SUCCESS; | ||
2032 | 1002 | if (before_date > 0) { | ||
2033 | 1003 | err= purge_archived_logs(before_date, 0); | ||
2034 | 1004 | } else if (to_filename) { | ||
2035 | 1005 | if (is_prefix(to_filename, IB_ARCHIVED_LOGS_PREFIX)) { | ||
2036 | 1006 | unsigned long long log_file_lsn = strtoll(to_filename | ||
2037 | 1007 | + IB_ARCHIVED_LOGS_PREFIX_LEN, | ||
2038 | 1008 | NULL, 10); | ||
2039 | 1009 | if (log_file_lsn > 0) { | ||
2040 | 1010 | err= purge_archived_logs(0, log_file_lsn); | ||
2041 | 1011 | } | ||
2042 | 1012 | } | ||
2043 | 1013 | } | ||
2044 | 1014 | return (err == DB_SUCCESS) ? 0 : 1; | ||
2045 | 1015 | } | ||
2046 | 1016 | |||
2047 | 1017 | /*************************************************************//** | ||
2048 | 992 | Check for a valid value of innobase_commit_concurrency. | 1018 | Check for a valid value of innobase_commit_concurrency. |
2049 | 993 | @return 0 for valid innodb_commit_concurrency */ | 1019 | @return 0 for valid innodb_commit_concurrency */ |
2050 | 994 | static | 1020 | static |
2051 | @@ -2760,6 +2786,7 @@ | |||
2052 | 2760 | 2786 | ||
2053 | 2761 | innobase_hton->release_temporary_latches = | 2787 | innobase_hton->release_temporary_latches = |
2054 | 2762 | innobase_release_temporary_latches; | 2788 | innobase_release_temporary_latches; |
2055 | 2789 | innobase_hton->purge_archive_logs = innobase_purge_archive_logs; | ||
2056 | 2763 | 2790 | ||
2057 | 2764 | innobase_hton->data = &innodb_api_cb; | 2791 | innobase_hton->data = &innodb_api_cb; |
2058 | 2765 | 2792 | ||
2059 | @@ -2862,12 +2889,9 @@ | |||
2060 | 2862 | } | 2889 | } |
2061 | 2863 | 2890 | ||
2062 | 2864 | #ifdef UNIV_LOG_ARCHIVE | 2891 | #ifdef UNIV_LOG_ARCHIVE |
2069 | 2865 | /* Since innodb_log_arch_dir has no relevance under MySQL, | 2892 | if (!innobase_log_arch_dir) { |
2070 | 2866 | starting from 4.0.6 we always set it the same as | 2893 | innobase_log_arch_dir = srv_log_group_home_dir; |
2071 | 2867 | innodb_log_group_home_dir: */ | 2894 | } |
2066 | 2868 | |||
2067 | 2869 | innobase_log_arch_dir = innobase_log_group_home_dir; | ||
2068 | 2870 | |||
2072 | 2871 | srv_arch_dir = innobase_log_arch_dir; | 2895 | srv_arch_dir = innobase_log_arch_dir; |
2073 | 2872 | #endif /* UNIG_LOG_ARCHIVE */ | 2896 | #endif /* UNIG_LOG_ARCHIVE */ |
2074 | 2873 | 2897 | ||
2075 | @@ -13684,6 +13708,45 @@ | |||
2076 | 13684 | } | 13708 | } |
2077 | 13685 | 13709 | ||
2078 | 13686 | /****************************************************************//** | 13710 | /****************************************************************//** |
2079 | 13711 | Update the system variable innodb_log_arch_expire_sec using | ||
2080 | 13712 | the "saved" value. This function is registered as a callback with MySQL. */ | ||
2081 | 13713 | static | ||
2082 | 13714 | void | ||
2083 | 13715 | innodb_log_archive_expire_update( | ||
2084 | 13716 | /*==============================*/ | ||
2085 | 13717 | THD* thd, /*!< in: thread handle */ | ||
2086 | 13718 | struct st_mysql_sys_var* var, /*!< in: pointer to | ||
2087 | 13719 | system variable */ | ||
2088 | 13720 | void* var_ptr, /*!< out: unused */ | ||
2089 | 13721 | const void* save) /*!< in: immediate result | ||
2090 | 13722 | from check function */ | ||
2091 | 13723 | { | ||
2092 | 13724 | srv_log_arch_expire_sec = *(ulint*) save; | ||
2093 | 13725 | } | ||
2094 | 13726 | |||
2095 | 13727 | static | ||
2096 | 13728 | void | ||
2097 | 13729 | innodb_log_archive_update( | ||
2098 | 13730 | /*======================*/ | ||
2099 | 13731 | THD* thd, | ||
2100 | 13732 | struct st_mysql_sys_var* var, | ||
2101 | 13733 | void* var_ptr, | ||
2102 | 13734 | const void* save) | ||
2103 | 13735 | { | ||
2104 | 13736 | my_bool in_val = *static_cast<const my_bool*>(save); | ||
2105 | 13737 | |||
2106 | 13738 | if (in_val) { | ||
2107 | 13739 | /* turn archiving on */ | ||
2108 | 13740 | srv_log_archive_on = innobase_log_archive = 1; | ||
2109 | 13741 | log_archive_archivelog(); | ||
2110 | 13742 | } else { | ||
2111 | 13743 | /* turn archivng off */ | ||
2112 | 13744 | srv_log_archive_on = innobase_log_archive = 0; | ||
2113 | 13745 | log_archive_noarchivelog(); | ||
2114 | 13746 | } | ||
2115 | 13747 | } | ||
2116 | 13748 | |||
2117 | 13749 | /****************************************************************//** | ||
2118 | 13687 | Update the system variable innodb_max_dirty_pages_pct using the "saved" | 13750 | Update the system variable innodb_max_dirty_pages_pct using the "saved" |
2119 | 13688 | value. This function is registered as a callback with MySQL. */ | 13751 | value. This function is registered as a callback with MySQL. */ |
2120 | 13689 | static | 13752 | static |
2121 | @@ -15486,14 +15549,20 @@ | |||
2122 | 15486 | "Where full logs should be archived.", NULL, NULL, NULL); | 15549 | "Where full logs should be archived.", NULL, NULL, NULL); |
2123 | 15487 | 15550 | ||
2124 | 15488 | static MYSQL_SYSVAR_BOOL(log_archive, innobase_log_archive, | 15551 | static MYSQL_SYSVAR_BOOL(log_archive, innobase_log_archive, |
2127 | 15489 | PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, | 15552 | PLUGIN_VAR_OPCMDARG, |
2128 | 15490 | "Set to 1 if you want to have logs archived.", NULL, NULL, FALSE); | 15553 | "Set to 1 if you want to have logs archived.", |
2129 | 15554 | NULL, innodb_log_archive_update, FALSE); | ||
2130 | 15491 | #endif /* UNIV_LOG_ARCHIVE */ | 15555 | #endif /* UNIV_LOG_ARCHIVE */ |
2131 | 15492 | 15556 | ||
2132 | 15493 | static MYSQL_SYSVAR_STR(log_group_home_dir, srv_log_group_home_dir, | 15557 | static MYSQL_SYSVAR_STR(log_group_home_dir, srv_log_group_home_dir, |
2133 | 15494 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, | 15558 | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, |
2134 | 15495 | "Path to InnoDB log files.", NULL, NULL, NULL); | 15559 | "Path to InnoDB log files.", NULL, NULL, NULL); |
2135 | 15496 | 15560 | ||
2136 | 15561 | static MYSQL_SYSVAR_ULONG(log_arch_expire_sec, | ||
2137 | 15562 | srv_log_arch_expire_sec, PLUGIN_VAR_OPCMDARG, | ||
2138 | 15563 | "Expiration time for archived innodb transaction logs.", | ||
2139 | 15564 | NULL, innodb_log_archive_expire_update, 0, 0, ~0L, 0); | ||
2140 | 15565 | |||
2141 | 15497 | static MYSQL_SYSVAR_ULONG(max_dirty_pages_pct, srv_max_buf_pool_modified_pct, | 15566 | static MYSQL_SYSVAR_ULONG(max_dirty_pages_pct, srv_max_buf_pool_modified_pct, |
2142 | 15498 | PLUGIN_VAR_RQCMDARG, | 15567 | PLUGIN_VAR_RQCMDARG, |
2143 | 15499 | "Percentage of dirty pages allowed in bufferpool.", | 15568 | "Percentage of dirty pages allowed in bufferpool.", |
2144 | @@ -16140,6 +16209,7 @@ | |||
2145 | 16140 | #ifdef UNIV_LOG_ARCHIVE | 16209 | #ifdef UNIV_LOG_ARCHIVE |
2146 | 16141 | MYSQL_SYSVAR(log_arch_dir), | 16210 | MYSQL_SYSVAR(log_arch_dir), |
2147 | 16142 | MYSQL_SYSVAR(log_archive), | 16211 | MYSQL_SYSVAR(log_archive), |
2148 | 16212 | MYSQL_SYSVAR(log_arch_expire_sec), | ||
2149 | 16143 | #endif /* UNIV_LOG_ARCHIVE */ | 16213 | #endif /* UNIV_LOG_ARCHIVE */ |
2150 | 16144 | MYSQL_SYSVAR(page_size), | 16214 | MYSQL_SYSVAR(page_size), |
2151 | 16145 | MYSQL_SYSVAR(log_buffer_size), | 16215 | MYSQL_SYSVAR(log_buffer_size), |
2152 | 16146 | 16216 | ||
2153 | === modified file 'Percona-Server/storage/innobase/include/fil0fil.h' | |||
2154 | --- Percona-Server/storage/innobase/include/fil0fil.h 2013-03-05 12:46:43 +0000 | |||
2155 | +++ Percona-Server/storage/innobase/include/fil0fil.h 2013-03-20 16:30:32 +0000 | |||
2156 | @@ -229,6 +229,14 @@ | |||
2157 | 229 | ulint trunc_len); /*!< in: truncate by this much; it is an error | 229 | ulint trunc_len); /*!< in: truncate by this much; it is an error |
2158 | 230 | if this does not equal to the combined size of | 230 | if this does not equal to the combined size of |
2159 | 231 | some initial files in the space */ | 231 | some initial files in the space */ |
2160 | 232 | /****************************************************************//** | ||
2161 | 233 | Check is there node in file space with given name. */ | ||
2162 | 234 | UNIV_INTERN | ||
2163 | 235 | ibool | ||
2164 | 236 | fil_space_contains_node( | ||
2165 | 237 | /*====================*/ | ||
2166 | 238 | ulint id, /*!< in: space id */ | ||
2167 | 239 | char* node_name); /*!< in: node name */ | ||
2168 | 232 | #endif /* UNIV_LOG_ARCHIVE */ | 240 | #endif /* UNIV_LOG_ARCHIVE */ |
2169 | 233 | /*******************************************************************//** | 241 | /*******************************************************************//** |
2170 | 234 | Creates a space memory object and puts it to the 'fil system' hash table. | 242 | Creates a space memory object and puts it to the 'fil system' hash table. |
2171 | @@ -371,12 +379,6 @@ | |||
2172 | 371 | contain sensible data */ | 379 | contain sensible data */ |
2173 | 372 | ulint* flags, /*!< out: tablespace flags */ | 380 | ulint* flags, /*!< out: tablespace flags */ |
2174 | 373 | ulint* space_id, /*!< out: tablespace ID */ | 381 | ulint* space_id, /*!< out: tablespace ID */ |
2175 | 374 | #ifdef UNIV_LOG_ARCHIVE | ||
2176 | 375 | ulint* min_arch_log_no, /*!< out: min of archived | ||
2177 | 376 | log numbers in data files */ | ||
2178 | 377 | ulint* max_arch_log_no, /*!< out: max of archived | ||
2179 | 378 | log numbers in data files */ | ||
2180 | 379 | #endif /* UNIV_LOG_ARCHIVE */ | ||
2181 | 380 | lsn_t* min_flushed_lsn, /*!< out: min of flushed | 382 | lsn_t* min_flushed_lsn, /*!< out: min of flushed |
2182 | 381 | lsn values in data files */ | 383 | lsn values in data files */ |
2183 | 382 | lsn_t* max_flushed_lsn); /*!< out: max of flushed | 384 | lsn_t* max_flushed_lsn); /*!< out: max of flushed |
2184 | 383 | 385 | ||
2185 | === modified file 'Percona-Server/storage/innobase/include/log0log.h' | |||
2186 | --- Percona-Server/storage/innobase/include/log0log.h 2013-03-05 12:46:43 +0000 | |||
2187 | +++ Percona-Server/storage/innobase/include/log0log.h 2013-03-20 16:30:32 +0000 | |||
2188 | @@ -70,6 +70,9 @@ | |||
2189 | 70 | /** Maximum number of log groups in log_group_t::checkpoint_buf */ | 70 | /** Maximum number of log groups in log_group_t::checkpoint_buf */ |
2190 | 71 | #define LOG_MAX_N_GROUPS 32 | 71 | #define LOG_MAX_N_GROUPS 32 |
2191 | 72 | 72 | ||
2192 | 73 | #define IB_ARCHIVED_LOGS_PREFIX "ib_log_archive_" | ||
2193 | 74 | #define IB_ARCHIVED_LOGS_PREFIX_LEN 15 | ||
2194 | 75 | |||
2195 | 73 | /*******************************************************************//** | 76 | /*******************************************************************//** |
2196 | 74 | Calculates where in log files we find a specified lsn. | 77 | Calculates where in log files we find a specified lsn. |
2197 | 75 | @return log file number */ | 78 | @return log file number */ |
2198 | @@ -340,6 +343,7 @@ | |||
2199 | 340 | log_archived_file_name_gen( | 343 | log_archived_file_name_gen( |
2200 | 341 | /*=======================*/ | 344 | /*=======================*/ |
2201 | 342 | char* buf, /*!< in: buffer where to write */ | 345 | char* buf, /*!< in: buffer where to write */ |
2202 | 346 | ulint buf_len,/*!< in: buffer length */ | ||
2203 | 343 | ulint id, /*!< in: group id */ | 347 | ulint id, /*!< in: group id */ |
2204 | 344 | ulint file_no);/*!< in: file number */ | 348 | ulint file_no);/*!< in: file number */ |
2205 | 345 | #else /* !UNIV_HOTBACKUP */ | 349 | #else /* !UNIV_HOTBACKUP */ |
2206 | 346 | 350 | ||
2207 | === modified file 'Percona-Server/storage/innobase/include/log0recv.h' | |||
2208 | --- Percona-Server/storage/innobase/include/log0recv.h 2013-03-05 12:46:43 +0000 | |||
2209 | +++ Percona-Server/storage/innobase/include/log0recv.h 2013-03-20 16:30:32 +0000 | |||
2210 | @@ -297,7 +297,7 @@ | |||
2211 | 297 | Recovers from archived log files, and also from log files, if they exist. | 297 | Recovers from archived log files, and also from log files, if they exist. |
2212 | 298 | @return error code or DB_SUCCESS */ | 298 | @return error code or DB_SUCCESS */ |
2213 | 299 | UNIV_INTERN | 299 | UNIV_INTERN |
2215 | 300 | ulint | 300 | dberr_t |
2216 | 301 | recv_recovery_from_archive_start( | 301 | recv_recovery_from_archive_start( |
2217 | 302 | /*=============================*/ | 302 | /*=============================*/ |
2218 | 303 | lsn_t min_flushed_lsn,/*!< in: min flushed lsn field from the | 303 | lsn_t min_flushed_lsn,/*!< in: min flushed lsn field from the |
2219 | 304 | 304 | ||
2220 | === modified file 'Percona-Server/storage/innobase/include/srv0srv.h' | |||
2221 | --- Percona-Server/storage/innobase/include/srv0srv.h 2013-03-05 12:46:43 +0000 | |||
2222 | +++ Percona-Server/storage/innobase/include/srv0srv.h 2013-03-20 16:30:32 +0000 | |||
2223 | @@ -348,6 +348,8 @@ | |||
2224 | 348 | extern ulong srv_doublewrite_batch_size; | 348 | extern ulong srv_doublewrite_batch_size; |
2225 | 349 | extern ulong srv_checksum_algorithm; | 349 | extern ulong srv_checksum_algorithm; |
2226 | 350 | 350 | ||
2227 | 351 | extern ulong srv_log_arch_expire_sec; | ||
2228 | 352 | |||
2229 | 351 | extern ulong srv_max_buf_pool_modified_pct; | 353 | extern ulong srv_max_buf_pool_modified_pct; |
2230 | 352 | extern ulong srv_max_purge_lag; | 354 | extern ulong srv_max_purge_lag; |
2231 | 353 | extern ulong srv_max_purge_lag_delay; | 355 | extern ulong srv_max_purge_lag_delay; |
2232 | @@ -651,6 +653,17 @@ | |||
2233 | 651 | void | 653 | void |
2234 | 652 | srv_export_innodb_status(void); | 654 | srv_export_innodb_status(void); |
2235 | 653 | /*==========================*/ | 655 | /*==========================*/ |
2236 | 656 | /*************************************************************//** | ||
2237 | 657 | Removes old archived transaction log files. | ||
2238 | 658 | Both parameters couldn't be provided at the same time */ | ||
2239 | 659 | UNIV_INTERN | ||
2240 | 660 | ulint | ||
2241 | 661 | purge_archived_logs( | ||
2242 | 662 | time_t before_date, /*!< in: all files modified | ||
2243 | 663 | before timestamp should be removed */ | ||
2244 | 664 | unsigned long long before_lsn); /*!< in: files with this lsn in name | ||
2245 | 665 | and earler should be removed */ | ||
2246 | 666 | /*==========================*/ | ||
2247 | 654 | /*******************************************************************//** | 667 | /*******************************************************************//** |
2248 | 655 | Get current server activity count. We don't hold srv_sys::mutex while | 668 | Get current server activity count. We don't hold srv_sys::mutex while |
2249 | 656 | reading this value as it is only used in heuristics. | 669 | reading this value as it is only used in heuristics. |
2250 | 657 | 670 | ||
2251 | === modified file 'Percona-Server/storage/innobase/include/univ.i' | |||
2252 | --- Percona-Server/storage/innobase/include/univ.i 2013-03-05 12:46:43 +0000 | |||
2253 | +++ Percona-Server/storage/innobase/include/univ.i 2013-03-20 16:30:32 +0000 | |||
2254 | @@ -46,6 +46,9 @@ | |||
2255 | 46 | #define INNODB_VERSION_MINOR 2 | 46 | #define INNODB_VERSION_MINOR 2 |
2256 | 47 | #define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH | 47 | #define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH |
2257 | 48 | 48 | ||
2258 | 49 | /* Enable UNIV_LOG_ARCHIVE in XtraDB */ | ||
2259 | 50 | #define UNIV_LOG_ARCHIVE 1 | ||
2260 | 51 | |||
2261 | 49 | /* The following is the InnoDB version as shown in | 52 | /* The following is the InnoDB version as shown in |
2262 | 50 | SELECT plugin_version FROM information_schema.plugins; | 53 | SELECT plugin_version FROM information_schema.plugins; |
2263 | 51 | calculated in make_version_string() in sql/sql_show.cc like this: | 54 | calculated in make_version_string() in sql/sql_show.cc like this: |
2264 | 52 | 55 | ||
2265 | === modified file 'Percona-Server/storage/innobase/log/log0log.cc' | |||
2266 | --- Percona-Server/storage/innobase/log/log0log.cc 2013-03-05 12:46:43 +0000 | |||
2267 | +++ Percona-Server/storage/innobase/log/log0log.cc 2013-03-20 16:30:32 +0000 | |||
2268 | @@ -817,15 +817,11 @@ | |||
2269 | 817 | rw_lock_create(archive_lock_key, &log_sys->archive_lock, | 817 | rw_lock_create(archive_lock_key, &log_sys->archive_lock, |
2270 | 818 | SYNC_NO_ORDER_CHECK); | 818 | SYNC_NO_ORDER_CHECK); |
2271 | 819 | 819 | ||
2281 | 820 | log_sys->archive_buf = NULL; | 820 | log_sys->archive_buf = static_cast<byte*>( |
2282 | 821 | 821 | ut_align(mem_zalloc(LOG_ARCHIVE_BUF_SIZE | |
2283 | 822 | /* ut_align( | 822 | + OS_FILE_LOG_BLOCK_SIZE), |
2284 | 823 | ut_malloc(LOG_ARCHIVE_BUF_SIZE | 823 | OS_FILE_LOG_BLOCK_SIZE)); |
2285 | 824 | + OS_FILE_LOG_BLOCK_SIZE), | 824 | log_sys->archive_buf_size = LOG_ARCHIVE_BUF_SIZE; |
2277 | 825 | OS_FILE_LOG_BLOCK_SIZE); */ | ||
2278 | 826 | log_sys->archive_buf_size = 0; | ||
2279 | 827 | |||
2280 | 828 | /* memset(log_sys->archive_buf, '\0', LOG_ARCHIVE_BUF_SIZE); */ | ||
2286 | 829 | 825 | ||
2287 | 830 | log_sys->archiving_on = os_event_create(); | 826 | log_sys->archiving_on = os_event_create(); |
2288 | 831 | #endif /* UNIV_LOG_ARCHIVE */ | 827 | #endif /* UNIV_LOG_ARCHIVE */ |
2289 | @@ -896,10 +892,10 @@ | |||
2290 | 896 | mem_zalloc(sizeof(byte**) * n_files)); | 892 | mem_zalloc(sizeof(byte**) * n_files)); |
2291 | 897 | 893 | ||
2292 | 898 | #ifdef UNIV_LOG_ARCHIVE | 894 | #ifdef UNIV_LOG_ARCHIVE |
2294 | 899 | group->archive_file_header_bufs_ptr = static_cast<byte*>( | 895 | group->archive_file_header_bufs_ptr = static_cast<byte**>( |
2295 | 900 | mem_zalloc( sizeof(byte*) * n_files)); | 896 | mem_zalloc( sizeof(byte*) * n_files)); |
2296 | 901 | 897 | ||
2298 | 902 | group->archive_file_header_bufs = static_cast<byte*>( | 898 | group->archive_file_header_bufs = static_cast<byte**>( |
2299 | 903 | mem_zalloc(sizeof(byte*) * n_files)); | 899 | mem_zalloc(sizeof(byte*) * n_files)); |
2300 | 904 | #endif /* UNIV_LOG_ARCHIVE */ | 900 | #endif /* UNIV_LOG_ARCHIVE */ |
2301 | 905 | 901 | ||
2302 | @@ -924,7 +920,7 @@ | |||
2303 | 924 | #ifdef UNIV_LOG_ARCHIVE | 920 | #ifdef UNIV_LOG_ARCHIVE |
2304 | 925 | group->archive_space_id = archive_space_id; | 921 | group->archive_space_id = archive_space_id; |
2305 | 926 | 922 | ||
2307 | 927 | group->archived_file_no = 0; | 923 | group->archived_file_no = LOG_START_LSN; |
2308 | 928 | group->archived_offset = 0; | 924 | group->archived_offset = 0; |
2309 | 929 | #endif /* UNIV_LOG_ARCHIVE */ | 925 | #endif /* UNIV_LOG_ARCHIVE */ |
2310 | 930 | 926 | ||
2311 | @@ -2225,7 +2221,7 @@ | |||
2312 | 2225 | fil_io(OS_FILE_READ | OS_FILE_LOG, sync, group->space_id, 0, | 2221 | fil_io(OS_FILE_READ | OS_FILE_LOG, sync, group->space_id, 0, |
2313 | 2226 | (ulint) (source_offset / UNIV_PAGE_SIZE), | 2222 | (ulint) (source_offset / UNIV_PAGE_SIZE), |
2314 | 2227 | (ulint) (source_offset % UNIV_PAGE_SIZE), | 2223 | (ulint) (source_offset % UNIV_PAGE_SIZE), |
2316 | 2228 | len, buf, NULL); | 2224 | len, buf, (type == LOG_ARCHIVE) ? &log_archive_io : NULL); |
2317 | 2229 | 2225 | ||
2318 | 2230 | start_lsn += len; | 2226 | start_lsn += len; |
2319 | 2231 | buf += len; | 2227 | buf += len; |
2320 | @@ -2244,12 +2240,25 @@ | |||
2321 | 2244 | log_archived_file_name_gen( | 2240 | log_archived_file_name_gen( |
2322 | 2245 | /*=======================*/ | 2241 | /*=======================*/ |
2323 | 2246 | char* buf, /*!< in: buffer where to write */ | 2242 | char* buf, /*!< in: buffer where to write */ |
2324 | 2243 | ulint buf_len,/*!< in: buffer length */ | ||
2325 | 2247 | ulint id __attribute__((unused)), | 2244 | ulint id __attribute__((unused)), |
2326 | 2248 | /*!< in: group id; | 2245 | /*!< in: group id; |
2327 | 2249 | currently we only archive the first group */ | 2246 | currently we only archive the first group */ |
2328 | 2250 | ulint file_no)/*!< in: file number */ | 2247 | ulint file_no)/*!< in: file number */ |
2329 | 2251 | { | 2248 | { |
2331 | 2252 | sprintf(buf, "%sib_arch_log_%010lu", srv_arch_dir, (ulong) file_no); | 2249 | ulint dirnamelen; |
2332 | 2250 | |||
2333 | 2251 | dirnamelen = strlen(srv_arch_dir); | ||
2334 | 2252 | |||
2335 | 2253 | ut_a(buf_len > dirnamelen + 18 + IB_ARCHIVED_LOGS_PREFIX_LEN); | ||
2336 | 2254 | |||
2337 | 2255 | strcpy(buf, srv_arch_dir); | ||
2338 | 2256 | |||
2339 | 2257 | if (buf[dirnamelen-1] != SRV_PATH_SEPARATOR) { | ||
2340 | 2258 | buf[dirnamelen++] = SRV_PATH_SEPARATOR; | ||
2341 | 2259 | } | ||
2342 | 2260 | |||
2343 | 2261 | sprintf(buf + dirnamelen, IB_ARCHIVED_LOGS_PREFIX "%016lu", (ulong) file_no); | ||
2344 | 2253 | } | 2262 | } |
2345 | 2254 | 2263 | ||
2346 | 2255 | /******************************************************//** | 2264 | /******************************************************//** |
2347 | @@ -2287,6 +2296,7 @@ | |||
2348 | 2287 | MONITOR_INC(MONITOR_LOG_IO); | 2296 | MONITOR_INC(MONITOR_LOG_IO); |
2349 | 2288 | 2297 | ||
2350 | 2289 | fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->archive_space_id, | 2298 | fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->archive_space_id, |
2351 | 2299 | 0, | ||
2352 | 2290 | dest_offset / UNIV_PAGE_SIZE, | 2300 | dest_offset / UNIV_PAGE_SIZE, |
2353 | 2291 | dest_offset % UNIV_PAGE_SIZE, | 2301 | dest_offset % UNIV_PAGE_SIZE, |
2354 | 2292 | 2 * OS_FILE_LOG_BLOCK_SIZE, | 2302 | 2 * OS_FILE_LOG_BLOCK_SIZE, |
2355 | @@ -2322,6 +2332,7 @@ | |||
2356 | 2322 | MONITOR_INC(MONITOR_LOG_IO); | 2332 | MONITOR_INC(MONITOR_LOG_IO); |
2357 | 2323 | 2333 | ||
2358 | 2324 | fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->archive_space_id, | 2334 | fil_io(OS_FILE_WRITE | OS_FILE_LOG, TRUE, group->archive_space_id, |
2359 | 2335 | 0, | ||
2360 | 2325 | dest_offset / UNIV_PAGE_SIZE, | 2336 | dest_offset / UNIV_PAGE_SIZE, |
2361 | 2326 | dest_offset % UNIV_PAGE_SIZE, | 2337 | dest_offset % UNIV_PAGE_SIZE, |
2362 | 2327 | OS_FILE_LOG_BLOCK_SIZE, | 2338 | OS_FILE_LOG_BLOCK_SIZE, |
2363 | @@ -2340,7 +2351,7 @@ | |||
2364 | 2340 | os_file_t file_handle; | 2351 | os_file_t file_handle; |
2365 | 2341 | lsn_t start_lsn; | 2352 | lsn_t start_lsn; |
2366 | 2342 | lsn_t end_lsn; | 2353 | lsn_t end_lsn; |
2368 | 2343 | char name[1024]; | 2354 | char name[OS_FILE_MAX_PATH]; |
2369 | 2344 | byte* buf; | 2355 | byte* buf; |
2370 | 2345 | ulint len; | 2356 | ulint len; |
2371 | 2346 | ibool ret; | 2357 | ibool ret; |
2372 | @@ -2372,12 +2383,19 @@ | |||
2373 | 2372 | 2383 | ||
2374 | 2373 | if (next_offset % group->file_size == 0) { | 2384 | if (next_offset % group->file_size == 0) { |
2375 | 2374 | open_mode = OS_FILE_CREATE; | 2385 | open_mode = OS_FILE_CREATE; |
2376 | 2386 | if (n_files == 0) { | ||
2377 | 2387 | /* Adjust archived_file_no match start_lsn | ||
2378 | 2388 | which is written in file header as well */ | ||
2379 | 2389 | group->archived_file_no = start_lsn; | ||
2380 | 2390 | } | ||
2381 | 2375 | } else { | 2391 | } else { |
2382 | 2376 | open_mode = OS_FILE_OPEN; | 2392 | open_mode = OS_FILE_OPEN; |
2383 | 2377 | } | 2393 | } |
2384 | 2378 | 2394 | ||
2387 | 2379 | log_archived_file_name_gen(name, group->id, | 2395 | log_archived_file_name_gen(name, sizeof(name), group->id, |
2388 | 2380 | group->archived_file_no + n_files); | 2396 | group->archived_file_no + |
2389 | 2397 | n_files * (group->file_size - | ||
2390 | 2398 | LOG_FILE_HDR_SIZE)); | ||
2391 | 2381 | 2399 | ||
2392 | 2382 | file_handle = os_file_create(innodb_file_log_key, | 2400 | file_handle = os_file_create(innodb_file_log_key, |
2393 | 2383 | name, open_mode, | 2401 | name, open_mode, |
2394 | @@ -2414,13 +2432,14 @@ | |||
2395 | 2414 | 2432 | ||
2396 | 2415 | /* Add the archive file as a node to the space */ | 2433 | /* Add the archive file as a node to the space */ |
2397 | 2416 | 2434 | ||
2400 | 2417 | fil_node_create(name, group->file_size / UNIV_PAGE_SIZE, | 2435 | ut_a(fil_node_create(name, group->file_size / UNIV_PAGE_SIZE, |
2401 | 2418 | group->archive_space_id, FALSE); | 2436 | group->archive_space_id, FALSE)); |
2402 | 2419 | 2437 | ||
2403 | 2420 | if (next_offset % group->file_size == 0) { | 2438 | if (next_offset % group->file_size == 0) { |
2404 | 2421 | log_group_archive_file_header_write( | 2439 | log_group_archive_file_header_write( |
2405 | 2422 | group, n_files, | 2440 | group, n_files, |
2407 | 2423 | group->archived_file_no + n_files, | 2441 | group->archived_file_no + |
2408 | 2442 | n_files * (group->file_size - LOG_FILE_HDR_SIZE), | ||
2409 | 2424 | start_lsn); | 2443 | start_lsn); |
2410 | 2425 | 2444 | ||
2411 | 2426 | next_offset += LOG_FILE_HDR_SIZE; | 2445 | next_offset += LOG_FILE_HDR_SIZE; |
2412 | @@ -2451,6 +2470,7 @@ | |||
2413 | 2451 | MONITOR_INC(MONITOR_LOG_IO); | 2470 | MONITOR_INC(MONITOR_LOG_IO); |
2414 | 2452 | 2471 | ||
2415 | 2453 | fil_io(OS_FILE_WRITE | OS_FILE_LOG, FALSE, group->archive_space_id, | 2472 | fil_io(OS_FILE_WRITE | OS_FILE_LOG, FALSE, group->archive_space_id, |
2416 | 2473 | 0, | ||
2417 | 2454 | (ulint) (next_offset / UNIV_PAGE_SIZE), | 2474 | (ulint) (next_offset / UNIV_PAGE_SIZE), |
2418 | 2455 | (ulint) (next_offset % UNIV_PAGE_SIZE), | 2475 | (ulint) (next_offset % UNIV_PAGE_SIZE), |
2419 | 2456 | ut_calc_align(len, OS_FILE_LOG_BLOCK_SIZE), buf, | 2476 | ut_calc_align(len, OS_FILE_LOG_BLOCK_SIZE), buf, |
2420 | @@ -2469,7 +2489,8 @@ | |||
2421 | 2469 | goto loop; | 2489 | goto loop; |
2422 | 2470 | } | 2490 | } |
2423 | 2471 | 2491 | ||
2425 | 2472 | group->next_archived_file_no = group->archived_file_no + n_files; | 2492 | group->next_archived_file_no = group->archived_file_no + |
2426 | 2493 | n_files * (group->file_size - LOG_FILE_HDR_SIZE); | ||
2427 | 2473 | group->next_archived_offset = next_offset % group->file_size; | 2494 | group->next_archived_offset = next_offset % group->file_size; |
2428 | 2474 | 2495 | ||
2429 | 2475 | ut_a(group->next_archived_offset % OS_FILE_LOG_BLOCK_SIZE == 0); | 2496 | ut_a(group->next_archived_offset % OS_FILE_LOG_BLOCK_SIZE == 0); |
2430 | @@ -2822,18 +2843,8 @@ | |||
2431 | 2822 | trunc_len); | 2843 | trunc_len); |
2432 | 2823 | if (increment_file_count) { | 2844 | if (increment_file_count) { |
2433 | 2824 | group->archived_offset = 0; | 2845 | group->archived_offset = 0; |
2434 | 2825 | group->archived_file_no += 2; | ||
2435 | 2826 | } | 2846 | } |
2436 | 2827 | 2847 | ||
2437 | 2828 | #ifdef UNIV_DEBUG | ||
2438 | 2829 | if (log_debug_writes) { | ||
2439 | 2830 | fprintf(stderr, | ||
2440 | 2831 | "Incrementing arch file no to %lu" | ||
2441 | 2832 | " in log group %lu\n", | ||
2442 | 2833 | (ulong) group->archived_file_no + 2, | ||
2443 | 2834 | (ulong) group->id); | ||
2444 | 2835 | } | ||
2445 | 2836 | #endif /* UNIV_DEBUG */ | ||
2446 | 2837 | } | 2848 | } |
2447 | 2838 | } | 2849 | } |
2448 | 2839 | 2850 | ||
2449 | @@ -3087,7 +3098,6 @@ | |||
2450 | 3087 | /*=======================================*/ | 3098 | /*=======================================*/ |
2451 | 3088 | { | 3099 | { |
2452 | 3089 | lsn_t lsn; | 3100 | lsn_t lsn; |
2453 | 3090 | ulint arch_log_no; | ||
2454 | 3091 | ulint count = 0; | 3101 | ulint count = 0; |
2455 | 3092 | ulint total_trx; | 3102 | ulint total_trx; |
2456 | 3093 | ulint pending_io; | 3103 | ulint pending_io; |
2457 | @@ -3304,15 +3314,7 @@ | |||
2458 | 3304 | goto loop; | 3314 | goto loop; |
2459 | 3305 | } | 3315 | } |
2460 | 3306 | 3316 | ||
2461 | 3307 | arch_log_no = 0; | ||
2462 | 3308 | |||
2463 | 3309 | #ifdef UNIV_LOG_ARCHIVE | 3317 | #ifdef UNIV_LOG_ARCHIVE |
2464 | 3310 | UT_LIST_GET_FIRST(log_sys->log_groups)->archived_file_no; | ||
2465 | 3311 | |||
2466 | 3312 | if (0 == UT_LIST_GET_FIRST(log_sys->log_groups)->archived_offset) { | ||
2467 | 3313 | |||
2468 | 3314 | arch_log_no--; | ||
2469 | 3315 | } | ||
2470 | 3316 | 3318 | ||
2471 | 3317 | log_archive_close_groups(TRUE); | 3319 | log_archive_close_groups(TRUE); |
2472 | 3318 | #endif /* UNIV_LOG_ARCHIVE */ | 3320 | #endif /* UNIV_LOG_ARCHIVE */ |
2473 | @@ -3371,7 +3373,7 @@ | |||
2474 | 3371 | srv_shutdown_lsn = lsn; | 3373 | srv_shutdown_lsn = lsn; |
2475 | 3372 | 3374 | ||
2476 | 3373 | if (!srv_read_only_mode) { | 3375 | if (!srv_read_only_mode) { |
2478 | 3374 | fil_write_flushed_lsn_to_data_files(lsn, arch_log_no); | 3376 | fil_write_flushed_lsn_to_data_files(lsn, 0); |
2479 | 3375 | 3377 | ||
2480 | 3376 | fil_flush_file_spaces(FIL_TABLESPACE); | 3378 | fil_flush_file_spaces(FIL_TABLESPACE); |
2481 | 3377 | } | 3379 | } |
2482 | @@ -3594,7 +3596,7 @@ | |||
2483 | 3594 | 3596 | ||
2484 | 3595 | #ifdef UNIV_LOG_ARCHIVE | 3597 | #ifdef UNIV_LOG_ARCHIVE |
2485 | 3596 | rw_lock_free(&log_sys->archive_lock); | 3598 | rw_lock_free(&log_sys->archive_lock); |
2487 | 3597 | os_event_create(); | 3599 | os_event_free(log_sys->archiving_on); |
2488 | 3598 | #endif /* UNIV_LOG_ARCHIVE */ | 3600 | #endif /* UNIV_LOG_ARCHIVE */ |
2489 | 3599 | 3601 | ||
2490 | 3600 | #ifdef UNIV_LOG_DEBUG | 3602 | #ifdef UNIV_LOG_DEBUG |
2491 | 3601 | 3603 | ||
2492 | === modified file 'Percona-Server/storage/innobase/log/log0recv.cc' | |||
2493 | --- Percona-Server/storage/innobase/log/log0recv.cc 2013-03-05 12:46:43 +0000 | |||
2494 | +++ Percona-Server/storage/innobase/log/log0recv.cc 2013-03-20 16:30:32 +0000 | |||
2495 | @@ -3690,7 +3690,7 @@ | |||
2496 | 3690 | os_offset_t read_offset; | 3690 | os_offset_t read_offset; |
2497 | 3691 | os_offset_t file_size; | 3691 | os_offset_t file_size; |
2498 | 3692 | int input_char; | 3692 | int input_char; |
2500 | 3693 | char name[10000]; | 3693 | char name[OS_FILE_MAX_PATH]; |
2501 | 3694 | 3694 | ||
2502 | 3695 | ut_a(0); | 3695 | ut_a(0); |
2503 | 3696 | 3696 | ||
2504 | @@ -3699,7 +3699,8 @@ | |||
2505 | 3699 | 3699 | ||
2506 | 3700 | /* Add the file to the archive file space; open the file */ | 3700 | /* Add the file to the archive file space; open the file */ |
2507 | 3701 | 3701 | ||
2509 | 3702 | log_archived_file_name_gen(name, group->id, group->archived_file_no); | 3702 | log_archived_file_name_gen(name, sizeof(name), |
2510 | 3703 | group->id, group->archived_file_no); | ||
2511 | 3703 | 3704 | ||
2512 | 3704 | file_handle = os_file_create(innodb_file_log_key, | 3705 | file_handle = os_file_create(innodb_file_log_key, |
2513 | 3705 | name, OS_FILE_OPEN, | 3706 | name, OS_FILE_OPEN, |
2514 | @@ -3748,14 +3749,13 @@ | |||
2515 | 3748 | 3749 | ||
2516 | 3749 | /* Add the archive file as a node to the space */ | 3750 | /* Add the archive file as a node to the space */ |
2517 | 3750 | 3751 | ||
2523 | 3751 | fil_node_create(name, 1 + file_size / UNIV_PAGE_SIZE, | 3752 | ut_a(fil_node_create(name, 1 + file_size / UNIV_PAGE_SIZE, |
2524 | 3752 | group->archive_space_id, FALSE); | 3753 | group->archive_space_id, FALSE)); |
2525 | 3753 | #if RECV_SCAN_SIZE < LOG_FILE_HDR_SIZE | 3754 | ut_a(RECV_SCAN_SIZE >= LOG_FILE_HDR_SIZE); |
2521 | 3754 | # error "RECV_SCAN_SIZE < LOG_FILE_HDR_SIZE" | ||
2522 | 3755 | #endif | ||
2526 | 3756 | 3755 | ||
2527 | 3757 | /* Read the archive file header */ | 3756 | /* Read the archive file header */ |
2529 | 3758 | fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, group->archive_space_id, 0, 0, | 3757 | fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, group->archive_space_id, 0, |
2530 | 3758 | 0, 0, | ||
2531 | 3759 | LOG_FILE_HDR_SIZE, buf, NULL); | 3759 | LOG_FILE_HDR_SIZE, buf, NULL); |
2532 | 3760 | 3760 | ||
2533 | 3761 | /* Check if the archive file header is consistent */ | 3761 | /* Check if the archive file header is consistent */ |
2534 | @@ -3828,7 +3828,7 @@ | |||
2535 | 3828 | #endif /* UNIV_DEBUG */ | 3828 | #endif /* UNIV_DEBUG */ |
2536 | 3829 | 3829 | ||
2537 | 3830 | fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, | 3830 | fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, |
2539 | 3831 | group->archive_space_id, read_offset / UNIV_PAGE_SIZE, | 3831 | group->archive_space_id, 0, read_offset / UNIV_PAGE_SIZE, |
2540 | 3832 | read_offset % UNIV_PAGE_SIZE, len, buf, NULL); | 3832 | read_offset % UNIV_PAGE_SIZE, len, buf, NULL); |
2541 | 3833 | 3833 | ||
2542 | 3834 | ret = recv_scan_log_recs( | 3834 | ret = recv_scan_log_recs( |
2543 | @@ -3863,7 +3863,7 @@ | |||
2544 | 3863 | Recovers from archived log files, and also from log files, if they exist. | 3863 | Recovers from archived log files, and also from log files, if they exist. |
2545 | 3864 | @return error code or DB_SUCCESS */ | 3864 | @return error code or DB_SUCCESS */ |
2546 | 3865 | UNIV_INTERN | 3865 | UNIV_INTERN |
2548 | 3866 | ulint | 3866 | dberr_t |
2549 | 3867 | recv_recovery_from_archive_start( | 3867 | recv_recovery_from_archive_start( |
2550 | 3868 | /*=============================*/ | 3868 | /*=============================*/ |
2551 | 3869 | ib_uint64_t min_flushed_lsn,/*!< in: min flushed lsn field from the | 3869 | ib_uint64_t min_flushed_lsn,/*!< in: min flushed lsn field from the |
2552 | @@ -3880,7 +3880,7 @@ | |||
2553 | 3880 | ulint group_id; | 3880 | ulint group_id; |
2554 | 3881 | ulint trunc_len; | 3881 | ulint trunc_len; |
2555 | 3882 | ibool ret; | 3882 | ibool ret; |
2557 | 3883 | ulint err; | 3883 | dberr_t err; |
2558 | 3884 | 3884 | ||
2559 | 3885 | ut_a(0); | 3885 | ut_a(0); |
2560 | 3886 | 3886 | ||
2561 | 3887 | 3887 | ||
2562 | === modified file 'Percona-Server/storage/innobase/srv/srv0srv.cc' | |||
2563 | --- Percona-Server/storage/innobase/srv/srv0srv.cc 2013-03-05 12:46:43 +0000 | |||
2564 | +++ Percona-Server/storage/innobase/srv/srv0srv.cc 2013-03-20 16:30:32 +0000 | |||
2565 | @@ -67,6 +67,7 @@ | |||
2566 | 67 | #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */ | 67 | #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */ |
2567 | 68 | #include "srv0mon.h" | 68 | #include "srv0mon.h" |
2568 | 69 | #include "ut0crc32.h" | 69 | #include "ut0crc32.h" |
2569 | 70 | #include "os0file.h" | ||
2570 | 70 | 71 | ||
2571 | 71 | #include "mysql/plugin.h" | 72 | #include "mysql/plugin.h" |
2572 | 72 | #include "mysql/service_thd_wait.h" | 73 | #include "mysql/service_thd_wait.h" |
2573 | @@ -111,6 +112,7 @@ | |||
2574 | 111 | 112 | ||
2575 | 112 | #ifdef UNIV_LOG_ARCHIVE | 113 | #ifdef UNIV_LOG_ARCHIVE |
2576 | 113 | UNIV_INTERN char* srv_arch_dir = NULL; | 114 | UNIV_INTERN char* srv_arch_dir = NULL; |
2577 | 115 | UNIV_INTERN ulong srv_log_arch_expire_sec = 0; | ||
2578 | 114 | #endif /* UNIV_LOG_ARCHIVE */ | 116 | #endif /* UNIV_LOG_ARCHIVE */ |
2579 | 115 | 117 | ||
2580 | 116 | /** Set if InnoDB must operate in read-only mode. We don't do any | 118 | /** Set if InnoDB must operate in read-only mode. We don't do any |
2581 | @@ -1852,6 +1854,132 @@ | |||
2582 | 1852 | return(thread_active); | 1854 | return(thread_active); |
2583 | 1853 | } | 1855 | } |
2584 | 1854 | 1856 | ||
2585 | 1857 | /*************************************************************//** | ||
2586 | 1858 | Removes old archived transaction log files. | ||
2587 | 1859 | Both parameters couldn't be provided at the same time */ | ||
2588 | 1860 | ulint | ||
2589 | 1861 | purge_archived_logs( | ||
2590 | 1862 | time_t before_date, /*!< in: all files modified | ||
2591 | 1863 | before timestamp should be removed */ | ||
2592 | 1864 | unsigned long long before_no) /*!< in: files with this number in name | ||
2593 | 1865 | and earler should be removed */ | ||
2594 | 1866 | { | ||
2595 | 1867 | log_group_t* group = UT_LIST_GET_FIRST(log_sys->log_groups); | ||
2596 | 1868 | |||
2597 | 1869 | os_file_dir_t dir; | ||
2598 | 1870 | os_file_stat_t fileinfo; | ||
2599 | 1871 | char archived_log_filename[OS_FILE_MAX_PATH]; | ||
2600 | 1872 | char namegen[OS_FILE_MAX_PATH]; | ||
2601 | 1873 | ulint dirnamelen; | ||
2602 | 1874 | |||
2603 | 1875 | if (srv_arch_dir) { | ||
2604 | 1876 | dir = os_file_opendir(srv_arch_dir, FALSE); | ||
2605 | 1877 | if (!dir) { | ||
2606 | 1878 | fprintf(stderr, | ||
2607 | 1879 | "InnoDB: Note: opening archived log directory " | ||
2608 | 1880 | "%s failed. " | ||
2609 | 1881 | "Purge archived logs are not available\n", | ||
2610 | 1882 | srv_arch_dir); | ||
2611 | 1883 | /* failed to open directory */ | ||
2612 | 1884 | return(DB_ERROR); | ||
2613 | 1885 | } | ||
2614 | 1886 | } else { | ||
2615 | 1887 | /* log archive directory is not specified */ | ||
2616 | 1888 | return(DB_ERROR); | ||
2617 | 1889 | } | ||
2618 | 1890 | |||
2619 | 1891 | dirnamelen = strlen(srv_arch_dir); | ||
2620 | 1892 | |||
2621 | 1893 | memcpy(archived_log_filename, srv_arch_dir, dirnamelen); | ||
2622 | 1894 | if (dirnamelen && | ||
2623 | 1895 | archived_log_filename[dirnamelen - 1] != SRV_PATH_SEPARATOR) { | ||
2624 | 1896 | archived_log_filename[dirnamelen++] = SRV_PATH_SEPARATOR; | ||
2625 | 1897 | } | ||
2626 | 1898 | |||
2627 | 1899 | memset(&fileinfo, 0, sizeof(fileinfo)); | ||
2628 | 1900 | while(!os_file_readdir_next_file(srv_arch_dir, dir, | ||
2629 | 1901 | &fileinfo) ) { | ||
2630 | 1902 | if (strncmp(fileinfo.name, | ||
2631 | 1903 | IB_ARCHIVED_LOGS_PREFIX, IB_ARCHIVED_LOGS_PREFIX_LEN)) { | ||
2632 | 1904 | continue; | ||
2633 | 1905 | } | ||
2634 | 1906 | if (dirnamelen + strlen(fileinfo.name) + 2 > OS_FILE_MAX_PATH) | ||
2635 | 1907 | continue; | ||
2636 | 1908 | |||
2637 | 1909 | snprintf(archived_log_filename + dirnamelen, OS_FILE_MAX_PATH, | ||
2638 | 1910 | "%s", fileinfo.name); | ||
2639 | 1911 | |||
2640 | 1912 | if (before_no) { | ||
2641 | 1913 | ib_uint64_t log_file_no = strtoll(fileinfo.name + | ||
2642 | 1914 | IB_ARCHIVED_LOGS_PREFIX_LEN, | ||
2643 | 1915 | NULL, 10); | ||
2644 | 1916 | if (log_file_no == 0 || before_no <= log_file_no) { | ||
2645 | 1917 | continue; | ||
2646 | 1918 | } | ||
2647 | 1919 | } else { | ||
2648 | 1920 | fileinfo.mtime = 0; | ||
2649 | 1921 | if (os_file_get_status(archived_log_filename, | ||
2650 | 1922 | &fileinfo, false) != DB_SUCCESS || | ||
2651 | 1923 | fileinfo.mtime == 0) { | ||
2652 | 1924 | continue; | ||
2653 | 1925 | } | ||
2654 | 1926 | |||
2655 | 1927 | if (before_date == 0 || fileinfo.mtime > before_date) { | ||
2656 | 1928 | continue; | ||
2657 | 1929 | } | ||
2658 | 1930 | } | ||
2659 | 1931 | |||
2660 | 1932 | /* We are going to delete archived file. Aquire log_sys->mutex | ||
2661 | 1933 | to make sue we are the only who try to delete file. This also | ||
2662 | 1934 | prevents log system from using this file. Do not delete file | ||
2663 | 1935 | if it is currently in progress of writting or have pending IO. | ||
2664 | 1936 | This enforced by checking: | ||
2665 | 1937 | 1. fil_space_contains_node. | ||
2666 | 1938 | 2. group->archived_offset % group->file_size != 0, i.e. have | ||
2667 | 1939 | archive in progress and we are going to delete it. | ||
2668 | 1940 | This aimed to cover 3 cases: | ||
2669 | 1941 | a. Normal case when we have one archive in progress, | ||
2670 | 1942 | both 1 and 2 are TRUE | ||
2671 | 1943 | b. When we have more then 1 archiveds in fil_space, | ||
2672 | 1944 | this can happen when flushed LSN range crosses file | ||
2673 | 1945 | boundary | ||
2674 | 1946 | c. Whan we have empty fil_space, but existing file will be | ||
2675 | 1947 | opened once archiving operation is requested. This usually | ||
2676 | 1948 | happens on startup. | ||
2677 | 1949 | */ | ||
2678 | 1950 | |||
2679 | 1951 | mutex_enter(&log_sys->mutex); | ||
2680 | 1952 | |||
2681 | 1953 | log_archived_file_name_gen(namegen, sizeof(namegen), | ||
2682 | 1954 | group->id, group->archived_file_no); | ||
2683 | 1955 | |||
2684 | 1956 | if (fil_space_contains_node(group->archive_space_id, | ||
2685 | 1957 | archived_log_filename) || | ||
2686 | 1958 | (group->archived_offset % group->file_size != 0 && | ||
2687 | 1959 | strcmp(namegen, archived_log_filename) == 0)) { | ||
2688 | 1960 | |||
2689 | 1961 | mutex_exit(&log_sys->mutex); | ||
2690 | 1962 | continue; | ||
2691 | 1963 | } | ||
2692 | 1964 | |||
2693 | 1965 | if (os_file_delete_if_exists(archived_log_filename) == FALSE) { | ||
2694 | 1966 | fprintf(stderr, | ||
2695 | 1967 | "InnoDB: Note: can't delete archived log file" | ||
2696 | 1968 | " %s.\n", archived_log_filename); | ||
2697 | 1969 | |||
2698 | 1970 | mutex_exit(&log_sys->mutex); | ||
2699 | 1971 | return(DB_ERROR); | ||
2700 | 1972 | } | ||
2701 | 1973 | |||
2702 | 1974 | mutex_exit(&log_sys->mutex); | ||
2703 | 1975 | } | ||
2704 | 1976 | |||
2705 | 1977 | os_file_closedir(dir); | ||
2706 | 1978 | |||
2707 | 1979 | return(DB_SUCCESS); | ||
2708 | 1980 | } | ||
2709 | 1981 | |||
2710 | 1982 | |||
2711 | 1855 | /*******************************************************************//** | 1983 | /*******************************************************************//** |
2712 | 1856 | Tells the InnoDB server that there has been activity in the database | 1984 | Tells the InnoDB server that there has been activity in the database |
2713 | 1857 | and wakes up the master thread if it is suspended (not sleeping). Used | 1985 | and wakes up the master thread if it is suspended (not sleeping). Used |
2714 | @@ -2205,6 +2333,18 @@ | |||
2715 | 2205 | log_checkpoint(TRUE, FALSE); | 2333 | log_checkpoint(TRUE, FALSE); |
2716 | 2206 | MONITOR_INC_TIME_IN_MICRO_SECS(MONITOR_SRV_CHECKPOINT_MICROSECOND, | 2334 | MONITOR_INC_TIME_IN_MICRO_SECS(MONITOR_SRV_CHECKPOINT_MICROSECOND, |
2717 | 2207 | counter_time); | 2335 | counter_time); |
2718 | 2336 | |||
2719 | 2337 | if (srv_shutdown_state > 0) { | ||
2720 | 2338 | return; | ||
2721 | 2339 | } | ||
2722 | 2340 | |||
2723 | 2341 | if (srv_log_arch_expire_sec) { | ||
2724 | 2342 | srv_main_thread_op_info = "purging archived logs"; | ||
2725 | 2343 | purge_archived_logs(ut_time() - srv_log_arch_expire_sec, | ||
2726 | 2344 | 0); | ||
2727 | 2345 | MONITOR_INC_TIME_IN_MICRO_SECS(MONITOR_SRV_CHECKPOINT_MICROSECOND, | ||
2728 | 2346 | counter_time); | ||
2729 | 2347 | } | ||
2730 | 2208 | } | 2348 | } |
2731 | 2209 | 2349 | ||
2732 | 2210 | /*********************************************************************//** | 2350 | /*********************************************************************//** |
2733 | 2211 | 2351 | ||
2734 | === modified file 'Percona-Server/storage/innobase/srv/srv0start.cc' | |||
2735 | --- Percona-Server/storage/innobase/srv/srv0start.cc 2013-03-05 12:46:43 +0000 | |||
2736 | +++ Percona-Server/storage/innobase/srv/srv0start.cc 2013-03-20 16:30:32 +0000 | |||
2737 | @@ -640,6 +640,11 @@ | |||
2738 | 640 | } | 640 | } |
2739 | 641 | } | 641 | } |
2740 | 642 | 642 | ||
2741 | 643 | #ifdef UNIV_LOG_ARCHIVE | ||
2742 | 644 | /* Create the file space object for archived logs. */ | ||
2743 | 645 | fil_space_create("arch_log_space", SRV_LOG_SPACE_FIRST_ID + 1, | ||
2744 | 646 | 0, FIL_LOG); | ||
2745 | 647 | #endif | ||
2746 | 643 | log_group_init(0, srv_n_log_files, | 648 | log_group_init(0, srv_n_log_files, |
2747 | 644 | srv_log_file_size * UNIV_PAGE_SIZE, | 649 | srv_log_file_size * UNIV_PAGE_SIZE, |
2748 | 645 | SRV_LOG_SPACE_FIRST_ID, | 650 | SRV_LOG_SPACE_FIRST_ID, |
2749 | @@ -650,7 +655,12 @@ | |||
2750 | 650 | /* Create a log checkpoint. */ | 655 | /* Create a log checkpoint. */ |
2751 | 651 | mutex_enter(&log_sys->mutex); | 656 | mutex_enter(&log_sys->mutex); |
2752 | 652 | ut_d(recv_no_log_write = FALSE); | 657 | ut_d(recv_no_log_write = FALSE); |
2754 | 653 | recv_reset_logs(lsn); | 658 | recv_reset_logs( |
2755 | 659 | #ifdef UNIV_LOG_ARCHIVE | ||
2756 | 660 | UT_LIST_GET_FIRST(log_sys->log_groups)->archived_file_no, | ||
2757 | 661 | TRUE, | ||
2758 | 662 | #endif | ||
2759 | 663 | lsn); | ||
2760 | 654 | mutex_exit(&log_sys->mutex); | 664 | mutex_exit(&log_sys->mutex); |
2761 | 655 | 665 | ||
2762 | 656 | return(DB_SUCCESS); | 666 | return(DB_SUCCESS); |
2763 | @@ -963,9 +973,6 @@ | |||
2764 | 963 | skip_size_check: | 973 | skip_size_check: |
2765 | 964 | fil_read_first_page( | 974 | fil_read_first_page( |
2766 | 965 | files[i], one_opened, &flags, &space, | 975 | files[i], one_opened, &flags, &space, |
2767 | 966 | #ifdef UNIV_LOG_ARCHIVE | ||
2768 | 967 | min_arch_log_no, max_arch_log_no, | ||
2769 | 968 | #endif /* UNIV_LOG_ARCHIVE */ | ||
2770 | 969 | min_flushed_lsn, max_flushed_lsn); | 976 | min_flushed_lsn, max_flushed_lsn); |
2771 | 970 | 977 | ||
2772 | 971 | /* The first file of the system tablespace must | 978 | /* The first file of the system tablespace must |
2773 | @@ -1883,17 +1890,6 @@ | |||
2774 | 1883 | os_thread_create(io_handler_thread, n + i, thread_ids + i); | 1890 | os_thread_create(io_handler_thread, n + i, thread_ids + i); |
2775 | 1884 | } | 1891 | } |
2776 | 1885 | 1892 | ||
2777 | 1886 | #ifdef UNIV_LOG_ARCHIVE | ||
2778 | 1887 | if (0 != ut_strcmp(srv_log_group_home_dir, srv_arch_dir)) { | ||
2779 | 1888 | ut_print_timestamp(stderr); | ||
2780 | 1889 | fprintf(stderr, " InnoDB: Error: you must set the log group home dir in my.cnf\n"); | ||
2781 | 1890 | ut_print_timestamp(stderr); | ||
2782 | 1891 | fprintf(stderr, " InnoDB: the same as log arch dir.\n"); | ||
2783 | 1892 | |||
2784 | 1893 | return(DB_ERROR); | ||
2785 | 1894 | } | ||
2786 | 1895 | #endif /* UNIV_LOG_ARCHIVE */ | ||
2787 | 1896 | |||
2788 | 1897 | if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE | 1893 | if (srv_n_log_files * srv_log_file_size * UNIV_PAGE_SIZE |
2789 | 1898 | >= 512ULL * 1024ULL * 1024ULL * 1024ULL) { | 1894 | >= 512ULL * 1024ULL * 1024ULL * 1024ULL) { |
2790 | 1899 | /* log_block_convert_lsn_to_no() limits the returned block | 1895 | /* log_block_convert_lsn_to_no() limits the returned block |
2791 | @@ -1982,7 +1978,6 @@ | |||
2792 | 1982 | 1978 | ||
2793 | 1983 | #ifdef UNIV_LOG_ARCHIVE | 1979 | #ifdef UNIV_LOG_ARCHIVE |
2794 | 1984 | srv_normalize_path_for_win(srv_arch_dir); | 1980 | srv_normalize_path_for_win(srv_arch_dir); |
2795 | 1985 | srv_arch_dir = srv_add_path_separator_if_needed(srv_arch_dir); | ||
2796 | 1986 | #endif /* UNIV_LOG_ARCHIVE */ | 1981 | #endif /* UNIV_LOG_ARCHIVE */ |
2797 | 1987 | 1982 | ||
2798 | 1988 | dirnamelen = strlen(srv_log_group_home_dir); | 1983 | dirnamelen = strlen(srv_log_group_home_dir); |
2799 | @@ -2462,6 +2457,8 @@ | |||
2800 | 2462 | if (!srv_log_archive_on) { | 2457 | if (!srv_log_archive_on) { |
2801 | 2463 | ut_a(DB_SUCCESS == log_archive_noarchivelog()); | 2458 | ut_a(DB_SUCCESS == log_archive_noarchivelog()); |
2802 | 2464 | } else { | 2459 | } else { |
2803 | 2460 | bool start_archive; | ||
2804 | 2461 | |||
2805 | 2465 | mutex_enter(&(log_sys->mutex)); | 2462 | mutex_enter(&(log_sys->mutex)); |
2806 | 2466 | 2463 | ||
2807 | 2467 | start_archive = FALSE; | 2464 | start_archive = FALSE; |
http:// jenkins. percona. com/view/ PS%205. 6/job/percona- server- 5.6-param/ 37/