Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Conversation

@wshafer
Copy link
Contributor

@wshafer wshafer commented Feb 28, 2018

Updated Timestamp tables for newer / stricter version of mysql. In it's current form this SQL can't be imported on new installs of Mysql on Ubuntu due to the new restrictions on timestamps

@weierophinney
Copy link
Member

@wshafer Will this same syntax work on older versions of MySQL?

And what do you mean by "newer" - what release introduces this change?

@wshafer
Copy link
Contributor Author

wshafer commented Feb 28, 2018

In 5.7 NO_ZERO_DATE was added as the default boot option, making all 0's in the timestamp invalid... why the default value is always "0" for timestamps now I have no idea.

This will work fine on older versions. It just allows you to have null values in the columns.

@wshafer
Copy link
Contributor Author

wshafer commented Feb 28, 2018

Testing the results on Ubuntu 14.04 to verify. Will post results once I have them.

@wshafer
Copy link
Contributor Author

wshafer commented Feb 28, 2018

Yep we're good.

root@vagrant:~# mysql -u root -proot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 42
Server version: 5.5.59-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW VARIABLES LIKE "%version%";
+-------------------------+-------------------------+
| Variable_name           | Value                   |
+-------------------------+-------------------------+
| innodb_version          | 5.5.59                  |
| protocol_version        | 10                      |
| slave_type_conversions  |                         |
| version                 | 5.5.59-0ubuntu0.14.04.1 |
| version_comment         | (Ubuntu)                |
| version_compile_machine | x86_64                  |
| version_compile_os      | debian-linux-gnu        |
+-------------------------+-------------------------+
7 rows in set (0.00 sec)

mysql> create database local;
Query OK, 1 row affected (0.00 sec)

mysql> exit
Bye
root@vagrant:~# mysql -u root -proot local < /var/www/oauth2.sql 
root@vagrant:~# mysql -u root -proot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.5.59-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show tables;
ERROR 1046 (3D000): No database selected
mysql> use local
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-------------------------------+
| Tables_in_local               |
+-------------------------------+
| oauth_access_tokens           |
| oauth_auth_codes              |
| oauth_clients                 |
| oauth_personal_access_clients |
| oauth_refresh_tokens          |
| oauth_scopes                  |
| oauth_users                   |
+-------------------------------+
7 rows in set (0.00 sec)

mysql> 

@weierophinney weierophinney changed the base branch from release-1.0.0 to master February 28, 2018 23:04
@weierophinney weierophinney changed the base branch from master to release-1.0.0 February 28, 2018 23:05
weierophinney added a commit that referenced this pull request Feb 28, 2018
weierophinney added a commit that referenced this pull request Feb 28, 2018
Forward port #18

Conflicts:
	CHANGELOG.md
@weierophinney
Copy link
Member

Cherry-picked to master, and merged to release-1.0.0. I've tagged and released 0.3.1 and 1.0.0alpha4 with this change.

Thanks, @wshafer!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants