Top Banner
<Insert Picture Here> CONFIDENTIAL ORACLE HIGHLY RESTRICTED
68

My sql 56_roadmap_april2012

May 17, 2015

Download

Technology

sqlhjalp

MySQL 5.6 Roadmap April2012
Atlanta MySQL user Group
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: My sql 56_roadmap_april2012

<Insert Picture Here>

CONFIDENTIAL – ORACLE HIGHLY RESTRICTED

Page 2: My sql 56_roadmap_april2012

<Insert Picture Here>

CONFIDENTIAL – ORACLE HIGHLY RESTRICTED

2

The MySQL Roadmap: Discover What’s NewJune, 2012Keith Larson, MySQL Community Manager

Page 3: My sql 56_roadmap_april2012

3Copyright Oracle Corporation 2012

Safe Harbor Statement

The following is intended to outline our general

product direction. It is intended for information

purposes only, and may not be incorporated into

any contract. It is not a commitment to deliver any

material, code, or functionality, and should not be

relied upon in making purchasing decision. The

development, release, and timing of any features

or functionality described for Oracle’s products

remains at the sole discretion of Oracle.

Page 4: My sql 56_roadmap_april2012

4Copyright Oracle Corporation 2012

localhost ~]$ whoami

Keith [email protected] MySQL Community Managersqlhjalp.blogspot.com

Started with MySQL 3.23 during the dot.com days. Primary real world work was with a MySQL InnoDB delayed replicated environment that easily held over 4 billion rows of user data. Did a lot of data mining of that data over the years.

Numerous other sites developed on LAMP stack over the last 13 years.

Who are you?DBAs?Developers?

Page 5: My sql 56_roadmap_april2012

5Copyright Oracle Corporation 2012

Oracle’s Investment in MySQLRapid Innovation

Make MySQL a Better MySQL• #1 Open Source Database for Web Applications• “M” in most complete LAMP stack• Embedded

Develop, Promote and Support MySQL• Improved engineering, consulting and support• Leverage 24x7, World-Class Oracle Support

MySQL Community Edition • Source and binary releases• GPL license

Page 6: My sql 56_roadmap_april2012

6Copyright Oracle Corporation 2012

More Product Releases Than Ever Before

CY2010 CY2011

• MySQL Workbench 5.2 • MySQL Database 5.5 • MySQL Enterprise Backup

3.5• MySQL Enterprise Monitor

2.3• MySQL Cluster Manager 1.1

All GA!

A Better MySQL

Q1 CY2012

• MySQL Enterprise Monitor 2.2

• MySQL Cluster 7.1• MySQL Cluster Manager 1.0

• MySQL Enterprise Backup 3.7

• Oracle VM Template for MySQL Enterprise Edition

• MySQL Enterprise Oracle Certifications

• MySQL Windows Installer• New MySQL Enterprise

Commercial Extensions

*Development Milestone Release

• MySQL Database 5.6 DMR*• MySQL Cluster 7.2 DMR

and MySQL Labs!(“early and often”)

Driving MySQL Innovation

All GA!

• MySQL Cluster 7.2• MySQL Cluster

Manager 1.4• MySQL Utilities 1.0.6

• MySQL Database 5.6.5 DMR*

and MySQL Labs!(“early and often”)

All GA!

Page 7: My sql 56_roadmap_april2012

7Copyright Oracle Corporation 2012

InnoDB is the default storage engine• ACID Transactions, FKs, Crash Recovery

Improved Performance• Enhancements in MySQL DB• Enhancements in InnoDB• + 360% over 5.1 on Linux• + 1500% over 5.1 on WindowsImproved Availability• Semi-synchronous Replication• Replication HeartbeatImproved Usability• SIGNAL/RESIGNAL• More Partitioning Options• New PERFORMANCE_SCHEMA

MySQL 5.5 – Best Release Ever

Page 8: My sql 56_roadmap_april2012

8Copyright Oracle Corporation 2012

MySQL 5.5 Scales On Multi-Core SysBench Read Write

MySQL 5.1

MySQL 5.5.3

MySQL 5.5.4

AMD Opteron 7160 (Magny-Cours) @2100 MHz 64 GB memory 2 x Intel X25E SSD drives OS is Oracle Enterprise Linux with the Enterprise Kernel

4 sockets with a total of 48 cores.

Transactions/S

econd

Page 9: My sql 56_roadmap_april2012

9Copyright Oracle Corporation 2012

• MySQL 5.6 builds on MySQL 5.5 by improving:• Performance and Scalability• Optimizer for better query execution times, diagnostics• Performance Schema for better instrumentation• InnoDB for better transactional throughput • Replication for higher availability, data integrity• “NotOnlySQL” options for better flexibility

• 5.6.5 m8 latest DMR -- 2012

MySQL Database 5.6: A Better MySQL.

Page 10: My sql 56_roadmap_april2012

10Copyright Oracle Corporation 2012

Model: Development Milestone Releases (“DMR”)• New DMR every 3-6 months• Accumulating features for Next GA (5.6)• New features integrated on stable trunk• Features signed off by QA and tested together• Close to Release Quality• Next GA cut from one upcoming DMR

Model: MySQL Labs “Early Access” features

• Previews, not on trunk• No promise of making GA release

MySQL “Early Access” Release ModelsDatabase and Cluster

Page 11: My sql 56_roadmap_april2012

11Copyright Oracle Corporation 2012

MySQL 5.6.5 – Optimizer Enhancements

• Subquery Optimizations• File sort optimizations with small limit

• 3X better execution time – 40s to 10s• Index Condition Pushdown

• Better execution time – 15s to 90ms• Batched Key Access and Multi Range Read

• Better execution time – 2000s to 10s• Postpone Materialization of views/subqueries in FROM

• 240X better execution time for EXPLAIN - 8m to 2s

Page 12: My sql 56_roadmap_april2012

12Copyright Oracle Corporation 2012

MySQL 5.6.5 – OptimizerPostpone materialization of views/subqueries

Late materialization• Allows fast EXPLAINs for views/subqueries• Avoid materialization when possible, faster bail out

A key can be generated for derived tables => 240X better execution time (drops from ~8 min to ~2 sec)

EXPLAIN SELECT * FROM (SELECT * FROM a_big_table);SELECT … FROM derived_table AS dt join table AS t WHERE dt.fld = t.dlf

Page 13: My sql 56_roadmap_april2012

EXPLAIN in MySQL 5.5: Room for Improvement

● SELECT statements only● What about INSERT, UPDATE, DELETE ?

● Tabular output● Difficult to see the structure of the query plan

● More information would be useful● E.g., When are the WHERE conditions evaluated?

● Shows the chosen plan, but does not tell you why this plan was chosen.

Page 14: My sql 56_roadmap_april2012

14Copyright Oracle Corporation 2012

• Long standing feature request from customers and users

mysql> EXPLAIN UPDATE t1 SET c1 = 10 WHERE c2 = 1; +----+-------------+-------+-------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+-------+---------------+------+---------+------+------+-------------+ | 1 | SIMPLE | t1 | range | c2,c2_2 | c2 | 5 | NULL | 1 | Using where | +----+-------------+-------+-------+---------------+------+---------+------+------+-------------+ 1 row in set (0.00 sec)

MySQL 5.6.5 – OptimizerAdd EXPLAIN for INSERT/UPDATE/DELETE

CREATE TABLE t1(c1 INT, c2 INT, KEY(c2), KEY(c2, c1));

EXPLAIN UPDATE t1 SET c1 = 10 WHERE c2 = 1;

Page 15: My sql 56_roadmap_april2012

MySQL 5.6: EXPLAIN for Data-Modifying Statements

EXPLAIN UPDATE t1 SET b = 'b' WHERE a > 2 \G

id: 1

select_type: SIMPLE

table: t1

type: range

possible_keys: a,a_2

key: a

key_len: 16

ref: null

rows: 2

Extra: Using where; Using temporary

Page 16: My sql 56_roadmap_april2012

MySQL 5.6: EXPLAIN for Data-Modifying Statements, cont.

EXPLAIN INSERT INTO t1

SELECT * FROM t2 WHERE a IN (1, 3, 5) \G

id: 1

select_type: SIMPLE

table: t2

type: range

possible_keys: t2i1

key: t2i1

key_len: 4

ref: null

rows: 3

Extra: Using index condition

Page 17: My sql 56_roadmap_april2012

MySQL 5.6: Structured EXPLAIN

EXPLAIN FORMAT=JSON

SELECT * FROM t2 WHERE i > 1 AND j < 3;

{

"query_block": {

"select_id": 1,

"table": {

"table_name": "t2",

"access_type": "range",

"possible_keys": [

"PRIMARY"

] /* possible_keys */,

...

Page 18: My sql 56_roadmap_april2012

MySQL 5.6: Structured EXPLAIN, cont.

...

"key": "PRIMARY",

"key_length": "4",

"rows": 2,

"filtered": 100,

"index_condition": "(`test`.`t2`.`i` > 1)",

"attached_condition": "(`test`.`t2`.`j` < 3)"

} /* table */

} /* query_block */

}

Page 19: My sql 56_roadmap_april2012

SET SESSION.OPTIMIZER_TRACE=‘enabled=on’;

SELECT v FROM t1 WHERE i1 = 1 AND v = 'a';

SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE; "rows_estimation": [ { "table": "`t1`", "range_analysis": { "table_scan": { "rows": 5, "cost": 4.1 }, "potential_range_indices": [ { "index": "v_idx", "usable": true, "key_parts": [ "v", "i1" ] } ], "best_covering_index_scan": { "index": "v_idx", "cost": 2.0063, "chosen": true

},

• EXPLAIN shows the generated plan • TRACE shows how the plan was generated,

decision points etc.• JSON format• Developers, support, advanced customers

Query Plan Debugging

MySQL 5.6.5 – Optimizer Traces

Page 20: My sql 56_roadmap_april2012

20Copyright Oracle Corporation 2012

testper

CREATE TABLE person ( personid INTEGER PRIMARY KEY, firstname CHAR(20), lastname CHAR(20), postalcode INTEGER, age INTEGER, address CHAR(50), KEY k1 (postalcode,age) ) ENGINE=InnoDB;

SELECT lastname, firstname FROM person WHERE postalcode BETWEEN 5000 AND 5500 AND age BETWEEN 21 AND 22;

• With ICP Disabled• 15 s (buffer pool 128 Mb)• 1.4 s (buffer pool 1.5 Gb)

MySQL 5.6.5 – Optimizer EnhancementsIndex Condition Pushdown (ICP)

• With ICP Enabled⇒ Execution time drops to 90 ms for both

Page 21: My sql 56_roadmap_april2012

21Copyright Oracle Corporation 2012

0 8 16 24 32 40 48 56 645

50

500

5000

1225

9.63

2821

No BKABKA

Join Buffer Size (MB)

Que

ry T

ime

(sec

s)

MySQL 5.6.5 – Optimizer EnhancementsBatched Key Access (BKA) and Multi Range Read

Improves performance of disk-bound join queries

Execution time without BKA + MRR

Execution time with BKA + MRR

DBT3 Q3: “Customer Distribution Query”

Page 22: My sql 56_roadmap_april2012

22Copyright Oracle Corporation 2012

• Statements/Stages• What are my most resource intensive queries? Where do they spend

time?• Table/Index I/O, Table Locks

• Which application tables/indexes cause the most load or contention?• Users/Hosts/Accounts

• Which application users, hosts, accounts are consuming the most resources?

• Network I/O• What is the network load like? How long do sessions idle?

• Summaries• Aggregated statistics grouped by thread, user, host, account or object

MySQL 5.6.5 – Performance Schema InstrumentationImproved Database Profiling/Application Tuning

Page 23: My sql 56_roadmap_april2012

23Copyright Oracle Corporation 2012

MySQL 5.6.5 – InnoDB Enhancements

• Better Performance, Scale• Improved performance on multi-core/CPU servers• Improved thread scheduling• Reduced contention during file extension• Deadlock detection now non-recursive• Improve LRU flushing• Increase max redo log size• Separate tablespaces for undo log• Fast checksum

• Better recovery• Dump and restore buffer pool

• Better Usability• Full-text Search• Variable page sizes – 4k, 8k• Larger limit of index key prefixes (3072 bytes)

Page 24: My sql 56_roadmap_april2012

24Copyright Oracle Corporation 2012

MySQL 5.6.5 – Replication Enhancements

• High Availability and Fail-over• Global Transaction Ids• Replication Administration and Fail-over Utilities

• Better Data Integrity • Crash-Safe Slaves, Replication Checksums, Crash-Safe Binlog

• Better Performance, Scale• Multi-threaded slaves• Reduced Binlog size for RBR

• Extra flexibility• Time-delayed replication

• Simpler troubleshooting• Row-based repl. logging of original query

• Enhanced Monitoring/Management

Page 25: My sql 56_roadmap_april2012

25Copyright Oracle Corporation 2012

•Foundation for reliable, automatic failover & recovery• Unique identifier for each replication event written to the Binlog

•Simple to track & compare replication across the cluster

•Automatically identify the most up-to-date slave for failover

•Deploy complex replication topologies

•Eliminates Dev/Ops overhead

Master

GTID=123456

GTID=123456

GTID=123456 GTID=123456

MySQL 5.6.5 - Global Transaction Ids

Page 26: My sql 56_roadmap_april2012

26Copyright Oracle Corporation 2012

MySQL Utilities

• Automate common Dev/Ops tasks• Replication: provisioning, testing, monitoring and failover• Database comparisons: consistency checking• Database administration: users, connections, tables, etc• New utilities in development, ie log analysis

• Implemented as Python scripts, executed within MySQL Workbench• Extensible to include custom scripting

• Resources: Documentation & Community Forum• http://dev.mysql.com/doc/workbench/en/mysql-utils-man.html• http://forums.mysql.com/list.php?155

Page 27: My sql 56_roadmap_april2012

27Copyright Oracle Corporation 2012

Utility Workflow for Replication

• Check: Verifies pre-requisites for Replication• Repl: Initiates Replication to the new slave• Show: Display Replication topology• Fail-Over & Admin: Detects and failovers (or switches)

from master to slave. Status monitoring

Check Repl ShowFail-Over & Admin

Page 28: My sql 56_roadmap_april2012

28Copyright Oracle Corporation 2012

•Automatic failover & slave promotion• Continuous health monitoring & recovery

•Default is to promote most up-to-date slave, based on GTID

• Slave promotion policies are fully configurable

•Never lose replication events• Nominated slave automatically retrieves

updates from later slaves

Replication Failover Utility

Failover

Utility

Monitoring

Fail-Over

Master

Slaves

Auto-Failover & Slave Promotion

Page 29: My sql 56_roadmap_april2012

29Copyright Oracle Corporation 2012

Replication Administration Utility•Perform switchover to eliminate

downtime during planned maintenance

•Start and stop slaves

•Slave discovery & monitoring• Slave status, thread status

• Replication processing, including any lag

• Configure slave promotion policies

Master

Slaves

Administration Utility

Status & Switchover

Admin

Page 30: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

MySQL <5.6Transaction Data: in tablesReplication Info: in files

MySQL 5.6Transaction Data: in tablesReplication Info: in tables

Slave Tables for Replication Information

MySQL 5.6.5 – Replication Enhancements

Page 31: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

System tables: slave_master_info (mysql.slave_master_info) --master-info-repository=TABLE slave_relay_log_info (mysql.slave_relay_log_info) --relay-log-info-repository=TABLE

mysql_slave> stop slave; mysql_slave> SET GLOBAL master_info_repository = 'TABLE'; mysql_slave> SET GLOBAL relay_log_info_repository = 'TABLE'; mysql_slave> start slave; Make sure you add to my.cnf

master-info-repository =TABLE relay-log-info-repository =TABLE

Transactional tables enables transactional slave positions Automatic conversion between files and tables on startup Long time awaited feature

http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html

Slave Tables for Replication Information

MySQL 5.6.5 – Replication Enhancements

Page 32: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

mysql_slave> select * from slave_master_info \G *************************** 1. row *************************** Master_id: 2 Number_of_lines: 22 Master_log_name: yoda-bin.000003 Master_log_pos: 323 Host: yoda User_name: replication User_password: slavepass Port: 3306 Connect_retry: 10 Enabled_ssl: 0 Ssl_ca: Ssl_capath: Ssl_cert: Ssl_cipher: Ssl_key: Ssl_verify_server_cert: 0 Heartbeat: 1800 Bind: Ignored_server_ids: 0 Uuid: 75d407df-2be4-11e1-9668-b4be9bce39b0 Retry_count: 86400 Ssl_crl: Ssl_crlpath: 1 row in set (0.00 sec)

Slave Tables for Replication Information

MySQL 5.6.5 – Replication Enhancements

Page 33: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Detects corrupt replication events before they are applied

Guards against bugs and disk or network corruptions CRC-32 checksum, more precisely ISO-3309 (supplied

with zlib) New mysqld options:

binlog-checksum= NONE or CRC32 generated by the session thread and written to the binary log SET GLOBAL binlog_checksum = 1;

master-verify-checksum= 0 or 1 Master validates checksum read from the binary log SET GLOBAL master_verify_checksum = 1;

slave-sql-verify-checksum= 0 or 1 SQL thread should verify the checksum when reading it from the relay log on the slave mysql> SET GLOBAL slave_sql_verify_checksum=1;

http://mysqlmusings.blogspot.com/2011/04/replication-event-checksum.html

Replication Event Checksums

MySQL 5.6.5 – Replication Enhancements

Page 34: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Problem: events get corrupted while en route from master to slave. Why and where it got corrupted?

Disk corruption, network, bugs in replication, faulty memory, cosmic ray, act of God?

Solution: include in each event its control checksum and verify it before:

sending it to the slave (master - dump thread)storing it in the relay log (slave - IO thread)applying it (slave - SQL thread)several verification points: flexibility

mysql> show global variables like '%checksum%';+---------------------------+--------+| Variable_name | Value |+---------------------------+--------+| binlog_checksum | CRC32 || innodb_checksum_algorithm | innodb || innodb_checksums | ON || master_verify_checksum | ON || slave_sql_verify_checksum | ON |+---------------------------+--------+

Replication Event Checksums

MySQL 5.6.5 – Replication Enhancements

Page 35: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Throughput of slave increased by allowing multiple slave threads: 0 - functionality disabled 0 to 1024

Exec_Master_Log_Posn in SHOW SLAVE STATUS represents a “low-water” mark, before which no uncommitted transactions remain.Configure using:

slave-parallel-workers=4On a per-database basis

can process successive transactions on a given database without waiting for updates on other databases to complete

http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workers

Multi-Threaded Slave

MySQL 5.6.5 – Replication Enhancements

Page 36: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

mysql_luke> show slave status\G*************************** 1. row *************************** .... Exec_Master_Log_Pos: 114

mysql> show global variables like '%workers%';+------------------------+-------+| Variable_name | Value |+------------------------+-------+| slave_parallel_workers | 0 |+------------------------+-------+1 row in set (0.00 sec)

mysql> SET GLOBAL slave_parallel_workers=4;Query OK, 0 rows affected (0.00 sec)

mysql> show global variables like '%workers%';+------------------------+-------+| Variable_name | Value |+------------------------+-------+| slave_parallel_workers | 4 |+------------------------+-------+1 row in set (0.00 sec)

http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#sysvar_slave_parallel_workers

Multi-Threaded Slave

MySQL 5.6.5 – Replication Enhancements

Page 37: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

In MySQL row-based replication (RBR), each row change event contains two images, a “before” image whose columns are matched against when searching for the row to be updated, and an “after” image containing the changes.

can often save disk, memory, and network usage by logging only those columns which are actually required.

Default is full : Log all columns in both the before image and the after image. New option: binlog-row-image= minimal

no effect when the binary logging format is STATEMENT. When binlog_format is MIXED, the setting for binlog_row_image is applied to changes that are logged using row-based format, but this setting no effect on changes logged as statements.

mysql> show global variables like '%binlog_row_image%'; mysql> SET GLOBAL binlog_row_image=minimal;

http://d2-systems.blogspot.com/2011/04/mysql-562-dm-optimized-row-based.htmlhttp://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#sysvar_binlog_row_image

Optimized Row Based Replication

MySQL 5.6.5 – Replication Enhancements

Page 38: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Problem: Make replication slave to lag a specified amount of time behind the master to:

To protect against user mistakes on the master. To test how the system behaves when there is a lag. To inspect what the database looked like long ago, without having to

reload a backup.

Solution: The slave waits until a given number of seconds elapses before applying the changes:

Delays configured per slave: flexible deployment; Are implemented in the SQL thread layer. Rolling Database Backups with Relayed Replication

Time Delayed Replication

MySQL 5.6.5 – Replication Enhancements

Page 39: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

User interface: CHANGE MASTER TO MASTER_DELAY = <NUM_SECONDS>;

mysql> stop slave; mysql> CHANGE MASTER TO MASTER_DELAY=86400; start slave;

SHOW SLAVE STATUS: SQL_Delay: 86400 SQL_Remaining_Delay: 86395 Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master

executed event RESET SLAVE clears the configured delay;

Rolling forward delayed slaves until bad event: START SLAVE [SQL_THREAD] UNTIL MASTER_LOG_FILE = 'log_name', MASTER_LOG_POS = log_pos

http://dev.mysql.com/doc/refman/5.6/en/replication-delayed.htmlhttp://dev.mysql.com/doc/refman/5.6/en/start-slave.html

Time Delayed Replication

MySQL 5.6.5 – Replication Enhancements

Page 40: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

86400 seconds in a day.

slave2> CHANGE MASTER TO -> MASTER_HOST = 'localhost', -> MASTER_PORT = 3306, -> MASTER_USER = 'repl_user', -> MASTER_PASSWORD = 'pw', -> MASTER_DELAY = 86400;

slave2> START SLAVE;

Time Delayed Replication

MySQL 5.6.5 – Replication Enhancements

Page 41: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

mysql_luke> STOP SLAVE;

mysql_luke>SHOW RELAYLOG EVENTS FROM 2337\G*************************** 4. row *************************** Log_name: luke-relay-bin.000005 Pos: 2674 Event_type: Query Server_id: 1End_log_pos: 2623 Info: drop database Tatooine

mysql_luke> START SLAVE UNTIL -> MASTER_LOG_FILE='luke-relay-bin.000005', -> MASTER_LOG_POS=2674;

Time Delayed Replication

MySQL 5.6.5 – Replication Enhancements

Page 42: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Problem: no way to send informational events down the replication stream.

Solution: Create a class of events that carry information from master to slave(s): Use case: log the query that originated several rows events up-front as an

informational event; Feature often requested for debugging.

http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.htmlhttp://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html#option_mysqld_binlog-rows-query-log-events

Informational Log Events

MySQL 5.6.5 – Replication Enhancements

Page 43: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Enhances auditing and debugging when using Row-Based Replication by writing the original query to the binary log, which is then replicated with its associated row-based event to the slave.

write informational log events such as row query log events into its binary log. sysvar_binlog_rows_query_log_events must be disabled during logging. Logs the query that originated the subsequent rows changes.Shows up in mysqlbinlog and SHOW SLAVE STATUS output.New variable: --binlog-rows-query-log-events= ON|OFF (default: OFF)

mysql> SET GLOBAL binlog_rows_query_log_events=ON;mysql> show global variables like '%binlog_rows_query_log_events%';+------------------------------+-------+| Variable_name | Value |+------------------------------+-------+| binlog_rows_query_log_events | ON |+------------------------------+-------+

Informational Log Events

MySQL 5.6.5 – Replication Enhancements

Page 44: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

mysql> SET binlog_format=ROW;Query OK, 0 rows affected (0.00 sec)

mysql> SET SESSION binlog_rows_query_log_events=ON;Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t1 (a INT);Query OK, 0 rows affected (0.07 sec)

mysql> INSERT INTO t1 VALUES (1), (2), (3);Query OK, 3 rows affected (0.00 sec)Records: 3 Duplicates: 0 Warnings: 0

mysql> SHOW BINLOG EVENTS;+-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |+-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+| master-bin.000001 | 4 | Format_desc | 1 | 114 | Server ver: 5.6.3-m5-debug-log, Binlog ver: 4 || master-bin.000001 | 114 | Query | 1 | 200 | use `test`; CREATE TABLE t1 (a INT) || master-bin.000001 | 200 | Query | 1 | 268 | BEGIN || master-bin.000001 | 268 | Rows_query | 1 | 323 | # INSERT INTO t1 VALUES (1), (2), (3) || master-bin.000001 | 323 | Table_map | 1 | 364 | table_id: 54 (test.t1) || master-bin.000001 | 364 | Write_rows | 1 | 408 | table_id: 54 flags: STMT_END_F || master-bin.000001 | 408 | Query | 1 | 477 | COMMIT |+-------------------+-----+-------------+-----------+-------------+-----------------------------------------------+7 rows in set (0.00 sec)

http://d2-systems.blogspot.com/2011/04/mysql-562-dm-binlog-informational.html

Informational Log Events

MySQL 5.6.5 – Replication Enhancements

Page 45: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Problem: There is no way to create real-time backups of the master's binary logs.

Solution: Make use of mysqlbinlog facilities that retrieve and dump remote MySQL log contents as SQL statements to make it output in raw format: DBAs don't need to do remote logins to retrieve master's binlogs or setup

an intermediate slave.

Remote Backup of Binary logs

MySQL 5.6.5 – Replication Enhancements

Page 46: My sql 56_roadmap_april2012

Copyright Oracle Corporation 2012

Make use of mysqlbinlog facilities that retrieve and dump remote MySQL log contents. Writes to a local file with the same name as the original.

DBAs don't need to do remote logins to retrieve master's binlogs or setup an intermediate slave.

Relevant new options for mysqlbinlog: raw: dump in raw format stop-never: waits for new data upon reaching the end of the log stop-never-slave-server-id: id that mysqlbinlog will use to emulate itself as a slave.

Raw format use cases: make a static backup backing up a set of log files and stopping when the end of the last file is reached continuous (“live”) backup

$> mysqlbinlog --read-from-remote-server –raw -h secret_server -P 3306 -u root mysql-bin.000001

http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html

Remote Backup of Binary logs

MySQL 5.6.5 – Replication Enhancements

Page 47: My sql 56_roadmap_april2012

47Copyright Oracle Corporation 2012

MySQL 5.6.5 – Other Enhancements

• TIME/TIMESTAMP/DATETIME – fractional second precision• Ipv6 improvements• Support Unicode for Windows command client• Import/export tables to/from partitioned tables• Explicit partition selection • GIS/MyISAM: Precise spatial operations

Get it now!dev.mysql.com/downloads/mysql/

Page 48: My sql 56_roadmap_april2012

48Copyright Oracle Corporation 2012

• Replication• Binlog Group Commit• Binlog API

• InnoDB• Memcached API for accessing InnoDB data• Online operations (INDEX add, FK drop, Column rename) • SSD/Flash Optimizations

• And More...

MySQL Database - Under DevelopmentEarly Access Features

labs.mysql.com/

Try it now!labs.mysql.com

Page 49: My sql 56_roadmap_april2012

49Copyright Oracle Corporation 2012

• Fast, simple access to InnoDB• Accessed via Memcached API• Use existing Memcached clients• Bypasses SQL transformations

• NotOnlySQL access• For key-value operations• SQL for rich queries, JOINs, FKs, etc.

• Implementation• Memcached daemon plug-in to mysqld • Memcached protocol mapped to the

native InnoDB API• Shared process space for ultra-low

latency

InnoDB Storage Engine

MySQL Server Memcached plugin

Application

SQL (MySQL Client)

NoSQL (Memcached Protocol)

mysqld

MySQL Database – Key-value access for InnoDB NotOnlySQL: Memcached API

Try it now!labs.mysql.com

Page 50: My sql 56_roadmap_april2012

50Copyright Oracle Corporation 2012

MySQL Database Development Priorities• Performance/Scale – more threads/cores, SSD• Cloud/SaaS/DaaS

• Multi-tenancy - Role-based security/ACLs, session/host level throttling, more authentication options

• Elastic Scale – Auto-sharding/partitioning of data, provisioning of replicas, load balancing, “elastic” allocation of server/VM resources

• Web-based management, monitoring, backup/recovery• High Availability

• Multi-source, master replication, conflict detection• Auto-failover, redundancy• Management tools and utilities for ease of use

• Pluggable, micro-kernel architecture

Page 51: My sql 56_roadmap_april2012

51Copyright Oracle Corporation 2012

• Foreign Keys• Ease of Use

• Tools for simplified configuration, provisioning & management

• Enhanced API Support• New NoSQL Interfaces• Richer SQL Functionality

• Performance & Capacity Increases• Optimizations for latest hardware developments

• Wider Deployment Options• Virtualization• Cloud

MySQL Cluster Development Priorities

Page 52: My sql 56_roadmap_april2012

52Copyright Oracle Corporation 2012

MySQL Enterprise Edition

Most secure, scalable MySQL Database, Online Backup, Development/Monitoring Tools, backed by Oracle Premier Lifetime Support

Oracle Premier Support

Oracle Product Certifications/Integrations

MySQL Enterprise High Availability

MySQL Enterprise Security

MySQL Enterprise Scalability

MySQL Enterprise Backup

MySQL Enterprise Monitor/Query Analyzer

MySQL Workbench

Page 53: My sql 56_roadmap_april2012

53Copyright Oracle Corporation 2012

• MySQL Enterprise Security• External Authentication for Windows and PAM• Integrates MySQL apps with existing infrastructures

• MySQL Enterprise Scalability• MySQL Thread Pool• Improves sustained performance/scale as connections grow• 20x scale improvement in SysBench OLTP R/W benchmarks

• MySQL High Availability• Oracle VM Template for MySQL• Windows Clustering

• Oracle Product Certifications• Manage MySQL with Oracle tools that are already in use

MySQL Enterprise EditionCommercial Extensions Available Now

Page 54: My sql 56_roadmap_april2012

54Copyright Oracle Corporation 2012

Connect as

4. Tokens are checked, win_joe user is authenticated using Windows login, password with MySQL specific privs

Connect as

1. MyDomain/joe logs into environment with Windows login, password

Connected

Authenticate

CREATE USER win_joe

IDENTIFIED WITH authentication_windows

AS ‘joe';

App

Win OS users, groups, etc

Windows Auth

Connect as

2. MyDomain\joe is authenticated on Windows OSConnect as

3. MyDomain/joe logs into application, application connects to MySQL with user win_joe.

Connector

Windows AuthenticationExample

Page 55: My sql 56_roadmap_april2012

55Copyright Oracle Corporation 2012

3. User name/password sent to the PAM library, yes/no answer from PAM library returned to client.

1. Joe logs in using application user name/password.

Connected

CREATE USER joe

IDENTIFIED WITH 'authentication_pam'

AS ‘mysql';

App

PAM library and various backends

2. Connector sends the user name/password to the MySQL server.

Connector

4. PAM library verifies credentials (using e.g. LDAP or Kerberos etc) and returns yes/no answer for delivery to client.

PAM Authentication

PAM AuthenticationExample

Page 56: My sql 56_roadmap_april2012

56Copyright Oracle Corporation 2012

Default Thread Handling

Internal Clients

DefaultThread Handling

Connections/statements assigned to Threads

for life

• Connections assigned to 1 thread for the life of the connection, same thread used for all statements

• No prioritization of threads, statement executions • Many concurrent connections = many concurrent execution threads to

consume server memory, limit scalability

Connection Execution Threads

External Clients

Page 57: My sql 56_roadmap_april2012

57Copyright Oracle Corporation 2012

With Thread Pool Enabled

Internal Clients

Connection Execution Threads

External Clients

Thread Pool

Thread Group 1Threads 1 - 4096

Thread Group 2Threads 4097 - 8193

Thread Group NThreads 8194 - N

• Thread Pool contains configurable number of thread groups (default = 16), each manages up to 4096 re-usable threads

• Each connection assigned to thread group via round robin• Threads are prioritized, statements queued to limit concurrent executions,

load on server, improve scalability as connections grow

Thread Group 1

Thread Group 2

Thread Group N

Page 58: My sql 56_roadmap_april2012

58Copyright Oracle Corporation 2012

MySQL Enterprise EditionWith Thread Pool

MySQL Community ServerWithout Thread Pool

MySQL Enterprise Edition

20x Better Scalability with Thread Pool

8 32 128 512 1536 2560 35840

1000

2000

3000

4000

5000

6000

7000

8000

MySQL 5.5 Sysbench OLTP Read/Write

Simultaneous Database Connections

Transactions Per Second

MySQL 5.5.16Oracle Linux 6.1, Unbreakable Kernel 2.6.322 sockets, 24 cores, 2 X 12-coreIntel(R) Xeon(R) X5670 2.93GHz CPUs72GB DDR3 RAM2 X LSI SCSI Disk (MR9261-8i) (597GB)

Page 59: My sql 56_roadmap_april2012

59Copyright Oracle Corporation 2012

MySQL Enterprise EditionWith Thread Pool

MySQL Community ServerWithout Thread Pool

MySQL Enterprise Edition

3x Better Scalability with Thread Pool

MySQL 5.5.16Oracle Linux 6.1, Unbreakable Kernel 2.6.322 sockets, 24 cores, 2 X 12-coreIntel(R) Xeon(R) X5670 2.93GHz CPUs72GB DDR3 RAM2 X LSI SCSI Disk (MR9261-8i) (597GB)

8 32 128 512 1536 2560 35840

2000

4000

6000

8000

10000

12000

MySQL 5.5 Sysbench OLTP Read Only

Simultaneous Database Connections

Transactions Per Second

Page 60: My sql 56_roadmap_april2012

60Copyright Oracle Corporation 2012

• MySQL Enterprise Security• MySQL Database Auditing extension• More Authentication plug-ins• Oracle Product Certifications

• Oracle Audit Vault• MySQL Enterprise High Availability

• Oracle Clusterware

MySQL Enterprise Development Priorities

Page 61: My sql 56_roadmap_april2012

61Copyright Oracle Corporation 2012

• MySQL Enterprise Backup • Performance – parallel backups, skip empty pages,

more• Efficiency, Ease of use

• Better PIT recovery • Remote backup administration (on-premise, Cloud)• Integration with Enterprise tools

• MySQL Workbench SE• Schema/data migration from SQL Server• ER Model Repository• Code generation – PHP, Python

MySQL Enterprise Development Priorities

Page 62: My sql 56_roadmap_april2012

62Copyright Oracle Corporation 2012

• MySQL Enterprise Monitor• Evolve into management

• Instance, Backup, Replication\HA• Integration with Oracle Enterprise Manager

MySQL Enterprise Development Priorities

Page 63: My sql 56_roadmap_april2012

63Copyright Oracle Corporation 2012

Oracle Fusion MiddleWare• WebLogic Server• Database Adapter for Oracle

SOA Suite • Oracle Business Process

Management • Oracle Virtual Directory• Oracle Data Integrator• Oracle Enterprise

Performance Management • Oracle Identity Analytics• Open SSO STS, Open SSO

Fedlet

• Oracle Linux• Oracle VM• Oracle VM Template for

MySQL Enterprise Edition• Oracle GoldenGate• Oracle Secure Backup• Oracle Database Firewall• MyOracle Online Support

MySQL Enterprise Oracle CertificationsCompleted

Page 64: My sql 56_roadmap_april2012

64Copyright Oracle Corporation 2012

mysql.com TCO calculator: http://www.mysql.com/tcosavings/ White Papers: http://www.mysql.com/why-mysql/white-papers/ Customer use cases and success stories:

http://www.mysql.com/why-mysql/case-studies/

dev.mysql.com Downloads: http://dev.mysql.com/downloads/ Documentation: http://dev.mysql.com/doc/ Forums: http://forums.mysql.com/ PlanetMySQL: http://planet.mysql.com List of resources (books) : http://dev.mysql.com/resources/

MySQL Resources

Page 65: My sql 56_roadmap_april2012

65Copyright Oracle Corporation 2012

eDelivery.com Download and evaluate all MySQL products

Wiki: https://wikis.oracle.com/display/mysql/Home

50 things to know before migrating Oracle to MySQLIt is a little old but worth the read

www.xaprb.com/blog/2009/03/13/50-things-to-know-before-migrating-oracle-to-mysql/

MySQL Resources

Page 66: My sql 56_roadmap_april2012

66Copyright Oracle Corporation 2012

https://blogs.oracle.com/MySQL/entry/more_early_access_features_in

http://mysqlblog.fivefarmers.com/2012/05/29/overlooked-mysql-5-6-new-features-timestamp-and-datetime-improvements/

http://mysqlblog.fivefarmers.com/2012/05/23/overlooked-mysql-5-6-new-features-wl5217/

MySQL Resources

Page 67: My sql 56_roadmap_april2012

67Copyright Oracle Corporation 2012

https://blogs.oracle.com/MySQL/entry/more_early_access_features_in

Page 68: My sql 56_roadmap_april2012

<Insert Picture Here>

CONFIDENTIAL – ORACLE HIGHLY RESTRICTED

68

Thank You