Drizzled Public API Documentation

insert_select.inc
00001 # 
00002 # Simple test of the serial event log for single INSERT SELECT statements
00003 # 
00004 # We create a table and insert some records
00005 # into it.  We then create another table and
00006 # INSERT SELECT from the first table into the 
00007 # new one.
00008 # 
00009 # We then use the command_reader in drizzled/message/ to read the events.
00010 #
00011 
00012 --disable_warnings
00013 DROP TABLE IF EXISTS t1;
00014 DROP TABLE IF EXISTS t2;
00015 --enable_warnings
00016 
00017 CREATE TABLE t1 (
00018   id INT NOT NULL PRIMARY KEY
00019 , padding VARCHAR(200) NOT NULL
00020 );
00021 
00022 INSERT INTO t1 VALUES (1, "I love testing.");
00023 INSERT INTO t1 VALUES (2, "I hate testing.");
00024 
00025 CREATE TABLE t2 (
00026   id INT NOT NULL PRIMARY KEY
00027 , padding VARCHAR(200) NOT NULL
00028 );
00029 
00030 INSERT INTO t2 SELECT * FROM t1;
00031 
00032 DROP TABLE t1, t2;