Created
July 26, 2009 01:49
-
-
Save hobodave/155400 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use test | |
| Database changed | |
| mysql> CREATE TABLE `a` ( | |
| -> `id` int(11) DEFAULT NULL | |
| -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | |
| -> ; | |
| Query OK, 0 rows affected (0.01 sec) | |
| mysql> INSERT INTO a (id) VALUES (1),(2),(3); | |
| Query OK, 3 rows affected (0.01 sec) | |
| Records: 3 Duplicates: 0 Warnings: 0 | |
| mysql> CREATE TABLE `aa` ( | |
| -> `id` int(11) DEFAULT NULL | |
| -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
| Query OK, 0 rows affected (0.02 sec) | |
| mysql> INSERT INTO aa (id) VALUES (1),(2),(3); | |
| Query OK, 3 rows affected (0.01 sec) | |
| Records: 3 Duplicates: 0 Warnings: 0 | |
| mysql> CREATE VIEW magic AS SELECT a.id AS a_id, aa.id AS aa_id FROM a JOIN aa ON a.id = aa.id; | |
| Query OK, 0 rows affected (0.02 sec) | |
| mysql> CREATE TABLE magic ENGINE=MEMORY | |
| -> SELECT a.id AS a_id, aa.id AS aa_id FROM a JOIN aa ON a.id = aa.id; | |
| ERROR 2013 (HY000): Lost connection to MySQL server during query |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment