Skip to content

Instantly share code, notes, and snippets.

@morgo
morgo / gist:5603720185f0c19de9ed
Created June 17, 2014 18:46
Zero date testcase
Example showing zero date:
mysql [localhost] {msandbox} (test) > CREATE TABLE a (a INT NOT NULL primary key auto_increment, b date);
Query OK, 0 rows affected (0.05 sec)
mysql [localhost] {msandbox} (test) > INSERT INTO a VALUES (NULL, '2014-06-00');
Query OK, 1 row affected (0.01 sec)
# MySQL 5.7 proposal is to merge the SQL mode NO_ZERO_IN_DATE into the definition of STRICT_ALL_TABLES
# Which is on by default.
morgo@rbook:~/sandboxes/msb_5_6_16$ cat /tmp/my.cnf
[mysql]
user=root
password=testtttt
------------------------------------------------------------------------------------------------------------------------------------- 15:16:39
morgo@rbook:~/sandboxes/msb_5_6_16$ ~/Documents/mysql-installs/5.6.16/bin/mysql --defaults-extra-file=/tmp/my.cnf --defaults-file=/Users/morgo/sandboxes/msb_5_6_16/my.sandbox.cnf
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.6.16-log MySQL Community Server (GPL)
@morgo
morgo / gist:7880479
Last active December 30, 2015 20:28
Testing performance schema - recreating show_profiles.
/*
* Procedure: show_profiles()
*
* Versions: 5.6.x
*
* Emulates previous behaviour of SHOW PROFILES feature which has been
* officially deprecated from MySQL 5.7 onwards.
*/

Percona Server with XtraDB

Introduction

  • 2010(2009?) InnoDB 1.1 announced, will first ship with MySQL 5.5.
  • Historically InnoDB development lags while MySQL is trying to GA
  • lots of things fixed in InnoDB since MySQL 5.0
  • important note -- plugin version of InnoDB is not the default in 5.1