mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Changed mysql-test to print warnings for not existing table to DROP TABLE
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print()
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
# Problem with INSERT ... SELECT
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLINT UNSIGNED NOT NULL);
|
||||
insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12);
|
||||
create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY);
|
||||
@@ -12,13 +15,13 @@ insert into t2 (payoutID) SELECT payoutID+10 FROM t1;
|
||||
insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1;
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# bug in bulk insert optimization
|
||||
# test case by Fournier Jocelyn <joc@presence-pc.com>
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS crash1,crash2;
|
||||
CREATE TABLE `crash1` (
|
||||
CREATE TABLE `t1` (
|
||||
`numeropost` bigint(20) unsigned NOT NULL default '0',
|
||||
`icone` tinyint(4) unsigned NOT NULL default '0',
|
||||
`numreponse` bigint(20) unsigned NOT NULL auto_increment,
|
||||
@@ -34,7 +37,7 @@ CREATE TABLE `crash1` (
|
||||
KEY `numreponse` (`numreponse`)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
CREATE TABLE `crash2` (
|
||||
CREATE TABLE `t2` (
|
||||
`numeropost` bigint(20) unsigned NOT NULL default '0',
|
||||
`icone` tinyint(4) unsigned NOT NULL default '0',
|
||||
`numreponse` bigint(20) unsigned NOT NULL auto_increment,
|
||||
@@ -50,21 +53,21 @@ CREATE TABLE `crash2` (
|
||||
KEY `numreponse` (`numreponse`)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
INSERT INTO crash2
|
||||
INSERT INTO t2
|
||||
(numeropost,icone,numreponse,contenu,pseudo,date,ip,signature) VALUES
|
||||
(9,1,56,'test','joce','2001-07-25 13:50:53'
|
||||
,3649052399,0);
|
||||
|
||||
|
||||
INSERT INTO crash1 (numeropost,icone,contenu,pseudo,date,signature,ip)
|
||||
SELECT 1618,icone,contenu,pseudo,date,signature,ip FROM crash2
|
||||
INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
|
||||
SELECT 1618,icone,contenu,pseudo,date,signature,ip FROM t2
|
||||
WHERE numeropost=9 ORDER BY numreponse ASC;
|
||||
|
||||
show variables like '%bulk%';
|
||||
|
||||
INSERT INTO crash1 (numeropost,icone,contenu,pseudo,date,signature,ip)
|
||||
SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM crash2
|
||||
INSERT INTO t1 (numeropost,icone,contenu,pseudo,date,signature,ip)
|
||||
SELECT 1718,icone,contenu,pseudo,date,signature,ip FROM t2
|
||||
WHERE numeropost=9 ORDER BY numreponse ASC;
|
||||
|
||||
DROP TABLE IF EXISTS crash1,crash2;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user