SlideShare ist ein Scribd-Unternehmen logo
1 von 62
Downloaden Sie, um offline zu lesen
MySQL Core Server
Changes
Morgan Tocker

MySQL Community Manager
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!2
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 decisions. The development, release,
and timing of any features or functionality described for Oracle’s products
remains at the sole discretion of Oracle.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!3
MySQL 5.5
MySQL Enterprise Monitor 2.3 & 3.0
MySQL Enterprise Backup
Security
Scalability
HA
Audit
MySQL 5.6
MySQL Workbench 6.1
MySQL Utilities
MySQL Applier for
Hadoop
MySQL Workbench 5.2 & 6.0
MySQL Enterprise Oracle
Certifications
MySQL@Oracle: 4 Years of MySQL Innovation
MySQL Cluster Manager
Windows installer & Tools
MySQL Cluster 7.2
MySQL Cluster 7.1
MySQL Migration
Wizard
MySQL 5.7
MySQL Cluster 7.4
MySQL Fabric
MySQL Cluster 7.3
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!4
Discussion Topics
▪ Let’s talk about MySQL 5.7!
▪ Less discussion about InnoDB, Performance Schema,
Benchmarks, Replication.
▪ Well covered in other talks.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!5
Discussion Topics (cont.)
▪ New Features
▪ Changes to Existing Features
▪ Our Ongoing Efforts to Refactor and Improve MySQL.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!6
Quick Recap of the MySQL
Development Process
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!7
The DMR Model
▪ Up to 4 Development Milestone Releases per year (DMRs).
▪ Features are merged into main branch only when stable.
▪ High level review complete.
▪ Low level review complete.
▪ 80%+ code coverage testing goal.
▪ DMRs are intended to be of “Release Candidate” Quality.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!8
MySQL 5.7 DMR Schedule
April 2013
DMR1
221 Bugs Fixed
29 Changes
21 Worklogs
Sep 2013
DMR2
384 Bugs Fixed
41 Changes
52 Worklogs
Dec 2013
DMR3
155 Bugs Fixed
23 Changes
27 Worklogs
April 2014
DMR4
256 Bugs Fixed
38 Changes
56 Worklogs
5.6 GA
Feb 2013
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!9
Labs Releases
▪ For functionality that doesn’t meet the DMR requirements.
▪ Intended to be an earlier preview.
▪ Recent Labs Releases:
▪ Hadoop Applier for MySQL
▪ MySQL Fabric
▪ Multi-Source Replication
▪ NEW - InnoDB GIS+Optimizer GIS+Parser Refactoring!
▪ NEW - InnoDB Page/IO Compression!
▪ NEW - Multi-threaded Slaves!
labs.mysql.com
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!10
InnoDB GIS+Optimizer GIS+Parser 

Refactoring
▪ InnoDB R-Tree Index Support
▪ Based on Boost.Geometry
▪ Previously only Available in MyISAM
labs.mysql.com
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!11
InnoDB GIS+Optimizer GIS+Parser 

Refactoring (cont.)
▪ Improves readability, maintainability, and stability
– Cleanly separate the parsing, optimizing, and execution stages
– Allows for easier feature additions, with lessened risk
!
▪ Transforms SQL Parser into a true bottom-up parser
– Better support for larger syntax rules in the future
– Fewer intermediate nodes in the parse tree
▪ Fewer node allocations
▪ Faster grammar
labs.mysql.com
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!12
InnoDB Page/IO Compression
▪ Transparent Page Level Compression
▪ Builds on new multiple page cleaner threads from DMR4.
▪ Compress/decompress transparently in background threads
▪ Applies to all tables, including the system tablespace and UNDO
logs
▪ Thank you to Fusion-IO!
labs.mysql.com
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!13
MySQL 5.7 DMRs To Date
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!14
Common Themes
▪ Improved support for high connection
creation rate
▪ Lock Thread count impact reduced
▪ Multiple Metadata Locking (MDL)
improvements
▪ InnoDB Improvements for:
▪ Index lock contention
▪ Read Only Transactions
▪ Temporary Tables
▪ Redo Logs
▪ Multiple page cleaner threads.
▪ Scalability
▪ Parallel Replication (Intra-schema)
Performance & Scalability
▪ Overhead has been reduced.
▪ Improved to do lazy initialization on new
connections.
▪ Now instruments:
▪ Memory usage
▪ Stored programs
▪ Replication
▪ Metadata Locking (MDL)
▪ Transactions
▪ Prepared Statements
From DMR1 to DMR4
Performance Schema
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!15
Common Themes (cont.)
▪ Internal logging API
▪ Timestamps are now written with
log entries in YYYY-MM-
DDThh:mm:ss.uuuuuu format.
▪ Configurable Verbosity
▪ InnoDB Refactored:
▪ Locking Code
▪ Redo Log Code (for
performance)
▪ Tablespace Class
▪ Atomics refactored
▪ Optimizer refactoring (multiple
improvements)
Deep Refactoring
▪ Password expiration support +
timestamp of password last changed.
▪ mysql_secure_installation changed
to C++ program.
▪ Improvements to SSL Support.
▪ Support to change AES key length
and block encryption mode
From DMR1 to DMR4
Security
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!16
DMR0
▪ Error issued when creating duplicate index.
▪ Warning when strict SQL Mode removed.
▪ Ctl-C fixed in MySQL CLI!
▪ Non-blocking SHOW SLAVE STATUS
▪ Idempotent mysqlbinlog mode.
▪ Stacked Diagnostics Area
Internal Release Only
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!17
DMR1
▪ Online DDL Now supports RENAME INDEX and VARCHAR
extensions.
▪ InnoDB support for Spatial Data Types.
▪ Rewrite-db option for mysqlbinlog with RBR.
Released April 2013
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!18
DMR2
▪ Semi sync replication improvements.
▪ Multiple Triggers per event per table.
▪ EXPLAIN FOR CONNECTION
▪ EXPLAIN showing cost information.
Released September 2013
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!19
Example: Cost Information in EXPLAIN
*************************** 1. row ***************************

