Commit 9cd23662 authored by Konstantin Osipov's avatar Konstantin Osipov

Merge next-mr -> next-4284-merge.

parents 8d6a192d 46400e13
#!/bin/sh
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# This script's purpose is to update the automake/autoconf helper scripts and
# to run a plain "configure" without any special compile flags. Only features
......@@ -61,6 +77,7 @@ fi
# Remember that configure restricts the man pages to the configured features !
./configure \
--with-embedded-server \
--with-perfschema \
--with-ndbcluster
$gmake
......@@ -40,9 +40,9 @@ extern "C" {
typedef struct unicase_info_st
{
uint16 toupper;
uint16 tolower;
uint16 sort;
uint32 toupper;
uint32 tolower;
uint32 sort;
} MY_UNICASE_INFO;
......@@ -439,6 +439,14 @@ extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_caseup_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_caseup_ujis(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern size_t my_casedn_ujis(CHARSET_INFO *, char *src, size_t srclen,
char *dst, size_t dstlen);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
int my_wildcmp_mb(CHARSET_INFO *,
......
# Copyright (C) 2000-2006 MySQL AB
# Copyright (C) 2000-2006 MySQL AB, 2008-2009 Sun Microsystems, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -75,6 +75,8 @@ EXTRA_DIST = README \
# List of directories containing test + result files and the
# related test data files that should be copied
# If you want to add a new suite, please check DEFAULT_SUITES in
# mysql-test-run.pl.
TEST_DIRS = t r include std_data std_data/parts collections \
std_data/ndb_backup50 std_data/ndb_backup51 \
std_data/ndb_backup51_data_be std_data/ndb_backup51_data_le \
......@@ -100,7 +102,9 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r
suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r \
suite/perfschema suite/perfschema/t suite/perfschema/r \
suite/perfschema/include
# Used by dist-hook and install-data-local to copy all
# test files into either dist or install directory
......
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Use default setting for mysqld processes
!include default_mysqld.cnf
!include default_client.cnf
......@@ -9,6 +24,8 @@
log-bin= master-bin
# Run tests with the performance schema instrumentation
loose-enable-performance-schema
[mysqlbinlog]
disable-force-if-open
......
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Default values that applies to all MySQL Servers
[mysqld]
open-files-limit= 1024
......@@ -26,3 +41,6 @@ slave-net-timeout=120
log-bin=mysqld-bin
# Run tests with the performance schema instrumentation
loose-enable-performance-schema
#!/usr/bin/perl
# -*- cperl -*-
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
##############################################################################
#
......@@ -128,7 +143,9 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb";
# If you add a new suite, please check TEST_DIRS in Makefile.am.
#
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb,perfschema";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
......
......@@ -3,6 +3,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
show tables in mysql;
Tables_in_mysql
......
......@@ -277,3 +277,281 @@ hex(a)
EE00
drop table t1;
End of 5.0 tests
#
# Start of 5.5 tests
#
#
# Testing WL#4583 Case conversion in Asian character sets
#
SET NAMES utf8;
SET collation_connection=big5_chinese_ci;
CREATE TABLE t1 (b VARCHAR(2));
INSERT INTO t1 VALUES ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
INSERT INTO t1 VALUES ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F');
CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1 b2;
CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2;
DROP TABLE t1;
CREATE TABLE t1 AS
SELECT concat(head, tail) AS code, ' ' AS a
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET big5 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t1;
COUNT(*)
28672
UPDATE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
Warning 1366 Incorrect string value: '\x80"' for column 'a' at row 3
Warning 1366 Incorrect string value: '\x80#' for column 'a' at row 4
Warning 1366 Incorrect string value: '\x80$' for column 'a' at row 5
Warning 1366 Incorrect string value: '\x80%' for column 'a' at row 6
Warning 1366 Incorrect string value: '\x80&' for column 'a' at row 7
Warning 1366 Incorrect string value: '\x80'' for column 'a' at row 8
Warning 1366 Incorrect string value: '\x80(' for column 'a' at row 9
Warning 1366 Incorrect string value: '\x80)' for column 'a' at row 10
Warning 1366 Incorrect string value: '\x80*' for column 'a' at row 11
Warning 1366 Incorrect string value: '\x80+' for column 'a' at row 12
Warning 1366 Incorrect string value: '\x80,' for column 'a' at row 13
Warning 1366 Incorrect string value: '\x80-' for column 'a' at row 14
Warning 1366 Incorrect string value: '\x80.' for column 'a' at row 15
Warning 1366 Incorrect string value: '\x80/' for column 'a' at row 16
Warning 1366 Incorrect string value: '\x800' for column 'a' at row 17
Warning 1366 Incorrect string value: '\x801' for column 'a' at row 18
Warning 1366 Incorrect string value: '\x802' for column 'a' at row 19
Warning 1366 Incorrect string value: '\x803' for column 'a' at row 20
Warning 1366 Incorrect string value: '\x804' for column 'a' at row 21
Warning 1366 Incorrect string value: '\x805' for column 'a' at row 22
Warning 1366 Incorrect string value: '\x806' for column 'a' at row 23
Warning 1366 Incorrect string value: '\x807' for column 'a' at row 24
Warning 1366 Incorrect string value: '\x808' for column 'a' at row 25
Warning 1366 Incorrect string value: '\x809' for column 'a' at row 26
Warning 1366 Incorrect string value: '\x80:' for column 'a' at row 27
Warning 1366 Incorrect string value: '\x80;' for column 'a' at row 28
Warning 1366 Incorrect string value: '\x80<' for column 'a' at row 29
Warning 1366 Incorrect string value: '\x80=' for column 'a' at row 30
Warning 1366 Incorrect string value: '\x80>' for column 'a' at row 31
Warning 1366 Incorrect string value: '\x80?' for column 'a' at row 32
Warning 1366 Incorrect string value: '\x80@' for column 'a' at row 33
Warning 1366 Incorrect string value: '\x80A' for column 'a' at row 34
Warning 1366 Incorrect string value: '\x80B' for column 'a' at row 35
Warning 1366 Incorrect string value: '\x80C' for column 'a' at row 36
Warning 1366 Incorrect string value: '\x80D' for column 'a' at row 37
Warning 1366 Incorrect string value: '\x80E' for column 'a' at row 38
Warning 1366 Incorrect string value: '\x80F' for column 'a' at row 39
Warning 1366 Incorrect string value: '\x80G' for column 'a' at row 40
Warning 1366 Incorrect string value: '\x80H' for column 'a' at row 41
Warning 1366 Incorrect string value: '\x80I' for column 'a' at row 42
Warning 1366 Incorrect string value: '\x80J' for column 'a' at row 43
Warning 1366 Incorrect string value: '\x80K' for column 'a' at row 44
Warning 1366 Incorrect string value: '\x80L' for column 'a' at row 45
Warning 1366 Incorrect string value: '\x80M' for column 'a' at row 46
Warning 1366 Incorrect string value: '\x80N' for column 'a' at row 47
Warning 1366 Incorrect string value: '\x80O' for column 'a' at row 48
Warning 1366 Incorrect string value: '\x80P' for column 'a' at row 49
Warning 1366 Incorrect string value: '\x80Q' for column 'a' at row 50
Warning 1366 Incorrect string value: '\x80R' for column 'a' at row 51
Warning 1366 Incorrect string value: '\x80S' for column 'a' at row 52
Warning 1366 Incorrect string value: '\x80T' for column 'a' at row 53
Warning 1366 Incorrect string value: '\x80U' for column 'a' at row 54
Warning 1366 Incorrect string value: '\x80V' for column 'a' at row 55
Warning 1366 Incorrect string value: '\x80W' for column 'a' at row 56
Warning 1366 Incorrect string value: '\x80X' for column 'a' at row 57
Warning 1366 Incorrect string value: '\x80Y' for column 'a' at row 58
Warning 1366 Incorrect string value: '\x80Z' for column 'a' at row 59
Warning 1366 Incorrect string value: '\x80[' for column 'a' at row 60
Warning 1366 Incorrect string value: '\x80\' for column 'a' at row 61
Warning 1366 Incorrect string value: '\x80]' for column 'a' at row 62
Warning 1366 Incorrect string value: '\x80^' for column 'a' at row 63
Warning 1366 Incorrect string value: '\x80_' for column 'a' at row 64
SELECT COUNT(*) FROM t1 WHERE a<>'';
COUNT(*)
13973
SELECT code, hex(upper(a)), hex(lower(a)),a, upper(a), lower(a) FROM t1 WHERE hex(a)<>hex(upper(a)) OR hex(a)<>hex(lower(a));
code hex(upper(a)) hex(lower(a)) a upper(a) lower(a)
A2CF A2CF A2E9 A A a
A2D0 A2D0 A2EA B B b
A2D1 A2D1 A2EB C C c
A2D2 A2D2 A2EC D D d
A2D3 A2D3 A2ED E E e
A2D4 A2D4 A2EE F F f
A2D5 A2D5 A2EF G G g
A2D6 A2D6 A2F0 H H h
A2D7 A2D7 A2F1 I I i
A2D8 A2D8 A2F2 J J j
A2D9 A2D9 A2F3 K K k
A2DA A2DA A2F4 L L l
A2DB A2DB A2F5 M M m
A2DC A2DC A2F6 N N n
A2DD A2DD A2F7 O O o
A2DE A2DE A2F8 P P p
A2DF A2DF A2F9 Q Q q
A2E0 A2E0 A2FA R R r
A2E1 A2E1 A2FB S S s
A2E2 A2E2 A2FC T T t
A2E3 A2E3 A2FD U U u
A2E4 A2E4 A2FE V V v
A2E5 A2E5 A340 W W w
A2E6 A2E6 A341 X X x
A2E7 A2E7 A342 Y Y y
A2E8 A2E8 A343 Z Z z
A2E9 A2CF A2E9 a A a
A2EA A2D0 A2EA b B b
A2EB A2D1 A2EB c C c
A2EC A2D2 A2EC d D d
A2ED A2D3 A2ED e E e
A2EE A2D4 A2EE f F f
A2EF A2D5 A2EF g G g
A2F0 A2D6 A2F0 h H h
A2F1 A2D7 A2F1 i I i
A2F2 A2D8 A2F2 j J j
A2F3 A2D9 A2F3 k K k
A2F4 A2DA A2F4 l L l
A2F5 A2DB A2F5 m M m
A2F6 A2DC A2F6 n N n
A2F7 A2DD A2F7 o O o
A2F8 A2DE A2F8 p P p
A2F9 A2DF A2F9 q Q q
A2FA A2E0 A2FA r R r
A2FB A2E1 A2FB s S s
A2FC A2E2 A2FC t T t
A2FD A2E3 A2FD u U u
A2FE A2E4 A2FE v V v
A340 A2E5 A340 w W w
A341 A2E6 A341 x X x
A342 A2E7 A342 y Y y
A343 A2E8 A343 z Z z
A344 A344 A35C Α Α α
A345 A345 A35D Β Β β
A346 A346 A35E Γ Γ γ
A347 A347 A35F Δ Δ δ
A348 A348 A360 Ε Ε ε
A349 A349 A361 Ζ Ζ ζ
A34A A34A A362 Η Η η
A34B A34B A363 Θ Θ θ
A34C A34C A364 Ι Ι ι
A34D A34D A365 Κ Κ κ
A34E A34E A366 Λ Λ λ
A34F A34F A367 Μ Μ μ
A350 A350 A368 Ν Ν ν
A351 A351 A369 Ξ Ξ ξ
A352 A352 A36A Ο Ο ο
A353 A353 A36B Π Π π
A354 A354 A36C Ρ Ρ ρ
A355 A355 A36D Σ Σ σ
A356 A356 A36E Τ Τ τ
A357 A357 A36F Υ Υ υ
A358 A358 A370 Φ Φ φ
A359 A359 A371 Χ Χ χ
A35A A35A A372 Ψ Ψ ψ
A35B A35B A373 Ω Ω ω
A35C A344 A35C α Α α
A35D A345 A35D β Β β
A35E A346 A35E γ Γ γ
A35F A347 A35F δ Δ δ
A360 A348 A360 ε Ε ε
A361 A349 A361 ζ Ζ ζ
A362 A34A A362 η Η η
A363 A34B A363 θ Θ θ
A364 A34C A364 ι Ι ι
A365 A34D A365 κ Κ κ
A366 A34E A366 λ Λ λ
A367 A34F A367 μ Μ μ
A368 A350 A368 ν Ν ν
A369 A351 A369 ξ Ξ ξ
A36A A352 A36A ο Ο ο
A36B A353 A36B π Π π
A36C A354 A36C ρ Ρ ρ
A36D A355 A36D σ Σ σ
A36E A356 A36E τ Τ τ
A36F A357 A36F υ Υ υ
A370 A358 A370 φ Φ φ
A371 A359 A371 χ Χ χ
A372 A35A A372 ψ Ψ ψ
A373 A35B A373 ω Ω ω
C7B1 C7B1 C7CC Д Д д
C7B2 C7B2 C7CD Е Е е
C7B3 C7B3 C7CE Ё Ё ё
C7B4 C7B4 C7CF Ж Ж ж
C7B5 C7B5 C7D0 З З з
C7B6 C7B6 C7D1 И И и
C7B7 C7B7 C7D2 Й Й й
C7B8 C7B8 C7D3 К К к
C7B9 C7B9 C7D4 Л Л л
C7BA C7BA C7D5 М М м
C7BB C7BB C7DC У У у
C7BC C7BC C7DD Ф Ф ф
C7BD C7BD C7DE Х Х х
C7BE C7BE C7DF Ц Ц ц
C7BF C7BF C7E0 Ч Ч ч
C7C0 C7C0 C7E1 Ш Ш ш
C7C1 C7C1 C7E2 Щ Щ щ
C7C2 C7C2 C7E3 Ъ Ъ ъ
C7C3 C7C3 C7E4 Ы Ы ы
C7C4 C7C4 C7E5 Ь Ь ь
C7C5 C7C5 C7E6 Э Э э
C7C6 C7C6 C7E7 Ю Ю ю
C7C7 C7C7 C7E8 Я Я я
C7CC C7B1 C7CC д Д д
C7CD C7B2 C7CD е Е е
C7CE C7B3 C7CE ё Ё ё
C7CF C7B4 C7CF ж Ж ж
C7D0 C7B5 C7D0 з З з
C7D1 C7B6 C7D1 и И и
C7D2 C7B7 C7D2 й Й й
C7D3 C7B8 C7D3 к К к
C7D4 C7B9 C7D4 л Л л
C7D5 C7BA C7D5 м М м
C7DC C7BB C7DC у У у
C7DD C7BC C7DD ф Ф ф
C7DE C7BD C7DE х Х х
C7DF C7BE C7DF ц Ц ц
C7E0 C7BF C7E0 ч Ч ч
C7E1 C7C0 C7E1 ш Ш ш
C7E2 C7C1 C7E2 щ Щ щ
C7E3 C7C2 C7E3 ъ Ъ ъ
C7E4 C7C3 C7E4 ы Ы ы
C7E5 C7C4 C7E5 ь Ь ь
C7E6 C7C5 C7E6 э Э э
C7E7 C7C6 C7E7 ю Ю ю
C7E8 C7C7 C7E8 я Я я
SELECT * FROM t1
WHERE HEX(CAST(LOWER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(LOWER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
A2B9 Ⅰ
A2BA Ⅱ
A2BB Ⅲ
A2BC Ⅳ
A2BD Ⅴ
A2BE Ⅵ
A2BF Ⅶ
A2C0 Ⅷ
A2C1 Ⅸ
A2C2 Ⅹ
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
C7C8 а
C7C9 б
C7CA в
C7CB г
C7D6 н
C7D7 о
C7D8 п
C7D9 р
C7DA с
C7DB т
DROP TABLE t1;
#
# End of 5.5 tests
#
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,7 @@ information_schema
mtr
mysql
mysqltest
performance_schema
test
flush tables with read lock;
drop database mysqltest;
......@@ -61,6 +62,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
drop database mysqltest;
ERROR HY000: Can't drop database 'mysqltest'; database doesn't exist
......
......@@ -11,12 +11,14 @@ select * from information_schema.SCHEMATA where schema_name > 'm';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
def mtr latin1 latin1_swedish_ci NULL
def mysql latin1 latin1_swedish_ci NULL
def performance_schema utf8 utf8_general_ci NULL
def test latin1 latin1_swedish_ci NULL
select schema_name from information_schema.schemata;
schema_name
information_schema
mtr
mysql
performance_schema
test
show databases like 't%';
Database (t%)
......@@ -26,6 +28,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
show databases where `database` = 't%';
Database
......@@ -364,6 +367,7 @@ c
information_schema
mtr
mysql
performance_schema
test
explain select * from v0;
id select_type table type possible_keys key key_len ref rows Extra
......
This diff is collapsed.
This diff is collapsed.
......@@ -262,6 +262,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
prepare stmt4 from ' show tables from test like ''t2%'' ';
execute stmt4;
......
......@@ -9,6 +9,7 @@ information_schema
foo
mtr
mysql
performance_schema
test
drop schema foo;
#
......
......@@ -142,6 +142,7 @@ Database
information_schema
mtr
mysql
performance_schema
test
show databases like "test%";
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
......
......@@ -116,4 +116,5 @@ Database
information_schema
mtr
mysql
performance_schema
test
......@@ -320,10 +320,10 @@ INSERT INTO t2 SET a = func_modify_t1();
SHOW BINLOG EVENTS FROM 12283;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 12283 Query 1 12351 BEGIN
master-bin.000001 12351 Table_map 1 12393 table_id: 41 (test.t2)
master-bin.000001 12393 Table_map 1 12435 table_id: 42 (test.t1)
master-bin.000001 12435 Write_rows 1 12473 table_id: 42
master-bin.000001 12473 Write_rows 1 12511 table_id: 41 flags: STMT_END_F
master-bin.000001 12351 Table_map 1 12393 table_id: 59 (test.t2)
master-bin.000001 12393 Table_map 1 12435 table_id: 60 (test.t1)
master-bin.000001 12435 Write_rows 1 12473 table_id: 60
master-bin.000001 12473 Write_rows 1 12511 table_id: 59 flags: STMT_END_F
master-bin.000001 12511 Query 1 12580 COMMIT
DROP TABLE t1,t2;
DROP FUNCTION func_modify_t1;
......@@ -347,12 +347,12 @@ INSERT INTO t1 SET a = 2;
SHOW BINLOG EVENTS FROM 13426;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 13426 Query 1 13494 BEGIN
master-bin.000001 13494 Table_map 1 13535 table_id: 44 (test.t1)
master-bin.000001 13535 Table_map 1 13577 table_id: 45 (test.t3)
master-bin.000001 13577 Table_map 1 13619 table_id: 46 (test.t2)
master-bin.000001 13619 Write_rows 1 13657 table_id: 46
master-bin.000001 13657 Write_rows 1 13695 table_id: 45
master-bin.000001 13695 Write_rows 1 13729 table_id: 44 flags: STMT_END_F
master-bin.000001 13494 Table_map 1 13535 table_id: 62 (test.t1)
master-bin.000001 13535 Table_map 1 13577 table_id: 63 (test.t3)
master-bin.000001 13577 Table_map 1 13619 table_id: 64 (test.t2)
master-bin.000001 13619 Write_rows 1 13657 table_id: 64
master-bin.000001 13657 Write_rows 1 13695 table_id: 63
master-bin.000001 13695 Write_rows 1 13729 table_id: 62 flags: STMT_END_F
master-bin.000001 13729 Query 1 13798 COMMIT
DROP TABLE t1,t2,t3;
SET SESSION binlog_format = STATEMENT;
......
......@@ -56,6 +56,7 @@ catalog_name schema_name sql_path
def information_schema NULL
def mtr NULL
def mysql NULL
def performance_schema NULL
def test NULL
###############################################################################
# Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information
......
......@@ -13,6 +13,7 @@ information_schema
日本語
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
......@@ -14,6 +14,7 @@ information_schema
龔龖龗
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
......@@ -13,6 +13,7 @@ information_schema
龔龖龗
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
......@@ -13,6 +13,7 @@ information_schema
龔龖龗
ニホンゴ
mysql
performance_schema
test
USE `ニホンゴ`;
USE `日本語`;
......
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
--disable_warnings
drop table if exists test.t1;
drop table if exists test.t2;
--enable_warnings
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
--source include/show_binlog_events.inc
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
disconnect con1;
disconnect con2;
disconnect con3;
connection default;
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
--disable_warnings
drop table if exists test.t1;
--enable_warnings
## The result of show grants is not consistent across platforms ...
## show grants;
## Not enforced yet: deny CREATE_ACL and DROP_ACL
## Waiting to remove .FRM files first
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.t1(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.t1;
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.SETUP_INSTRUMENTS(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.EVENTS_WAITS_CURRENT(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## create table performance_schema.FILE_INSTANCES(a int);
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.SETUP_INSTRUMENTS;
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.EVENTS_WAITS_CURRENT;
##
## --error ER_DBACCESS_DENIED_ERROR
## drop table performance_schema.FILE_INSTANCES;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.FILE_INSTANCES to test.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS to performance_schema.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT to performance_schema.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.FILE_INSTANCES to performance_schema.t1;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.SETUP_INSTRUMENTS
to performance_schema.EVENTS_WAITS_CURRENT;
--error ER_DBACCESS_DENIED_ERROR
rename table performance_schema.EVENTS_WAITS_CURRENT
to performance_schema.SETUP_INSTRUMENTS;
--error ER_DBACCESS_DENIED_ERROR
create procedure performance_schema.my_proc() begin end;
--error ER_DBACCESS_DENIED_ERROR
create function performance_schema.my_func() returns int return 0;
--error ER_DBACCESS_DENIED_ERROR
create event performance_schema.my_event on schedule every 15 minute
do begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_setup_instruments
before insert on performance_schema.SETUP_INSTRUMENTS
for each row begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_events_waits_current
before insert on performance_schema.EVENTS_WAITS_CURRENT
for each row begin end;
--error ER_DBACCESS_DENIED_ERROR
create trigger performance_schema.bi_file_instances
before insert on performance_schema.FILE_INSTANCES
for each row begin end;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1(a int) engine=PERFORMANCE_SCHEMA;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.SETUP_INSTRUMENTS;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.EVENTS_WAITS_CURRENT;
--error ER_WRONG_PERFSCHEMA_USAGE
create table test.t1 like performance_schema.FILE_INSTANCES;
--replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.SETUP_INSTRUMENTS
set name="foo";
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.EVENTS_WAITS_CURRENT
set name="foo";
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.FILE_INSTANCES
set name="foo";
--replace_result '\'setup_instruments' '\'SETUP_INSTRUMENTS'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.SETUP_INSTRUMENTS;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.EVENTS_WAITS_CURRENT;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.FILE_INSTANCES;
lock table performance_schema.SETUP_INSTRUMENTS read;
unlock tables;
lock table performance_schema.SETUP_INSTRUMENTS write;
unlock tables;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.EVENTS_WAITS_CURRENT read;
unlock tables;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.EVENTS_WAITS_CURRENT write;
unlock tables;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.FILE_INSTANCES read;
unlock tables;
--replace_result '\'file_instances' '\'FILE_INSTANCES'
--error ER_TABLEACCESS_DENIED_ERROR
lock table performance_schema.FILE_INSTANCES write;
unlock tables;
--echo #
--echo # WL#4818, NFS2: Can use grants to give normal user access
--echo # to view data from _CURRENT and _HISTORY tables
--echo #
--echo # Should work as pfs_user_1 and pfs_user_2, but not as pfs_user_3.
--echo # (Except for EVENTS_WAITS_CURRENT, which is granted.)
# Errors here will be caught by the diff afterwards
--disable_abort_on_error
--replace_result '\'events_waits_history' '\'EVENTS_WAITS_HISTORY'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_HISTORY LIMIT 1;
--replace_result '\'events_waits_history_long' '\'EVENTS_WAITS_HISTORY_LONG'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_HISTORY_LONG LIMIT 1;
--replace_result '\'events_waits_current' '\'EVENTS_WAITS_CURRENT'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_CURRENT LIMIT 1;
--replace_result '\'events_waits_summary_by_instance' '\'EVENTS_WAITS_SUMMARY_BY_INSTANCE'
SELECT "can select" FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE LIMIT 1;
--replace_result '\'file_summary_by_instance' '\'FILE_SUMMARY_BY_INSTANCE'
SELECT "can select" FROM performance_schema.FILE_SUMMARY_BY_INSTANCE LIMIT 1;
--enable_abort_on_error
# Copyright (C) 2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
let $MYSQLD_DATADIR= `select @@datadir`;
let $MYSQLD_TMPDIR= `select @@tmpdir`;
--disable_query_log
update performance_schema.SETUP_INSTRUMENTS set enabled='NO';
update performance_schema.SETUP_CONSUMERS set enabled='YES';
--enable_query_log
connect (con1, localhost, root, , );
let $con1_THREAD_ID=`select thread_id from performance_schema.PROCESSLIST
where ID in (select connection_id())`;
connect (con2, localhost, root, , );
let $con2_THREAD_ID=`select thread_id from performance_schema.PROCESSLIST
where ID in (select connection_id())`;
connect (con3, localhost, root, , );
let $con3_THREAD_ID=`select thread_id from performance_schema.PROCESSLIST
where ID in (select connection_id())`;
connection default;
--disable_query_log
prepare stmt_dump_events from
"select event_name,
left(source, locate(\":\", source)) as short_source,
operation, number_of_bytes
from performance_schema.EVENTS_WAITS_HISTORY_LONG
where thread_id=? order by event_id;";
prepare stmt_dump_thread from
"select name from performance_schema.PROCESSLIST where thread_id=? ;";
--enable_query_log
# Copyright (C) 2008-2009 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Tests for PERFORMANCE_SCHEMA
show databases;
select count(*) from performance_schema.PERFORMANCE_TIMERS;
select count(*) from performance_schema.SETUP_CONSUMERS;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
select count(*) from performance_schema.SETUP_TIMERS;
# Make sure we don't crash, no matter what the starting parameters are
--disable_result_log
select * from performance_schema.COND_INSTANCES;
select * from performance_schema.EVENTS_WAITS_CURRENT;
select * from performance_schema.EVENTS_WAITS_HISTORY;
select * from performance_schema.EVENTS_WAITS_HISTORY_LONG;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
select * from performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
select * from performance_schema.FILE_INSTANCES;
select * from performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
select * from performance_schema.FILE_SUMMARY_BY_INSTANCE;
select * from performance_schema.MUTEX_INSTANCES;
select * from performance_schema.PERFORMANCE_TIMERS;
select * from performance_schema.PROCESSLIST;
select * from performance_schema.RWLOCK_INSTANCES;
select * from performance_schema.SETUP_CONSUMERS;
select * from performance_schema.SETUP_INSTRUMENTS;
select * from performance_schema.SETUP_OBJECTS;
select * from performance_schema.SETUP_TIMERS;
--enable_result_log
# This has a stable output, printing the result:
show variables like "performance_schema%";
# This has an unrepeatable output, it does depends too much on
# - the platform hardware (sizeof structures, padding)
# - the compiler used (sizeof(enum))
# - the platform header files (sizeof(size_t))
# - the code path in the server (what gets executed and instrumented
# at runtime)
--disable_result_log
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
--enable_result_log
"General cleanup"
drop table if exists t1;
update performance_schema.SETUP_INSTRUMENTS set enabled = 'NO';
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
truncate table performance_schema.FILE_SUMMARY_BY_EVENT_NAME;
truncate table performance_schema.FILE_SUMMARY_BY_INSTANCE;
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
update performance_schema.SETUP_INSTRUMENTS
set enabled = 'YES', timed = 'YES';
create table t1 (
id INT PRIMARY KEY,
b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM;
insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
set @dump_all=FALSE;
"Verifying file aggregate consistency"
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
OR @dump_all;
EVENT_NAME COUNT_READ SUM(i.COUNT_READ)
SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
OR @dump_all;
EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ))
OR @dump_all;
EVENT_NAME SUM_NUMBER_OF_BYTES_READ SUM(i.SUM_NUMBER_OF_BYTES_READ)
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
FROM performance_schema.FILE_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.FILE_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE))
OR @dump_all;
EVENT_NAME SUM_NUMBER_OF_BYTES_WRITE SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
"Verifying waits aggregate consistency (instance)"
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT))
OR @dump_all;
EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT)
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT))
AND (MIN(i.MIN_TIMER_WAIT) != 0)
OR @dump_all;
EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT)
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT))
OR @dump_all;
EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT)
"Verifying waits aggregate consistency (thread)"
SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT))
OR @dump_all;
EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT)
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT))
AND (MIN(t.MIN_TIMER_WAIT) != 0)
OR @dump_all;
EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT)
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT)
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
USING (EVENT_NAME)
GROUP BY EVENT_NAME
HAVING (e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT))
OR @dump_all;
EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT)
update performance_schema.SETUP_CONSUMERS set enabled = 'YES';
update performance_schema.SETUP_INSTRUMENTS
set enabled = 'YES', timed = 'YES';
drop table test.t1;
Found: unknown variable 'performance-schema-enabled=maybe'
Found: Aborting
Found: ambiguous option '--performance-schema-max_=12'
set binlog_format=mixed;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
count(*) > 0
1
drop table if exists test.t1;
drop table if exists test.t2;
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table if exists test.t1
master-bin.000001 # Query # # use `test`; drop table if exists test.t2
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table test.t1
master-bin.000001 # Query # # use `test`; drop table test.t2
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
set binlog_format=row;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
count(*) > 0
1
drop table if exists test.t1;
drop table if exists test.t2;
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table if exists test.t1
master-bin.000001 # Query # # use `test`; drop table if exists test.t2
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; drop table test.t1
master-bin.000001 # Query # # use `test`; drop table test.t2
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (performance_schema.SETUP_INSTRUMENTS)
master-bin.000001 # Update_rows # # table_id: #
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
set binlog_format=statement;
RESET MASTER;
select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS;
count(*) > 0
1
update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Statement may not be safe to log in statement format.
select count(*) > 0 from performance_schema.EVENTS_WAITS_CURRENT;
count(*) > 0
1
drop table if exists test.t1;
drop table if exists test.t2;
create table test.t1 (thread_id integer);
create table test.t2 (name varchar(128));
insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
Warnings:
Note 1592 Statement may not be safe to log in statement format.
insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Statement may not be safe to log in statement format.
drop table test.t1;
drop table test.t2;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%";
Warnings:
Note 1592 Statement may not be safe to log in statement format.
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; update performance_schema.SETUP_INSTRUMENTS set enabled='NO'
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # use `test`; drop table if exists test.t1
master-bin.000001 # Query # # use `test`; drop table if exists test.t2
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128))
master-bin.000001 # Query # # use `test`; insert into test.t1
select thread_id from performance_schema.EVENTS_WAITS_CURRENT
master-bin.000001 # Query # # use `test`; insert into test.t2
select name from performance_schema.SETUP_INSTRUMENTS
where name like "wait/synch/rwlock/%"
master-bin.000001 # Query # # use `test`; drop table test.t1
master-bin.000001 # Query # # use `test`; drop table test.t2
master-bin.000001 # Query # # use `test`; update performance_schema.SETUP_INSTRUMENTS set enabled='YES'
where name like "wait/synch/rwlock/%"
show variables like 'performance_schema_max_thread_classes';
Variable_name Value
performance_schema_max_thread_classes 12
show variables like 'performance_schema_max_thread_instances';
Variable_name Value
performance_schema_max_thread_instances 318
show grants;
Grants for root@localhost
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
grant SELECT(thread_id, event_id) on performance_schema.EVENTS_WAITS_CURRENT
to 'pfs_user_5'@localhost;
grant UPDATE(enabled) on performance_schema.SETUP_INSTRUMENTS
to 'pfs_user_5'@localhost;
flush privileges;
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
select thread_id, event_id from performance_schema.EVENTS_WAITS_CURRENT;
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
select event_name from performance_schema.EVENTS_WAITS_CURRENT;
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'EVENTS_WAITS_CURRENT'
select thread_id, event_id, event_name
from performance_schema.EVENTS_WAITS_CURRENT;
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'EVENTS_WAITS_CURRENT'
update performance_schema.SETUP_INSTRUMENTS set name='illegal';
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'SETUP_INSTRUMENTS'
update performance_schema.SETUP_INSTRUMENTS set timed='NO';
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'SETUP_INSTRUMENTS'
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
DROP USER 'pfs_user_5'@localhost;
flush privileges;
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'CYCLE';
alter table performance_schema.COND_INSTANCES add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.COND_INSTANCES;
ERROR HY000: Invalid performance_schema usage.
ALTER TABLE performance_schema.COND_INSTANCES ADD INDEX test_index(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.COND_INSTANCES(NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_CURRENT add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_CURRENT;
ALTER TABLE performance_schema.EVENTS_WAITS_CURRENT ADD INDEX test_index(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_CURRENT(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_HISTORY add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_HISTORY;
ALTER TABLE performance_schema.EVENTS_WAITS_HISTORY ADD INDEX test_index(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_HISTORY(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_HISTORY_LONG add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_HISTORY_LONG;
ALTER TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG ADD INDEX test_index(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_HISTORY_LONG(EVENT_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME;
ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME ADD INDEX test_index(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE;
ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE ADD INDEX test_index(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index ON performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE(EVENT_NAME);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
alter table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME;
ALTER TABLE performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME ADD INDEX test_index(THREAD_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE UNIQUE INDEX test_index
ON performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME(THREAD_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment