Add lib/, t/lib/, and sandbox/. All modules are updated and passing on MySQL 5.1.

This commit is contained in:
Daniel Nichter
2011-06-24 11:22:06 -06:00
parent 01e0175ad9
commit 6c501128e6
567 changed files with 335952 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
CREATE TABLE `geodb_coordinates` (
`loc_id` int(11) NOT NULL default '0',
`lon` double default NULL,
`lat` double default NULL,
`sin_lon` double default NULL,
`sin_lat` double default NULL,
`cos_lon` double default NULL,
`cos_lat` double default NULL,
`coord_type` int(11) NOT NULL default '0',
`coord_subtype` int(11) default NULL,
`valid_since` date default NULL,
`date_type_since` int(11) default NULL,
`valid_until` date NOT NULL default '0000-00-00',
`date_type_until` int(11) NOT NULL default '0',
KEY `coord_loc_id_idx` (`loc_id`),
KEY `coord_lon_idx` (`lon`),
KEY `coord_lat_idx` (`lat`),
KEY `coord_slon_idx` (`sin_lon`),
KEY `coord_slat_idx` (`sin_lat`),
KEY `coord_clon_idx` (`cos_lon`),
KEY `coord_clat_idx` (`cos_lat`),
KEY `coord_type_idx` (`coord_type`),
KEY `coord_stype_idx` (`coord_subtype`),
KEY `coord_since_idx` (`valid_since`),
KEY `coord_until_idx` (`valid_until`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

View File

@@ -0,0 +1,6 @@
INSERT INTO raw_data VALUES
('2011-06-01', 101, 'ep1-1', 'ep2-1', 'd1-1', 'd2-1'),
('2011-06-02', 102, 'ep1-2', 'ep2-2', 'd1-2', 'd2-2'),
('2011-06-03', 103, 'ep1-3', 'ep2-3', 'd1-3', 'd2-3'),
('2011-06-04', 104, 'ep1-4', 'ep2-4', 'd1-4', 'd2-4'),
('2011-06-05', 105, 'ep1-5', 'ep2-5', 'd1-5', 'd2-5');

View File

@@ -0,0 +1,20 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
use test;
CREATE TABLE a (
id int primary key, -- doesn't map
c varchar(16)
);
INSERT INTO a VALUES
(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e');
CREATE TABLE b (
b_id int auto_increment primary key,
c varchar(16)
);
CREATE TABLE c (
c_id int auto_increment primary key,
c varchar(16)
);

View File

@@ -0,0 +1,60 @@
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 5.1.53-log
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`address` varchar(50) NOT NULL,
`city_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`address_id`),
KEY `idx_fk_city_id` (`city_id`),
CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `city`;
CREATE TABLE `city` (
`city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`city` varchar(50) NOT NULL,
`country_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`city_id`),
KEY `idx_fk_country_id` (`country_id`),
CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `country`;
CREATE TABLE `country` (
`country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`country` varchar(50) NOT NULL,
PRIMARY KEY (`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `denorm_address`;
CREATE TABLE `denorm_address` (
`address_id` smallint(5) unsigned NOT NULL,
`address` varchar(50) NOT NULL,
`city_id` smallint(5) unsigned NOT NULL,
`city` varchar(50) NOT NULL,
`country_id` smallint(5) unsigned NOT NULL,
`country` varchar(50) NOT NULL,
PRIMARY KEY (`address_id`,`city_id`,`country_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
LOCK TABLES `denorm_address` WRITE;
INSERT INTO `denorm_address` VALUES
(1,'47 MySakila Drive',300,'Lethbridge',20,'Canada'),
(2,'28 MySQL Boulevard',576,'Woodridge',8,'Australia'),
(3,'23 Workhaven Lane',300,'Lethbridge',20,'Canada'),
(4,'1411 Lillydale Drive',576,'Woodridge',8,'Australia'),
(5,'1913 Hanoi Way',463,'Sasebo',50,'Japan'),
(6,'1121 Loja Avenue',449,'San Bernardino',103,'United States'),
(7,'692 Joliet Street',38,'Athenai',39,'Greece'),
(8,'1566 Inegl Manor',349,'Myingyan',64,'Myanmar'),
(9,'53 Idfu Parkway',361,'Nantou',92,'Taiwan'),
(10,'1795 Santiago Way',295,'Laredo',103,'United States');
UNLOCK TABLES;
SET FOREIGN_KEY_CHECKS=1;

View File

@@ -0,0 +1,42 @@
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 5.1.53-log
DROP TABLE IF EXISTS `denorm_items`;
CREATE TABLE `denorm_items` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(16) DEFAULT NULL,
`color` varchar(16) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
LOCK TABLES `denorm_items` WRITE;
INSERT INTO `denorm_items` VALUES (1,'t1','red'),(2,'t2','red'),(3,'t2','blue'),(4,'t3','black'),(5,'t4','orange'),(6,'t5','green');
UNLOCK TABLES;
DROP TABLE IF EXISTS `types`;
CREATE TABLE `types` (
`type_id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(16) DEFAULT NULL,
PRIMARY KEY (`type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `colors`;
CREATE TABLE `colors` (
`color_id` int(11) NOT NULL AUTO_INCREMENT,
`color` varchar(16) DEFAULT NULL,
PRIMARY KEY (`color_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `items`;
CREATE TABLE `items` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`type_id` int(11) NOT NULL,
`color_id` int(11) NOT NULL,
PRIMARY KEY (`item_id`),
KEY `type_id` (`type_id`),
KEY `color_id` (`color_id`),
CONSTRAINT `items_ibfk_1` FOREIGN KEY (`type_id`) REFERENCES `types` (`type_id`) ON UPDATE CASCADE,
CONSTRAINT `items_ibfk_2` FOREIGN KEY (`color_id`) REFERENCES `colors` (`color_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@@ -0,0 +1,32 @@
--
-- Database: test
--
--
-- address --> city --> country
--
CREATE TABLE `country` (
`country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`country` varchar(50) NOT NULL,
PRIMARY KEY (`country_id`)
) ENGINE=InnoDB;
CREATE TABLE `city` (
`city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`city` varchar(50) NOT NULL,
`country_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`city_id`),
KEY `idx_fk_country_id` (`country_id`),
CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE
) ENGINE=InnoDB;
CREATE TABLE `address` (
`address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`address` varchar(50) NOT NULL,
`city_id` smallint(5) unsigned NOT NULL,
`postal_code` varchar(10) DEFAULT NULL,
PRIMARY KEY (`address_id`),
KEY `idx_fk_city_id` (`city_id`),
CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE
) ENGINE=InnoDB;

View File

@@ -0,0 +1,40 @@
--
-- Database: test
--
--
-- data
-- |
-- +--> data_report
-- |
-- +--> entity
--
CREATE TABLE `data_report` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` date DEFAULT NULL,
`posted` datetime DEFAULT NULL,
`acquired` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `date` (`date`,`posted`,`acquired`)
) ENGINE=InnoDB;
CREATE TABLE `entity` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`entity_property_1` varchar(16) DEFAULT NULL,
`entity_property_2` varchar(16) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `entity_property_1` (`entity_property_1`,`entity_property_2`)
) ENGINE=InnoDB;
CREATE TABLE `data` (
`data_report` int(11) NOT NULL DEFAULT '0',
`hour` tinyint(4) NOT NULL DEFAULT '0',
`entity` int(11) NOT NULL DEFAULT '0',
`data_1` varchar(16) DEFAULT NULL,
`data_2` varchar(16) DEFAULT NULL,
PRIMARY KEY (`data_report`,`hour`,`entity`),
KEY `entity` (`entity`),
CONSTRAINT `data_ibfk_1` FOREIGN KEY (`data_report`) REFERENCES `data_report` (`id`),
CONSTRAINT `data_ibfk_2` FOREIGN KEY (`entity`) REFERENCES `entity` (`id`)
) ENGINE=InnoDB;

View File

@@ -0,0 +1,92 @@
-- START SESSION Query
;
DELIMITER
ROLLBACK
use test/*!*/
SET TIMESTAMP=1289247700 ;
SET @@session.pseudo_thread_id=15 ;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1 ;
SET @@session.sql_mode=0 ;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1 ; ;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=33 ;
SET @@session.lc_time_names=0 ;
SET @@session.collation_database=DEFAULT ;
CREATE TABLE `test1` ( `kwid` int(10) unsigned NOT NULL default '0', `keyword` varchar(80) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET TIMESTAMP=1289247700 ;
BEGIN
SET TIMESTAMP=1289247700 ;
INSERT INTO `test1` VALUES
(1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
COMMIT
SET TIMESTAMP=1289247700 ;
CREATE TABLE `test2` ( `kwid` int(10) unsigned NOT NULL default '0', `keyword` varchar(80) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET TIMESTAMP=1289247701 ;
BEGIN
SET TIMESTAMP=1289247701 ;
INSERT INTO `test2` VALUES
(1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
COMMIT
SET TIMESTAMP=1289247988 ;
BEGIN
SET TIMESTAMP=1289247988 ;
INSERT INTO `test1` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
COMMIT
SET TIMESTAMP=1289247988 ;
BEGIN
SET TIMESTAMP=1289247988 ;
INSERT INTO `test2` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
COMMIT
SET TIMESTAMP=1289247999 ;
drop table test1
SET TIMESTAMP=1289247999 ;
drop table test2
SET TIMESTAMP=1289248000 ;
CREATE TABLE `test1` ( `kwid` int(10) unsigned NOT NULL DEFAULT '0', `keyword` varchar(80) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET TIMESTAMP=1289248000 ;
BEGIN
SET TIMESTAMP=1289248000 ;
INSERT INTO `test1` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
COMMIT
SET TIMESTAMP=1289248000 ;
CREATE TABLE `test2` ( `kwid` int(10) unsigned NOT NULL DEFAULT '0', `keyword` varchar(80) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET TIMESTAMP=1289248000 ;
BEGIN
SET TIMESTAMP=1289248000 ;
INSERT INTO `test2` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
COMMIT
DELIMITER
ROLLBACK ;

View File

@@ -0,0 +1,12 @@
-- START SESSION 1
use foo
SELECT col FROM foo_tbl
use bar
SELECT col FROM bar_tbl
SELECT col FROM bar_tbl

View File

@@ -0,0 +1,14 @@
-- START SESSION 2
use foo
SELECT col FROM foo_tbl
use bar
SELECT col FROM bar_tbl
use foo
SELECT col FROM foo_tbl

View File

@@ -0,0 +1,21 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME [OPTIONS]
Options:
--defaults-file=s -F alignment test
--[no]defaultset alignment test with a very long thing that is longer
than 80 characters wide and must be wrapped
--dog=s -D Dogs are fun
--[no]foo Foo
--love -l And peace
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Options and values after processing arguments:
--defaults-file (No value)
--defaultset FALSE
--dog (No value)
--foo FALSE
--love 0

View File

@@ -0,0 +1,14 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--database=s -D Specify the database for all tables
--[no]nouniquechecks Set UNIQUE_CHECKS=0 before LOAD DATA INFILE
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Options and values after processing arguments:
--database (No value)
--nouniquechecks FALSE

View File

@@ -0,0 +1,18 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--ignore -i Use IGNORE for INSERT statements
--replace -r Use REPLACE instead of INSERT statements
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Rules:
--ignore and --replace are mutually exclusive.
Options and values after processing arguments:
--ignore FALSE
--replace FALSE

View File

@@ -0,0 +1,16 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--bar=m Time. Optional suffix s=seconds, m=minutes, h=hours, d=days; if no
suffix, m is used.
--foo=m Time. Optional suffix s=seconds, m=minutes, h=hours, d=days; if no
suffix, s is used.
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Options and values after processing arguments:
--bar (No value)
--foo (No value)

View File

@@ -0,0 +1,33 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--bar=d DSN bar
--foo=d DSN foo
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Rules:
DSN values in --foo default to values in --bar if COPY is yes.
DSN syntax is key=value[,key=value...] Allowable DSN keys:
KEY COPY MEANING
=== ==== =============================================
A yes Default character set
D yes Database to use
F yes Only read default options from the given file
P yes Port number to use for connection
S yes Socket file to use for connection
h yes Connect to host
p yes Password to use when connecting
u yes User for login if not current user
If the DSN is a bareword, the word is treated as the 'h' key.
Options and values after processing arguments:
--bar (No value)
--foo (No value)

View File

@@ -0,0 +1,33 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--bar=d DSN bar
--foo=d DSN foo
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Rules:
DSN values in --foo default to values in --bar if COPY is yes.
DSN syntax is key=value[,key=value...] Allowable DSN keys:
KEY COPY MEANING
=== ==== =============================================
A yes Default character set
D yes Database to use
F yes Only read default options from the given file
P yes Port number to use for connection
S yes Socket file to use for connection
h yes Connect to host
p yes Password to use when connecting
u yes User for login if not current user
If the DSN is a bareword, the word is treated as the 'h' key.
Options and values after processing arguments:
--bar D=DB,h=localhost,u=USER
--foo D=DB,h=otherhost,u=USER

View File

@@ -0,0 +1,20 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--books=a -b books optional
--columns=H -C cols required
--databases=A -d databases required
--foo=A foo (default a,b,c)
--tables=h -t tables optional
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Options and values after processing arguments:
--books o,p
--columns a,b
--databases f,g
--foo a,b,c
--tables d,e

View File

@@ -0,0 +1,42 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--algorithm=s Checksum algorithm (ACCUM|CHECKSUM|BIT_XOR)
--schema Checksum SHOW CREATE TABLE intead of table data
Connection:
--defaults-file=s -F Only read mysql options from the given file
Filter:
--databases=h -d Only checksum this comma-separated list of databases
Help:
--explain-hosts Explain hosts
--help Show help and exit
--version Show version and exit
Output:
--tab Print tab-separated output, not column-aligned output
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Rules:
--schema is restricted to option groups Connection, Filter, Output, Help.
Options and values after processing arguments:
--algorithm (No value)
--databases (No value)
--defaults-file (No value)
--explain-hosts FALSE
--help FALSE
--schema FALSE
--tab FALSE
--version FALSE

View File

@@ -0,0 +1,15 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--cat=A cat option (default a,b)
--config=A Read this comma-separated list of config files (must be the first
option on the command line).
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Options and values after processing arguments:
--cat a,b
--config /etc/maatkit/maatkit.conf,/etc/maatkit/OptionParser.t.conf,$ENV{HOME}/.maatkit.conf,$ENV{HOME}/.OptionParser.t.conf

View File

@@ -0,0 +1,15 @@
OptionParser.t parses command line options. For more details, please use the --help option, or try 'perldoc $PROGRAM_NAME' for complete documentation.
Usage: $PROGRAM_NAME <options>
Options:
--cat cat option
--config=A Read this comma-separated list of config files (must be the first
option on the command line).
Option types: s=string, i=integer, f=float, h/H/a/A=comma-separated list, d=DSN, z=size, m=time
Options and values after processing arguments:
--cat TRUE
--config $trunk/t/lib/samples/empty

View File

@@ -0,0 +1,40 @@
# Overall: 1 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 1s 1s 1s 1s 1s 0 1s
# Lock time 1ms 1ms 1ms 1ms 1ms 0 1ms
# Query 1: 0 QPS, 0x concurrency, ID 0x5796997451B1FA1D at byte 123 ______
# Scores: Apdex = 1.00 [1.0]*, V/M = 0.00
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 1s 1s 1s 1s 1s 0 1s
# Lock time 100 1ms 1ms 1ms 1ms 1ms 0 1ms
# String:
# cmd Query
# Databases foodb
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `foodb` LIKE 'tbl'\G
# SHOW CREATE TABLE `foodb`.`tbl`\G
# CRC 926
# EXPLAIN /*!50100 PARTITIONS*/
select col from tbl where id=42\G
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M Item
# ==== ================== ============= ===== ====== ==== ===== ==========
# 1 0x5796997451B1FA1D 1.0007 100.0% 1 1.0007 1.00 0.00 SELECT tbl

View File

@@ -0,0 +1,67 @@
# Query 1: 0 QPS, 0x concurrency, ID 0x3F79759E7FA2F117 at byte 1106 _____
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2009-12-08 09:23:49.637892
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 99 30ms 30ms 30ms 30ms 30ms 0 30ms
# Query size 51 37 37 37 37 37 0 37
# Statement id 50 2 2 2 2 2 0 2
# Warning coun 0 0 0 0 0 0 0 0
# String:
# cmd Query
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms ################################################################
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `d` LIKE 't'\G
# SHOW CREATE TABLE `d`.`t`\G
# CRC 990
EXECUTE SELECT i FROM d.t WHERE i="3"\G
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
SELECT i FROM d.t WHERE i="3"\G
# Query 2: 0 QPS, 0x concurrency, ID 0xAA8E9FA785927259 at byte 0 ________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2009-12-08 09:23:49.637394
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 286us 286us 286us 286us 286us 0 286us
# Query size 48 35 35 35 35 35 0 35
# Statement id 50 2 2 2 2 2 0 2
# Warning coun 0 0 0 0 0 0 0 0
# String:
# cmd Query
# Query_time distribution
# 1us
# 10us
# 100us ################################################################
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `d` LIKE 't'\G
# SHOW CREATE TABLE `d`.`t`\G
# CRC 348
PREPARE SELECT i FROM d.t WHERE i=?\G
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
SELECT i FROM d.t WHERE i=?\G
# Prepared statements
# Rank Query ID PREP PREP Response EXEC EXEC Response Item
# ==== ================== ==== ============= ==== ============= ==========
# 1 0x3F79759E7FA2F117 0 0.0003 0.9% 1 0.0303 99.1% SELECT d.t

View File

@@ -0,0 +1,40 @@
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M Item
# ==== ================== ============= ===== ====== ==== ===== ==========
# 1 0x5796997451B1FA1D 1.0007 100.0% 1 1.0007 1.00 0.00 SELECT tbl
# Query 1: 0 QPS, 0x concurrency, ID 0x5796997451B1FA1D at byte 123 ______
# Scores: Apdex = 1.00 [1.0]*, V/M = 0.00
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 1s 1s 1s 1s 1s 0 1s
# Lock time 100 1ms 1ms 1ms 1ms 1ms 0 1ms
# String:
# cmd Query
# Databases foodb
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `foodb` LIKE 'tbl'\G
# SHOW CREATE TABLE `foodb`.`tbl`\G
# CRC 926
# EXPLAIN /*!50100 PARTITIONS*/
select col from tbl where id=42\G
# Overall: 1 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 1s 1s 1s 1s 1s 0 1s
# Lock time 1ms 1ms 1ms 1ms 1ms 0 1ms

View File

@@ -0,0 +1,6 @@
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M Item
# ==== ================== ============= ===== ====== ==== ===== ==========
# 1 0xAECF4CA2310AC9E2 1.0303 97.1% 1 1.0303 NS 0.00 UPDATE foo
# MISC 0xMISC 0.0306 2.9% 2 0.0153 NS 0.0 <2 ITEMS>

View File

@@ -0,0 +1,5 @@
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M Item
# ==== ================== ============== ===== ====== ==== ===== ========
# 1 0xCB5621E548E5497F 17.5000 100.0% 4 4.3750 NS 2.23 SELECT t

View File

@@ -0,0 +1,8 @@
# Overall: 3 total, 2 unique, 3 QPS, 10.00x concurrency __________________
# Time range: 2007-10-15 21:43:52 to 21:43:53
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 10s 1s 8s 3s 8s 3s 992ms
# Lock time 455us 109us 201us 151us 194us 35us 144us
# Rows sent 2 0 1 0.67 0.99 0.47 0.99
# Rows examine 3 0 2 1 1.96 0.80 0.99

View File

@@ -0,0 +1,14 @@
# Query 1: 2 QPS, 9.00x concurrency, ID 0x82860EDA9A88FCC5 at byte 1 _____
# This item is included in the report because it matches --limit.
# Scores: Apdex = 0.50 [1.0]*, V/M = 5.44
# Time range: 2007-10-15 21:43:52 to 21:43:53
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 66 2
# Exec time 89 9s 1s 8s 5s 8s 5s 5s
# Lock time 68 310us 109us 201us 155us 201us 65us 155us
# Rows sent 100 2 1 1 1 1 0 1
# Rows examine 100 3 1 2 1.50 2 0.71 1.50
# String:
# Databases test1 (1/50%), test3 (1/50%)
# Users bob (1/50%), root (1/50%)

View File

@@ -0,0 +1,9 @@
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+

View File

@@ -0,0 +1,11 @@
# Query 1: 0 QPS, 0x concurrency, ID 0x5D51E5F01B88B79E at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: Apdex = 1.00 [1.0]*, V/M = 0.00
# Time range: all events occurred at 2009-04-12 11:00:13.118191
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 0 0 0 0 0 0 0 0
# String:
# Databases mysql
# Users msandbox

View File

@@ -0,0 +1,10 @@
# Query 1: 0 QPS, 0x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 1s 1s 1s 1s 1s 0 1s
# String:
# foo Hi. I'm a very long string. I'm way over t...

View File

@@ -0,0 +1,10 @@
# Query 1: 0.67 QPS, 1x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 _____
# This item is included in the report because it matches --limit.
# Scores: Apdex = NS [0.0]*, V/M = 0.33
# Time range: 2007-10-15 21:43:52 to 21:43:55
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 2
# Exec time 100 3s 1s 2s 2s 2s 707ms 2s
# String:
# foo Hi. I'm a... (1/50%), Me too! I'... (1/50%)

View File

@@ -0,0 +1,10 @@
# Query 1: 1 QPS, 2x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: Apdex = NS [0.0]*, V/M = 0.30
# Time range: 2007-10-15 21:43:52 to 21:43:55
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 3
# Exec time 100 6s 1s 3s 2s 3s 780ms 2s
# String:
# foo Hi. I'm a... (1/33%), Me too! I'... (1/33%)... 1 more

View File

@@ -0,0 +1,8 @@
# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 2
# Exec time 100 16s 8s 8s 8s 8s 0 8s
# String:
# Hosts 123.123.123.456 (1/50%)... 1 more

View File

@@ -0,0 +1,8 @@
# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 3
# Exec time 100 24s 8s 8s 8s 8s 0 8s
# String:
# Hosts 123.123.123.456 (1/33%)... 2 more

View File

@@ -0,0 +1,9 @@
# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Query_time sparkline: | ^ |
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 3
# Exec time 100 24s 8s 8s 8s 8s 0 8s
# String:
# Hosts 123.123.123.456 (1/33%), 123.123.123.789 (1/33%), 123.123.123.999 (1/33%)

View File

@@ -0,0 +1,11 @@
# Item 1: 0 QPS, 0x concurrency, ID 0xEDEF654FCCC4A4D8 at byte 0 _________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Query_time sparkline: | ^ |
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 8s 8s 8s 8s 8s 0 8s
# InnoDB:
# IO r wait 100 2ms 2ms 2ms 2ms 2ms 0 2ms
# queue wait 100 3ms 3ms 3ms 3ms 3ms 0 3ms
# rec lock wai 100 1ms 1ms 1ms 1ms 1ms 0 1ms

View File

@@ -0,0 +1,12 @@
# Query 1: 2 QPS, 9.00x concurrency, ID 0x82860EDA9A88FCC5 at byte 1 ___________
# This item is included in the report because it matches --limit.
# Attribute pct total min max avg 95% stddev median
# =============== ====== ======= ======= ======= ======= ======= ======= =======
# Count 66 2
# Exec time 89 9s 1s 8s 5s 8s 5s 5s
# Lock time 68 310us 109us 201us 155us 201us 65us 155us
# Rows sent 100 2 1 1 1 1 0 1
# Rows examined 100 3 1 2 1.50 2 0.71 1.50
# Users 2 bob (1), root (1)
# Databases 2 test1 (1), test3 (1)
# Time range 2007-10-15 21:43:52 to 2007-10-15 21:43:53

View File

@@ -0,0 +1,5 @@
# Overall: 1 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Time range: all events occurred at 2009-04-12 11:00:13.118191
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 0 0 0 0 0 0 0

View File

@@ -0,0 +1,9 @@
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+

View File

@@ -0,0 +1,12 @@
# Overall: 3 total, 1 unique, 3 QPS, 10.00x concurrency __________________
# Time range: 2007-10-15 21:43:52 to 21:43:53
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 10s 1s 8s 3s 8s 3s 992ms
# Lock time 8ms 2ms 3ms 3ms 3ms 500us 2ms
# InnoDB:
# IO r bytes 7 2 3 2.33 2.90 0.44 1.96
# pages distin 49 11 20 16.33 19.46 3.71 17.65
# Boolean:
# Filesort 100% yes, 0% no
# QC Hit 66% yes, 33% no

View File

@@ -0,0 +1,8 @@
# Overall: 3 total, 1 unique, 3 QPS, 10.00x concurrency __________________
# Time range: 2007-10-15 21:43:52 to 21:43:53
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 10s 1s 8s 3s 8s 3s 992ms
# Lock time 8ms 2ms 3ms 3ms 3ms 500us 2ms
# Boolean:
# QC Hit 66% yes, 33% no

View File

@@ -0,0 +1,4 @@
# Overall: 3 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 10s 1s 8s 3s 8s 3s 992ms

View File

@@ -0,0 +1,9 @@
# Overall: 1 total, 1 unique, 0 QPS, 0x concurrency ______________________
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute total min max avg 95% stddev median
# ============ ======= ======= ======= ======= ======= ======= =======
# Exec time 8s 8s 8s 8s 8s 0 8s
# Lock time 2ms 2ms 2ms 2ms 2ms 0 2ms
# InnoDB:
# IO r bytes 2 2 2 2 2 0 2
# pages distin 20 20 20 20 20 0 20

View File

@@ -0,0 +1,11 @@
# Query 0: 0 QPS, 0x concurrency, ID 0x82860EDA9A88FCC5 at byte 0 ________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 8s 8s 8s 8s 8s 0 8s
# Lock time 100 2ms 2ms 2ms 2ms 2ms 0 2ms
# InnoDB:
# IO r bytes 100 2 2 2 2 2 0 2
# pages distin 100 20 20 20 20 20 0 20

View File

@@ -0,0 +1,12 @@
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: t
# partitions: NULL
# type: const
# possible_keys: PRIMARY
# key: PRIMARY
# key_len: 4
# ref: const
# rows: 1
# Extra:

View File

@@ -0,0 +1,11 @@
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: t
# type: const
# possible_keys: PRIMARY
# key: PRIMARY
# key_len: 4
# ref: const
# rows: 1
# Extra:

View File

@@ -0,0 +1,58 @@
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M EXPLAIN Item
# ==== ================== ============= ===== ====== ==== ===== ======= =========
# 1 0x46F81B022F1AD76B 0.0003 100.0% 1 0.0003 NS 0.00 TF>aI SELECT t
# MISC 0xMISC 0.0003 100.0% 1 0.0003 NS 0.0 MISC <1 ITEMS>
# Query 1: 0 QPS, 0x concurrency, ID 0x46F81B022F1AD76B at byte 0 ________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# EXPLAIN sparkline: TF>aI
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2009-12-08 09:23:49.637394
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 286us 286us 286us 286us 286us 0 286us
# Query size 100 90 90 90 90 90 0 90
# String:
# cmd Query
# Databases qrf
# Query_time distribution
# 1us
# 10us
# 100us ################################################################
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `qrf` LIKE 't'\G
# SHOW CREATE TABLE `qrf`.`t`\G
# EXPLAIN /*!50100 PARTITIONS*/
select t1.i from t as t1 join t as t2 where t1.i < t2.i and t1.v is not null order by t1.i\G
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: t1
# partitions: NULL
# type: ALL
# possible_keys: PRIMARY
# key: NULL
# key_len: NULL
# ref: NULL
# rows: 4
# Extra: Using where; Using temporary; Using filesort
# *************************** 2. row ***************************
# id: 1
# select_type: SIMPLE
# table: t2
# partitions: NULL
# type: index
# possible_keys: PRIMARY
# key: PRIMARY
# key_len: 4
# ref: NULL
# rows: 4
# Extra: Using where; Using index; Using join buffer

View File

@@ -0,0 +1,8 @@
# Query 1: 0 QPS, 0x concurrency, ID 0xFDE00DF974C61E9F at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: Apdex = 0.62 [1.0]*, V/M = 17.71
# Query_time sparkline: |^^ ^^|
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 8
# Exec time 100 66s 3us 30s 8s 29s 12s 3s

View File

@@ -0,0 +1,56 @@
# Profile
# Rank Query ID Response time Calls R/Call Apdx V/M EXPLAIN Item
# ==== ================== ============= ===== ====== ==== ===== ======= =========
# 1 0x46F81B022F1AD76B 0.0003 100.0% 1 0.0003 NS 0.00 TF>aI SELECT t
# MISC 0xMISC 0.0003 100.0% 1 0.0003 NS 0.0 MISC <1 ITEMS>
# Query 1: 0 QPS, 0x concurrency, ID 0x46F81B022F1AD76B at byte 0 ________
# Scores: Apdex = NS [0.0]*, V/M = 0.00
# EXPLAIN sparkline: TF>aI
# Query_time sparkline: | ^ |
# Time range: all events occurred at 2009-12-08 09:23:49.637394
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 100 1
# Exec time 100 286us 286us 286us 286us 286us 0 286us
# Query size 100 90 90 90 90 90 0 90
# String:
# cmd Query
# Databases qrf
# Query_time distribution
# 1us
# 10us
# 100us ################################################################
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `qrf` LIKE 't'\G
# SHOW CREATE TABLE `qrf`.`t`\G
# EXPLAIN /*!50100 PARTITIONS*/
select t1.i from t as t1 join t as t2 where t1.i < t2.i and t1.v is not null order by t1.i\G
# *************************** 1. row ***************************
# id: 1
# select_type: SIMPLE
# table: t1
# type: ALL
# possible_keys: PRIMARY
# key: NULL
# key_len: NULL
# ref: NULL
# rows: 4
# Extra: Using where; Using temporary; Using filesort
# *************************** 2. row ***************************
# id: 1
# select_type: SIMPLE
# table: t2
# type: index
# possible_keys: PRIMARY
# key: PRIMARY
# key_len: 4
# ref: NULL
# rows: 4
# Extra: Using where; Using index

View File

@@ -0,0 +1,12 @@
DROP DATABASE IF EXISTS qrf;
CREATE DATABASE qrf;
USE qrf;
CREATE TABLE t (
i int not null auto_increment primary key,
v varchar(16)
) engine=InnoDB;
insert into qrf.t values
(null, 'hello'),
(null, ','),
(null, 'world'),
(null, '!');

View File

@@ -0,0 +1,3 @@
# Rank Query ID Response time Calls R/Call Apdx V/M EXPLAIN Item
# ==== ================== ============= ===== ====== ==== ===== ========= ========
# 1 0x0F52986F18B3A4D0 0.0000 100.0% 1 0.0000 1.00 0.00 SELECT trees

View File

@@ -0,0 +1,24 @@
DROP DATABASE IF EXISTS d1;
DROP DATABASE IF EXISTS d2;
DROP DATABASE IF EXISTS d3;
CREATE DATABASE d1;
CREATE DATABASE d2;
CREATE DATABASE d3;
CREATE TABLE d1.t1 (
i int
) ENGINE=MyISAM CHARSET=utf8;
INSERT INTO d1.t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9);
CREATE TABLE d1.t2 (
c varchar(255)
) ENGINE=InnoDB;
CREATE TABLE d1.t3 (
i int
) ENGINE=MEMORY;
CREATE TABLE d2.t1 (
i int
);
-- d3 is an empty database.

View File

@@ -0,0 +1,39 @@
mysql.columns_priv
mysql.db
mysql.event
mysql.func
mysql.general_log
mysql.help_category
mysql.help_keyword
mysql.help_relation
mysql.help_topic
mysql.host
mysql.ndb_binlog_index
mysql.plugin
mysql.proc
mysql.procs_priv
mysql.servers
mysql.slow_log
mysql.tables_priv
mysql.time_zone
mysql.time_zone_leap_second
mysql.time_zone_name
mysql.time_zone_transition
mysql.time_zone_transition_type
mysql.user
sakila.actor
sakila.address
sakila.category
sakila.city
sakila.country
sakila.customer
sakila.film
sakila.film_actor
sakila.film_category
sakila.film_text
sakila.inventory
sakila.language
sakila.payment
sakila.rental
sakila.staff
sakila.store

View File

@@ -0,0 +1,523 @@
mysql.columns_priv
CREATE TABLE `columns_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
mysql.db
CREATE TABLE `db` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`,`User`),
KEY `User` (`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
mysql.event
CREATE TABLE `event` (
`db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`name` char(64) NOT NULL DEFAULT '',
`body` longblob NOT NULL,
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
`ends` datetime DEFAULT NULL,
`status` enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM',
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob,
PRIMARY KEY (`db`,`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events';
mysql.func
CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`ret` tinyint(1) NOT NULL DEFAULT '0',
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions';
mysql.help_category
CREATE TABLE `help_category` (
`help_category_id` smallint(5) unsigned NOT NULL,
`name` char(64) NOT NULL,
`parent_category_id` smallint(5) unsigned DEFAULT NULL,
`url` char(128) NOT NULL,
PRIMARY KEY (`help_category_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help categories';
mysql.help_keyword
CREATE TABLE `help_keyword` (
`help_keyword_id` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
PRIMARY KEY (`help_keyword_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help keywords';
mysql.help_relation
CREATE TABLE `help_relation` (
`help_topic_id` int(10) unsigned NOT NULL,
`help_keyword_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='keyword-topic relation';
mysql.help_topic
CREATE TABLE `help_topic` (
`help_topic_id` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
`help_category_id` smallint(5) unsigned NOT NULL,
`description` text NOT NULL,
`example` text NOT NULL,
`url` char(128) NOT NULL,
PRIMARY KEY (`help_topic_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='help topics';
mysql.host
CREATE TABLE `host` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
PRIMARY KEY (`Host`,`Db`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges';
mysql.ndb_binlog_index
CREATE TABLE `ndb_binlog_index` (
`Position` bigint(20) unsigned NOT NULL,
`File` varchar(255) NOT NULL,
`epoch` bigint(20) unsigned NOT NULL,
`inserts` bigint(20) unsigned NOT NULL,
`updates` bigint(20) unsigned NOT NULL,
`deletes` bigint(20) unsigned NOT NULL,
`schemaops` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`epoch`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
mysql.plugin
CREATE TABLE `plugin` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';
mysql.proc
CREATE TABLE `proc` (
`db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`name` char(64) NOT NULL DEFAULT '',
`type` enum('FUNCTION','PROCEDURE') NOT NULL,
`specific_name` char(64) NOT NULL DEFAULT '',
`language` enum('SQL') NOT NULL DEFAULT 'SQL',
`sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
`is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
`security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
`param_list` blob NOT NULL,
`returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`body_utf8` longblob,
PRIMARY KEY (`db`,`name`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
mysql.procs_priv
CREATE TABLE `procs_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Routine_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
mysql.servers
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL DEFAULT '',
`Host` char(64) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`Username` char(64) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
`Port` int(4) NOT NULL DEFAULT '0',
`Socket` char(64) NOT NULL DEFAULT '',
`Wrapper` char(64) NOT NULL DEFAULT '',
`Owner` char(64) NOT NULL DEFAULT '',
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
mysql.tables_priv
CREATE TABLE `tables_priv` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
mysql.time_zone
CREATE TABLE `time_zone` (
`Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY (`Time_zone_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zones';
mysql.time_zone_leap_second
CREATE TABLE `time_zone_leap_second` (
`Transition_time` bigint(20) NOT NULL,
`Correction` int(11) NOT NULL,
PRIMARY KEY (`Transition_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Leap seconds information for time zones';
mysql.time_zone_name
CREATE TABLE `time_zone_name` (
`Name` char(64) NOT NULL,
`Time_zone_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`Name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone names';
mysql.time_zone_transition
CREATE TABLE `time_zone_transition` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_time` bigint(20) NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`Time_zone_id`,`Transition_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transitions';
mysql.time_zone_transition_type
CREATE TABLE `time_zone_transition_type` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
`Offset` int(11) NOT NULL DEFAULT '0',
`Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Abbreviation` char(8) NOT NULL DEFAULT '',
PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types';
mysql.user
CREATE TABLE `user` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
`max_questions` int(11) unsigned NOT NULL DEFAULT '0',
`max_updates` int(11) unsigned NOT NULL DEFAULT '0',
`max_connections` int(11) unsigned NOT NULL DEFAULT '0',
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
sakila.actor
CREATE TABLE `actor` (
`actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`actor_id`),
KEY `idx_actor_last_name` (`last_name`)
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;
sakila.address
CREATE TABLE `address` (
`address_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`address` varchar(50) NOT NULL,
`address2` varchar(50) DEFAULT NULL,
`district` varchar(20) NOT NULL,
`city_id` smallint(5) unsigned NOT NULL,
`postal_code` varchar(10) DEFAULT NULL,
`phone` varchar(20) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`address_id`),
KEY `idx_fk_city_id` (`city_id`),
CONSTRAINT `fk_address_city` FOREIGN KEY (`city_id`) REFERENCES `city` (`city_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8;
sakila.category
CREATE TABLE `category` (
`category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
sakila.city
CREATE TABLE `city` (
`city_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`city` varchar(50) NOT NULL,
`country_id` smallint(5) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`city_id`),
KEY `idx_fk_country_id` (`country_id`),
CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8;
sakila.country
CREATE TABLE `country` (
`country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`country` varchar(50) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`country_id`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8;
sakila.customer
CREATE TABLE `customer` (
`customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`store_id` tinyint(3) unsigned NOT NULL,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`email` varchar(50) DEFAULT NULL,
`address_id` smallint(5) unsigned NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`create_date` datetime NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`customer_id`),
KEY `idx_fk_store_id` (`store_id`),
KEY `idx_fk_address_id` (`address_id`),
KEY `idx_last_name` (`last_name`),
CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8;
sakila.film
CREATE TABLE `film` (
`film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text,
`release_year` year(4) DEFAULT NULL,
`language_id` tinyint(3) unsigned NOT NULL,
`original_language_id` tinyint(3) unsigned DEFAULT NULL,
`rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3',
`rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99',
`length` smallint(5) unsigned DEFAULT NULL,
`replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99',
`rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G',
`special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`film_id`),
KEY `idx_title` (`title`),
KEY `idx_fk_language_id` (`language_id`),
KEY `idx_fk_original_language_id` (`original_language_id`),
CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8;
sakila.film_actor
CREATE TABLE `film_actor` (
`actor_id` smallint(5) unsigned NOT NULL,
`film_id` smallint(5) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`actor_id`,`film_id`),
KEY `idx_fk_film_id` (`film_id`),
CONSTRAINT `fk_film_actor_actor` FOREIGN KEY (`actor_id`) REFERENCES `actor` (`actor_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
sakila.film_category
CREATE TABLE `film_category` (
`film_id` smallint(5) unsigned NOT NULL,
`category_id` tinyint(3) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`film_id`,`category_id`),
KEY `fk_film_category_category` (`category_id`),
CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
sakila.film_text
CREATE TABLE `film_text` (
`film_id` smallint(6) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text,
PRIMARY KEY (`film_id`),
FULLTEXT KEY `idx_title_description` (`title`,`description`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
sakila.inventory
CREATE TABLE `inventory` (
`inventory_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`film_id` smallint(5) unsigned NOT NULL,
`store_id` tinyint(3) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`inventory_id`),
KEY `idx_fk_film_id` (`film_id`),
KEY `idx_store_id_film_id` (`store_id`,`film_id`),
CONSTRAINT `fk_inventory_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8;
sakila.language
CREATE TABLE `language` (
`language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` char(20) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`language_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
sakila.payment
CREATE TABLE `payment` (
`payment_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`customer_id` smallint(5) unsigned NOT NULL,
`staff_id` tinyint(3) unsigned NOT NULL,
`rental_id` int(11) DEFAULT NULL,
`amount` decimal(5,2) NOT NULL,
`payment_date` datetime NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`payment_id`),
KEY `idx_fk_staff_id` (`staff_id`),
KEY `idx_fk_customer_id` (`customer_id`),
KEY `fk_payment_rental` (`rental_id`),
CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `fk_payment_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_payment_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8;
sakila.rental
CREATE TABLE `rental` (
`rental_id` int(11) NOT NULL AUTO_INCREMENT,
`rental_date` datetime NOT NULL,
`inventory_id` mediumint(8) unsigned NOT NULL,
`customer_id` smallint(5) unsigned NOT NULL,
`return_date` datetime DEFAULT NULL,
`staff_id` tinyint(3) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`rental_id`),
UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`),
KEY `idx_fk_inventory_id` (`inventory_id`),
KEY `idx_fk_customer_id` (`customer_id`),
KEY `idx_fk_staff_id` (`staff_id`),
CONSTRAINT `fk_rental_staff` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_rental_inventory` FOREIGN KEY (`inventory_id`) REFERENCES `inventory` (`inventory_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_rental_customer` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16050 DEFAULT CHARSET=utf8;
sakila.staff
CREATE TABLE `staff` (
`staff_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`address_id` smallint(5) unsigned NOT NULL,
`picture` blob,
`email` varchar(50) DEFAULT NULL,
`store_id` tinyint(3) unsigned NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`username` varchar(16) NOT NULL,
`password` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`staff_id`),
KEY `idx_fk_store_id` (`store_id`),
KEY `idx_fk_address_id` (`address_id`),
CONSTRAINT `fk_staff_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_staff_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
sakila.store
CREATE TABLE `store` (
`store_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`manager_staff_id` tinyint(3) unsigned NOT NULL,
`address_id` smallint(5) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`store_id`),
UNIQUE KEY `idx_unique_manager` (`manager_staff_id`),
KEY `idx_fk_address_id` (`address_id`),
CONSTRAINT `fk_store_staff` FOREIGN KEY (`manager_staff_id`) REFERENCES `staff` (`staff_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

View File

@@ -0,0 +1,38 @@
test.a
CREATE TABLE `a` (
`c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(45) NOT NULL
);
test.b
CREATE TABLE `b` (
`c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(45) NOT NULL,
`c3` varchar(45) NOT NULL,
);
test2.a
CREATE TABLE `a` (
`c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(45) NOT NULL
);
test.a
CREATE TABLE `a` (
`c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(45) NOT NULL
);
test.b
CREATE TABLE `b` (
`c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(45) NOT NULL,
`c3` varchar(45) NOT NULL,
);
test2.a
CREATE TABLE `a` (
`c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`c2` varchar(45) NOT NULL
);

View File

@@ -0,0 +1,44 @@
mysql.user
CREATE TABLE `user` (
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
`max_questions` int(11) unsigned NOT NULL DEFAULT '0',
`max_updates` int(11) unsigned NOT NULL DEFAULT '0',
`max_connections` int(11) unsigned NOT NULL DEFAULT '0',
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'

View File

@@ -0,0 +1,6 @@
CREATE TABLE `t1` (
`a` varchar(64) default NULL,
`b` varchar(64) default NULL,
KEY `prefix_idx` (`a`(10),`b`(20)),
KEY `mix_idx` (`a`,`b`(20))
) ENGINE=MyISAM DEFAULT CHARSET=latin1

View File

@@ -0,0 +1,3 @@
use test;
drop table if exists test1,test2,test3,test4,test5;

View File

@@ -0,0 +1,3 @@
CREATE TABLE "a" (
"a" int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1

View File

@@ -0,0 +1,8 @@
CREATE TABLE `actor` (
`actor_id` smallint(5) unsigned NOT NULL auto_increment,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`last_update` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`actor_id`),
KEY `idx_actor_last_name` (`last_name`)
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;

View File

@@ -0,0 +1,26 @@
use test;
drop table if exists test1,test2,test3,test4,test5,test6;
create table test1(
a int not null,
b char(2) not null,
primary key(a, b),
unique key (a)
) ENGINE=INNODB;
create table test2(
a int not null,
b char(2) not null,
primary key(a, b),
unique key (a)
) ENGINE=INNODB;
insert into test1 values(1, 'en'), (2, 'ca'), (3, 'ab'), (4, 'bz');
create table test3(a int not null primary key, b int not null, unique(b));
create table test4(a int not null primary key, b int not null, unique(b));
insert into test3 values(1, 2), (2, 1);
insert into test4 values(1, 1), (2, 2);
create table test5(a varchar(5));
create table test6(a varchar(16), unique index (a));

View File

@@ -0,0 +1,39 @@
use test;
drop table if exists test1,test2;
create table test1(
a int not null,
b int not null,
c int not null
) ENGINE=INNODB;
create table test2(
a int not null,
b int not null,
c int not null
) ENGINE=INNODB;
insert into test1 values
(1, 2, 3),
(1, 2, 3),
(1, 2, 3),
(1, 2, 3),
(2, 2, 3),
(2, 2, 3),
(2, 2, 3),
(2, 2, 3),
(3, 2, 3),
(3, 2, 3);
insert into test2 values
(1, 2, 3),
(1, 2, 3),
(1, 2, 3),
(2, 2, 3),
(2, 2, 3),
(2, 2, 3),
(2, 2, 3),
(2, 2, 3),
(2, 2, 3),
(4, 2, 3);

View File

@@ -0,0 +1,20 @@
use test;
drop table if exists test1,test2,test3,test4;
create table test1(
a int not null,
b char(2) not null,
c char(2) not null,
primary key(a, b)
) ENGINE=INNODB;
create table test2(
a int not null,
b char(2) not null,
c char(2) not null,
primary key(a, b)
) ENGINE=INNODB;
insert into test1 values(1, 'en', 'a'), (2, 'ca', 'b'), (3, 'ab', 'c'),
(4, 'bz', 'd');

View File

@@ -0,0 +1,73 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 498006722
#071207 12:02:50 server id 21 end_log_pos 498006652 Query thread_id=104168 exec_time=20664 error_code=0
SET TIMESTAMP=1197046970/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.time_zone='SYSTEM'/*!*/;
BEGIN/*!*/;
# at 498006789
#071207 12:02:07 server id 21 end_log_pos 278 Query thread_id=104168 exec_time=20675 error_code=0
use test1/*!*/;
SET TIMESTAMP=1197046927/*!*/;
update test3.tblo as o
inner join test3.tbl2 as e on o.animal = e.animal and o.oid = e.oid
set e.tblo = o.tblo,
e.col3 = o.col3
where e.tblo is null/*!*/;
# at 498007067
#071207 12:02:08 server id 21 end_log_pos 836 Query thread_id=104168 exec_time=20704 error_code=0
SET TIMESTAMP=1197046928/*!*/;
replace into test4.tbl9(tbl5, day, todo, comment)
select distinct o.tbl5, date(o.col3), 'misc', right('foo', 50)
from test3.tblo as o
inner join test3.tbl2 as e on o.animal = e.animal and o.oid = e.oid
where e.tblo is not null
and o.col1 > 0
and o.tbl2 is null
and o.col3 >= date_sub(current_date, interval 30 day)/*!*/;
# at 498007625
#071207 12:02:50 server id 21 end_log_pos 1161 Query thread_id=104168 exec_time=20664 error_code=0
SET TIMESTAMP=1197046970/*!*/;
update test3.tblo as o inner join test3.tbl2 as e
on o.animal = e.animal and o.oid = e.oid
set o.tbl2 = e.tbl2,
e.col9 = now()
where o.tbl2 is null/*!*/;
# at 498007950
#071207 12:02:50 server id 21 end_log_pos 498007840 Xid = 4584956
COMMIT/*!*/;
# at 498007977
#071207 12:02:53 server id 21 end_log_pos 417 Query thread_id=103374 exec_time=20661 error_code=0
SET TIMESTAMP=1197046973/*!*/;
insert into test1.tbl6
(day, tbl5, misccol9type, misccol9, metric11, metric12, secs)
values
(convert_tz(current_timestamp,'EST5EDT','PST8PDT'), '239', 'foo', 'bar', 1, '1', '16.3574378490448')
on duplicate key update metric11 = metric11 + 1,
metric12 = metric12 + values(metric12), secs = secs + values(secs)/*!*/;
# at 498008394
#071207 12:02:53 server id 21 end_log_pos 498008284 Xid = 4584964
COMMIT/*!*/;
# at 498008421
#071207 12:02:53 server id 21 end_log_pos 314 Query thread_id=103374 exec_time=20661 error_code=0
SET TIMESTAMP=1197046973/*!*/;
update test2.tbl8
set last2metric1 = last1metric1, last2time = last1time,
last1metric1 = last0metric1, last1time = last0time,
last0metric1 = ondeckmetric1, last0time = now()
where tbl8 in (10800712)/*!*/;
# at 498008735
#071207 12:02:53 server id 21 end_log_pos 498008625 Xid = 4584965
COMMIT/*!*/;
# at 498008762
#071207 12:02:53 server id 21 end_log_pos 28 Intvar
SET INSERT_ID=86547461/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,31 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#090722 7:21:41 server id 12345 end_log_pos 98 Start: binlog v 4, server v 5.0.82-log created 090722 7:21:41 at startup
# Warning: this binlog was not closed properly. Most probably mysqld crashed writing it.
ROLLBACK/*!*/;
# at 98
#090722 7:21:59 server id 12345 end_log_pos 175 Query thread_id=3 exec_time=0 error_code=0
SET TIMESTAMP=1248268919/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
create database d
/*!*/;
# at 175
#090722 7:22:16 server id 12345 end_log_pos 259 Query thread_id=3 exec_time=0 error_code=0
use d/*!*/;
SET TIMESTAMP=1248268936/*!*/;
create table foo (i int)
/*!*/;
# at 259
#090722 7:22:24 server id 12345 end_log_pos 344 Query thread_id=3 exec_time=0 error_code=0
SET TIMESTAMP=1248268944/*!*/;
insert foo values (1),(2)
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,64 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 263
#090911 9:24:52 server id 12345 end_log_pos 349 Query thread_id=3 exec_time=0 error_code=0
SET TIMESTAMP=1252682692/*!*/;
insert into t (i) values (1)
/*!*/;
# at 349
#090911 9:25:06 server id 12345 end_log_pos 434 Query thread_id=3 exec_time=0 error_code=0
use test1/*!*/;
SET TIMESTAMP=1252682706/*!*/;
delete from t where i=1
/*!*/;
# at 434
#090911 11:37:23 server id 12345 end_log_pos 520 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690643/*!*/;
insert into t (i) values (1)
/*!*/;
# at 520
#090911 11:37:25 server id 12345 end_log_pos 606 Query thread_id=7 exec_time=0 error_code=0
use test2/*!*/;
SET TIMESTAMP=1252690645/*!*/;
insert into t (i) values (2)
/*!*/;
# at 606
#090911 11:37:46 server id 12345 end_log_pos 721 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690666/*!*/;
insert into t (i) values (3),(4),(5),(6),(7),(8),(9),(10)
/*!*/;
# at 721
#090911 11:37:57 server id 12345 end_log_pos 817 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690677/*!*/;
delete from t where i = 3 or i = 5
/*!*/;
# at 817
#090911 11:38:05 server id 12345 end_log_pos 911 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690685/*!*/;
update t set i = 11 where i = 10
/*!*/;
# at 911
#090911 11:38:16 server id 12345 end_log_pos 1013 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690696/*!*/;
insert into t (i) values (13),(14),(15),(16)
/*!*/;
# at 1013
#090911 11:38:23 server id 12345 end_log_pos 1100 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690703/*!*/;
delete from t where i < 5
/*!*/;
# at 1100
#090911 11:38:37 server id 12345 end_log_pos 1178 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690717/*!*/;
truncate table t
/*!*/;
# at 1178
#090911 11:38:40 server id 12345 end_log_pos 1252 Query thread_id=7 exec_time=0 error_code=0
SET TIMESTAMP=1252690720/*!*/;
drop table t
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,29 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#091021 21:25:55 server id 11 end_log_pos 98 Start: binlog v 4, server v 5.0.84-percona-highperf-b18-log created 091021 21:25:55
# at 571891091
#091022 0:00:00 server id 11 end_log_pos 571891160 Query thread_id=140839791 exec_time=0 error_code=0
SET TIMESTAMP=1256194800/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
BEGIN
/*!*/;
# at 571891160
#091022 0:00:00 server id 11 end_log_pos 571891286 Query thread_id=140839791 exec_time=0 error_code=0
use db/*!*/;
SET TIMESTAMP=1256194800/*!*/;
DELETE FROM `foo` WHERE `id` = 42
/*!*/;
# at 572080896
#091022 0:00:03 server id 11 end_log_pos 572081114 Query thread_id=131294991 exec_time=0 error_code=0
SET TIMESTAMP=1256194803/*!*/;
SET @@session.time_zone='SYSTEM'/*!*/;
insert ignore into user (id,f_id,c_date) values (17, 18, now())
/*!*/;
# at 572081114
#091022 0:00:03 server id 11 end_log_pos 572081141 Xid = 1243150725
COMMIT/*!*/;

View File

@@ -0,0 +1,37 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 498006722
#071207 12:02:50 server id 21 end_log_pos 498006652 Query thread_id=104168 exec_time=20664 error_code=0
insert into foo values (12)/*!*/;
# at 498006789
#071207 12:59:07 server id 21 end_log_pos 278 Query thread_id=104168 exec_time=20675 error_code=0
insert into foo values (12)/*!*/;
# at 498007067
#071207 13:02:08 server id 21 end_log_pos 836 Query thread_id=104168 exec_time=20704 error_code=0
insert into foo values (13)/*!*/;
# at 498007625
#071207 13:02:09 server id 21 end_log_pos 1161 Query thread_id=104168 exec_time=20664 error_code=0
insert into foo values (13)/*!*/;
# at 498007950
#071207 13:02:10 server id 21 end_log_pos 498007840 Query thread_id=103374 exec_time=20661 error_code=0
insert into foo values (13)/*!*/;
# at 498007977
#071207 18:02:53 server id 21 end_log_pos 417 Query thread_id=103374 exec_time=20661 error_code=0
insert into foo values (18)/*!*/;
# at 498008394
#071207 23:02:53 server id 21 end_log_pos 498008284 Query thread_id=103374 exec_time=20661 error_code=0
insert into foo values (23)/*!*/;
# at 498008421
#071208 08:00:00 server id 21 end_log_pos 314 Query thread_id=103374 exec_time=20661 error_code=0
insert into bar values (8)/*!*/;
# at 498008735
#071208 10:02:53 server id 21 end_log_pos 498008625 Query thread_id=103374 exec_time=20661 error_code=0
insert into bar values (10)/*!*/;
# at 498008762
#071208 12:12:12 server id 21 end_log_pos 28 Query thread_id=103374 exec_time=20661 error_code=0
insert into bar values (12)/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,6 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 498006722
#071207 12:02:50 server id 21 end_log_pos 498006652 Pontificate thread_id=104168 exec_time=20664 error_code=0
insert into foo values (12)/*!*/;

View File

@@ -0,0 +1,9 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 498008762
#071208 12:12:12 server id 21 end_log_pos 28 Query thread_id=103374 exec_time=20661 error_code=0
delete from test2.t where a=1/*!*/;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,7 @@
DELIMITER /*!*/;
# at 498008762
#100429 08:23:12 server id 12345 end_log_pos 28 Query thread_id=10 exec_time=0 error_code=0
delete from t where a=1/*!*/;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,11 @@
DELIMITER /*!*/;
# at 498008760
#100429 08:23:10 server id 12345 end_log_pos 28 Query thread_id=10 exec_time=0 error_code=0
use test2/*!*/;
insert into t values (1,2,3)/*!*/;
# at 498008762
#100429 08:23:12 server id 12345 end_log_pos 28 Query thread_id=10 exec_time=0 error_code=0
insert into test2.t values (1,2,3)/*!*/;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

View File

@@ -0,0 +1,143 @@
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#101108 13:21:08 server id 1234 end_log_pos 106 Start: binlog v 4, server v 5.1.50-log created 101108 13:21:08 at startup
ROLLBACK/*!*/;
# at 106
#101108 13:21:40 server id 1234 end_log_pos 320 Query thread_id=15 exec_time=0 error_code=0
use test/*!*/;
SET TIMESTAMP=1289247700/*!*/;
SET @@session.pseudo_thread_id=15/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE `test1` (
`kwid` int(10) unsigned NOT NULL default '0',
`keyword` varchar(80) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!*/;
# at 320
#101108 13:21:40 server id 1234 end_log_pos 388 Query thread_id=15 exec_time=0 error_code=0
SET TIMESTAMP=1289247700/*!*/;
BEGIN
/*!*/;
# at 388
#101108 13:21:40 server id 1234 end_log_pos 545 Query thread_id=15 exec_time=0 error_code=0
SET TIMESTAMP=1289247700/*!*/;
INSERT INTO `test1` VALUES
(1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
/*!*/;
# at 545
#101108 13:21:40 server id 1234 end_log_pos 572 Xid = 10
COMMIT/*!*/;
# at 572
#101108 13:21:40 server id 1234 end_log_pos 788 Query thread_id=15 exec_time=1 error_code=0
SET TIMESTAMP=1289247700/*!*/;
CREATE TABLE `test2` (
`kwid` int(10) unsigned NOT NULL default '0',
`keyword` varchar(80) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!*/;
# at 788
#101108 13:21:41 server id 1234 end_log_pos 856 Query thread_id=15 exec_time=0 error_code=0
SET TIMESTAMP=1289247701/*!*/;
BEGIN
/*!*/;
# at 856
#101108 13:21:41 server id 1234 end_log_pos 1013 Query thread_id=15 exec_time=0 error_code=0
SET TIMESTAMP=1289247701/*!*/;
INSERT INTO `test2` VALUES
(1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
/*!*/;
# at 1013
#101108 13:21:41 server id 1234 end_log_pos 1040 Xid = 12
COMMIT/*!*/;
# at 1040
#101108 13:26:28 server id 1234 end_log_pos 1108 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289247988/*!*/;
BEGIN
/*!*/;
# at 1108
#101108 13:26:28 server id 1234 end_log_pos 1265 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289247988/*!*/;
INSERT INTO `test1` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
/*!*/;
# at 1265
#101108 13:26:28 server id 1234 end_log_pos 1292 Xid = 112
COMMIT/*!*/;
# at 1292
#101108 13:26:28 server id 1234 end_log_pos 1360 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289247988/*!*/;
BEGIN
/*!*/;
# at 1360
#101108 13:26:28 server id 1234 end_log_pos 1517 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289247988/*!*/;
INSERT INTO `test2` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
/*!*/;
# at 1517
#101108 13:26:28 server id 1234 end_log_pos 1544 Xid = 114
COMMIT/*!*/;
# at 1544
#101108 13:26:39 server id 1234 end_log_pos 1623 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289247999/*!*/;
drop table test1
/*!*/;
# at 1623
#101108 13:26:39 server id 1234 end_log_pos 1702 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289247999/*!*/;
drop table test2
/*!*/;
# at 1702
#101108 13:26:40 server id 1234 end_log_pos 1916 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289248000/*!*/;
CREATE TABLE `test1` (
`kwid` int(10) unsigned NOT NULL DEFAULT '0',
`keyword` varchar(80) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!*/;
# at 1916
#101108 13:26:40 server id 1234 end_log_pos 1984 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289248000/*!*/;
BEGIN
/*!*/;
# at 1984
#101108 13:26:40 server id 1234 end_log_pos 2141 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289248000/*!*/;
INSERT INTO `test1` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
/*!*/;
# at 2141
#101108 13:26:40 server id 1234 end_log_pos 2168 Xid = 118
COMMIT/*!*/;
# at 2168
#101108 13:26:40 server id 1234 end_log_pos 2384 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289248000/*!*/;
CREATE TABLE `test2` (
`kwid` int(10) unsigned NOT NULL DEFAULT '0',
`keyword` varchar(80) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!*/;
# at 2384
#101108 13:26:40 server id 1234 end_log_pos 2452 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289248000/*!*/;
BEGIN
/*!*/;
# at 2452
#101108 13:26:40 server id 1234 end_log_pos 2609 Query thread_id=167 exec_time=0 error_code=0
SET TIMESTAMP=1289248000/*!*/;
INSERT INTO `test2` VALUES (1,'watching'),(2,'poet'),(3,'просмотра'),(4,'Поэту')
/*!*/;
# at 2609
#101108 13:26:40 server id 1234 end_log_pos 2636 Xid = 120
COMMIT/*!*/;
# at 2636
#101108 13:28:55 server id 1234 end_log_pos 2655 Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

Binary file not shown.

View File

@@ -0,0 +1,8 @@
DROP TABLE IF EXISTS `ascii`;
CREATE TABLE `ascii` (
`i` int(11) NOT NULL AUTO_INCREMENT,
`c` char(64) NOT NULL,
PRIMARY KEY (`i`),
UNIQUE KEY `c` (`c`)
) ENGINE=MyISAM AUTO_INCREMENT=143 DEFAULT CHARSET=latin1;
INSERT INTO `ascii` VALUES (1,''),(2,'M'),(3,'007'),(4,'Penelope'),(5,'Nick'),(6,'Ed'),(7,'Jennifer'),(8,'johnny'),(9,'Bette'),(10,'Grace'),(11,'matthew'),(12,'joe'),(13,'christian'),(14,'zero'),(15,'karl'),(16,'uma'),(17,'vivien'),(18,'Cuba'),(19,'Fred'),(20,'Helen'),(21,'Dan'),(22,'Bob'),(23,'<[MEGATRON]>'),(24,'Lucille'),(25,'Kirsten'),(26,'Elvis'),(27,'Sandra'),(28,'Cameron'),(29,'Kevin'),(30,'Rip'),(31,'Julia'),(32,'Jean-Luc'),(33,'Woody'),(34,'Alec'),(35,'Sissy'),(36,'tim'),(37,'milla'),(38,'audrey'),(39,'judy'),(40,'burt'),(41,'val'),(42,'tom'),(43,'goldie'),(44,'jodie'),(45,'kirk'),(46,'reese'),(47,'parker'),(48,'Frances'),(49,'Anne'),(50,'Natalie'),(51,'Gary'),(52,'Carmen'),(53,'@the ball park'),(54,'Mena'),(55,'Fay'),(56,'Jude'),(57,'Dustin'),(58,'Henry'),(59,'jayne'),(60,'Ray'),(61,'Angela'),(62,'Mary'),(63,'Jessica'),(64,'kenneth'),(65,'Michelle'),(66,'adam'),(67,'Sean'),(68,'Angelina'),(69,'Cary'),(70,'Groucho'),(71,'Mae'),(72,'Ralph'),(73,'Scarlett'),(74,'Ben'),(75,'bling$$$'),(76,'James'),(77,'Minnie'),(78,'Greg'),(79,'spencer'),(80,'charlize'),(81,'christopher'),(82,'Ellen'),(83,'Daryl'),(84,'Gene'),(85,'Meg'),(86,'Chris'),(87,'jim'),(88,'susan'),(89,'walter'),(90,'sidney'),(91,'gina'),(92,'warren'),(93,'Sylvester'),(94,'Russell'),(95,'Morgan'),(96,'Harrison'),(97,'Renee'),(98,'Liza'),(99,'Salma'),(100,'Julianne'),(101,'Albert'),(102,'Cate'),(103,'Greta'),(104,'jane'),(105,'richard'),(106,'rita'),(107,'ewan'),(108,'whoopi'),(109,'jada'),(110,'River'),(111,'Kim'),(112,'Emily'),(113,'Geoffrey'),(114,'meryl'),(115,'Ian'),(116,'Laura'),(117,'Harvey'),(118,'Oprah'),(119,'Humphrey'),(120,'Al'),(121,'laurence'),(122,'will'),(123,'olympia'),(124,'alan'),(125,'michael'),(126,'william'),(127,'jon'),(128,'Mr. Peanut'),(129,'Mr. Rogers'),(130,'lisa'),(131,'Jeff'),(132,'Debbie'),(133,'Rock'),(134,'Gregory'),(135,'John'),(136,'Bela'),(137,'Thora'),(138,'Zesus'),(139,'Zesus!'),(140,'Zesus!!'),(141,'ZESUS!!!'),(142,'001');

View File

@@ -0,0 +1,11 @@
DROP TABLE IF EXISTS `latin1_chars`;
CREATE TABLE `latin1_chars` (
`c` varchar(1) NOT NULL,
UNIQUE KEY `c` (`c`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
SET NAMES 'latin1';
INSERT IGNORE INTO `latin1_chars` VALUES (CHAR(32)), (CHAR(33)), (CHAR(34)), (CHAR(35)), (CHAR(36)), (CHAR(37)), (CHAR(38)), (CHAR(39)), (CHAR(40)), (CHAR(41)), (CHAR(42)), (CHAR(43)), (CHAR(44)), (CHAR(45)), (CHAR(46)), (CHAR(47)), (CHAR(48)), (CHAR(49)), (CHAR(50)), (CHAR(51)), (CHAR(52)), (CHAR(53)), (CHAR(54)), (CHAR(55)), (CHAR(56)), (CHAR(57)), (CHAR(58)), (CHAR(59)), (CHAR(60)), (CHAR(61)), (CHAR(62)), (CHAR(63)), (CHAR(64)), (CHAR(65)), (CHAR(66)), (CHAR(67)), (CHAR(68)), (CHAR(69)), (CHAR(70)), (CHAR(71)), (CHAR(72)), (CHAR(73)), (CHAR(74)), (CHAR(75)), (CHAR(76)), (CHAR(77)), (CHAR(78)), (CHAR(79)), (CHAR(80)), (CHAR(81)), (CHAR(82)), (CHAR(83)), (CHAR(84)), (CHAR(85)), (CHAR(86)), (CHAR(87)), (CHAR(88)), (CHAR(89)), (CHAR(90)), (CHAR(91)), (CHAR(92)), (CHAR(93)), (CHAR(94)), (CHAR(95)), (CHAR(96)), (CHAR(97)), (CHAR(98)), (CHAR(99)), (CHAR(100)), (CHAR(101)), (CHAR(102)), (CHAR(103)), (CHAR(104)), (CHAR(105)), (CHAR(106)), (CHAR(107)), (CHAR(108)), (CHAR(109)), (CHAR(110)), (CHAR(111)), (CHAR(112)), (CHAR(113)), (CHAR(114)), (CHAR(115)), (CHAR(116)), (CHAR(117)), (CHAR(118)), (CHAR(119)), (CHAR(120)), (CHAR(121)), (CHAR(122)), (CHAR(123)), (CHAR(124)), (CHAR(125)), (CHAR(126)),
/* these are control characters
(CHAR(127)), (CHAR(128)), (CHAR(129)), (CHAR(130)), (CHAR(131)), (CHAR(132)), (CHAR(133)), (CHAR(134)), (CHAR(135)), (CHAR(136)), (CHAR(137)), (CHAR(138)), (CHAR(139)), (CHAR(140)), (CHAR(141)), (CHAR(142)), (CHAR(143)), (CHAR(144)), (CHAR(145)), (CHAR(146)), (CHAR(147)), (CHAR(148)), (CHAR(149)), (CHAR(150)), (CHAR(151)), (CHAR(152)), (CHAR(153)), (CHAR(154)), (CHAR(155)), (CHAR(156)), (CHAR(157)), (CHAR(158)), (CHAR(159)), (CHAR(160)),
*/
(CHAR(161)), (CHAR(162)), (CHAR(163)), (CHAR(164)), (CHAR(165)), (CHAR(166)), (CHAR(167)), (CHAR(168)), (CHAR(169)), (CHAR(170)), (CHAR(171)), (CHAR(172)), (CHAR(173)), (CHAR(174)), (CHAR(175)), (CHAR(176)), (CHAR(177)), (CHAR(178)), (CHAR(179)), (CHAR(180)), (CHAR(181)), (CHAR(182)), (CHAR(183)), (CHAR(184)), (CHAR(185)), (CHAR(186)), (CHAR(187)), (CHAR(188)), (CHAR(189)), (CHAR(190)), (CHAR(191)), (CHAR(192)), (CHAR(193)), (CHAR(194)), (CHAR(195)), (CHAR(196)), (CHAR(197)), (CHAR(198)), (CHAR(199)), (CHAR(200)), (CHAR(201)), (CHAR(202)), (CHAR(203)), (CHAR(204)), (CHAR(205)), (CHAR(206)), (CHAR(207)), (CHAR(208)), (CHAR(209)), (CHAR(210)), (CHAR(211)), (CHAR(212)), (CHAR(213)), (CHAR(214)), (CHAR(215)), (CHAR(216)), (CHAR(217)), (CHAR(218)), (CHAR(219)), (CHAR(220)), (CHAR(221)), (CHAR(222)), (CHAR(223)), (CHAR(224)), (CHAR(225)), (CHAR(226)), (CHAR(227)), (CHAR(228)), (CHAR(229)), (CHAR(230)), (CHAR(231)), (CHAR(232)), (CHAR(233)), (CHAR(234)), (CHAR(235)), (CHAR(236)), (CHAR(237)), (CHAR(238)), (CHAR(239)), (CHAR(240)), (CHAR(241)), (CHAR(242)), (CHAR(243)), (CHAR(244)), (CHAR(245)), (CHAR(246)), (CHAR(247)), (CHAR(248)), (CHAR(249)), (CHAR(250)), (CHAR(251)), (CHAR(252)), (CHAR(253)), (CHAR(254)), (CHAR(255));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,18 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE t (
i int
);
CREATE TABLE `t_` (
i int
);
CREATE TABLE ta (
i int
);
CREATE TABLE `t%` (
i int
);
CREATE TABLE `t%_` (
i int
);

View File

@@ -0,0 +1,20 @@
USE test;
-- Add more column types in another col_type_N table so that previous
-- tests won't break after being surprised with new colums.
DROP TABLE IF EXISTS col_types_1;
CREATE TABLE col_types_1 (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
i INT,
f FLOAT,
d DECIMAL(5,2),
dt DATETIME,
ts TIMESTAMP,
c char,
c2 char(15) not null,
v varchar(32),
t text
);
INSERT INTO col_types_1 VALUES (NULL, 1, 3.14, 5.08, NOW(), NOW(), 'c', 'c2', 'hello world', 'this is text');

View File

@@ -0,0 +1,23 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE dropme (
i int
);
CREATE TABLE t (
i int
);
INSERT INTO t VALUES (1),(2),(3);
CREATE TABLE t2 (
i int primary key,
c varchar(128)
);
INSERT INTO t2 VALUES (1,'a'),(2,'b'),(3,'c');
CREATE TABLE t3 (
f float
);
INSERT INTO t3 VALUES (1.12345);

View File

@@ -0,0 +1,11 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
USE test;
CREATE TABLE t (
i int unsigned not null,
v varchar(16),
t tinyint
);
INSERT INTO t VALUES (1,'hi',1);

View File

@@ -0,0 +1,6 @@
# This is a comment.
foo=bar
verbose # Another comment.
--
/path/to/file
h=127.1,P=12346

View File

@@ -0,0 +1,5 @@
# This is a comment.
foo=baz
verbose # Another comment.
--
/path/to/file

View File

@@ -0,0 +1,16 @@
[client]
user = root
port = 5150
protocol = tcp
socket = /home/baron/etc/mysql/server/5.1.50/data/mysql.sock
[mysql]
prompt = "5150> "
[mysqld]
datadir = /home/baron/etc/mysql/server/5.1.50/data/
port = 5150
socket = /home/baron/etc/mysql/server/5.1.50/data/mysql.sock
language = ./share/english
basedir = /home/baron/etc/mysql/server/5.1.50
log-bin
ignore-builtin-innodb
plugin-load=innodb=ha_innodb_plugin.so.0;innodb_trx=ha_innodb_plugin.so.0;innodb_locks=ha_innodb_plugin.so.0;innodb_cmp=ha_innodb_plugin.so.0;innodb_cmp_reset=ha_innodb_plugin.so.0;innodb_cmpmem=ha_innodb_plugin.so.0;innodb_cmpmem_reset=ha_innodb_plugin.so.0

View File

@@ -0,0 +1,99 @@
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld_safe]
log-error=/mnt/data-store/mysql/mysql.err
group=mysql
[mysqld]
user = mysql
pid-file = /mnt/data-store/mysql/data/mysql.pid
basedir = /usr
datadir = /mnt/data-store/mysql/data
port = 3306
socket = /tmp/mysql.sock
#tmpdir = /mnt/tmp
innodb_autoinc_lock_mode=0
slave_exec_mode = IDEMPOTENT
skip-locking
concurrent_insert=2
key_buffer = 150M
max_allowed_packet = 100M
table_open_cache = 2000
# Decreasing sort_buffer_size as per CR 404011
sort_buffer_size = 8M
max_connections = 1500
read_buffer_size = 16M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 0
tmp_table_size = 784M
max_heap_table_size = 784M
thread_concurrency = 8
log-slow-queries = /mnt/data-store/mysql/logs/slowquery.log
log-queries-not-using-indexes
long_query_time=0.5
min_examined_row_limit=10000
query_cache_type=0
innodb_flush_log_at_trx_commit = 2
# flush to cache to save disk I/O
# only lose transactions if no battery backed RAM cache
innodb_data_home_dir = /mnt/data-store/mysql/data
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /mnt/data-store/mysql/data
innodb_buffer_pool_size = 43G
innodb_additional_mem_pool_size = 500M
innodb_log_file_size = 2000M
innodb_log_files_in_group = 2
innodb_log_buffer_size = 10M
innodb_thread_concurrency = 16
innodb_file_per_table
net_write_timeout=120
#REPLICATION
server-id = 2171234
log-bin=/mnt/data-store/mysql/logs/mysql-bin
binlog_format = MIXED
max_binlog_size=500M
expire_logs_days=3
binlog-ignore-db=avail1
binlog-ignore-db=avail2
binlog-ignore-db=avail3
binlog-ignore-db=avail4
binlog-ignore-db=avail5
binlog-ignore-db=avail6
binlog-ignore-db=avail7
binlog-ignore-db=avail8
binlog-ignore-db=avail9
binlog-ignore-db=avail10
binlog-ignore-db=avail11
binlog-ignore-db=avail12
binlog-ignore-db=avail13
auto_increment_offset = 2
auto_increment_increment = 4
relay-log=/mnt/data-store/mysql/logs/mysql-relay
log-slave-updates
# set the general log file, but it should be off at first
general_log_file = /mnt/mysql/general.log
general_log = 0
log-error=/mnt/data-store/mysql/mysql.err
innodb_support_xa = 0
innodb_adaptive_hash_index = 0
tmpdir=/mnt/tmp
slave-load-tmpdir=/mnt/tmp

View File

@@ -0,0 +1,151 @@
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
#
# * IMPORTANT
# If you make changes to these settings and your system uses apparmor, you may
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Federated
#
# The FEDERATED storage engine is disabled since 5.0.67 by default in the .cnf files
# shipped with MySQL distributions (my-huge.cnf, my-medium.cnf, and so forth).
#
skip-federated
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/

View File

@@ -0,0 +1,13 @@
[mysqld]
var1 = 16M
var2 = 16MB
var3 = 16m
var4 = 16mb
var5 = 16K
var6 = 16KB
var7 = 16k
var8 = 16kb
var9 = 1G
var10 = 1GB
var11 = 1g
var12 = 1gb

View File

@@ -0,0 +1,18 @@
--port=12345
--socket=/tmp/12345/mysql_sandbox12345.sock
--pid-file=/tmp/12345/data/mysql_sandbox12345.pid
--basedir=/home/daniel/mysql_binaries/mysql-5.0.82-linux-x86_64-glibc23
--datadir=/tmp/12345/data
--key_buffer_size=16M
--innodb_buffer_pool_size=16M
--innodb_data_home_dir=/tmp/12345/data
--innodb_log_group_home_dir=/tmp/12345/data
--innodb_data_file_path=ibdata1:10M:autoextend
--innodb_log_file_size=5M
--log-bin=mysql-bin
--relay_log=mysql-relay-bin
--log_slave_updates
--server-id=12345
--report-host=127.0.0.1
--report-port=12345
--port=12349

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T5750 @ 2.00GHz
stepping : 13
cpu MHz : 1000.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 3989.52
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU T5750 @ 2.00GHz
stepping : 13
cpu MHz : 1000.000
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 3990.00
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

85
t/lib/samples/daemonizes.pl Executable file
View File

@@ -0,0 +1,85 @@
#!/usr/bin/env perl
# This script is used by Daemon.t because that test script
# cannot daemonize itself.
BEGIN {
die "The MAATKIT_WORKING_COPY environment variable is not set. See http://code.google.com/p/maatkit/wiki/Testing"
unless $ENV{MAATKIT_WORKING_COPY} && -d $ENV{MAATKIT_WORKING_COPY};
unshift @INC, "$ENV{MAATKIT_WORKING_COPY}/common";
};
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use constant MKDEBUG => $ENV{MKDEBUG};
use Daemon;
use OptionParser;
use MaatkitTest;
my $o = new OptionParser(file => "$trunk/common/t/samples/daemonizes.pl");
$o->get_specs();
$o->get_opts();
if ( scalar @ARGV < 1 ) {
$o->save_error('No SLEEP_TIME specified');
}
$o->usage_or_errors();
my $daemon;
if ( $o->get('daemonize') ) {
$daemon = new Daemon(o=>$o);
$daemon->daemonize();
print "STDOUT\n";
print STDERR "STDERR\n";
sleep $ARGV[0];
}
exit;
# ############################################################################
# Documentation.
# ############################################################################
=pod
=head1 SYNOPSIS
Usage: daemonizes.pl SLEEP_TIME [ARGS]
daemonizes.pl daemonizes, prints to STDOUT and STDERR, sleeps and exits.
=head1 OPTIONS
This tool accepts additional command-line arguments. Refer to the
L<"SYNOPSIS"> and usage information for details.
=over
=item --daemonize
Fork to background and detach (POSIX only). This probably doesn't work on
Microsoft Windows.
=item --help
Show help and exit.
=item --log
type: string
Print all output to this file when daemonized.
=item --pid
type: string
Create the given PID file when daemonized.
=back

5
t/lib/samples/date.sql Normal file
View File

@@ -0,0 +1,5 @@
CREATE TABLE `checksum_test_5` (
`a` date NOT NULL,
`b` int(11) default NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

View File

@@ -0,0 +1,5 @@
CREATE TABLE `checksum_test_5` (
`a` datetime NOT NULL,
`b` int(11) default NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

5
t/lib/samples/daycol.sql Normal file
View File

@@ -0,0 +1,5 @@
CREATE TABLE `checksum_test_5` (
`a` date NOT NULL,
`b` int(11) default NULL,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

View File

@@ -0,0 +1,10 @@
mysql> show create table checksum_test_10\G
*************************** 1. row ***************************
Table: checksum_test_10
Create Table: CREATE TABLE `checksum_test_10` (
`a` decimal(10,0) NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
mysql> notee

View File

@@ -0,0 +1,10 @@
mysql> show create table checksum_test_8\G
*************************** 1. row ***************************
Table: checksum_test_8
Create Table: CREATE TABLE `checksum_test_8` (
`a` double NOT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
mysql> notee

View File

@@ -0,0 +1,7 @@
CREATE TABLE `dupe_key` (
`a` int(11) default NULL,
`b` int(11) default NULL,
KEY `a` (`a`),
CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`, `b`) REFERENCES `t2` (`a`, `b`),
CONSTRAINT `t1_ibfk_2` FOREIGN KEY (`b`, `a`) REFERENCES `t2` (`b`, `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

View File

@@ -0,0 +1,6 @@
CREATE TABLE `ft_dupe_key_exact` (
`a` varchar(16) default NULL,
`b` varchar(16) default NULL,
FULLTEXT KEY `ft_idx_a_b_1` (`a`,`b`),
FULLTEXT KEY `ft_idx_a_b_2` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin

Some files were not shown because too many files have changed in this diff Show More