EXPLAIN: {

"query_block": {

"select_id": 1,

"cost_info": {

"query_cost": "4786.00"

},

"ordering_operation": {
"using_temporary_table": true,

"using_filesort": true,

"cost_info": {

"sort_cost": "2151.00"

},

"nested_loop": [

{

"table": {

..

],

"key_length": "3",

"rows_examined_per_scan": 239,

"rows_produced_per_join": 239,

"filtered": 100,

"using_index": true,

"cost_info": {

"read_cost": "6.00",

"eval_cost": "47.80",

"prefix_cost": "53.80",

"data_read_per_join": "61K"

},
..
EXPLAIN FORMAT=JSON FOR CONNECTION 2;
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!20
Example: EXPLAIN in MySQL Workbench
Visual EXPLAIN Including Cost Information!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!21
DMR3
▪ UNION ALL no longer requires temporary table.
▪ Filesort now packs VARCHAR and CHAR keys in temporary files.
▪ Optimizer Support for row value constructors.
▪ i.e. WHERE (a,b) in ((‘a’, ‘b’), (‘c’, ‘d’));
Released December 2013
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!22
DMR3 (cont.)
▪ InnoDB Fulltext now supports external parsers.
▪ Dynamic replication filters.
▪ Support ICP optimization for partitioned tables.
Released December 2013
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!23
Example: UNION ALL Optimization
***************** 1. row *****************
id: 1
select_type: PRIMARY
table: table_a
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 3
Extra: NULL
***************** 2. row *****************
id: 2
select_type: UNION
table: table_b
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 3
Extra: NULL
***************** 3. row *****************
id: NULL
select_type: UNION RESULT
table: <union1,2>
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: NULL
Extra: Using temporary
***************** 1. row *****************
id: 1
select_type: PRIMARY
table: table_a
partitions: NULL
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 3
filtered: 100.00
Extra: NULL
***************** 2. row *****************
id: 2
select_type: UNION
table: table_b
partitions: NULL
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 3
filtered: 100.00
Extra: NULL
EXPLAIN SELECT * FROM a UNION ALL SELECT * FROM b
MySQL 5.6: MySQL 5.7:
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!24
Example: Row-value Constructors
**************** 1. row ****************
id: 1
select_type: SIMPLE
table: City
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 4188
Extra: Using where
1 row in set (0.00 sec)
**************** 1. row ****************
id: 1
select_type: SIMPLE
table: City
partitions: NULL
type: range
possible_keys: CountryCode,CountryCode$Name
key: CountryCode$Name
key_len: 38
ref: NULL
rows: 3
filtered: 100.00
Extra: Using where
EXPLAIN SELECT * FROM City WHERE (CountryCode,Name) IN
(('USA', 'San Francisco'), ('USA', 'Chicago'), ('CAN', ‘Toronto'))
MySQL 5.6: MySQL 5.7:
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
{San Francisco, California, 776733}
{Chicago, Illinois, 2896016}
!25
Filesort Packing
ID Name CountryCode District Population
3805 San Francisco USA California 776733
1812 Toronto CAN Ontario 688275
3795 Chicago USA Illinois 2896016
1818 Vancouver CAN British Columbia 514008
SELECT Name, District, Population FROM City WHERE
CountryCode = ‘USA’ ORDER BY Name;
{San Francisco, California, 776733}
{Chicago, Illinois, 2896016}
Sort Buffer
MySQL 5.7: CHAR, VARCHAR and NULLABLE fixed-size types
are now packed in the sort buffer.
Using Modified Sort Algorithm
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!26
DMR4
▪ Statement Timeout.
▪ Change master without stopping SQL thread.
▪ Changed compiler from sun studio to gcc on Solaris.
▪ Transportable tablespaces for partitioned InnoDB tables.
Released April 2014
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!27
Example: Server-Side Statement Timeout
▪ SELECT MAX_STATEMENT_TIME = 109 * FROM my_table;
▪ SET SESSION MAX_STATEMENT_TIME = 100;
▪ SET GLOBAL MAX_STATEMENT_TIME = 100;
Incorporates Contributions from Davi Arnaut, the MySQL Community
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!28
Changes to Existing Functionality
(Deprecation and Change)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!29
Implementing Change
▪ Not all changes easily support old and new.
▪ Some changes do not easily support deprecation messages.
▪ i.e. GROUP BY with implicit ORDER BY
▪ Always special cases.
▪ i.e. removal of mysqlbug, msql2mysql CLI utilities.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!30
Functionality Changed
▪ Change of Defaults
▪ Replication
▪ SQL Modes
▪ EXPLAIN PARTITIONS and
EXTENDED
▪ Deprecation
▪ NULL synonym N
▪ ENCODE/DECODE functions.
▪ SHOW PROFILES feature
!
!
!
!
▪ Removal
▪ SHOW ENGINE INNODB MUTEX
▪ InnoDB Monitor Tables
▪ ALTER IGNORE TABLE
▪ Unused CLI Utilities
▪ INSERT DELAYED
▪ Specific SQL Modes
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!31
Changes to Replication Defaults
▪ MySQL 5.6 improved durable replication performance considerably
(group commit fix)
▪ Proposal is to make replication durable by default starting from 5.7:
▪ sync_binlog = 1
▪ master-info-repository = TABLE
▪ relay-log-info-repository = TABLE
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!32
Change SQL_Mode Defaults
mysql> SELECT id, invoice_id, description
FROM invoice_line_items GROUP BY invoice_id;
+----+------------+-------------+
| id | invoice_id | description |
+----+------------+-------------+
| 1 | 1 | New socks |
| 3 | 2 | Shoes |
| 5 | 3 | Tie |
+----+------------+-------------+
3 rows in set (0.00 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!33
SQL Mode: Only Full Group By
▪ Proposal is to produce an error from MySQL 5.7.
▪ Will still be configurable via SQL Mode ONLY_FULL_GROUP_BY.
mysql> SELECT id, invoice_id, description
FROM invoice_line_items GROUP BY invoice_id;
ERROR 1055 (42000): 'test.invoice_line_items.id'
isn't in GROUP BY
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!34
EXPLAIN PARTITIONS and EXPLAIN
EXTENDED Always Enabled
mysql> EXPLAIN SELECT * FROM table_aG
********************** 1. row **********************
id: 1
select_type: PRIMARY
table: table_a
partitions: NULL
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 3
filtered: 100.00
Extra: NULL
2 rows in set, 1 warning (0.00 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!35
EXPLAIN PARTITIONS and EXPLAIN
EXTENDED (cont.)
▪ Two optional flags that only add value
▪ Automated tooling only likely scenario to break.
▪ May be better suited for FORMAT=JSON
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!36
EXPLAIN PARTITIONS and EXPLAIN
EXTENDED (cont.)
▪ Proposal:
▪ Enables two flags by default, and deprecates the use of the
extended syntax.
▪ Went ahead in 5.7 DMR3.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!37
Deprecation of NULL synonym N
mysql> SELECT NULL is N;

+------------+

| NULL is N |

+------------+

| 1 |

+------------+

1 row in set (0.00 sec)


mysql> INSERT INTO tablea VALUES (3, N);

Query OK, 1 row affected (0.00 sec)


mysql> SELECT * FROM tablea WHERE b IS N;

+---+------+

| a | b |

+---+------+

| 3 | NULL |

+---+------+

1 row in set (0.00 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!38
Deprecation of NULL synonym N (cont.)
▪ Proposal:
▪ For removal in either 5.7 or 5.8.
▪ Still seeking feedback.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!39
Deprecate ENCODE/DECODE Functions
mysql> SELECT HEX(ENCODE('MyPassword', 'Super Secret!'));

+--------------------------------------------+

| HEX(ENCODE('MyPassword', 'Super Secret!')) |
+--------------------------------------------+

| A0E844F97A48FE6E8C1F |

+--------------------------------------------+
!
mysql> SELECT DECODE(UNHEX('A0E844F97A48FE6E8C1F'), 'Super Secret!');

+--------------------------------------------------------+

| DECODE(UNHEX('A0E844F97A48FE6E8C1F'), 'Super Secret!') |

+--------------------------------------------------------+

| MyPassword |

+--------------------------------------------------------+
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!40
Deprecate ENCODE/DECODE Functions (cont.)
▪ Functions are cryptographically weak.
▪ For crypto to be upgraded, storage format would become
incompatible.
▪ Overlaps with similar AES functionality already present.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!41
Deprecate SHOW PROFILES
And the INFORMATION_SCHEMA.PROFILING table
mysql> set profiling=1;

Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql> show profiles;

+----------+------------+-------------------------------------------------------+

| Query_ID | Duration | Query |

+----------+------------+-------------------------------------------------------+

| 1 | 0.00039200 | SELECT * FROM table_a UNION ALL SELECT * FROM table_b |

+----------+------------+-------------------------------------------------------+

2 rows in set, 1 warning (0.01 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!42
Deprecate SHOW PROFILES (cont.)
And the INFORMATION_SCHEMA.PROFILING table
mysql> show profile for query 1;

+----------------------+----------+

| Status | Duration |

+----------------------+----------+

| starting | 0.000059 |

| checking permissions | 0.000005 |

| checking permissions | 0.000005 |

| Opening tables | 0.000091 |

| System lock | 0.000011 |

| optimizing | 0.000004 |

| statistics | 0.000012 |

| preparing | 0.000009 |

| optimizing | 0.000002 |

| statistics | 0.000005 |

| preparing | 0.000004 |

| executing | 0.000003 |

| Sending data | 0.000053 |

| executing | 0.000002 |

..
..
| Sending data | 0.000029 |

| optimizing | 0.000006 |

| statistics | 0.000006 |

| preparing | 0.000004 |

| executing | 0.000002 |

| Sending data | 0.000019 |

| removing tmp table | 0.000007 |

| Sending data | 0.000002 |

| query end | 0.000007 |

| closing tables | 0.000010 |

| freeing items | 0.000019 |

| cleaning up | 0.000016 |

+----------------------+----------+

26 rows in set, 1 warning (0.00 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!43
Deprecate SHOW PROFILES (cont.)
▪ Overlaps with Performance Schema interface.
▪ Performance Schema has more flexible configuration
▪ Instrumentation level can be increased/lowered to reduce
overhead.
▪ Performance Schema has more data available.
And the INFORMATION_SCHEMA.PROFILING table
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!44
SHOW ENGINE INNODB MUTEX
mysql> show engine innodb mutex;

+--------+----------------------------+-------------------+

| Type | Name | Status |

+--------+----------------------------+-------------------+

| InnoDB | log/log0log.c:775 | os_waits=26 |

| InnoDB | log/log0log.c:771 | os_waits=1 |

| InnoDB | buf/buf0buf.c:1208 | os_waits=3219 |

| InnoDB | buf/buf0buf.c:1208 | os_waits=6990 |

| InnoDB | buf/buf0buf.c:1208 | os_waits=4619 |

| InnoDB | buf/buf0buf.c:1208 | os_waits=5627 |

..

| InnoDB | buf/buf0buf.c:1208 | os_waits=387166 |

| InnoDB | fil/fil0fil.c:1559 | os_waits=1265 |

| InnoDB | srv/srv0srv.c:987 | os_waits=460452 |

| InnoDB | combined buf/buf0buf.c:900 | os_waits=38503 |

| InnoDB | log/log0log.c:832 | os_waits=184 |

| InnoDB | combined buf/buf0buf.c:901 | os_waits=77 |

+--------+----------------------------+-------------------+

23 rows in set (0.56 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!45
SHOW ENGINE INNODB MUTEX (cont.)
▪ To be removed in 5.7.
▪ Rationale:
▪ Overlaps with PS.
▪ Can not be disabled.
▪ Code refactored so that InnoDB can use different locks internally.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!46
InnoDB Monitor tables
▪ Existed in a time when information_schema did not.
▪ Usage was:
CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;

/* view to the error log */

DROP TABLE innodb_monitor;
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!47
InnoDB Monitor tables (cont.)
▪ To be removed:
▪ innodb_tablespace_monitor
▪ innodb_table_monitor
▪ innodb_mem_validate
▪ To be replaced by config setting:
▪ innodb_monitor
▪ innodb_lock_monitor
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!48
InnoDB Monitor tables (cont.)
▪ Notable exception:
▪ In 5.7 DMR4 innodb_tablespace_monitor is removed,
without a replacement.
▪ This is included as part of our release notes.
▪ A resolution will be made before 5.7 GA.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!49
ALTER IGNORE TABLE
mysql> CREATE TABLE a (id INT NOT NULL);
Query OK, 0 rows affected (0.02 sec)
!
mysql> INSERT INTO a VALUES (2), (2), (3);
Query OK, 3 rows affected (0.01 sec)
Records: 3 Duplicates: 0 Warnings: 0
!
mysql> ALTER TABLE a ADD PRIMARY KEY (id);
ERROR 1062 (23000): Duplicate entry '2' for key
'PRIMARY'
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!50
ALTER IGNORE TABLE (cont.)
mysql> ALTER IGNORE TABLE a ADD PRIMARY KEY (id);
Query OK, 3 rows affected (0.01 sec)
Records: 3 Duplicates: 1 Warnings: 0
!
mysql> SELECT * FROM a;
+----+
| id |
+----+
| 2 |
| 3 |
+----+
2 rows in set (0.00 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!51
ALTER IGNORE TABLE (cont.)
▪ Rationale:
▪ Will silently drop rows for you!
▪ Has strange semantics for replication and ALTER TABLE.
▪ Proposal went ahead already:
▪ Deprecated in 5.6.17.
▪ Removed in 5.7 DMR4
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!52
Removal of unused CLI programs
▪ msql2mysql [Shell Script]
▪ mysqlaccess [Perl program]
▪ mysqlbug [Shell script]
▪ mysql_zap [Shell script]
▪ mysql_waitpid [C program]
▪ mysql_convert_table_format [Perl Program]
▪ mysql_fix_extensions [Perl Program]
▪ mysql_find_rows [Perl Program]
▪ mysql_setpermission [Perl Program]
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!53
Removal of unused CLI programs
▪ Aim:
▪ Increase supportability / remove a situation where users use
utilities that have outlived purpose.
▪ Improved cross platform experience in the case of shell scripts.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!54
INSERT DELAYED Removal
mysql> INSERT DELAYED INTO a (id) VALUES (5);
Query OK, 1 row affected, 1 warning (0.00 sec)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!55
INSERT DELAYED Removal (cont.)
▪ Rationale:
▪ INSERT DELAYED is slower than a normal INSERT when
statements do not need to be delayed.
▪ InnoDB has row level locking + MVCC. Reads do not block
writes (usually).
▪ Does not allow server to check for PRIMARY/UNIQUE
constraints.
▪ Errors can not be caught by the application.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!56
Simplify SQL_MODE options
▪ Proposal is to reduce the number of mode options available.
▪ Aim is to increase usage of SQL Mode options, encourage more
users to run MySQL in a stricter way.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!57
Simplify SQL_MODE options (cont.)
▪ Current recommendation:
▪ sql-mode=“STRICT_TRANS_TABLES,
ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,
NO_AUTO_VALUE_ON_ZERO, NO_ENGINE_SUBSTITUTION,
NO_ZERO_DATE, NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY"
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!58
Simplify SQL_MODE options (cont.)
▪ 5.7 Proposal:
▪ Remove the options ERROR_FOR_DIVISION_BY_ZERO,
NO_ZERO_DATE and NO_ZERO_IN_DATE.
▪ These behaviours be enabled by STRICT_TRANS_TABLES or
STRICT_ALL_TABLES.
▪ Improve error reporting when a behaviour is influenced by an SQL
mode.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!59
We Want Your Feedback!
Smooth
Transition
Ideas Feedback
Help make the transition as smooth as possible.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!60
Other Upcoming Oracle Talks
▪ Meet the MySQL Team
▪ Same room directly after this talk!
▪ Tomorrow:
▪ MySQL Fabric
▪ Performance and Benchmarks (5.7)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!61
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!62

Weitere ähnliche Inhalte

Was ist angesagt?

My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2Morgan Tocker
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 
Moving Data Between Exadata and Hadoop
Moving Data Between Exadata and HadoopMoving Data Between Exadata and Hadoop
Moving Data Between Exadata and HadoopEnkitec
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMario Beck
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMorgan Tocker
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesTanel Poder
 
Locking and Concurrency Control
Locking and Concurrency ControlLocking and Concurrency Control
Locking and Concurrency ControlMorgan Tocker
 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014Ryusuke Kajiyama
 
InnoDB Tablespace Encryption
InnoDB Tablespace Encryption InnoDB Tablespace Encryption
InnoDB Tablespace Encryption Satya Bodapati
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksJaime Crespo
 
MySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeMySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeAbel Flórez
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellEmily Ikuta
 
Query optimization: from 0 to 10 (and up to 5.7)
Query optimization: from 0 to 10 (and up to 5.7)Query optimization: from 0 to 10 (and up to 5.7)
Query optimization: from 0 to 10 (and up to 5.7)Jaime Crespo
 
MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014
MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014
MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014Dave Stokes
 

Was ist angesagt? (20)

MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
MySQL 5.7 + JSON
MySQL 5.7 + JSONMySQL 5.7 + JSON
MySQL 5.7 + JSON
 
My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2My sql 5.7-upcoming-changes-v2
My sql 5.7-upcoming-changes-v2
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
Moving Data Between Exadata and Hadoop
Moving Data Between Exadata and HadoopMoving Data Between Exadata and Hadoop
Moving Data Between Exadata and Hadoop
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
MySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big DataMySQL: From Single Instance to Big Data
MySQL: From Single Instance to Big Data
 
Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known Features
 
Locking and Concurrency Control
Locking and Concurrency ControlLocking and Concurrency Control
Locking and Concurrency Control
 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)
 
MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014MySQL Performance Tuning at COSCUP 2014
MySQL Performance Tuning at COSCUP 2014
 
InnoDB Tablespace Encryption
InnoDB Tablespace Encryption InnoDB Tablespace Encryption
InnoDB Tablespace Encryption
 
My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3My sql 5.6&MySQL Cluster 7.3
My sql 5.6&MySQL Cluster 7.3
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
 
MySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeMySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgrade
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
Query optimization: from 0 to 10 (and up to 5.7)
Query optimization: from 0 to 10 (and up to 5.7)Query optimization: from 0 to 10 (and up to 5.7)
Query optimization: from 0 to 10 (and up to 5.7)
 
MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014
MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014
MySQL Query Tuning for the Squeemish -- Fossetcon Orlando Sep 2014
 

Andere mochten auch

MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMorgan Tocker
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMorgan Tocker
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsTuyen Vuong
 
Mastering InnoDB Diagnostics
Mastering InnoDB DiagnosticsMastering InnoDB Diagnostics
Mastering InnoDB Diagnosticsguest8212a5
 
Web vulnerability seminar2
Web vulnerability seminar2Web vulnerability seminar2
Web vulnerability seminar2Sakuya Izayoi
 
GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항정명훈 Jerry Jeong
 
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0sprdd
 
Developing Information Schema Plugins
Developing Information Schema PluginsDeveloping Information Schema Plugins
Developing Information Schema PluginsMark Leith
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsMark Leith
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorMark Leith
 
Extending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorExtending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorMark Leith
 
Getting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise MonitorGetting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise MonitorMark Leith
 
Performance schema and_ps_helper
Performance schema and_ps_helperPerformance schema and_ps_helper
Performance schema and_ps_helperMark Leith
 
MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 PerformanceMYXPLAIN
 
Performance Schema for MySQL Troubleshooting
 Performance Schema for MySQL Troubleshooting Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMark Leith
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schemaMark Leith
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep diveMark Leith
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaMark Leith
 

Andere mochten auch (20)

MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
MySQL Cloud Service Deep Dive
MySQL Cloud Service Deep DiveMySQL Cloud Service Deep Dive
MySQL Cloud Service Deep Dive
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
 
Mastering InnoDB Diagnostics
Mastering InnoDB DiagnosticsMastering InnoDB Diagnostics
Mastering InnoDB Diagnostics
 
Web vulnerability seminar2
Web vulnerability seminar2Web vulnerability seminar2
Web vulnerability seminar2
 
GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항GoldenGate for MySQL 설치 시 필요한 사항
GoldenGate for MySQL 설치 시 필요한 사항
 
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0Linux con europe_2014_full_system_rollback_btrfs_snapper_0
Linux con europe_2014_full_system_rollback_btrfs_snapper_0
 
Developing Information Schema Plugins
Developing Information Schema PluginsDeveloping Information Schema Plugins
Developing Information Schema Plugins
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise Monitor
 
Extending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorExtending MySQL Enterprise Monitor
Extending MySQL Enterprise Monitor
 
Getting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise MonitorGetting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise Monitor
 
Performance schema and_ps_helper
Performance schema and_ps_helperPerformance schema and_ps_helper
Performance schema and_ps_helper
 
MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 Performance
 
Performance Schema for MySQL Troubleshooting
 Performance Schema for MySQL Troubleshooting Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
How to Monitor MySQL
How to Monitor MySQLHow to Monitor MySQL
How to Monitor MySQL
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
 
Performance schema and sys schema
Performance schema and sys schemaPerformance schema and sys schema
Performance schema and sys schema
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 

Ähnlich wie MySQL 5.7: Core Server Changes

Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Mark Leith
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) Frazer Clement
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsTed Wennmark
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesAlfredo Abate
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance TuningMark Swarbrick
 
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsContinuent
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptxIvan Ma
 
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsLinas Virbalas
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7MySQL Brasil
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014Dave Stokes
 
介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 XtrabackupYUCHENG HU
 
Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Connor McDonald
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeGeorgi Kodinov
 
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdfDataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdfMiguel Angel Fajardo
 
Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.
Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.
Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.Geir Høydalsvik
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!Miguel Araújo
 

Ähnlich wie MySQL 5.7: Core Server Changes (20)

Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014)
 
MySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA optionsMySQL 5.6, news in 5.7 and our HA options
MySQL 5.6, news in 5.7 and our HA options
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate from Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
 
20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx20141011 my sql clusterv01pptx
20141011 my sql clusterv01pptx
 
NoSQL and MySQL
NoSQL and MySQLNoSQL and MySQL
NoSQL and MySQL
 
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to AnalyticsReplicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
Replicate Oracle to Oracle, Oracle to MySQL, and Oracle to Analytics
 
NoSQL no MySQL 5.7
NoSQL no MySQL 5.7NoSQL no MySQL 5.7
NoSQL no MySQL 5.7
 
MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014MySQL 5.7 -- SCaLE Feb 2014
MySQL 5.7 -- SCaLE Feb 2014
 
介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup
 
Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2Whats new in Oracle Database 12c release 12.1.0.2
Whats new in Oracle Database 12c release 12.1.0.2
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
 
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdfDataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
DataEng Mad - 03.03.2020 - Tibero 30-min Presentation.pdf
 
MySQL-InnoDB
MySQL-InnoDBMySQL-InnoDB
MySQL-InnoDB
 
Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.
Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.
Simplifying MySQL, Pre-FOSDEM MySQL Days, Brussels, January 30, 2020.
 
Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
MySQL Shell/AdminAPI - MySQL Architectures Made Easy For All!
 

Mehr von Morgan Tocker

Introducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeIntroducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeMorgan Tocker
 
MySQL Usability Guidelines
MySQL Usability GuidelinesMySQL Usability Guidelines
MySQL Usability GuidelinesMorgan Tocker
 
My First 90 days with Vitess
My First 90 days with VitessMy First 90 days with Vitess
My First 90 days with VitessMorgan Tocker
 
FOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends DevroomFOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends DevroomMorgan Tocker
 
Introducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live FrankfurtIntroducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live FrankfurtMorgan Tocker
 
TiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup GroupTiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup GroupMorgan Tocker
 
TiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupTiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupMorgan Tocker
 
MySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMorgan Tocker
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated TestingMorgan Tocker
 

Mehr von Morgan Tocker (10)

Introducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeIntroducing Spirit - Online Schema Change
Introducing Spirit - Online Schema Change
 
MySQL Usability Guidelines
MySQL Usability GuidelinesMySQL Usability Guidelines
MySQL Usability Guidelines
 
My First 90 days with Vitess
My First 90 days with VitessMy First 90 days with Vitess
My First 90 days with Vitess
 
FOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends DevroomFOSDEM MySQL and Friends Devroom
FOSDEM MySQL and Friends Devroom
 
Introducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live FrankfurtIntroducing TiDB - Percona Live Frankfurt
Introducing TiDB - Percona Live Frankfurt
 
TiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup GroupTiDB Introduction - Boston MySQL Meetup Group
TiDB Introduction - Boston MySQL Meetup Group
 
TiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL MeetupTiDB Introduction - San Francisco MySQL Meetup
TiDB Introduction - San Francisco MySQL Meetup
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
MySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer Guide
 
Using MySQL in Automated Testing
Using MySQL in Automated TestingUsing MySQL in Automated Testing
Using MySQL in Automated Testing
 

MySQL 5.7: Core Server Changes

  • 1. MySQL Core Server Changes Morgan Tocker
 MySQL Community Manager
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!2 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 decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!3 MySQL 5.5 MySQL Enterprise Monitor 2.3 & 3.0 MySQL Enterprise Backup Security Scalability HA Audit MySQL 5.6 MySQL Workbench 6.1 MySQL Utilities MySQL Applier for Hadoop MySQL Workbench 5.2 & 6.0 MySQL Enterprise Oracle Certifications MySQL@Oracle: 4 Years of MySQL Innovation MySQL Cluster Manager Windows installer & Tools MySQL Cluster 7.2 MySQL Cluster 7.1 MySQL Migration Wizard MySQL 5.7 MySQL Cluster 7.4 MySQL Fabric MySQL Cluster 7.3
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!4 Discussion Topics ▪ Let’s talk about MySQL 5.7! ▪ Less discussion about InnoDB, Performance Schema, Benchmarks, Replication. ▪ Well covered in other talks.
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!5 Discussion Topics (cont.) ▪ New Features ▪ Changes to Existing Features ▪ Our Ongoing Efforts to Refactor and Improve MySQL.
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!6 Quick Recap of the MySQL Development Process
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!7 The DMR Model ▪ Up to 4 Development Milestone Releases per year (DMRs). ▪ Features are merged into main branch only when stable. ▪ High level review complete. ▪ Low level review complete. ▪ 80%+ code coverage testing goal. ▪ DMRs are intended to be of “Release Candidate” Quality.
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!8 MySQL 5.7 DMR Schedule April 2013 DMR1 221 Bugs Fixed 29 Changes 21 Worklogs Sep 2013 DMR2 384 Bugs Fixed 41 Changes 52 Worklogs Dec 2013 DMR3 155 Bugs Fixed 23 Changes 27 Worklogs April 2014 DMR4 256 Bugs Fixed 38 Changes 56 Worklogs 5.6 GA Feb 2013
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!9 Labs Releases ▪ For functionality that doesn’t meet the DMR requirements. ▪ Intended to be an earlier preview. ▪ Recent Labs Releases: ▪ Hadoop Applier for MySQL ▪ MySQL Fabric ▪ Multi-Source Replication ▪ NEW - InnoDB GIS+Optimizer GIS+Parser Refactoring! ▪ NEW - InnoDB Page/IO Compression! ▪ NEW - Multi-threaded Slaves! labs.mysql.com
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!10 InnoDB GIS+Optimizer GIS+Parser 
 Refactoring ▪ InnoDB R-Tree Index Support ▪ Based on Boost.Geometry ▪ Previously only Available in MyISAM labs.mysql.com
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!11 InnoDB GIS+Optimizer GIS+Parser 
 Refactoring (cont.) ▪ Improves readability, maintainability, and stability – Cleanly separate the parsing, optimizing, and execution stages – Allows for easier feature additions, with lessened risk ! ▪ Transforms SQL Parser into a true bottom-up parser – Better support for larger syntax rules in the future – Fewer intermediate nodes in the parse tree ▪ Fewer node allocations ▪ Faster grammar labs.mysql.com
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!12 InnoDB Page/IO Compression ▪ Transparent Page Level Compression ▪ Builds on new multiple page cleaner threads from DMR4. ▪ Compress/decompress transparently in background threads ▪ Applies to all tables, including the system tablespace and UNDO logs ▪ Thank you to Fusion-IO! labs.mysql.com
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!13 MySQL 5.7 DMRs To Date
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!14 Common Themes ▪ Improved support for high connection creation rate ▪ Lock Thread count impact reduced ▪ Multiple Metadata Locking (MDL) improvements ▪ InnoDB Improvements for: ▪ Index lock contention ▪ Read Only Transactions ▪ Temporary Tables ▪ Redo Logs ▪ Multiple page cleaner threads. ▪ Scalability ▪ Parallel Replication (Intra-schema) Performance & Scalability ▪ Overhead has been reduced. ▪ Improved to do lazy initialization on new connections. ▪ Now instruments: ▪ Memory usage ▪ Stored programs ▪ Replication ▪ Metadata Locking (MDL) ▪ Transactions ▪ Prepared Statements From DMR1 to DMR4 Performance Schema
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!15 Common Themes (cont.) ▪ Internal logging API ▪ Timestamps are now written with log entries in YYYY-MM- DDThh:mm:ss.uuuuuu format. ▪ Configurable Verbosity ▪ InnoDB Refactored: ▪ Locking Code ▪ Redo Log Code (for performance) ▪ Tablespace Class ▪ Atomics refactored ▪ Optimizer refactoring (multiple improvements) Deep Refactoring ▪ Password expiration support + timestamp of password last changed. ▪ mysql_secure_installation changed to C++ program. ▪ Improvements to SSL Support. ▪ Support to change AES key length and block encryption mode From DMR1 to DMR4 Security
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!16 DMR0 ▪ Error issued when creating duplicate index. ▪ Warning when strict SQL Mode removed. ▪ Ctl-C fixed in MySQL CLI! ▪ Non-blocking SHOW SLAVE STATUS ▪ Idempotent mysqlbinlog mode. ▪ Stacked Diagnostics Area Internal Release Only
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!17 DMR1 ▪ Online DDL Now supports RENAME INDEX and VARCHAR extensions. ▪ InnoDB support for Spatial Data Types. ▪ Rewrite-db option for mysqlbinlog with RBR. Released April 2013
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!18 DMR2 ▪ Semi sync replication improvements. ▪ Multiple Triggers per event per table. ▪ EXPLAIN FOR CONNECTION ▪ EXPLAIN showing cost information. Released September 2013
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!19 Example: Cost Information in EXPLAIN *************************** 1. row ***************************
 EXPLAIN: {
 "query_block": {
 "select_id": 1,
 "cost_info": {
 "query_cost": "4786.00"
 },
 "ordering_operation": { "using_temporary_table": true,
 "using_filesort": true,
 "cost_info": {
 "sort_cost": "2151.00"
 },
 "nested_loop": [
 {
 "table": {
 ..
 ],
 "key_length": "3",
 "rows_examined_per_scan": 239,
 "rows_produced_per_join": 239,
 "filtered": 100,
 "using_index": true,
 "cost_info": {
 "read_cost": "6.00",
 "eval_cost": "47.80",
 "prefix_cost": "53.80",
 "data_read_per_join": "61K"
 }, .. EXPLAIN FORMAT=JSON FOR CONNECTION 2;
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!20 Example: EXPLAIN in MySQL Workbench Visual EXPLAIN Including Cost Information!
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!21 DMR3 ▪ UNION ALL no longer requires temporary table. ▪ Filesort now packs VARCHAR and CHAR keys in temporary files. ▪ Optimizer Support for row value constructors. ▪ i.e. WHERE (a,b) in ((‘a’, ‘b’), (‘c’, ‘d’)); Released December 2013
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!22 DMR3 (cont.) ▪ InnoDB Fulltext now supports external parsers. ▪ Dynamic replication filters. ▪ Support ICP optimization for partitioned tables. Released December 2013
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!23 Example: UNION ALL Optimization ***************** 1. row ***************** id: 1 select_type: PRIMARY table: table_a type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 Extra: NULL ***************** 2. row ***************** id: 2 select_type: UNION table: table_b type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 Extra: NULL ***************** 3. row ***************** id: NULL select_type: UNION RESULT table: <union1,2> type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: NULL Extra: Using temporary ***************** 1. row ***************** id: 1 select_type: PRIMARY table: table_a partitions: NULL type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 filtered: 100.00 Extra: NULL ***************** 2. row ***************** id: 2 select_type: UNION table: table_b partitions: NULL type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 filtered: 100.00 Extra: NULL EXPLAIN SELECT * FROM a UNION ALL SELECT * FROM b MySQL 5.6: MySQL 5.7:
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!24 Example: Row-value Constructors **************** 1. row **************** id: 1 select_type: SIMPLE table: City type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 4188 Extra: Using where 1 row in set (0.00 sec) **************** 1. row **************** id: 1 select_type: SIMPLE table: City partitions: NULL type: range possible_keys: CountryCode,CountryCode$Name key: CountryCode$Name key_len: 38 ref: NULL rows: 3 filtered: 100.00 Extra: Using where EXPLAIN SELECT * FROM City WHERE (CountryCode,Name) IN (('USA', 'San Francisco'), ('USA', 'Chicago'), ('CAN', ‘Toronto')) MySQL 5.6: MySQL 5.7:
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. {San Francisco, California, 776733} {Chicago, Illinois, 2896016} !25 Filesort Packing ID Name CountryCode District Population 3805 San Francisco USA California 776733 1812 Toronto CAN Ontario 688275 3795 Chicago USA Illinois 2896016 1818 Vancouver CAN British Columbia 514008 SELECT Name, District, Population FROM City WHERE CountryCode = ‘USA’ ORDER BY Name; {San Francisco, California, 776733} {Chicago, Illinois, 2896016} Sort Buffer MySQL 5.7: CHAR, VARCHAR and NULLABLE fixed-size types are now packed in the sort buffer. Using Modified Sort Algorithm
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!26 DMR4 ▪ Statement Timeout. ▪ Change master without stopping SQL thread. ▪ Changed compiler from sun studio to gcc on Solaris. ▪ Transportable tablespaces for partitioned InnoDB tables. Released April 2014
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!27 Example: Server-Side Statement Timeout ▪ SELECT MAX_STATEMENT_TIME = 109 * FROM my_table; ▪ SET SESSION MAX_STATEMENT_TIME = 100; ▪ SET GLOBAL MAX_STATEMENT_TIME = 100; Incorporates Contributions from Davi Arnaut, the MySQL Community
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!28 Changes to Existing Functionality (Deprecation and Change)
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!29 Implementing Change ▪ Not all changes easily support old and new. ▪ Some changes do not easily support deprecation messages. ▪ i.e. GROUP BY with implicit ORDER BY ▪ Always special cases. ▪ i.e. removal of mysqlbug, msql2mysql CLI utilities.
  • 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!30 Functionality Changed ▪ Change of Defaults ▪ Replication ▪ SQL Modes ▪ EXPLAIN PARTITIONS and EXTENDED ▪ Deprecation ▪ NULL synonym N ▪ ENCODE/DECODE functions. ▪ SHOW PROFILES feature ! ! ! ! ▪ Removal ▪ SHOW ENGINE INNODB MUTEX ▪ InnoDB Monitor Tables ▪ ALTER IGNORE TABLE ▪ Unused CLI Utilities ▪ INSERT DELAYED ▪ Specific SQL Modes
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!31 Changes to Replication Defaults ▪ MySQL 5.6 improved durable replication performance considerably (group commit fix) ▪ Proposal is to make replication durable by default starting from 5.7: ▪ sync_binlog = 1 ▪ master-info-repository = TABLE ▪ relay-log-info-repository = TABLE
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!32 Change SQL_Mode Defaults mysql> SELECT id, invoice_id, description FROM invoice_line_items GROUP BY invoice_id; +----+------------+-------------+ | id | invoice_id | description | +----+------------+-------------+ | 1 | 1 | New socks | | 3 | 2 | Shoes | | 5 | 3 | Tie | +----+------------+-------------+ 3 rows in set (0.00 sec)
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!33 SQL Mode: Only Full Group By ▪ Proposal is to produce an error from MySQL 5.7. ▪ Will still be configurable via SQL Mode ONLY_FULL_GROUP_BY. mysql> SELECT id, invoice_id, description FROM invoice_line_items GROUP BY invoice_id; ERROR 1055 (42000): 'test.invoice_line_items.id' isn't in GROUP BY
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!34 EXPLAIN PARTITIONS and EXPLAIN EXTENDED Always Enabled mysql> EXPLAIN SELECT * FROM table_aG ********************** 1. row ********************** id: 1 select_type: PRIMARY table: table_a partitions: NULL type: ALL possible_keys: NULL key: NULL key_len: NULL ref: NULL rows: 3 filtered: 100.00 Extra: NULL 2 rows in set, 1 warning (0.00 sec)
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!35 EXPLAIN PARTITIONS and EXPLAIN EXTENDED (cont.) ▪ Two optional flags that only add value ▪ Automated tooling only likely scenario to break. ▪ May be better suited for FORMAT=JSON
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!36 EXPLAIN PARTITIONS and EXPLAIN EXTENDED (cont.) ▪ Proposal: ▪ Enables two flags by default, and deprecates the use of the extended syntax. ▪ Went ahead in 5.7 DMR3.
  • 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!37 Deprecation of NULL synonym N mysql> SELECT NULL is N;
 +------------+
 | NULL is N |
 +------------+
 | 1 |
 +------------+
 1 row in set (0.00 sec) 
 mysql> INSERT INTO tablea VALUES (3, N);
 Query OK, 1 row affected (0.00 sec) 
 mysql> SELECT * FROM tablea WHERE b IS N;
 +---+------+
 | a | b |
 +---+------+
 | 3 | NULL |
 +---+------+
 1 row in set (0.00 sec)
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!38 Deprecation of NULL synonym N (cont.) ▪ Proposal: ▪ For removal in either 5.7 or 5.8. ▪ Still seeking feedback.
  • 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!39 Deprecate ENCODE/DECODE Functions mysql> SELECT HEX(ENCODE('MyPassword', 'Super Secret!'));
 +--------------------------------------------+
 | HEX(ENCODE('MyPassword', 'Super Secret!')) | +--------------------------------------------+
 | A0E844F97A48FE6E8C1F |
 +--------------------------------------------+ ! mysql> SELECT DECODE(UNHEX('A0E844F97A48FE6E8C1F'), 'Super Secret!');
 +--------------------------------------------------------+
 | DECODE(UNHEX('A0E844F97A48FE6E8C1F'), 'Super Secret!') |
 +--------------------------------------------------------+
 | MyPassword |
 +--------------------------------------------------------+
  • 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!40 Deprecate ENCODE/DECODE Functions (cont.) ▪ Functions are cryptographically weak. ▪ For crypto to be upgraded, storage format would become incompatible. ▪ Overlaps with similar AES functionality already present.
  • 41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!41 Deprecate SHOW PROFILES And the INFORMATION_SCHEMA.PROFILING table mysql> set profiling=1;
 Query OK, 0 rows affected, 1 warning (0.00 sec) 
 mysql> show profiles;
 +----------+------------+-------------------------------------------------------+
 | Query_ID | Duration | Query |
 +----------+------------+-------------------------------------------------------+
 | 1 | 0.00039200 | SELECT * FROM table_a UNION ALL SELECT * FROM table_b |
 +----------+------------+-------------------------------------------------------+
 2 rows in set, 1 warning (0.01 sec)
  • 42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!42 Deprecate SHOW PROFILES (cont.) And the INFORMATION_SCHEMA.PROFILING table mysql> show profile for query 1;
 +----------------------+----------+
 | Status | Duration |
 +----------------------+----------+
 | starting | 0.000059 |
 | checking permissions | 0.000005 |
 | checking permissions | 0.000005 |
 | Opening tables | 0.000091 |
 | System lock | 0.000011 |
 | optimizing | 0.000004 |
 | statistics | 0.000012 |
 | preparing | 0.000009 |
 | optimizing | 0.000002 |
 | statistics | 0.000005 |
 | preparing | 0.000004 |
 | executing | 0.000003 |
 | Sending data | 0.000053 |
 | executing | 0.000002 |
 .. .. | Sending data | 0.000029 |
 | optimizing | 0.000006 |
 | statistics | 0.000006 |
 | preparing | 0.000004 |
 | executing | 0.000002 |
 | Sending data | 0.000019 |
 | removing tmp table | 0.000007 |
 | Sending data | 0.000002 |
 | query end | 0.000007 |
 | closing tables | 0.000010 |
 | freeing items | 0.000019 |
 | cleaning up | 0.000016 |
 +----------------------+----------+
 26 rows in set, 1 warning (0.00 sec)
  • 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!43 Deprecate SHOW PROFILES (cont.) ▪ Overlaps with Performance Schema interface. ▪ Performance Schema has more flexible configuration ▪ Instrumentation level can be increased/lowered to reduce overhead. ▪ Performance Schema has more data available. And the INFORMATION_SCHEMA.PROFILING table
  • 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!44 SHOW ENGINE INNODB MUTEX mysql> show engine innodb mutex;
 +--------+----------------------------+-------------------+
 | Type | Name | Status |
 +--------+----------------------------+-------------------+
 | InnoDB | log/log0log.c:775 | os_waits=26 |
 | InnoDB | log/log0log.c:771 | os_waits=1 |
 | InnoDB | buf/buf0buf.c:1208 | os_waits=3219 |
 | InnoDB | buf/buf0buf.c:1208 | os_waits=6990 |
 | InnoDB | buf/buf0buf.c:1208 | os_waits=4619 |
 | InnoDB | buf/buf0buf.c:1208 | os_waits=5627 |
 ..
 | InnoDB | buf/buf0buf.c:1208 | os_waits=387166 |
 | InnoDB | fil/fil0fil.c:1559 | os_waits=1265 |
 | InnoDB | srv/srv0srv.c:987 | os_waits=460452 |
 | InnoDB | combined buf/buf0buf.c:900 | os_waits=38503 |
 | InnoDB | log/log0log.c:832 | os_waits=184 |
 | InnoDB | combined buf/buf0buf.c:901 | os_waits=77 |
 +--------+----------------------------+-------------------+
 23 rows in set (0.56 sec)
  • 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!45 SHOW ENGINE INNODB MUTEX (cont.) ▪ To be removed in 5.7. ▪ Rationale: ▪ Overlaps with PS. ▪ Can not be disabled. ▪ Code refactored so that InnoDB can use different locks internally.
  • 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!46 InnoDB Monitor tables ▪ Existed in a time when information_schema did not. ▪ Usage was: CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
 /* view to the error log */
 DROP TABLE innodb_monitor;
  • 47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!47 InnoDB Monitor tables (cont.) ▪ To be removed: ▪ innodb_tablespace_monitor ▪ innodb_table_monitor ▪ innodb_mem_validate ▪ To be replaced by config setting: ▪ innodb_monitor ▪ innodb_lock_monitor
  • 48. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!48 InnoDB Monitor tables (cont.) ▪ Notable exception: ▪ In 5.7 DMR4 innodb_tablespace_monitor is removed, without a replacement. ▪ This is included as part of our release notes. ▪ A resolution will be made before 5.7 GA.
  • 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!49 ALTER IGNORE TABLE mysql> CREATE TABLE a (id INT NOT NULL); Query OK, 0 rows affected (0.02 sec) ! mysql> INSERT INTO a VALUES (2), (2), (3); Query OK, 3 rows affected (0.01 sec) Records: 3 Duplicates: 0 Warnings: 0 ! mysql> ALTER TABLE a ADD PRIMARY KEY (id); ERROR 1062 (23000): Duplicate entry '2' for key 'PRIMARY'
  • 50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!50 ALTER IGNORE TABLE (cont.) mysql> ALTER IGNORE TABLE a ADD PRIMARY KEY (id); Query OK, 3 rows affected (0.01 sec) Records: 3 Duplicates: 1 Warnings: 0 ! mysql> SELECT * FROM a; +----+ | id | +----+ | 2 | | 3 | +----+ 2 rows in set (0.00 sec)
  • 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!51 ALTER IGNORE TABLE (cont.) ▪ Rationale: ▪ Will silently drop rows for you! ▪ Has strange semantics for replication and ALTER TABLE. ▪ Proposal went ahead already: ▪ Deprecated in 5.6.17. ▪ Removed in 5.7 DMR4
  • 52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!52 Removal of unused CLI programs ▪ msql2mysql [Shell Script] ▪ mysqlaccess [Perl program] ▪ mysqlbug [Shell script] ▪ mysql_zap [Shell script] ▪ mysql_waitpid [C program] ▪ mysql_convert_table_format [Perl Program] ▪ mysql_fix_extensions [Perl Program] ▪ mysql_find_rows [Perl Program] ▪ mysql_setpermission [Perl Program]
  • 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!53 Removal of unused CLI programs ▪ Aim: ▪ Increase supportability / remove a situation where users use utilities that have outlived purpose. ▪ Improved cross platform experience in the case of shell scripts.
  • 54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!54 INSERT DELAYED Removal mysql> INSERT DELAYED INTO a (id) VALUES (5); Query OK, 1 row affected, 1 warning (0.00 sec)
  • 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!55 INSERT DELAYED Removal (cont.) ▪ Rationale: ▪ INSERT DELAYED is slower than a normal INSERT when statements do not need to be delayed. ▪ InnoDB has row level locking + MVCC. Reads do not block writes (usually). ▪ Does not allow server to check for PRIMARY/UNIQUE constraints. ▪ Errors can not be caught by the application.
  • 56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!56 Simplify SQL_MODE options ▪ Proposal is to reduce the number of mode options available. ▪ Aim is to increase usage of SQL Mode options, encourage more users to run MySQL in a stricter way.
  • 57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!57 Simplify SQL_MODE options (cont.) ▪ Current recommendation: ▪ sql-mode=“STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_AUTO_VALUE_ON_ZERO, NO_ENGINE_SUBSTITUTION, NO_ZERO_DATE, NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY"
  • 58. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!58 Simplify SQL_MODE options (cont.) ▪ 5.7 Proposal: ▪ Remove the options ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE and NO_ZERO_IN_DATE. ▪ These behaviours be enabled by STRICT_TRANS_TABLES or STRICT_ALL_TABLES. ▪ Improve error reporting when a behaviour is influenced by an SQL mode.
  • 59. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!59 We Want Your Feedback! Smooth Transition Ideas Feedback Help make the transition as smooth as possible.
  • 60. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.!60 Other Upcoming Oracle Talks ▪ Meet the MySQL Team ▪ Same room directly after this talk! ▪ Tomorrow: ▪ MySQL Fabric ▪ Performance and Benchmarks (5.7)
  • 61. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!61
  • 62. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12!62