Loading Docs/manual.texi +6 −0 Original line number Diff line number Diff line Loading @@ -7753,6 +7753,10 @@ version 4.0; @itemize @bullet @item @code{INSERT INTO ... SELECT} had in 3.23 always @code{IGNORE} enabled. In 4.0.1 MySQL will stop (and possible rollback) in case of an error if you don't specify @code{IGNORE}. @item @file{safe_mysqld} is renamed to @file{mysqld_safe}. @item The old C API functions @code{mysql_drop_db}, @code{mysql_create_db} and Loading Loading @@ -46487,6 +46491,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item Changed @code{INSERT INTO .. SELECT} to by default stop on errors. @item Ignore @code{DATA DIRECTORY} and @code{INDEX DIRECTORY} directives on windows. @item Added boolean fulltext search code. It should be considered early alpha. mysql-test/r/insert_select.result +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7, create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; insert into t2 (payoutID) SELECT payoutID+10 FROM t1; Duplicate entry '16' for key 1 insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1; select * from t2; payoutID 1 Loading mysql-test/t/insert_select.test +2 −0 Original line number Diff line number Diff line Loading @@ -7,7 +7,9 @@ create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLI 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); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; --error 1062 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; # Loading sql-bench/server-cfg.sh +15 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ sub new $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'vacuum'} = 1; # When using with --fast $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'NEG'} = 1; # Supports -id $limits{'alter_add_multi_col'}= 1; #Have ALTER TABLE t add a int,add b int; Loading Loading @@ -370,6 +371,7 @@ sub new $self->{'limits'} = \%limits; $self->{'double_quotes'} = 0; $self->{'drop_attr'} = ""; $self->{'transactions'} = 0; # No transactions $self->{'blob'} = "text(" . $limits{'max_text_size'} .")"; $self->{'text'} = "text(" . $limits{'max_text_size'} .")"; Loading Loading @@ -565,6 +567,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{"vacuum"} = 1; $limits{'join_optimizer'} = 1; # Can optimize FROM tables $limits{'load_data_infile'} = 0; Loading Loading @@ -854,6 +857,7 @@ sub new $self->{'text'} = "long varchar"; $self->{'double_quotes'} = 1; $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 9999; # Probably big enough $limits{'max_columns'} = 2000; # From crash-me Loading Loading @@ -1095,6 +1099,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 1258; $limits{'max_columns'} = 226; # server is disconnecting???? Loading Loading @@ -1377,6 +1382,7 @@ sub new $self->{'text'} = "long"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{"vacuum"} = 1; $limits{'max_conditions'} = 9999; # (Actually not a limit) Loading Loading @@ -1633,6 +1639,7 @@ sub new $self->{'text'} = "byte in table"; $self->{'double_quotes'} = 0; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{'host'} = $host; $limits{'NEG'} = 1; # Supports -id Loading Loading @@ -1834,6 +1841,7 @@ sub new $self->{'text'} = "blob"; # text ? $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 97; # We get 'Query is too complex' $limits{'max_columns'} = 255; # Max number of columns in table Loading Loading @@ -2010,6 +2018,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 1030; # We get 'Query is too complex' $limits{'max_columns'} = 250; # Max number of columns in table Loading Loading @@ -2197,6 +2206,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{"vacuum"} = 1; $limits{'max_conditions'} = 1030; # We get 'Query is too complex' Loading Loading @@ -2389,6 +2399,7 @@ sub new $self->{'text'} = "long"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 50; # (Actually not a limit) $limits{'max_columns'} = 254; # Max number of columns in table Loading Loading @@ -2603,6 +2614,7 @@ sub new $self->{'text'} = "varchar(255)"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 418; # We get 'Query is too complex' $limits{'max_columns'} = 500; # Max number of columns in table Loading Loading @@ -2772,6 +2784,7 @@ sub new $self->{'text'} = "character varying(15000)"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{'char_null'} = "cast(NULL as char(1))"; $self->{'numeric_null'} = "cast(NULL as int)"; Loading Loading @@ -2972,6 +2985,7 @@ sub new $self->{'text'} = ""; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{'char_null'} = ""; $self->{'numeric_null'} = ""; Loading Loading @@ -3184,6 +3198,7 @@ sub new $self->{'text'} = "varchar(8000000)"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ' restrict'; $self->{'transactions'} = 1; # Transactions enabled $self->{'error_on_execute_means_zero_rows'}=1; $limits{'max_conditions'} = 5427; # (Actually not a limit) Loading sql-bench/test-ATIS.sh +12 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,12 @@ if (!$opt_skip_create) } else { if ($opt_fast && $server->{transactions}) { $dbh->{AutoCommit} = 0; print "Transactions enabled\n" if ($opt_debug); } for ($ti = 0; $ti <= $#table_names; $ti++) { my $table_name = $table_names[$ti]; Loading @@ -128,8 +134,14 @@ if (!$opt_skip_create) $row_count++; } } if ($opt_fast && $server->{transactions}) { $dbh->commit; $dbh->{AutoCommit} = 1; } close(DATA); } if ($opt_lock_tables) { $dbh->do("UNLOCK TABLES"); Loading Loading
Docs/manual.texi +6 −0 Original line number Diff line number Diff line Loading @@ -7753,6 +7753,10 @@ version 4.0; @itemize @bullet @item @code{INSERT INTO ... SELECT} had in 3.23 always @code{IGNORE} enabled. In 4.0.1 MySQL will stop (and possible rollback) in case of an error if you don't specify @code{IGNORE}. @item @file{safe_mysqld} is renamed to @file{mysqld_safe}. @item The old C API functions @code{mysql_drop_db}, @code{mysql_create_db} and Loading Loading @@ -46487,6 +46491,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item Changed @code{INSERT INTO .. SELECT} to by default stop on errors. @item Ignore @code{DATA DIRECTORY} and @code{INDEX DIRECTORY} directives on windows. @item Added boolean fulltext search code. It should be considered early alpha.
mysql-test/r/insert_select.result +2 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,8 @@ insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7, create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; insert into t2 (payoutID) SELECT payoutID+10 FROM t1; Duplicate entry '16' for key 1 insert ignore into t2 (payoutID) SELECT payoutID+10 FROM t1; select * from t2; payoutID 1 Loading
mysql-test/t/insert_select.test +2 −0 Original line number Diff line number Diff line Loading @@ -7,7 +7,9 @@ create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLI 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); insert into t2 (payoutID) SELECT DISTINCT payoutID FROM t1; --error 1062 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; # Loading
sql-bench/server-cfg.sh +15 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ sub new $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'vacuum'} = 1; # When using with --fast $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'NEG'} = 1; # Supports -id $limits{'alter_add_multi_col'}= 1; #Have ALTER TABLE t add a int,add b int; Loading Loading @@ -370,6 +371,7 @@ sub new $self->{'limits'} = \%limits; $self->{'double_quotes'} = 0; $self->{'drop_attr'} = ""; $self->{'transactions'} = 0; # No transactions $self->{'blob'} = "text(" . $limits{'max_text_size'} .")"; $self->{'text'} = "text(" . $limits{'max_text_size'} .")"; Loading Loading @@ -565,6 +567,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{"vacuum"} = 1; $limits{'join_optimizer'} = 1; # Can optimize FROM tables $limits{'load_data_infile'} = 0; Loading Loading @@ -854,6 +857,7 @@ sub new $self->{'text'} = "long varchar"; $self->{'double_quotes'} = 1; $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 9999; # Probably big enough $limits{'max_columns'} = 2000; # From crash-me Loading Loading @@ -1095,6 +1099,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 1258; $limits{'max_columns'} = 226; # server is disconnecting???? Loading Loading @@ -1377,6 +1382,7 @@ sub new $self->{'text'} = "long"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{"vacuum"} = 1; $limits{'max_conditions'} = 9999; # (Actually not a limit) Loading Loading @@ -1633,6 +1639,7 @@ sub new $self->{'text'} = "byte in table"; $self->{'double_quotes'} = 0; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{'host'} = $host; $limits{'NEG'} = 1; # Supports -id Loading Loading @@ -1834,6 +1841,7 @@ sub new $self->{'text'} = "blob"; # text ? $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 97; # We get 'Query is too complex' $limits{'max_columns'} = 255; # Max number of columns in table Loading Loading @@ -2010,6 +2018,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 1030; # We get 'Query is too complex' $limits{'max_columns'} = 250; # Max number of columns in table Loading Loading @@ -2197,6 +2206,7 @@ sub new $self->{'text'} = "text"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{"vacuum"} = 1; $limits{'max_conditions'} = 1030; # We get 'Query is too complex' Loading Loading @@ -2389,6 +2399,7 @@ sub new $self->{'text'} = "long"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 50; # (Actually not a limit) $limits{'max_columns'} = 254; # Max number of columns in table Loading Loading @@ -2603,6 +2614,7 @@ sub new $self->{'text'} = "varchar(255)"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $limits{'max_conditions'} = 418; # We get 'Query is too complex' $limits{'max_columns'} = 500; # Max number of columns in table Loading Loading @@ -2772,6 +2784,7 @@ sub new $self->{'text'} = "character varying(15000)"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{'char_null'} = "cast(NULL as char(1))"; $self->{'numeric_null'} = "cast(NULL as int)"; Loading Loading @@ -2972,6 +2985,7 @@ sub new $self->{'text'} = ""; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ""; $self->{'transactions'} = 1; # Transactions enabled $self->{'char_null'} = ""; $self->{'numeric_null'} = ""; Loading Loading @@ -3184,6 +3198,7 @@ sub new $self->{'text'} = "varchar(8000000)"; $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' $self->{'drop_attr'} = ' restrict'; $self->{'transactions'} = 1; # Transactions enabled $self->{'error_on_execute_means_zero_rows'}=1; $limits{'max_conditions'} = 5427; # (Actually not a limit) Loading
sql-bench/test-ATIS.sh +12 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,12 @@ if (!$opt_skip_create) } else { if ($opt_fast && $server->{transactions}) { $dbh->{AutoCommit} = 0; print "Transactions enabled\n" if ($opt_debug); } for ($ti = 0; $ti <= $#table_names; $ti++) { my $table_name = $table_names[$ti]; Loading @@ -128,8 +134,14 @@ if (!$opt_skip_create) $row_count++; } } if ($opt_fast && $server->{transactions}) { $dbh->commit; $dbh->{AutoCommit} = 1; } close(DATA); } if ($opt_lock_tables) { $dbh->do("UNLOCK TABLES"); Loading