diff options
Diffstat (limited to 'mysql-test/r')
271 files changed, 55291 insertions, 7082 deletions
diff --git a/mysql-test/r/alias.result b/mysql-test/r/alias.result index 587c21e9129..6f0315da234 100644 --- a/mysql-test/r/alias.result +++ b/mysql-test/r/alias.result @@ -27,7 +27,7 @@ hdl_name varchar(30) default NULL, prov_hdl_nr int(11) NOT NULL default '0', auto_wirknetz varchar(50) default NULL, auto_billing varchar(50) default NULL, -touch timestamp(14) NOT NULL, +touch timestamp NOT NULL, kategorie varchar(50) default NULL, kundentyp varchar(20) NOT NULL default '', sammel_rech_msisdn varchar(30) NOT NULL default '', @@ -58,6 +58,8 @@ INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05 SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie; Kundentyp kategorie Privat (Private Nutzung) Mobilfunk +Warnings: +Warning 1052 Column 'kundentyp' in group statement is ambiguous drop table t1; CREATE TABLE t1 ( AUFNR varchar(12) NOT NULL default '', diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index b7d47a09bee..9f127181fc2 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -52,9 +52,9 @@ KEY NAME (NAME)); ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null; SHOW FULL COLUMNS FROM t1; Field Type Collation Null Key Default Extra Privileges Comment -GROUP_ID int(10) unsigned NULL PRI 0 # -LANG_ID smallint(5) unsigned NULL PRI 0 # -NAME char(80) latin1_swedish_ci MUL # +GROUP_ID int(10) unsigned NULL NO PRI 0 # +LANG_ID smallint(5) unsigned NULL NO PRI 0 # +NAME char(80) latin1_swedish_ci NO MUL # DROP TABLE t1; create table t1 (n int); insert into t1 values(9),(3),(12),(10); @@ -179,7 +179,7 @@ alter table t1 rename t2; alter table t2 rename t1, add c char(10) comment "no comment"; show columns from t1; Field Type Null Key Default Extra -i int(10) unsigned PRI NULL auto_increment +i int(10) unsigned NO PRI NULL auto_increment c char(10) YES NULL drop table t1; create table t1 (a int, b int); @@ -314,7 +314,7 @@ INSERT INTO t1 VALUES ('localhost','root'),('localhost',''),('games','monty'); SHOW INDEX FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE -t1 0 PRIMARY 2 User A 3 NULL NULL BTREE +t1 0 PRIMARY 2 User A 0 NULL NULL BTREE ALTER TABLE t1 ENABLE KEYS; UNLOCK TABLES; CHECK TABLES t1; @@ -338,7 +338,7 @@ INSERT INTO t1 VALUES ('localhost','root'),('localhost',''); SHOW INDEX FROM t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE -t1 0 PRIMARY 2 User A 2 NULL NULL BTREE +t1 0 PRIMARY 2 User A 0 NULL NULL BTREE t1 1 Host 1 Host A NULL NULL NULL BTREE disabled ALTER TABLE t1 ENABLE KEYS; SHOW INDEX FROM t1; @@ -389,7 +389,7 @@ alter table t1 modify a varchar(10); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(10) NOT NULL default '', + `a` varchar(10) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`) flush tables; @@ -397,7 +397,7 @@ alter table t1 modify a varchar(10) not null; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(10) NOT NULL default '', + `a` varchar(10) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`) drop table if exists t1, t2; @@ -405,17 +405,26 @@ create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, p insert into t1 (a) values(1); show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL +t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL alter table t1 modify a int; show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL +t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL drop table t1; create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM; insert into t1 (a) values(1); +Warnings: +Warning 1364 Field 'b' doesn't have a default value +Warning 1364 Field 'c' doesn't have a default value +Warning 1364 Field 'd' doesn't have a default value +Warning 1364 Field 'e' doesn't have a default value +Warning 1364 Field 'f' doesn't have a default value +Warning 1364 Field 'g' doesn't have a default value +Warning 1364 Field 'h' doesn't have a default value +Warning 1364 Field 'i' doesn't have a default value show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 9 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL +t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL drop table t1; set names koi8r; create table t1 (a char(10) character set koi8r); @@ -501,7 +510,7 @@ ALTER TABLE t1 DROP PRIMARY KEY; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` int(11) default NULL, UNIQUE KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result index 09c606b5a04..a56902e8ae7 100644 --- a/mysql-test/r/analyse.result +++ b/mysql-test/r/analyse.result @@ -36,16 +36,16 @@ create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `Field_name` binary(255) NOT NULL default '', - `Min_value` binary(255) default NULL, - `Max_value` binary(255) default NULL, + `Field_name` varbinary(255) NOT NULL default '', + `Min_value` varbinary(255) default NULL, + `Max_value` varbinary(255) default NULL, `Min_length` bigint(11) NOT NULL default '0', `Max_length` bigint(11) NOT NULL default '0', `Empties_or_zeros` bigint(11) NOT NULL default '0', `Nulls` bigint(11) NOT NULL default '0', - `Avg_value_or_avg_length` binary(255) NOT NULL default '', - `Std` binary(255) default NULL, - `Optimal_fieldtype` binary(64) NOT NULL default '' + `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', + `Std` varbinary(255) default NULL, + `Optimal_fieldtype` varbinary(64) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1 where 0=1 procedure analyse(); Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype @@ -55,16 +55,16 @@ create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `Field_name` binary(255) NOT NULL default '', - `Min_value` binary(255) default NULL, - `Max_value` binary(255) default NULL, + `Field_name` varbinary(255) NOT NULL default '', + `Min_value` varbinary(255) default NULL, + `Max_value` varbinary(255) default NULL, `Min_length` bigint(11) NOT NULL default '0', `Max_length` bigint(11) NOT NULL default '0', `Empties_or_zeros` bigint(11) NOT NULL default '0', `Nulls` bigint(11) NOT NULL default '0', - `Avg_value_or_avg_length` binary(255) NOT NULL default '', - `Std` binary(255) default NULL, - `Optimal_fieldtype` binary(64) NOT NULL default '' + `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', + `Std` varbinary(255) default NULL, + `Optimal_fieldtype` varbinary(64) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype @@ -78,16 +78,16 @@ create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `Field_name` binary(255) NOT NULL default '', - `Min_value` binary(255) default NULL, - `Max_value` binary(255) default NULL, + `Field_name` varbinary(255) NOT NULL default '', + `Min_value` varbinary(255) default NULL, + `Max_value` varbinary(255) default NULL, `Min_length` bigint(11) NOT NULL default '0', `Max_length` bigint(11) NOT NULL default '0', `Empties_or_zeros` bigint(11) NOT NULL default '0', `Nulls` bigint(11) NOT NULL default '0', - `Avg_value_or_avg_length` binary(255) NOT NULL default '', - `Std` binary(255) default NULL, - `Optimal_fieldtype` binary(64) NOT NULL default '' + `Avg_value_or_avg_length` varbinary(255) NOT NULL default '', + `Std` varbinary(255) default NULL, + `Optimal_fieldtype` varbinary(64) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype @@ -102,3 +102,10 @@ select * from t1 procedure analyse(); Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype test.t1.v " \\ 1 19 0 0 3.7619 NULL ENUM('"','""','"c','\'\0\\"','\'','\'\'','\'b','a\0\0\0b','a\0','a""""b','a\'\'\'\'b','abc','abc\'def\\hij"klm\0opq','a\\\\\\\\b','b\'','c"','d\\','The\ZEnd','\\','\\d','\\\\') NOT NULL drop table t1; +create table t1 (df decimal(5,1)); +insert into t1 values(1.1); +insert into t1 values(2.2); +select * from t1 procedure analyse(); +Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype +test.t1.df 1.1 2.2 8 8 0 0 1.650000000 0.302500000 ENUM('1.1','2.2') NOT NULL +drop table t1; diff --git a/mysql-test/r/ansi.result b/mysql-test/r/ansi.result index 212d28f918b..00a526df8ea 100644 --- a/mysql-test/r/ansi.result +++ b/mysql-test/r/ansi.result @@ -2,7 +2,7 @@ drop table if exists t1; set sql_mode="MySQL40"; select @@sql_mode; @@sql_mode -NO_FIELD_OPTIONS,MYSQL40 +NO_FIELD_OPTIONS,MYSQL40,HIGH_NOT_PRECEDENCE set @@sql_mode="ANSI"; select @@sql_mode; @@sql_mode diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 993fe7e4213..54780dbbd22 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -184,6 +184,22 @@ fld1 fld3 250503 heaving 250504 population 250505 bomb +create table t3 engine=archive select * from t2; +select * from t3 where fld3='bonfire'; +auto fld1 companynr fld3 fld4 fld5 fld6 +1191 068504 00 bonfire corresponds positively +select count(*) from t3; +count(*) +1199 +rename table t3 to t4; +Warnings: +Error 7 Error on rename of './test/t3.ARN' to './test/t4.ARN' (Errcode: 2) +select * from t4 where fld3='bonfire'; +auto fld1 companynr fld3 fld4 fld5 fld6 +1191 068504 00 bonfire corresponds positively +select count(*) from t4; +count(*) +1199 INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat',''); INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W'); INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring',''); @@ -2601,18 +2617,3643 @@ auto fld1 companynr fld3 fld4 fld5 fld6 2 011401 37 breaking dreaded Steinberg W 3 011402 37 Romans scholastics jarring 4 011403 37 intercepted audiology tinily -create table t3 engine=archive select * from t2; -select * from t3 where fld3='bonfire'; +INSERT INTO t2 VALUES (2,011401,37,'breaking','dreaded','Steinberg','W'); +INSERT INTO t2 VALUES (3,011402,37,'Romans','scholastics','jarring',''); +INSERT INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); +OPTIMIZE TABLE t2 EXTENDED; +Table Op Msg_type Msg_text +test.t2 optimize status OK +SELECT * FROM t2; auto fld1 companynr fld3 fld4 fld5 fld6 +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +5 011501 37 bewilderingly wallet balled +6 011701 37 astound parters persist W +7 011702 37 admonishing eschew attainments +8 011703 37 sumac quitter fanatic +9 012001 37 flanking neat measures FAS +10 012003 37 combed Steinberg rightfulness +11 012004 37 subjective jarring capably +12 012005 37 scatterbrain tinily impulsive +13 012301 37 Eulerian balled starlet +14 012302 36 dubbed persist terminators +15 012303 37 Kane attainments untying +16 012304 37 overlay fanatic announces FAS +17 012305 37 perturb measures featherweight FAS +18 012306 37 goblins rightfulness pessimist FAS +19 012501 37 annihilates capably daughter +20 012602 37 Wotan impulsive decliner FAS +21 012603 37 snatching starlet lawgiver +22 012604 37 concludes terminators stated +23 012605 37 laterally untying readable +24 012606 37 yelped announces attrition +25 012701 37 grazing featherweight cascade FAS +26 012702 37 Baird pessimist motors FAS +27 012703 37 celery daughter interrogate +28 012704 37 misunderstander decliner pests W +29 013601 37 handgun lawgiver stairway +30 013602 37 foldout stated dopers FAS +31 013603 37 mystic readable testicle W +32 013604 37 succumbed attrition Parsifal W +33 013605 37 Nabisco cascade leavings +34 013606 37 fingerings motors postulation W +35 013607 37 aging interrogate squeaking +36 013608 37 afield pests contrasted +37 013609 37 ammonium stairway leftover +38 013610 37 boat dopers whiteners +39 013801 37 intelligibility testicle erases W +40 013802 37 Augustine Parsifal Punjab W +41 013803 37 teethe leavings Merritt +42 013804 37 dreaded postulation Quixotism +43 013901 37 scholastics squeaking sweetish FAS +44 016001 37 audiology contrasted dogging FAS +45 016201 37 wallet leftover scornfully FAS +46 016202 37 parters whiteners bellow +47 016301 37 eschew erases bills +48 016302 37 quitter Punjab cupboard FAS +49 016303 37 neat Merritt sureties FAS +50 016304 37 Steinberg Quixotism puddings +51 018001 37 jarring sweetish tapestry +52 018002 37 tinily dogging fetters +53 018003 37 balled scornfully bivalves +54 018004 37 persist bellow incurring +55 018005 37 attainments bills Adolph +56 018007 37 fanatic cupboard pithed +57 018008 37 measures sureties emergency +58 018009 37 rightfulness puddings Miles +59 018010 37 capably tapestry trimmings +60 018012 37 impulsive fetters tragedies W +61 018013 37 starlet bivalves skulking W +62 018014 37 terminators incurring flint +63 018015 37 untying Adolph flopping W +64 018016 37 announces pithed relaxing FAS +65 018017 37 featherweight emergency offload FAS +66 018018 37 pessimist Miles suites W +67 018019 37 daughter trimmings lists FAS +68 018020 37 decliner tragedies animized FAS +69 018021 37 lawgiver skulking multilayer W +70 018022 37 stated flint standardizes FAS +71 018023 37 readable flopping Judas +72 018024 37 attrition relaxing vacuuming W +73 018025 37 cascade offload dentally W +74 018026 37 motors suites humanness W +75 018027 37 interrogate lists inch W +76 018028 37 pests animized Weissmuller W +77 018029 37 stairway multilayer irresponsibly W +78 018030 37 dopers standardizes luckily FAS +79 018032 37 testicle Judas culled W +80 018033 37 Parsifal vacuuming medical FAS +81 018034 37 leavings dentally bloodbath FAS +82 018035 37 postulation humanness subschema W +83 018036 37 squeaking inch animals W +84 018037 37 contrasted Weissmuller Micronesia +85 018038 37 leftover irresponsibly repetitions +86 018039 37 whiteners luckily Antares +87 018040 37 erases culled ventilate W +88 018041 37 Punjab medical pityingly +89 018042 37 Merritt bloodbath interdependent +90 018043 37 Quixotism subschema Graves FAS +91 018044 37 sweetish animals neonatal +92 018045 37 dogging Micronesia scribbled FAS +93 018046 37 scornfully repetitions chafe W +94 018048 37 bellow Antares honoring +95 018049 37 bills ventilate realtor +96 018050 37 cupboard pityingly elite +97 018051 37 sureties interdependent funereal +98 018052 37 puddings Graves abrogating +99 018053 50 tapestry neonatal sorters +100 018054 37 fetters scribbled Conley +101 018055 37 bivalves chafe lectured +102 018056 37 incurring honoring Abraham +103 018057 37 Adolph realtor Hawaii W +104 018058 37 pithed elite cage +105 018059 36 emergency funereal hushes +106 018060 37 Miles abrogating Simla +107 018061 37 trimmings sorters reporters +108 018101 37 tragedies Conley Dutchman FAS +109 018102 37 skulking lectured descendants FAS +110 018103 37 flint Abraham groupings FAS +111 018104 37 flopping Hawaii dissociate +112 018201 37 relaxing cage coexist W +113 018202 37 offload hushes Beebe +114 018402 37 suites Simla Taoism +115 018403 37 lists reporters Connally +116 018404 37 animized Dutchman fetched FAS +117 018405 37 multilayer descendants checkpoints FAS +118 018406 37 standardizes groupings rusting +119 018409 37 Judas dissociate galling +120 018601 37 vacuuming coexist obliterates +121 018602 37 dentally Beebe traitor +122 018603 37 humanness Taoism resumes FAS +123 018801 37 inch Connally analyzable FAS +124 018802 37 Weissmuller fetched terminator FAS +125 018803 37 irresponsibly checkpoints gritty FAS +126 018804 37 luckily rusting firearm W +127 018805 37 culled galling minima +128 018806 37 medical obliterates Selfridge +129 018807 37 bloodbath traitor disable +130 018808 37 subschema resumes witchcraft W +131 018809 37 animals analyzable betroth W +132 018810 37 Micronesia terminator Manhattanize +133 018811 37 repetitions gritty imprint +134 018812 37 Antares firearm peeked +135 019101 37 ventilate minima swelling +136 019102 37 pityingly Selfridge interrelationships W +137 019103 37 interdependent disable riser +138 019201 37 Graves witchcraft Gandhian W +139 030501 37 neonatal betroth peacock A +140 030502 50 scribbled Manhattanize bee A +141 030503 37 chafe imprint kanji +142 030504 37 honoring peeked dental +143 031901 37 realtor swelling scarf FAS +144 036001 37 elite interrelationships chasm A +145 036002 37 funereal riser insolence A +146 036004 37 abrogating Gandhian syndicate +147 036005 37 sorters peacock alike +148 038001 37 Conley bee imperial A +149 038002 37 lectured kanji convulsion A +150 038003 37 Abraham dental railway A +151 038004 37 Hawaii scarf validate A +152 038005 37 cage chasm normalizes A +153 038006 37 hushes insolence comprehensive +154 038007 37 Simla syndicate chewing +155 038008 37 reporters alike denizen +156 038009 37 Dutchman imperial schemer +157 038010 37 descendants convulsion chronicle +158 038011 37 groupings railway Kline +159 038012 37 dissociate validate Anatole +160 038013 37 coexist normalizes partridges +161 038014 37 Beebe comprehensive brunch +162 038015 37 Taoism chewing recruited +163 038016 37 Connally denizen dimensions W +164 038017 37 fetched schemer Chicana W +165 038018 37 checkpoints chronicle announced +166 038101 37 rusting Kline praised FAS +167 038102 37 galling Anatole employing +168 038103 37 obliterates partridges linear +169 038104 37 traitor brunch quagmire +170 038201 37 resumes recruited western A +171 038202 37 analyzable dimensions relishing +172 038203 37 terminator Chicana serving A +173 038204 37 gritty announced scheduling +174 038205 37 firearm praised lore +175 038206 37 minima employing eventful +176 038208 37 Selfridge linear arteriole A +177 042801 37 disable quagmire disentangle +178 042802 37 witchcraft western cured A +179 046101 37 betroth relishing Fenton W +180 048001 37 Manhattanize serving avoidable A +181 048002 37 imprint scheduling drains A +182 048003 37 peeked lore detectably FAS +183 048004 37 swelling eventful husky +184 048005 37 interrelationships arteriole impelling +185 048006 37 riser disentangle undoes +186 048007 37 Gandhian cured evened +187 048008 37 peacock Fenton squeezes +188 048101 37 bee avoidable destroyer FAS +189 048102 37 kanji drains rudeness +190 048201 37 dental detectably beaner FAS +191 048202 37 scarf husky boorish +192 048203 37 chasm impelling Everhart +193 048204 37 insolence undoes encompass A +194 048205 37 syndicate evened mushrooms +195 048301 37 alike squeezes Alison A +196 048302 37 imperial destroyer externally FAS +197 048303 37 convulsion rudeness pellagra +198 048304 37 railway beaner cult +199 048305 37 validate boorish creek A +200 048401 37 normalizes Everhart Huffman +201 048402 37 comprehensive encompass Majorca FAS +202 048403 37 chewing mushrooms governing A +203 048404 37 denizen Alison gadfly FAS +204 048405 37 schemer externally reassigned FAS +205 048406 37 chronicle pellagra intentness W +206 048407 37 Kline cult craziness +207 048408 37 Anatole creek psychic +208 048409 37 partridges Huffman squabbled +209 048410 37 brunch Majorca burlesque +210 048411 37 recruited governing capped +211 048412 37 dimensions gadfly extracted A +212 048413 37 Chicana reassigned DiMaggio +213 048601 37 announced intentness exclamation FAS +214 048602 37 praised craziness subdirectory +215 048603 37 employing psychic fangs +216 048604 37 linear squabbled buyer A +217 048801 37 quagmire burlesque pithing A +218 050901 37 western capped transistorizing A +219 051201 37 relishing extracted nonbiodegradable +220 056002 37 serving DiMaggio dislocate +221 056003 37 scheduling exclamation monochromatic FAS +222 056004 37 lore subdirectory batting +223 056102 37 eventful fangs postcondition A +224 056203 37 arteriole buyer catalog FAS +225 056204 37 disentangle pithing Remus +226 058003 37 cured transistorizing devices A +227 058004 37 Fenton nonbiodegradable bike A +228 058005 37 avoidable dislocate qualify +229 058006 37 drains monochromatic detained +230 058007 37 detectably batting commended +231 058101 37 husky postcondition civilize +232 058102 37 impelling catalog Elmhurst +233 058103 37 undoes Remus anesthetizing +234 058105 37 evened devices deaf +235 058111 37 squeezes bike Brigham +236 058112 37 destroyer qualify title +237 058113 37 rudeness detained coarse +238 058114 37 beaner commended combinations +239 058115 37 boorish civilize grayness +240 058116 37 Everhart Elmhurst innumerable FAS +241 058117 37 encompass anesthetizing Caroline A +242 058118 37 mushrooms deaf fatty FAS +243 058119 37 Alison Brigham eastbound +244 058120 37 externally title inexperienced +245 058121 37 pellagra coarse hoarder A +246 058122 37 cult combinations scotch W +247 058123 37 creek grayness passport A +248 058124 37 Huffman innumerable strategic FAS +249 058125 37 Majorca Caroline gated +250 058126 37 governing fatty flog +251 058127 37 gadfly eastbound Pipestone +252 058128 37 reassigned inexperienced Dar +253 058201 37 intentness hoarder Corcoran +254 058202 37 craziness scotch flyers A +255 058303 37 psychic passport competitions W +256 058304 37 squabbled strategic suppliers FAS +257 058602 37 burlesque gated skips +258 058603 37 capped flog institutes +259 058604 37 extracted Pipestone troop A +260 058605 37 DiMaggio Dar connective W +261 058606 37 exclamation Corcoran denies +262 058607 37 subdirectory flyers polka +263 060401 36 fangs competitions observations FAS +264 061701 36 buyer suppliers askers +265 066201 36 pithing skips homeless FAS +266 066501 36 transistorizing institutes Anna +267 068001 36 nonbiodegradable troop subdirectories W +268 068002 36 dislocate connective decaying FAS +269 068005 36 monochromatic denies outwitting W +270 068006 36 batting polka Harpy W +271 068007 36 postcondition observations crazed +272 068008 36 catalog askers suffocate +273 068009 36 Remus homeless provers FAS +274 068010 36 devices Anna technically +275 068011 36 bike subdirectories Franklinizations +276 068202 36 qualify decaying considered +277 068302 36 detained outwitting tinnily +278 068303 36 commended Harpy uninterruptedly +279 068401 36 civilize crazed whistled A +280 068501 36 Elmhurst suffocate automate +281 068502 36 anesthetizing provers gutting W +282 068503 36 deaf technically surreptitious +283 068602 36 Brigham Franklinizations Choctaw +284 068603 36 title considered cooks +285 068701 36 coarse tinnily millivolt FAS +286 068702 36 combinations uninterruptedly counterpoise +287 068703 36 grayness whistled Gothicism +288 076001 36 innumerable automate feminine +289 076002 36 Caroline gutting metaphysically W +290 076101 36 fatty surreptitious sanding A +291 076102 36 eastbound Choctaw contributorily +292 076103 36 inexperienced cooks receivers FAS +293 076302 36 hoarder millivolt adjourn +294 076303 36 scotch counterpoise straggled A +295 076304 36 passport Gothicism druggists +296 076305 36 strategic feminine thanking FAS +297 076306 36 gated metaphysically ostrich +298 076307 36 flog sanding hopelessness FAS +299 076402 36 Pipestone contributorily Eurydice +300 076501 36 Dar receivers excitation W +301 076502 36 Corcoran adjourn presumes FAS +302 076701 36 flyers straggled imaginable FAS +303 078001 36 competitions druggists concoct W +304 078002 36 suppliers thanking peering W +305 078003 36 skips ostrich Phelps FAS +306 078004 36 institutes hopelessness ferociousness FAS +307 078005 36 troop Eurydice sentences +308 078006 36 connective excitation unlocks +309 078007 36 denies presumes engrossing W +310 078008 36 polka imaginable Ruth +311 078101 36 observations concoct tying +312 078103 36 askers peering exclaimers +313 078104 36 homeless Phelps synergy +314 078105 36 Anna ferociousness Huey W +315 082101 36 subdirectories sentences merging +316 083401 36 decaying unlocks judges A +317 084001 36 outwitting engrossing Shylock W +318 084002 36 Harpy Ruth Miltonism +319 086001 36 crazed tying hen W +320 086102 36 suffocate exclaimers honeybee FAS +321 086201 36 provers synergy towers +322 088001 36 technically Huey dilutes W +323 088002 36 Franklinizations merging numerals FAS +324 088003 36 considered judges democracy FAS +325 088004 36 tinnily Shylock Ibero- +326 088101 36 uninterruptedly Miltonism invalids +327 088102 36 whistled hen behavior +328 088103 36 automate honeybee accruing +329 088104 36 gutting towers relics A +330 088105 36 surreptitious dilutes rackets +331 088106 36 Choctaw numerals Fischbein W +332 088201 36 cooks democracy phony W +333 088203 36 millivolt Ibero- cross FAS +334 088204 36 counterpoise invalids cleanup +335 088302 37 Gothicism behavior conspirator +336 088303 37 feminine accruing label FAS +337 088305 37 metaphysically relics university +338 088402 37 sanding rackets cleansed FAS +339 088501 36 contributorily Fischbein ballgown +340 088502 36 receivers phony starlet +341 088503 36 adjourn cross aqueous +342 098001 58 straggled cleanup portrayal A +343 098002 58 druggists conspirator despising W +344 098003 58 thanking label distort W +345 098004 58 ostrich university palmed +346 098005 58 hopelessness cleansed faced +347 098006 58 Eurydice ballgown silverware +348 141903 29 excitation starlet assessor +349 098008 58 presumes aqueous spiders +350 098009 58 imaginable portrayal artificially +351 098010 58 concoct despising reminiscence +352 098011 58 peering distort Mexican +353 098012 58 Phelps palmed obnoxious +354 098013 58 ferociousness faced fragile +355 098014 58 sentences silverware apprehensible +356 098015 58 unlocks assessor births +357 098016 58 engrossing spiders garages +358 098017 58 Ruth artificially panty +359 098018 58 tying reminiscence anteater +360 098019 58 exclaimers Mexican displacement A +361 098020 58 synergy obnoxious drovers A +362 098021 58 Huey fragile patenting A +363 098022 58 merging apprehensible far A +364 098023 58 judges births shrieks +365 098024 58 Shylock garages aligning W +366 098025 37 Miltonism panty pragmatism +367 106001 36 hen anteater fevers W +368 108001 36 honeybee displacement reexamines A +369 108002 36 towers drovers occupancies +370 108003 36 dilutes patenting sweats FAS +371 108004 36 numerals far modulators +372 108005 36 democracy shrieks demand W +373 108007 36 Ibero- aligning Madeira +374 108008 36 invalids pragmatism Viennese W +375 108009 36 behavior fevers chillier W +376 108010 36 accruing reexamines wildcats FAS +377 108011 36 relics occupancies gentle +378 108012 36 rackets sweats Angles W +379 108101 36 Fischbein modulators accuracies +380 108102 36 phony demand toggle +381 108103 36 cross Madeira Mendelssohn W +382 108111 50 cleanup Viennese behaviorally +383 108105 36 conspirator chillier Rochford +384 108106 36 label wildcats mirror W +385 108107 36 university gentle Modula +386 108108 50 cleansed Angles clobbering +387 108109 36 ballgown accuracies chronography +388 108110 36 starlet toggle Eskimoizeds +389 108201 36 aqueous Mendelssohn British W +390 108202 36 portrayal behaviorally pitfalls +391 108203 36 despising Rochford verify W +392 108204 36 distort mirror scatter FAS +393 108205 36 palmed Modula Aztecan +394 108301 36 faced clobbering acuity W +395 108302 36 silverware chronography sinking W +396 112101 36 assessor Eskimoizeds beasts FAS +397 112102 36 spiders British Witt W +398 113701 36 artificially pitfalls physicists FAS +399 116001 36 reminiscence verify folksong A +400 116201 36 Mexican scatter strokes FAS +401 116301 36 obnoxious Aztecan crowder +402 116302 36 fragile acuity merry +403 116601 36 apprehensible sinking cadenced +404 116602 36 births beasts alimony A +405 116603 36 garages Witt principled A +406 116701 36 panty physicists golfing +407 116702 36 anteater folksong undiscovered +408 118001 36 displacement strokes irritates +409 118002 36 drovers crowder patriots A +410 118003 36 patenting merry rooms FAS +411 118004 36 far cadenced towering W +412 118005 36 shrieks alimony displease +413 118006 36 aligning principled photosensitive +414 118007 36 pragmatism golfing inking +415 118008 36 fevers undiscovered gainers +416 118101 36 reexamines irritates leaning A +417 118102 36 occupancies patriots hydrant A +418 118103 36 sweats rooms preserve +419 118202 36 modulators towering blinded A +420 118203 36 demand displease interactions A +421 118204 36 Madeira photosensitive Barry +422 118302 36 Viennese inking whiteness A +423 118304 36 chillier gainers pastimes W +424 118305 36 wildcats leaning Edenization +425 118306 36 gentle hydrant Muscat +426 118307 36 Angles preserve assassinated +427 123101 36 accuracies blinded labeled +428 123102 36 toggle interactions glacial A +429 123301 36 Mendelssohn Barry implied W +430 126001 36 behaviorally whiteness bibliographies W +431 126002 36 Rochford pastimes Buchanan +432 126003 36 mirror Edenization forgivably FAS +433 126101 36 Modula Muscat innuendo A +434 126301 36 clobbering assassinated den FAS +435 126302 36 chronography labeled submarines W +436 126402 36 Eskimoizeds glacial mouthful A +437 126601 36 British implied expiring +438 126602 36 pitfalls bibliographies unfulfilled FAS +439 126702 36 verify Buchanan precession +440 128001 36 scatter forgivably nullified +441 128002 36 Aztecan innuendo affects +442 128003 36 acuity den Cynthia +443 128004 36 sinking submarines Chablis A +444 128005 36 beasts mouthful betterments FAS +445 128007 36 Witt expiring advertising +446 128008 36 physicists unfulfilled rubies A +447 128009 36 folksong precession southwest FAS +448 128010 36 strokes nullified superstitious A +449 128011 36 crowder affects tabernacle W +450 128012 36 merry Cynthia silk A +451 128013 36 cadenced Chablis handsomest A +452 128014 36 alimony betterments Persian A +453 128015 36 principled advertising analog W +454 128016 36 golfing rubies complex W +455 128017 36 undiscovered southwest Taoist +456 128018 36 irritates superstitious suspend +457 128019 36 patriots tabernacle relegated +458 128020 36 rooms silk awesome W +459 128021 36 towering handsomest Bruxelles +460 128022 36 displease Persian imprecisely A +461 128023 36 photosensitive analog televise +462 128101 36 inking complex braking +463 128102 36 gainers Taoist true FAS +464 128103 36 leaning suspend disappointing FAS +465 128104 36 hydrant relegated navally W +466 128106 36 preserve awesome circus +467 128107 36 blinded Bruxelles beetles +468 128108 36 interactions imprecisely trumps +469 128202 36 Barry televise fourscore W +470 128203 36 whiteness braking Blackfoots +471 128301 36 pastimes true Grady +472 128302 36 Edenization disappointing quiets FAS +473 128303 36 Muscat navally floundered FAS +474 128304 36 assassinated circus profundity W +475 128305 36 labeled beetles Garrisonian W +476 128307 36 glacial trumps Strauss +477 128401 36 implied fourscore cemented FAS +478 128502 36 bibliographies Blackfoots contrition A +479 128503 36 Buchanan Grady mutations +480 128504 36 forgivably quiets exhibits W +481 128505 36 innuendo floundered tits +482 128601 36 den profundity mate A +483 128603 36 submarines Garrisonian arches +484 128604 36 mouthful Strauss Moll +485 128702 36 expiring cemented ropers +486 128703 36 unfulfilled contrition bombast +487 128704 36 precession mutations difficultly A +488 138001 36 nullified exhibits adsorption +489 138002 36 affects tits definiteness FAS +490 138003 36 Cynthia mate cultivation A +491 138004 36 Chablis arches heals A +492 138005 36 betterments Moll Heusen W +493 138006 36 advertising ropers target FAS +494 138007 36 rubies bombast cited A +495 138008 36 southwest difficultly congresswoman W +496 138009 36 superstitious adsorption Katherine +497 138102 36 tabernacle definiteness titter A +498 138103 36 silk cultivation aspire A +499 138104 36 handsomest heals Mardis +500 138105 36 Persian Heusen Nadia W +501 138201 36 analog target estimating FAS +502 138302 36 complex cited stuck A +503 138303 36 Taoist congresswoman fifteenth A +504 138304 36 suspend Katherine Colombo +505 138401 29 relegated titter survey A +506 140102 29 awesome aspire staffing +507 140103 29 Bruxelles Mardis obtain +508 140104 29 imprecisely Nadia loaded +509 140105 29 televise estimating slaughtered +510 140201 29 braking stuck lights A +511 140701 29 true fifteenth circumference +512 141501 29 disappointing Colombo dull A +513 141502 29 navally survey weekly A +514 141901 29 circus staffing wetness +515 141902 29 beetles obtain visualized +516 142101 29 trumps loaded Tannenbaum +517 142102 29 fourscore slaughtered moribund +518 142103 29 Blackfoots lights demultiplex +519 142701 29 Grady circumference lockings +520 143001 29 quiets dull thugs FAS +521 143501 29 floundered weekly unnerves +522 143502 29 profundity wetness abut +523 148001 29 Garrisonian visualized Chippewa A +524 148002 29 Strauss Tannenbaum stratifications A +525 148003 29 cemented moribund signaled +526 148004 29 contrition demultiplex Italianizes A +527 148005 29 mutations lockings algorithmic A +528 148006 29 exhibits thugs paranoid FAS +529 148007 29 tits unnerves camping A +530 148009 29 mate abut signifying A +531 148010 29 arches Chippewa Patrice W +532 148011 29 Moll stratifications search A +533 148012 29 ropers signaled Angeles A +534 148013 29 bombast Italianizes semblance +535 148023 36 difficultly algorithmic taxed +536 148015 29 adsorption paranoid Beatrice +537 148016 29 definiteness camping retrace +538 148017 29 cultivation signifying lockout +539 148018 29 heals Patrice grammatic +540 148019 29 Heusen search helmsman +541 148020 29 target Angeles uniform W +542 148021 29 cited semblance hamming +543 148022 29 congresswoman taxed disobedience +544 148101 29 Katherine Beatrice captivated A +545 148102 29 titter retrace transferals A +546 148201 29 aspire lockout cartographer A +547 148401 29 Mardis grammatic aims FAS +548 148402 29 Nadia helmsman Pakistani +549 148501 29 estimating uniform burglarized FAS +550 148502 29 stuck hamming saucepans A +551 148503 29 fifteenth disobedience lacerating A +552 148504 29 Colombo captivated corny +553 148601 29 survey transferals megabytes FAS +554 148602 29 staffing cartographer chancellor +555 150701 29 obtain aims bulk A +556 152101 29 loaded Pakistani commits A +557 152102 29 slaughtered burglarized meson W +558 155202 36 lights saucepans deputies +559 155203 29 circumference lacerating northeaster A +560 155204 29 dull corny dipole +561 155205 29 weekly megabytes machining 0 +562 156001 29 wetness chancellor therefore +563 156002 29 visualized bulk Telefunken +564 156102 29 Tannenbaum commits salvaging +565 156301 29 moribund meson Corinthianizes A +566 156302 29 demultiplex deputies restlessly A +567 156303 29 lockings northeaster bromides +568 156304 29 thugs dipole generalized A +569 156305 29 unnerves machining mishaps +570 156306 29 abut therefore quelling +571 156501 29 Chippewa Telefunken spiritual A +572 158001 29 stratifications salvaging beguiles FAS +573 158002 29 signaled Corinthianizes Trobriand FAS +574 158101 29 Italianizes restlessly fleeing A +575 158102 29 algorithmic bromides Armour A +576 158103 29 paranoid generalized chin A +577 158201 29 camping mishaps provers A +578 158202 29 signifying quelling aeronautic A +579 158203 29 Patrice spiritual voltage W +580 158204 29 search beguiles sash +581 158301 29 Angeles Trobriand anaerobic A +582 158302 29 semblance fleeing simultaneous A +583 158303 29 taxed Armour accumulating A +584 158304 29 Beatrice chin Medusan A +585 158305 29 retrace provers shouted A +586 158306 29 lockout aeronautic freakish +587 158501 29 grammatic voltage index FAS +588 160301 29 helmsman sash commercially +589 166101 50 uniform anaerobic mistiness A +590 166102 50 hamming simultaneous endpoint +591 168001 29 disobedience accumulating straight A +592 168002 29 captivated Medusan flurried +593 168003 29 transferals shouted denotative A +594 168101 29 cartographer freakish coming FAS +595 168102 29 aims index commencements FAS +596 168103 29 Pakistani commercially gentleman +597 168104 29 burglarized mistiness gifted +598 168202 29 saucepans endpoint Shanghais +599 168301 29 lacerating straight sportswriting A +600 168502 29 corny flurried sloping A +601 168503 29 megabytes denotative navies +602 168601 29 chancellor coming leaflet A +603 173001 40 bulk commencements shooter +604 173701 40 commits gentleman Joplin FAS +605 173702 40 meson gifted babies +606 176001 40 deputies Shanghais subdivision FAS +607 176101 40 northeaster sportswriting burstiness W +608 176201 40 dipole sloping belted FAS +609 176401 40 machining navies assails FAS +610 176501 40 therefore leaflet admiring W +611 176601 40 Telefunken shooter swaying 0 +612 176602 40 salvaging Joplin Goldstine FAS +613 176603 40 Corinthianizes babies fitting +614 178001 40 restlessly subdivision Norwalk W +615 178002 40 bromides burstiness weakening W +616 178003 40 generalized belted analogy FAS +617 178004 40 mishaps assails deludes +618 178005 40 quelling admiring cokes +619 178006 40 spiritual swaying Clayton +620 178007 40 beguiles Goldstine exhausts +621 178008 40 Trobriand fitting causality +622 178101 40 fleeing Norwalk sating FAS +623 178102 40 Armour weakening icon +624 178103 40 chin analogy throttles +625 178201 40 provers deludes communicants FAS +626 178202 40 aeronautic cokes dehydrate FAS +627 178301 40 voltage Clayton priceless FAS +628 178302 40 sash exhausts publicly +629 178401 40 anaerobic causality incidentals FAS +630 178402 40 simultaneous sating commonplace +631 178403 40 accumulating icon mumbles +632 178404 40 Medusan throttles furthermore W +633 178501 40 shouted communicants cautioned W +634 186002 37 freakish dehydrate parametrized A +635 186102 37 index priceless registration A +636 186201 40 commercially publicly sadly FAS +637 186202 40 mistiness incidentals positioning +638 186203 40 endpoint commonplace babysitting +639 186302 37 straight mumbles eternal A +640 188007 37 flurried furthermore hoarder +641 188008 37 denotative cautioned congregates +642 188009 37 coming parametrized rains +643 188010 37 commencements registration workers W +644 188011 37 gentleman sadly sags A +645 188012 37 gifted positioning unplug W +646 188013 37 Shanghais babysitting garage A +647 188014 37 sportswriting eternal boulder A +648 188015 37 sloping hoarder hollowly A +649 188016 37 navies congregates specifics +650 188017 37 leaflet rains Teresa +651 188102 37 shooter workers Winsett +652 188103 37 Joplin sags convenient A +653 188202 37 babies unplug buckboards FAS +654 188301 40 subdivision garage amenities +655 188302 40 burstiness boulder resplendent FAS +656 188303 40 belted hollowly priding FAS +657 188401 37 assails specifics configurations +658 188402 37 admiring Teresa untidiness A +659 188503 37 swaying Winsett Brice W +660 188504 37 Goldstine convenient sews FAS +661 188505 37 fitting buckboards participated +662 190701 37 Norwalk amenities Simon FAS +663 190703 50 weakening resplendent certificates +664 191701 37 analogy priding Fitzpatrick +665 191702 37 deludes configurations Evanston A +666 191703 37 cokes untidiness misted +667 196001 37 Clayton Brice textures A +668 196002 37 exhausts sews save +669 196003 37 causality participated count +670 196101 37 sating Simon rightful A +671 196103 37 icon certificates chaperone +672 196104 37 throttles Fitzpatrick Lizzy A +673 196201 37 communicants Evanston clenched A +674 196202 37 dehydrate misted effortlessly +675 196203 37 priceless textures accessed +676 198001 37 publicly save beaters A +677 198003 37 incidentals count Hornblower FAS +678 198004 37 commonplace rightful vests A +679 198005 37 mumbles chaperone indulgences FAS +680 198006 37 furthermore Lizzy infallibly A +681 198007 37 cautioned clenched unwilling FAS +682 198008 37 parametrized effortlessly excrete FAS +683 198009 37 registration accessed spools A +684 198010 37 sadly beaters crunches FAS +685 198011 37 positioning Hornblower overestimating FAS +686 198012 37 babysitting vests ineffective +687 198013 37 eternal indulgences humiliation A +688 198014 37 hoarder infallibly sophomore +689 198015 37 congregates unwilling star +690 198017 37 rains excrete rifles +691 198018 37 workers spools dialysis +692 198019 37 sags crunches arriving +693 198020 37 unplug overestimating indulge +694 198021 37 garage ineffective clockers +695 198022 37 boulder humiliation languages +696 198023 50 hollowly sophomore Antarctica A +697 198024 37 specifics star percentage +698 198101 37 Teresa rifles ceiling A +699 198103 37 Winsett dialysis specification +700 198105 37 convenient arriving regimented A +701 198106 37 buckboards indulge ciphers +702 198201 37 amenities clockers pictures A +703 198204 37 resplendent languages serpents A +704 198301 53 priding Antarctica allot A +705 198302 53 configurations percentage realized A +706 198303 53 untidiness ceiling mayoral A +707 198304 53 Brice specification opaquely A +708 198401 37 sews regimented hostess FAS +709 198402 37 participated ciphers fiftieth +710 198403 37 Simon pictures incorrectly +711 202101 37 certificates serpents decomposition FAS +712 202301 37 Fitzpatrick allot stranglings +713 202302 37 Evanston realized mixture FAS +714 202303 37 misted mayoral electroencephalography FAS +715 202304 37 textures opaquely similarities FAS +716 202305 37 save hostess charges W +717 202601 37 count fiftieth freest FAS +718 202602 37 rightful incorrectly Greenberg FAS +719 202605 37 chaperone decomposition tinting +720 202606 37 Lizzy stranglings expelled W +721 202607 37 clenched mixture warm +722 202901 37 effortlessly electroencephalography smoothed +723 202902 37 accessed similarities deductions FAS +724 202903 37 beaters charges Romano W +725 202904 37 Hornblower freest bitterroot +726 202907 37 vests Greenberg corset +727 202908 37 indulgences tinting securing +728 203101 37 infallibly expelled environing FAS +729 203103 37 unwilling warm cute +730 203104 37 excrete smoothed Crays +731 203105 37 spools deductions heiress FAS +732 203401 37 crunches Romano inform FAS +733 203402 37 overestimating bitterroot avenge +734 203404 37 ineffective corset universals +735 203901 37 humiliation securing Kinsey W +736 203902 37 sophomore environing ravines FAS +737 203903 37 star cute bestseller +738 203906 37 rifles Crays equilibrium +739 203907 37 dialysis heiress extents 0 +740 203908 37 arriving inform relatively +741 203909 37 indulge avenge pressure FAS +742 206101 37 clockers universals critiques FAS +743 206201 37 languages Kinsey befouled +744 206202 37 Antarctica ravines rightfully FAS +745 206203 37 percentage bestseller mechanizing FAS +746 206206 37 ceiling equilibrium Latinizes +747 206207 37 specification extents timesharing +748 206208 37 regimented relatively Aden +749 208001 37 ciphers pressure embassies +750 208002 37 pictures critiques males FAS +751 208003 37 serpents befouled shapelessly FAS +752 208004 37 allot rightfully genres FAS +753 208008 37 realized mechanizing mastering +754 208009 37 mayoral Latinizes Newtonian +755 208010 37 opaquely timesharing finishers FAS +756 208011 37 hostess Aden abates +757 208101 37 fiftieth embassies teem +758 208102 37 incorrectly males kiting FAS +759 208103 37 decomposition shapelessly stodgy FAS +760 208104 37 stranglings genres scalps FAS +761 208105 37 mixture mastering feed FAS +762 208110 37 electroencephalography Newtonian guitars +763 208111 37 similarities finishers airships +764 208112 37 charges abates store +765 208113 37 freest teem denounces +766 208201 37 Greenberg kiting Pyle FAS +767 208203 37 tinting stodgy Saxony +768 208301 37 expelled scalps serializations FAS +769 208302 37 warm feed Peruvian FAS +770 208305 37 smoothed guitars taxonomically FAS +771 208401 37 deductions airships kingdom A +772 208402 37 Romano store stint A +773 208403 37 bitterroot denounces Sault A +774 208404 37 corset Pyle faithful +775 208501 37 securing Saxony Ganymede FAS +776 208502 37 environing serializations tidiness FAS +777 208503 37 cute Peruvian gainful FAS +778 208504 37 Crays taxonomically contrary FAS +779 208505 37 heiress kingdom Tipperary FAS +780 210101 37 inform stint tropics W +781 210102 37 avenge Sault theorizers +782 210103 37 universals faithful renew 0 +783 210104 37 Kinsey Ganymede already +784 210105 37 ravines tidiness terminal +785 210106 37 bestseller gainful Hegelian +786 210107 37 equilibrium contrary hypothesizer +787 210401 37 extents Tipperary warningly FAS +788 213201 37 relatively tropics journalizing FAS +789 213203 37 pressure theorizers nested +790 213204 37 critiques renew Lars +791 213205 37 befouled already saplings +792 213206 37 rightfully terminal foothill +793 213207 37 mechanizing Hegelian labeled +794 216101 37 Latinizes hypothesizer imperiously FAS +795 216103 37 timesharing warningly reporters FAS +796 218001 37 Aden journalizing furnishings FAS +797 218002 37 embassies nested precipitable FAS +798 218003 37 males Lars discounts FAS +799 218004 37 shapelessly saplings excises FAS +800 143503 50 genres foothill Stalin +801 218006 37 mastering labeled despot FAS +802 218007 37 Newtonian imperiously ripeness FAS +803 218008 37 finishers reporters Arabia +804 218009 37 abates furnishings unruly +805 218010 37 teem precipitable mournfulness +806 218011 37 kiting discounts boom FAS +807 218020 37 stodgy excises slaughter A +808 218021 50 scalps Stalin Sabine +809 218022 37 feed despot handy FAS +810 218023 37 guitars ripeness rural +811 218024 37 airships Arabia organizer +812 218101 37 store unruly shipyard FAS +813 218102 37 denounces mournfulness civics FAS +814 218103 37 Pyle boom inaccuracy FAS +815 218201 37 Saxony slaughter rules FAS +816 218202 37 serializations Sabine juveniles FAS +817 218203 37 Peruvian handy comprised W +818 218204 37 taxonomically rural investigations +819 218205 37 kingdom organizer stabilizes A +820 218301 37 stint shipyard seminaries FAS +821 218302 37 Sault civics Hunter A +822 218401 37 faithful inaccuracy sporty FAS +823 218402 37 Ganymede rules test FAS +824 218403 37 tidiness juveniles weasels +825 218404 37 gainful comprised CERN +826 218407 37 contrary investigations tempering +827 218408 37 Tipperary stabilizes afore FAS +828 218409 37 tropics seminaries Galatean +829 218410 37 theorizers Hunter techniques W +830 226001 37 renew sporty error +831 226002 37 already test veranda +832 226003 37 terminal weasels severely +833 226004 37 Hegelian CERN Cassites FAS +834 226005 37 hypothesizer tempering forthcoming +835 226006 37 warningly afore guides +836 226007 37 journalizing Galatean vanish FAS +837 226008 37 nested techniques lied A +838 226203 37 Lars error sawtooth FAS +839 226204 37 saplings veranda fated FAS +840 226205 37 foothill severely gradually +841 226206 37 labeled Cassites widens +842 226207 37 imperiously forthcoming preclude +843 226208 37 reporters guides Jobrel +844 226209 37 furnishings vanish hooker +845 226210 37 precipitable lied rainstorm +846 226211 37 discounts sawtooth disconnects +847 228001 37 excises fated cruelty +848 228004 37 Stalin gradually exponentials A +849 228005 37 despot widens affective A +850 228006 37 ripeness preclude arteries +851 228007 37 Arabia Jobrel Crosby FAS +852 228008 37 unruly hooker acquaint +853 228009 37 mournfulness rainstorm evenhandedly +854 228101 37 boom disconnects percentage +855 228108 37 slaughter cruelty disobedience +856 228109 37 Sabine exponentials humility +857 228110 37 handy affective gleaning A +858 228111 37 rural arteries petted A +859 228112 37 organizer Crosby bloater A +860 228113 37 shipyard acquaint minion A +861 228114 37 civics evenhandedly marginal A +862 228115 37 inaccuracy percentage apiary A +863 228116 37 rules disobedience measures +864 228117 37 juveniles humility precaution +865 228118 37 comprised gleaning repelled +866 228119 37 investigations petted primary FAS +867 228120 37 stabilizes bloater coverings +868 228121 37 seminaries minion Artemia A +869 228122 37 Hunter marginal navigate +870 228201 37 sporty apiary spatial +871 228206 37 test measures Gurkha +872 228207 37 weasels precaution meanwhile A +873 228208 37 CERN repelled Melinda A +874 228209 37 tempering primary Butterfield +875 228210 37 afore coverings Aldrich A +876 228211 37 Galatean Artemia previewing A +877 228212 37 techniques navigate glut A +878 228213 37 error spatial unaffected +879 228214 37 veranda Gurkha inmate +880 228301 37 severely meanwhile mineral +881 228305 37 Cassites Melinda impending A +882 228306 37 forthcoming Butterfield meditation A +883 228307 37 guides Aldrich ideas +884 228308 37 vanish previewing miniaturizes W +885 228309 37 lied glut lewdly +886 228310 37 sawtooth unaffected title +887 228311 37 fated inmate youthfulness +888 228312 37 gradually mineral creak FAS +889 228313 37 widens impending Chippewa +890 228314 37 preclude meditation clamored +891 228401 65 Jobrel ideas freezes +892 228402 65 hooker miniaturizes forgivably FAS +893 228403 65 rainstorm lewdly reduce FAS +894 228404 65 disconnects title McGovern W +895 228405 65 cruelty youthfulness Nazis W +896 228406 65 exponentials creak epistle W +897 228407 65 affective Chippewa socializes W +898 228408 65 arteries clamored conceptions +899 228409 65 Crosby freezes Kevin +900 228410 65 acquaint forgivably uncovering +901 230301 37 evenhandedly reduce chews FAS +902 230302 37 percentage McGovern appendixes FAS +903 230303 37 disobedience Nazis raining +904 018062 37 humility epistle infest +905 230501 37 gleaning socializes compartment +906 230502 37 petted conceptions minting +907 230503 37 bloater Kevin ducks +908 230504 37 minion uncovering roped A +909 230505 37 marginal chews waltz +910 230506 37 apiary appendixes Lillian +911 230507 37 measures raining repressions A +912 230508 37 precaution infest chillingly +913 230509 37 repelled compartment noncritical +914 230901 37 primary minting lithograph +915 230902 37 coverings ducks spongers +916 230903 37 Artemia roped parenthood +917 230904 37 navigate waltz posed +918 230905 37 spatial Lillian instruments +919 230906 37 Gurkha repressions filial +920 230907 37 meanwhile chillingly fixedly +921 230908 37 Melinda noncritical relives +922 230909 37 Butterfield lithograph Pandora +923 230910 37 Aldrich spongers watering A +924 230911 37 previewing parenthood ungrateful +925 230912 37 glut posed secures +926 230913 37 unaffected instruments chastisers +927 230914 37 inmate filial icon +928 231304 37 mineral fixedly reuniting A +929 231305 37 impending relives imagining A +930 231306 37 meditation Pandora abiding A +931 231307 37 ideas watering omnisciently +932 231308 37 miniaturizes ungrateful Britannic +933 231309 37 lewdly secures scholastics A +934 231310 37 title chastisers mechanics A +935 231311 37 youthfulness icon humidly A +936 231312 37 creak reuniting masterpiece +937 231313 37 Chippewa imagining however +938 231314 37 clamored abiding Mendelian +939 231315 37 freezes omnisciently jarred +940 232102 37 forgivably Britannic scolds +941 232103 37 reduce scholastics infatuate +942 232104 37 McGovern mechanics willed A +943 232105 37 Nazis humidly joyfully +944 232106 37 epistle masterpiece Microsoft +945 232107 37 socializes however fibrosities +946 232108 37 conceptions Mendelian Baltimorean +947 232601 37 Kevin jarred equestrian +948 232602 37 uncovering scolds Goodrich +949 232603 37 chews infatuate apish A +950 232605 37 appendixes willed Adlerian +5950 1232605 37 appendixes willed Adlerian +5951 1232606 37 appendixes willed Adlerian +5952 1232607 37 appendixes willed Adlerian +5953 1232608 37 appendixes willed Adlerian +5954 1232609 37 appendixes willed Adlerian +951 232606 37 raining joyfully Tropez +952 232607 37 infest Microsoft nouns +953 232608 37 compartment fibrosities distracting +954 232609 37 minting Baltimorean mutton +955 236104 37 ducks equestrian bridgeable A +956 236105 37 roped Goodrich stickers A +957 236106 37 waltz apish transcontinental A +958 236107 37 Lillian Adlerian amateurish +959 236108 37 repressions Tropez Gandhian +960 236109 37 chillingly nouns stratified +961 236110 37 noncritical distracting chamberlains +962 236111 37 lithograph mutton creditably +963 236112 37 spongers bridgeable philosophic +964 236113 37 parenthood stickers ores +965 238005 37 posed transcontinental Carleton +966 238006 37 instruments amateurish tape A +967 238007 37 filial Gandhian afloat A +968 238008 37 fixedly stratified goodness A +969 238009 37 relives chamberlains welcoming +970 238010 37 Pandora creditably Pinsky FAS +971 238011 37 watering philosophic halting +972 238012 37 ungrateful ores bibliography +973 238013 37 secures Carleton decoding +974 240401 41 chastisers tape variance A +975 240402 41 icon afloat allowed A +976 240901 41 reuniting goodness dire A +977 240902 41 imagining welcoming dub A +978 241801 41 abiding Pinsky poisoning +979 242101 41 omnisciently halting Iraqis A +980 242102 41 Britannic bibliography heaving +981 242201 41 scholastics decoding population A +982 242202 41 mechanics variance bomb A +983 242501 41 humidly allowed Majorca A +984 242502 41 masterpiece dire Gershwins +985 246201 41 however dub explorers +986 246202 41 Mendelian poisoning libretto A +987 246203 41 jarred Iraqis occurred +988 246204 41 scolds heaving Lagos +989 246205 41 infatuate population rats +990 246301 41 willed bomb bankruptcies A +991 246302 41 joyfully Majorca crying +992 248001 41 Microsoft Gershwins unexpected +993 248002 41 fibrosities explorers accessed A +994 248003 41 Baltimorean libretto colorful A +995 248004 41 equestrian occurred versatility A +996 248005 41 Goodrich Lagos cosy +997 248006 41 apish rats Darius A +998 248007 41 Adlerian bankruptcies mastering A +999 248008 41 Tropez crying Asiaticizations A +1000 248009 41 nouns unexpected offerers A +1001 248010 41 distracting accessed uncles A +1002 248011 41 mutton colorful sleepwalk +1003 248012 41 bridgeable versatility Ernestine +1004 248013 41 stickers cosy checksumming +1005 248014 41 transcontinental Darius stopped +1006 248015 41 amateurish mastering sicker +1007 248016 41 Gandhian Asiaticizations Italianization +1008 248017 41 stratified offerers alphabetic +1009 248018 41 chamberlains uncles pharmaceutic +1010 248019 41 creditably sleepwalk creator +1011 248020 41 philosophic Ernestine chess +1012 248021 41 ores checksumming charcoal +1013 248101 41 Carleton stopped Epiphany A +1014 248102 41 tape sicker bulldozes A +1015 248201 41 afloat Italianization Pygmalion A +1016 248202 41 goodness alphabetic caressing A +1017 248203 41 welcoming pharmaceutic Palestine A +1018 248204 41 Pinsky creator regimented A +1019 248205 41 halting chess scars A +1020 248206 41 bibliography charcoal realest A +1021 248207 41 decoding Epiphany diffusing A +1022 248208 41 variance bulldozes clubroom A +1023 248209 41 allowed Pygmalion Blythe A +1024 248210 41 dire caressing ahead +1025 248211 50 dub Palestine reviver +1026 250501 34 poisoning regimented retransmitting A +1027 250502 34 Iraqis scars landslide +1028 250503 34 heaving realest Eiffel +1029 250504 34 population diffusing absentee +1030 250505 34 bomb clubroom aye +1031 250601 34 Majorca Blythe forked A +1032 250602 34 Gershwins ahead Peruvianizes +1033 250603 34 explorers reviver clerked +1034 250604 34 libretto retransmitting tutor +1035 250605 34 occurred landslide boulevard +1036 251001 34 Lagos Eiffel shuttered +1037 251002 34 rats absentee quotes A +1038 251003 34 bankruptcies aye Caltech +1039 251004 34 crying forked Mossberg +1040 251005 34 unexpected Peruvianizes kept +1041 251301 34 accessed clerked roundly +1042 251302 34 colorful tutor features A +1043 251303 34 versatility boulevard imaginable A +1044 251304 34 cosy shuttered controller +1045 251305 34 Darius quotes racial +1046 251401 34 mastering Caltech uprisings A +1047 251402 34 Asiaticizations Mossberg narrowed A +1048 251403 34 offerers kept cannot A +1049 251404 34 uncles roundly vest +1050 251405 34 sleepwalk features famine +1051 251406 34 Ernestine imaginable sugars +1052 251801 34 checksumming controller exterminated A +1053 251802 34 stopped racial belays +1054 252101 34 sicker uprisings Hodges A +1055 252102 34 Italianization narrowed translatable +1056 252301 34 alphabetic cannot duality A +1057 252302 34 pharmaceutic vest recording A +1058 252303 34 creator famine rouses A +1059 252304 34 chess sugars poison +1060 252305 34 charcoal exterminated attitude +1061 252306 34 Epiphany belays dusted +1062 252307 34 bulldozes Hodges encompasses +1063 252308 34 Pygmalion translatable presentation +1064 252309 34 caressing duality Kantian +1065 256001 34 Palestine recording imprecision A +1066 256002 34 regimented rouses saving +1067 256003 34 scars poison maternal +1068 256004 34 realest attitude hewed +1069 256005 34 diffusing dusted kerosene +1070 258001 34 clubroom encompasses Cubans +1071 258002 34 Blythe presentation photographers +1072 258003 34 ahead Kantian nymph A +1073 258004 34 reviver imprecision bedlam A +1074 258005 34 retransmitting saving north A +1075 258006 34 landslide maternal Schoenberg A +1076 258007 34 Eiffel hewed botany A +1077 258008 34 absentee kerosene curs +1078 258009 34 aye Cubans solidification +1079 258010 34 forked photographers inheritresses +1080 258011 34 Peruvianizes nymph stiller +1081 258101 68 clerked bedlam t1 A +1082 258102 68 tutor north suite A +1083 258103 34 boulevard Schoenberg ransomer +1084 258104 68 shuttered botany Willy +1085 258105 68 quotes curs Rena A +1086 258106 68 Caltech solidification Seattle A +1087 258107 68 Mossberg inheritresses relaxes A +1088 258108 68 kept stiller exclaim +1089 258109 68 roundly t1 implicated A +1090 258110 68 features suite distinguish +1091 258111 68 imaginable ransomer assayed +1092 258112 68 controller Willy homeowner +1093 258113 68 racial Rena and +1094 258201 34 uprisings Seattle stealth +1095 258202 34 narrowed relaxes coinciding A +1096 258203 34 cannot exclaim founder A +1097 258204 34 vest implicated environing +1098 258205 34 famine distinguish jewelry +1099 258301 34 sugars assayed lemons A +1100 258401 34 exterminated homeowner brokenness A +1101 258402 34 belays and bedpost A +1102 258403 34 Hodges stealth assurers A +1103 258404 34 translatable coinciding annoyers +1104 258405 34 duality founder affixed +1105 258406 34 recording environing warbling +1106 258407 34 rouses jewelry seriously +1107 228123 37 poison lemons boasted +1108 250606 34 attitude brokenness Chantilly +1109 208405 37 dusted bedpost Iranizes +1110 212101 37 encompasses assurers violinist +1111 218206 37 presentation annoyers extramarital +1112 150401 37 Kantian affixed spates +1113 248212 41 imprecision warbling cloakroom +1114 128026 00 saving seriously gazer +1115 128024 00 maternal boasted hand +1116 128027 00 hewed Chantilly tucked +1117 128025 00 kerosene Iranizes gems +1118 128109 00 Cubans violinist clinker +1119 128705 00 photographers extramarital refiner +1120 126303 00 nymph spates callus +1121 128308 00 bedlam cloakroom leopards +1122 128204 00 north gazer comfortingly +1123 128205 00 Schoenberg hand generically +1124 128206 00 botany tucked getters +1125 128207 00 curs gems sexually +1126 118205 00 solidification clinker spear +1127 116801 00 inheritresses refiner serums +1128 116803 00 stiller callus Italianization +1129 116804 00 t1 leopards attendants +1130 116802 00 suite comfortingly spies +1131 128605 00 ransomer generically Anthony +1132 118308 00 Willy getters planar +1133 113702 00 Rena sexually cupped +1134 113703 00 Seattle spear cleanser +1135 112103 00 relaxes serums commuters +1136 118009 00 exclaim Italianization honeysuckle +5136 1118009 00 exclaim Italianization honeysuckle +1137 138011 00 implicated attendants orphanage +1138 138010 00 distinguish spies skies +1139 138012 00 assayed Anthony crushers +1140 068304 00 homeowner planar Puritan +1141 078009 00 and cupped squeezer +1142 108013 00 stealth cleanser bruises +1143 084004 00 coinciding commuters bonfire +1144 083402 00 founder honeysuckle Colombo +1145 084003 00 environing orphanage nondecreasing +1146 088504 00 jewelry skies innocents +1147 088005 00 lemons crushers masked +1148 088007 00 brokenness Puritan file +1149 088006 00 bedpost squeezer brush +1150 148025 00 assurers bruises mutilate +1151 148024 00 annoyers bonfire mommy +1152 138305 00 affixed Colombo bulkheads +1153 138306 00 warbling nondecreasing undeclared +1154 152701 00 seriously innocents displacements +1155 148505 00 boasted masked nieces +1156 158003 00 Chantilly file coeducation +1157 156201 00 Iranizes brush brassy +1158 156202 00 violinist mutilate authenticator +1159 158307 00 extramarital mommy Washoe +1160 158402 00 spates bulkheads penny +1161 158401 00 cloakroom undeclared Flagler +1162 068013 00 gazer displacements stoned +1163 068012 00 hand nieces cranes +1164 068203 00 tucked coeducation masterful +1165 088205 00 gems brassy biracial +1166 068704 00 clinker authenticator steamships +1167 068604 00 refiner Washoe windmills +1168 158502 00 callus penny exploit +1169 123103 00 leopards Flagler riverfront +1170 148026 00 comfortingly stoned sisterly +1171 123302 00 generically cranes sharpshoot +1172 076503 00 getters masterful mittens +1173 126304 00 sexually biracial interdependency +1174 068306 00 spear steamships policy +1175 143504 00 serums windmills unleashing +1176 160201 00 Italianization exploit pretenders +1177 148028 00 attendants riverfront overstatements +1178 148027 00 spies sisterly birthed +1179 143505 00 Anthony sharpshoot opportunism +1180 108014 00 planar mittens showroom +1181 076104 00 cupped interdependency compromisingly +1182 078106 00 cleanser policy Medicare +1183 126102 00 commuters unleashing corresponds +1184 128029 00 honeysuckle pretenders hardware +1185 128028 00 orphanage overstatements implant +1186 018410 00 skies birthed Alicia +1187 128110 00 crushers opportunism requesting +1188 148506 00 Puritan showroom produced +1189 123303 00 squeezer compromisingly criticizes +1190 123304 00 bruises Medicare backer 1191 068504 00 bonfire corresponds positively -select count(*) from t3; -count(*) -1203 -rename table t3 to t4; -select * from t4 where fld3='bonfire'; +1192 068305 00 Colombo hardware colicky +1193 000000 00 nondecreasing implant thrillingly +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +REPAIR TABLE t2; +Table Op Msg_type Msg_text +test.t2 repair status OK +SELECT * FROM t2; +auto fld1 companynr fld3 fld4 fld5 fld6 +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +5 011501 37 bewilderingly wallet balled +6 011701 37 astound parters persist W +7 011702 37 admonishing eschew attainments +8 011703 37 sumac quitter fanatic +9 012001 37 flanking neat measures FAS +10 012003 37 combed Steinberg rightfulness +11 012004 37 subjective jarring capably +12 012005 37 scatterbrain tinily impulsive +13 012301 37 Eulerian balled starlet +14 012302 36 dubbed persist terminators +15 012303 37 Kane attainments untying +16 012304 37 overlay fanatic announces FAS +17 012305 37 perturb measures featherweight FAS +18 012306 37 goblins rightfulness pessimist FAS +19 012501 37 annihilates capably daughter +20 012602 37 Wotan impulsive decliner FAS +21 012603 37 snatching starlet lawgiver +22 012604 37 concludes terminators stated +23 012605 37 laterally untying readable +24 012606 37 yelped announces attrition +25 012701 37 grazing featherweight cascade FAS +26 012702 37 Baird pessimist motors FAS +27 012703 37 celery daughter interrogate +28 012704 37 misunderstander decliner pests W +29 013601 37 handgun lawgiver stairway +30 013602 37 foldout stated dopers FAS +31 013603 37 mystic readable testicle W +32 013604 37 succumbed attrition Parsifal W +33 013605 37 Nabisco cascade leavings +34 013606 37 fingerings motors postulation W +35 013607 37 aging interrogate squeaking +36 013608 37 afield pests contrasted +37 013609 37 ammonium stairway leftover +38 013610 37 boat dopers whiteners +39 013801 37 intelligibility testicle erases W +40 013802 37 Augustine Parsifal Punjab W +41 013803 37 teethe leavings Merritt +42 013804 37 dreaded postulation Quixotism +43 013901 37 scholastics squeaking sweetish FAS +44 016001 37 audiology contrasted dogging FAS +45 016201 37 wallet leftover scornfully FAS +46 016202 37 parters whiteners bellow +47 016301 37 eschew erases bills +48 016302 37 quitter Punjab cupboard FAS +49 016303 37 neat Merritt sureties FAS +50 016304 37 Steinberg Quixotism puddings +51 018001 37 jarring sweetish tapestry +52 018002 37 tinily dogging fetters +53 018003 37 balled scornfully bivalves +54 018004 37 persist bellow incurring +55 018005 37 attainments bills Adolph +56 018007 37 fanatic cupboard pithed +57 018008 37 measures sureties emergency +58 018009 37 rightfulness puddings Miles +59 018010 37 capably tapestry trimmings +60 018012 37 impulsive fetters tragedies W +61 018013 37 starlet bivalves skulking W +62 018014 37 terminators incurring flint +63 018015 37 untying Adolph flopping W +64 018016 37 announces pithed relaxing FAS +65 018017 37 featherweight emergency offload FAS +66 018018 37 pessimist Miles suites W +67 018019 37 daughter trimmings lists FAS +68 018020 37 decliner tragedies animized FAS +69 018021 37 lawgiver skulking multilayer W +70 018022 37 stated flint standardizes FAS +71 018023 37 readable flopping Judas +72 018024 37 attrition relaxing vacuuming W +73 018025 37 cascade offload dentally W +74 018026 37 motors suites humanness W +75 018027 37 interrogate lists inch W +76 018028 37 pests animized Weissmuller W +77 018029 37 stairway multilayer irresponsibly W +78 018030 37 dopers standardizes luckily FAS +79 018032 37 testicle Judas culled W +80 018033 37 Parsifal vacuuming medical FAS +81 018034 37 leavings dentally bloodbath FAS +82 018035 37 postulation humanness subschema W +83 018036 37 squeaking inch animals W +84 018037 37 contrasted Weissmuller Micronesia +85 018038 37 leftover irresponsibly repetitions +86 018039 37 whiteners luckily Antares +87 018040 37 erases culled ventilate W +88 018041 37 Punjab medical pityingly +89 018042 37 Merritt bloodbath interdependent +90 018043 37 Quixotism subschema Graves FAS +91 018044 37 sweetish animals neonatal +92 018045 37 dogging Micronesia scribbled FAS +93 018046 37 scornfully repetitions chafe W +94 018048 37 bellow Antares honoring +95 018049 37 bills ventilate realtor +96 018050 37 cupboard pityingly elite +97 018051 37 sureties interdependent funereal +98 018052 37 puddings Graves abrogating +99 018053 50 tapestry neonatal sorters +100 018054 37 fetters scribbled Conley +101 018055 37 bivalves chafe lectured +102 018056 37 incurring honoring Abraham +103 018057 37 Adolph realtor Hawaii W +104 018058 37 pithed elite cage +105 018059 36 emergency funereal hushes +106 018060 37 Miles abrogating Simla +107 018061 37 trimmings sorters reporters +108 018101 37 tragedies Conley Dutchman FAS +109 018102 37 skulking lectured descendants FAS +110 018103 37 flint Abraham groupings FAS +111 018104 37 flopping Hawaii dissociate +112 018201 37 relaxing cage coexist W +113 018202 37 offload hushes Beebe +114 018402 37 suites Simla Taoism +115 018403 37 lists reporters Connally +116 018404 37 animized Dutchman fetched FAS +117 018405 37 multilayer descendants checkpoints FAS +118 018406 37 standardizes groupings rusting +119 018409 37 Judas dissociate galling +120 018601 37 vacuuming coexist obliterates +121 018602 37 dentally Beebe traitor +122 018603 37 humanness Taoism resumes FAS +123 018801 37 inch Connally analyzable FAS +124 018802 37 Weissmuller fetched terminator FAS +125 018803 37 irresponsibly checkpoints gritty FAS +126 018804 37 luckily rusting firearm W +127 018805 37 culled galling minima +128 018806 37 medical obliterates Selfridge +129 018807 37 bloodbath traitor disable +130 018808 37 subschema resumes witchcraft W +131 018809 37 animals analyzable betroth W +132 018810 37 Micronesia terminator Manhattanize +133 018811 37 repetitions gritty imprint +134 018812 37 Antares firearm peeked +135 019101 37 ventilate minima swelling +136 019102 37 pityingly Selfridge interrelationships W +137 019103 37 interdependent disable riser +138 019201 37 Graves witchcraft Gandhian W +139 030501 37 neonatal betroth peacock A +140 030502 50 scribbled Manhattanize bee A +141 030503 37 chafe imprint kanji +142 030504 37 honoring peeked dental +143 031901 37 realtor swelling scarf FAS +144 036001 37 elite interrelationships chasm A +145 036002 37 funereal riser insolence A +146 036004 37 abrogating Gandhian syndicate +147 036005 37 sorters peacock alike +148 038001 37 Conley bee imperial A +149 038002 37 lectured kanji convulsion A +150 038003 37 Abraham dental railway A +151 038004 37 Hawaii scarf validate A +152 038005 37 cage chasm normalizes A +153 038006 37 hushes insolence comprehensive +154 038007 37 Simla syndicate chewing +155 038008 37 reporters alike denizen +156 038009 37 Dutchman imperial schemer +157 038010 37 descendants convulsion chronicle +158 038011 37 groupings railway Kline +159 038012 37 dissociate validate Anatole +160 038013 37 coexist normalizes partridges +161 038014 37 Beebe comprehensive brunch +162 038015 37 Taoism chewing recruited +163 038016 37 Connally denizen dimensions W +164 038017 37 fetched schemer Chicana W +165 038018 37 checkpoints chronicle announced +166 038101 37 rusting Kline praised FAS +167 038102 37 galling Anatole employing +168 038103 37 obliterates partridges linear +169 038104 37 traitor brunch quagmire +170 038201 37 resumes recruited western A +171 038202 37 analyzable dimensions relishing +172 038203 37 terminator Chicana serving A +173 038204 37 gritty announced scheduling +174 038205 37 firearm praised lore +175 038206 37 minima employing eventful +176 038208 37 Selfridge linear arteriole A +177 042801 37 disable quagmire disentangle +178 042802 37 witchcraft western cured A +179 046101 37 betroth relishing Fenton W +180 048001 37 Manhattanize serving avoidable A +181 048002 37 imprint scheduling drains A +182 048003 37 peeked lore detectably FAS +183 048004 37 swelling eventful husky +184 048005 37 interrelationships arteriole impelling +185 048006 37 riser disentangle undoes +186 048007 37 Gandhian cured evened +187 048008 37 peacock Fenton squeezes +188 048101 37 bee avoidable destroyer FAS +189 048102 37 kanji drains rudeness +190 048201 37 dental detectably beaner FAS +191 048202 37 scarf husky boorish +192 048203 37 chasm impelling Everhart +193 048204 37 insolence undoes encompass A +194 048205 37 syndicate evened mushrooms +195 048301 37 alike squeezes Alison A +196 048302 37 imperial destroyer externally FAS +197 048303 37 convulsion rudeness pellagra +198 048304 37 railway beaner cult +199 048305 37 validate boorish creek A +200 048401 37 normalizes Everhart Huffman +201 048402 37 comprehensive encompass Majorca FAS +202 048403 37 chewing mushrooms governing A +203 048404 37 denizen Alison gadfly FAS +204 048405 37 schemer externally reassigned FAS +205 048406 37 chronicle pellagra intentness W +206 048407 37 Kline cult craziness +207 048408 37 Anatole creek psychic +208 048409 37 partridges Huffman squabbled +209 048410 37 brunch Majorca burlesque +210 048411 37 recruited governing capped +211 048412 37 dimensions gadfly extracted A +212 048413 37 Chicana reassigned DiMaggio +213 048601 37 announced intentness exclamation FAS +214 048602 37 praised craziness subdirectory +215 048603 37 employing psychic fangs +216 048604 37 linear squabbled buyer A +217 048801 37 quagmire burlesque pithing A +218 050901 37 western capped transistorizing A +219 051201 37 relishing extracted nonbiodegradable +220 056002 37 serving DiMaggio dislocate +221 056003 37 scheduling exclamation monochromatic FAS +222 056004 37 lore subdirectory batting +223 056102 37 eventful fangs postcondition A +224 056203 37 arteriole buyer catalog FAS +225 056204 37 disentangle pithing Remus +226 058003 37 cured transistorizing devices A +227 058004 37 Fenton nonbiodegradable bike A +228 058005 37 avoidable dislocate qualify +229 058006 37 drains monochromatic detained +230 058007 37 detectably batting commended +231 058101 37 husky postcondition civilize +232 058102 37 impelling catalog Elmhurst +233 058103 37 undoes Remus anesthetizing +234 058105 37 evened devices deaf +235 058111 37 squeezes bike Brigham +236 058112 37 destroyer qualify title +237 058113 37 rudeness detained coarse +238 058114 37 beaner commended combinations +239 058115 37 boorish civilize grayness +240 058116 37 Everhart Elmhurst innumerable FAS +241 058117 37 encompass anesthetizing Caroline A +242 058118 37 mushrooms deaf fatty FAS +243 058119 37 Alison Brigham eastbound +244 058120 37 externally title inexperienced +245 058121 37 pellagra coarse hoarder A +246 058122 37 cult combinations scotch W +247 058123 37 creek grayness passport A +248 058124 37 Huffman innumerable strategic FAS +249 058125 37 Majorca Caroline gated +250 058126 37 governing fatty flog +251 058127 37 gadfly eastbound Pipestone +252 058128 37 reassigned inexperienced Dar +253 058201 37 intentness hoarder Corcoran +254 058202 37 craziness scotch flyers A +255 058303 37 psychic passport competitions W +256 058304 37 squabbled strategic suppliers FAS +257 058602 37 burlesque gated skips +258 058603 37 capped flog institutes +259 058604 37 extracted Pipestone troop A +260 058605 37 DiMaggio Dar connective W +261 058606 37 exclamation Corcoran denies +262 058607 37 subdirectory flyers polka +263 060401 36 fangs competitions observations FAS +264 061701 36 buyer suppliers askers +265 066201 36 pithing skips homeless FAS +266 066501 36 transistorizing institutes Anna +267 068001 36 nonbiodegradable troop subdirectories W +268 068002 36 dislocate connective decaying FAS +269 068005 36 monochromatic denies outwitting W +270 068006 36 batting polka Harpy W +271 068007 36 postcondition observations crazed +272 068008 36 catalog askers suffocate +273 068009 36 Remus homeless provers FAS +274 068010 36 devices Anna technically +275 068011 36 bike subdirectories Franklinizations +276 068202 36 qualify decaying considered +277 068302 36 detained outwitting tinnily +278 068303 36 commended Harpy uninterruptedly +279 068401 36 civilize crazed whistled A +280 068501 36 Elmhurst suffocate automate +281 068502 36 anesthetizing provers gutting W +282 068503 36 deaf technically surreptitious +283 068602 36 Brigham Franklinizations Choctaw +284 068603 36 title considered cooks +285 068701 36 coarse tinnily millivolt FAS +286 068702 36 combinations uninterruptedly counterpoise +287 068703 36 grayness whistled Gothicism +288 076001 36 innumerable automate feminine +289 076002 36 Caroline gutting metaphysically W +290 076101 36 fatty surreptitious sanding A +291 076102 36 eastbound Choctaw contributorily +292 076103 36 inexperienced cooks receivers FAS +293 076302 36 hoarder millivolt adjourn +294 076303 36 scotch counterpoise straggled A +295 076304 36 passport Gothicism druggists +296 076305 36 strategic feminine thanking FAS +297 076306 36 gated metaphysically ostrich +298 076307 36 flog sanding hopelessness FAS +299 076402 36 Pipestone contributorily Eurydice +300 076501 36 Dar receivers excitation W +301 076502 36 Corcoran adjourn presumes FAS +302 076701 36 flyers straggled imaginable FAS +303 078001 36 competitions druggists concoct W +304 078002 36 suppliers thanking peering W +305 078003 36 skips ostrich Phelps FAS +306 078004 36 institutes hopelessness ferociousness FAS +307 078005 36 troop Eurydice sentences +308 078006 36 connective excitation unlocks +309 078007 36 denies presumes engrossing W +310 078008 36 polka imaginable Ruth +311 078101 36 observations concoct tying +312 078103 36 askers peering exclaimers +313 078104 36 homeless Phelps synergy +314 078105 36 Anna ferociousness Huey W +315 082101 36 subdirectories sentences merging +316 083401 36 decaying unlocks judges A +317 084001 36 outwitting engrossing Shylock W +318 084002 36 Harpy Ruth Miltonism +319 086001 36 crazed tying hen W +320 086102 36 suffocate exclaimers honeybee FAS +321 086201 36 provers synergy towers +322 088001 36 technically Huey dilutes W +323 088002 36 Franklinizations merging numerals FAS +324 088003 36 considered judges democracy FAS +325 088004 36 tinnily Shylock Ibero- +326 088101 36 uninterruptedly Miltonism invalids +327 088102 36 whistled hen behavior +328 088103 36 automate honeybee accruing +329 088104 36 gutting towers relics A +330 088105 36 surreptitious dilutes rackets +331 088106 36 Choctaw numerals Fischbein W +332 088201 36 cooks democracy phony W +333 088203 36 millivolt Ibero- cross FAS +334 088204 36 counterpoise invalids cleanup +335 088302 37 Gothicism behavior conspirator +336 088303 37 feminine accruing label FAS +337 088305 37 metaphysically relics university +338 088402 37 sanding rackets cleansed FAS +339 088501 36 contributorily Fischbein ballgown +340 088502 36 receivers phony starlet +341 088503 36 adjourn cross aqueous +342 098001 58 straggled cleanup portrayal A +343 098002 58 druggists conspirator despising W +344 098003 58 thanking label distort W +345 098004 58 ostrich university palmed +346 098005 58 hopelessness cleansed faced +347 098006 58 Eurydice ballgown silverware +348 141903 29 excitation starlet assessor +349 098008 58 presumes aqueous spiders +350 098009 58 imaginable portrayal artificially +351 098010 58 concoct despising reminiscence +352 098011 58 peering distort Mexican +353 098012 58 Phelps palmed obnoxious +354 098013 58 ferociousness faced fragile +355 098014 58 sentences silverware apprehensible +356 098015 58 unlocks assessor births +357 098016 58 engrossing spiders garages +358 098017 58 Ruth artificially panty +359 098018 58 tying reminiscence anteater +360 098019 58 exclaimers Mexican displacement A +361 098020 58 synergy obnoxious drovers A +362 098021 58 Huey fragile patenting A +363 098022 58 merging apprehensible far A +364 098023 58 judges births shrieks +365 098024 58 Shylock garages aligning W +366 098025 37 Miltonism panty pragmatism +367 106001 36 hen anteater fevers W +368 108001 36 honeybee displacement reexamines A +369 108002 36 towers drovers occupancies +370 108003 36 dilutes patenting sweats FAS +371 108004 36 numerals far modulators +372 108005 36 democracy shrieks demand W +373 108007 36 Ibero- aligning Madeira +374 108008 36 invalids pragmatism Viennese W +375 108009 36 behavior fevers chillier W +376 108010 36 accruing reexamines wildcats FAS +377 108011 36 relics occupancies gentle +378 108012 36 rackets sweats Angles W +379 108101 36 Fischbein modulators accuracies +380 108102 36 phony demand toggle +381 108103 36 cross Madeira Mendelssohn W +382 108111 50 cleanup Viennese behaviorally +383 108105 36 conspirator chillier Rochford +384 108106 36 label wildcats mirror W +385 108107 36 university gentle Modula +386 108108 50 cleansed Angles clobbering +387 108109 36 ballgown accuracies chronography +388 108110 36 starlet toggle Eskimoizeds +389 108201 36 aqueous Mendelssohn British W +390 108202 36 portrayal behaviorally pitfalls +391 108203 36 despising Rochford verify W +392 108204 36 distort mirror scatter FAS +393 108205 36 palmed Modula Aztecan +394 108301 36 faced clobbering acuity W +395 108302 36 silverware chronography sinking W +396 112101 36 assessor Eskimoizeds beasts FAS +397 112102 36 spiders British Witt W +398 113701 36 artificially pitfalls physicists FAS +399 116001 36 reminiscence verify folksong A +400 116201 36 Mexican scatter strokes FAS +401 116301 36 obnoxious Aztecan crowder +402 116302 36 fragile acuity merry +403 116601 36 apprehensible sinking cadenced +404 116602 36 births beasts alimony A +405 116603 36 garages Witt principled A +406 116701 36 panty physicists golfing +407 116702 36 anteater folksong undiscovered +408 118001 36 displacement strokes irritates +409 118002 36 drovers crowder patriots A +410 118003 36 patenting merry rooms FAS +411 118004 36 far cadenced towering W +412 118005 36 shrieks alimony displease +413 118006 36 aligning principled photosensitive +414 118007 36 pragmatism golfing inking +415 118008 36 fevers undiscovered gainers +416 118101 36 reexamines irritates leaning A +417 118102 36 occupancies patriots hydrant A +418 118103 36 sweats rooms preserve +419 118202 36 modulators towering blinded A +420 118203 36 demand displease interactions A +421 118204 36 Madeira photosensitive Barry +422 118302 36 Viennese inking whiteness A +423 118304 36 chillier gainers pastimes W +424 118305 36 wildcats leaning Edenization +425 118306 36 gentle hydrant Muscat +426 118307 36 Angles preserve assassinated +427 123101 36 accuracies blinded labeled +428 123102 36 toggle interactions glacial A +429 123301 36 Mendelssohn Barry implied W +430 126001 36 behaviorally whiteness bibliographies W +431 126002 36 Rochford pastimes Buchanan +432 126003 36 mirror Edenization forgivably FAS +433 126101 36 Modula Muscat innuendo A +434 126301 36 clobbering assassinated den FAS +435 126302 36 chronography labeled submarines W +436 126402 36 Eskimoizeds glacial mouthful A +437 126601 36 British implied expiring +438 126602 36 pitfalls bibliographies unfulfilled FAS +439 126702 36 verify Buchanan precession +440 128001 36 scatter forgivably nullified +441 128002 36 Aztecan innuendo affects +442 128003 36 acuity den Cynthia +443 128004 36 sinking submarines Chablis A +444 128005 36 beasts mouthful betterments FAS +445 128007 36 Witt expiring advertising +446 128008 36 physicists unfulfilled rubies A +447 128009 36 folksong precession southwest FAS +448 128010 36 strokes nullified superstitious A +449 128011 36 crowder affects tabernacle W +450 128012 36 merry Cynthia silk A +451 128013 36 cadenced Chablis handsomest A +452 128014 36 alimony betterments Persian A +453 128015 36 principled advertising analog W +454 128016 36 golfing rubies complex W +455 128017 36 undiscovered southwest Taoist +456 128018 36 irritates superstitious suspend +457 128019 36 patriots tabernacle relegated +458 128020 36 rooms silk awesome W +459 128021 36 towering handsomest Bruxelles +460 128022 36 displease Persian imprecisely A +461 128023 36 photosensitive analog televise +462 128101 36 inking complex braking +463 128102 36 gainers Taoist true FAS +464 128103 36 leaning suspend disappointing FAS +465 128104 36 hydrant relegated navally W +466 128106 36 preserve awesome circus +467 128107 36 blinded Bruxelles beetles +468 128108 36 interactions imprecisely trumps +469 128202 36 Barry televise fourscore W +470 128203 36 whiteness braking Blackfoots +471 128301 36 pastimes true Grady +472 128302 36 Edenization disappointing quiets FAS +473 128303 36 Muscat navally floundered FAS +474 128304 36 assassinated circus profundity W +475 128305 36 labeled beetles Garrisonian W +476 128307 36 glacial trumps Strauss +477 128401 36 implied fourscore cemented FAS +478 128502 36 bibliographies Blackfoots contrition A +479 128503 36 Buchanan Grady mutations +480 128504 36 forgivably quiets exhibits W +481 128505 36 innuendo floundered tits +482 128601 36 den profundity mate A +483 128603 36 submarines Garrisonian arches +484 128604 36 mouthful Strauss Moll +485 128702 36 expiring cemented ropers +486 128703 36 unfulfilled contrition bombast +487 128704 36 precession mutations difficultly A +488 138001 36 nullified exhibits adsorption +489 138002 36 affects tits definiteness FAS +490 138003 36 Cynthia mate cultivation A +491 138004 36 Chablis arches heals A +492 138005 36 betterments Moll Heusen W +493 138006 36 advertising ropers target FAS +494 138007 36 rubies bombast cited A +495 138008 36 southwest difficultly congresswoman W +496 138009 36 superstitious adsorption Katherine +497 138102 36 tabernacle definiteness titter A +498 138103 36 silk cultivation aspire A +499 138104 36 handsomest heals Mardis +500 138105 36 Persian Heusen Nadia W +501 138201 36 analog target estimating FAS +502 138302 36 complex cited stuck A +503 138303 36 Taoist congresswoman fifteenth A +504 138304 36 suspend Katherine Colombo +505 138401 29 relegated titter survey A +506 140102 29 awesome aspire staffing +507 140103 29 Bruxelles Mardis obtain +508 140104 29 imprecisely Nadia loaded +509 140105 29 televise estimating slaughtered +510 140201 29 braking stuck lights A +511 140701 29 true fifteenth circumference +512 141501 29 disappointing Colombo dull A +513 141502 29 navally survey weekly A +514 141901 29 circus staffing wetness +515 141902 29 beetles obtain visualized +516 142101 29 trumps loaded Tannenbaum +517 142102 29 fourscore slaughtered moribund +518 142103 29 Blackfoots lights demultiplex +519 142701 29 Grady circumference lockings +520 143001 29 quiets dull thugs FAS +521 143501 29 floundered weekly unnerves +522 143502 29 profundity wetness abut +523 148001 29 Garrisonian visualized Chippewa A +524 148002 29 Strauss Tannenbaum stratifications A +525 148003 29 cemented moribund signaled +526 148004 29 contrition demultiplex Italianizes A +527 148005 29 mutations lockings algorithmic A +528 148006 29 exhibits thugs paranoid FAS +529 148007 29 tits unnerves camping A +530 148009 29 mate abut signifying A +531 148010 29 arches Chippewa Patrice W +532 148011 29 Moll stratifications search A +533 148012 29 ropers signaled Angeles A +534 148013 29 bombast Italianizes semblance +535 148023 36 difficultly algorithmic taxed +536 148015 29 adsorption paranoid Beatrice +537 148016 29 definiteness camping retrace +538 148017 29 cultivation signifying lockout +539 148018 29 heals Patrice grammatic +540 148019 29 Heusen search helmsman +541 148020 29 target Angeles uniform W +542 148021 29 cited semblance hamming +543 148022 29 congresswoman taxed disobedience +544 148101 29 Katherine Beatrice captivated A +545 148102 29 titter retrace transferals A +546 148201 29 aspire lockout cartographer A +547 148401 29 Mardis grammatic aims FAS +548 148402 29 Nadia helmsman Pakistani +549 148501 29 estimating uniform burglarized FAS +550 148502 29 stuck hamming saucepans A +551 148503 29 fifteenth disobedience lacerating A +552 148504 29 Colombo captivated corny +553 148601 29 survey transferals megabytes FAS +554 148602 29 staffing cartographer chancellor +555 150701 29 obtain aims bulk A +556 152101 29 loaded Pakistani commits A +557 152102 29 slaughtered burglarized meson W +558 155202 36 lights saucepans deputies +559 155203 29 circumference lacerating northeaster A +560 155204 29 dull corny dipole +561 155205 29 weekly megabytes machining 0 +562 156001 29 wetness chancellor therefore +563 156002 29 visualized bulk Telefunken +564 156102 29 Tannenbaum commits salvaging +565 156301 29 moribund meson Corinthianizes A +566 156302 29 demultiplex deputies restlessly A +567 156303 29 lockings northeaster bromides +568 156304 29 thugs dipole generalized A +569 156305 29 unnerves machining mishaps +570 156306 29 abut therefore quelling +571 156501 29 Chippewa Telefunken spiritual A +572 158001 29 stratifications salvaging beguiles FAS +573 158002 29 signaled Corinthianizes Trobriand FAS +574 158101 29 Italianizes restlessly fleeing A +575 158102 29 algorithmic bromides Armour A +576 158103 29 paranoid generalized chin A +577 158201 29 camping mishaps provers A +578 158202 29 signifying quelling aeronautic A +579 158203 29 Patrice spiritual voltage W +580 158204 29 search beguiles sash +581 158301 29 Angeles Trobriand anaerobic A +582 158302 29 semblance fleeing simultaneous A +583 158303 29 taxed Armour accumulating A +584 158304 29 Beatrice chin Medusan A +585 158305 29 retrace provers shouted A +586 158306 29 lockout aeronautic freakish +587 158501 29 grammatic voltage index FAS +588 160301 29 helmsman sash commercially +589 166101 50 uniform anaerobic mistiness A +590 166102 50 hamming simultaneous endpoint +591 168001 29 disobedience accumulating straight A +592 168002 29 captivated Medusan flurried +593 168003 29 transferals shouted denotative A +594 168101 29 cartographer freakish coming FAS +595 168102 29 aims index commencements FAS +596 168103 29 Pakistani commercially gentleman +597 168104 29 burglarized mistiness gifted +598 168202 29 saucepans endpoint Shanghais +599 168301 29 lacerating straight sportswriting A +600 168502 29 corny flurried sloping A +601 168503 29 megabytes denotative navies +602 168601 29 chancellor coming leaflet A +603 173001 40 bulk commencements shooter +604 173701 40 commits gentleman Joplin FAS +605 173702 40 meson gifted babies +606 176001 40 deputies Shanghais subdivision FAS +607 176101 40 northeaster sportswriting burstiness W +608 176201 40 dipole sloping belted FAS +609 176401 40 machining navies assails FAS +610 176501 40 therefore leaflet admiring W +611 176601 40 Telefunken shooter swaying 0 +612 176602 40 salvaging Joplin Goldstine FAS +613 176603 40 Corinthianizes babies fitting +614 178001 40 restlessly subdivision Norwalk W +615 178002 40 bromides burstiness weakening W +616 178003 40 generalized belted analogy FAS +617 178004 40 mishaps assails deludes +618 178005 40 quelling admiring cokes +619 178006 40 spiritual swaying Clayton +620 178007 40 beguiles Goldstine exhausts +621 178008 40 Trobriand fitting causality +622 178101 40 fleeing Norwalk sating FAS +623 178102 40 Armour weakening icon +624 178103 40 chin analogy throttles +625 178201 40 provers deludes communicants FAS +626 178202 40 aeronautic cokes dehydrate FAS +627 178301 40 voltage Clayton priceless FAS +628 178302 40 sash exhausts publicly +629 178401 40 anaerobic causality incidentals FAS +630 178402 40 simultaneous sating commonplace +631 178403 40 accumulating icon mumbles +632 178404 40 Medusan throttles furthermore W +633 178501 40 shouted communicants cautioned W +634 186002 37 freakish dehydrate parametrized A +635 186102 37 index priceless registration A +636 186201 40 commercially publicly sadly FAS +637 186202 40 mistiness incidentals positioning +638 186203 40 endpoint commonplace babysitting +639 186302 37 straight mumbles eternal A +640 188007 37 flurried furthermore hoarder +641 188008 37 denotative cautioned congregates +642 188009 37 coming parametrized rains +643 188010 37 commencements registration workers W +644 188011 37 gentleman sadly sags A +645 188012 37 gifted positioning unplug W +646 188013 37 Shanghais babysitting garage A +647 188014 37 sportswriting eternal boulder A +648 188015 37 sloping hoarder hollowly A +649 188016 37 navies congregates specifics +650 188017 37 leaflet rains Teresa +651 188102 37 shooter workers Winsett +652 188103 37 Joplin sags convenient A +653 188202 37 babies unplug buckboards FAS +654 188301 40 subdivision garage amenities +655 188302 40 burstiness boulder resplendent FAS +656 188303 40 belted hollowly priding FAS +657 188401 37 assails specifics configurations +658 188402 37 admiring Teresa untidiness A +659 188503 37 swaying Winsett Brice W +660 188504 37 Goldstine convenient sews FAS +661 188505 37 fitting buckboards participated +662 190701 37 Norwalk amenities Simon FAS +663 190703 50 weakening resplendent certificates +664 191701 37 analogy priding Fitzpatrick +665 191702 37 deludes configurations Evanston A +666 191703 37 cokes untidiness misted +667 196001 37 Clayton Brice textures A +668 196002 37 exhausts sews save +669 196003 37 causality participated count +670 196101 37 sating Simon rightful A +671 196103 37 icon certificates chaperone +672 196104 37 throttles Fitzpatrick Lizzy A +673 196201 37 communicants Evanston clenched A +674 196202 37 dehydrate misted effortlessly +675 196203 37 priceless textures accessed +676 198001 37 publicly save beaters A +677 198003 37 incidentals count Hornblower FAS +678 198004 37 commonplace rightful vests A +679 198005 37 mumbles chaperone indulgences FAS +680 198006 37 furthermore Lizzy infallibly A +681 198007 37 cautioned clenched unwilling FAS +682 198008 37 parametrized effortlessly excrete FAS +683 198009 37 registration accessed spools A +684 198010 37 sadly beaters crunches FAS +685 198011 37 positioning Hornblower overestimating FAS +686 198012 37 babysitting vests ineffective +687 198013 37 eternal indulgences humiliation A +688 198014 37 hoarder infallibly sophomore +689 198015 37 congregates unwilling star +690 198017 37 rains excrete rifles +691 198018 37 workers spools dialysis +692 198019 37 sags crunches arriving +693 198020 37 unplug overestimating indulge +694 198021 37 garage ineffective clockers +695 198022 37 boulder humiliation languages +696 198023 50 hollowly sophomore Antarctica A +697 198024 37 specifics star percentage +698 198101 37 Teresa rifles ceiling A +699 198103 37 Winsett dialysis specification +700 198105 37 convenient arriving regimented A +701 198106 37 buckboards indulge ciphers +702 198201 37 amenities clockers pictures A +703 198204 37 resplendent languages serpents A +704 198301 53 priding Antarctica allot A +705 198302 53 configurations percentage realized A +706 198303 53 untidiness ceiling mayoral A +707 198304 53 Brice specification opaquely A +708 198401 37 sews regimented hostess FAS +709 198402 37 participated ciphers fiftieth +710 198403 37 Simon pictures incorrectly +711 202101 37 certificates serpents decomposition FAS +712 202301 37 Fitzpatrick allot stranglings +713 202302 37 Evanston realized mixture FAS +714 202303 37 misted mayoral electroencephalography FAS +715 202304 37 textures opaquely similarities FAS +716 202305 37 save hostess charges W +717 202601 37 count fiftieth freest FAS +718 202602 37 rightful incorrectly Greenberg FAS +719 202605 37 chaperone decomposition tinting +720 202606 37 Lizzy stranglings expelled W +721 202607 37 clenched mixture warm +722 202901 37 effortlessly electroencephalography smoothed +723 202902 37 accessed similarities deductions FAS +724 202903 37 beaters charges Romano W +725 202904 37 Hornblower freest bitterroot +726 202907 37 vests Greenberg corset +727 202908 37 indulgences tinting securing +728 203101 37 infallibly expelled environing FAS +729 203103 37 unwilling warm cute +730 203104 37 excrete smoothed Crays +731 203105 37 spools deductions heiress FAS +732 203401 37 crunches Romano inform FAS +733 203402 37 overestimating bitterroot avenge +734 203404 37 ineffective corset universals +735 203901 37 humiliation securing Kinsey W +736 203902 37 sophomore environing ravines FAS +737 203903 37 star cute bestseller +738 203906 37 rifles Crays equilibrium +739 203907 37 dialysis heiress extents 0 +740 203908 37 arriving inform relatively +741 203909 37 indulge avenge pressure FAS +742 206101 37 clockers universals critiques FAS +743 206201 37 languages Kinsey befouled +744 206202 37 Antarctica ravines rightfully FAS +745 206203 37 percentage bestseller mechanizing FAS +746 206206 37 ceiling equilibrium Latinizes +747 206207 37 specification extents timesharing +748 206208 37 regimented relatively Aden +749 208001 37 ciphers pressure embassies +750 208002 37 pictures critiques males FAS +751 208003 37 serpents befouled shapelessly FAS +752 208004 37 allot rightfully genres FAS +753 208008 37 realized mechanizing mastering +754 208009 37 mayoral Latinizes Newtonian +755 208010 37 opaquely timesharing finishers FAS +756 208011 37 hostess Aden abates +757 208101 37 fiftieth embassies teem +758 208102 37 incorrectly males kiting FAS +759 208103 37 decomposition shapelessly stodgy FAS +760 208104 37 stranglings genres scalps FAS +761 208105 37 mixture mastering feed FAS +762 208110 37 electroencephalography Newtonian guitars +763 208111 37 similarities finishers airships +764 208112 37 charges abates store +765 208113 37 freest teem denounces +766 208201 37 Greenberg kiting Pyle FAS +767 208203 37 tinting stodgy Saxony +768 208301 37 expelled scalps serializations FAS +769 208302 37 warm feed Peruvian FAS +770 208305 37 smoothed guitars taxonomically FAS +771 208401 37 deductions airships kingdom A +772 208402 37 Romano store stint A +773 208403 37 bitterroot denounces Sault A +774 208404 37 corset Pyle faithful +775 208501 37 securing Saxony Ganymede FAS +776 208502 37 environing serializations tidiness FAS +777 208503 37 cute Peruvian gainful FAS +778 208504 37 Crays taxonomically contrary FAS +779 208505 37 heiress kingdom Tipperary FAS +780 210101 37 inform stint tropics W +781 210102 37 avenge Sault theorizers +782 210103 37 universals faithful renew 0 +783 210104 37 Kinsey Ganymede already +784 210105 37 ravines tidiness terminal +785 210106 37 bestseller gainful Hegelian +786 210107 37 equilibrium contrary hypothesizer +787 210401 37 extents Tipperary warningly FAS +788 213201 37 relatively tropics journalizing FAS +789 213203 37 pressure theorizers nested +790 213204 37 critiques renew Lars +791 213205 37 befouled already saplings +792 213206 37 rightfully terminal foothill +793 213207 37 mechanizing Hegelian labeled +794 216101 37 Latinizes hypothesizer imperiously FAS +795 216103 37 timesharing warningly reporters FAS +796 218001 37 Aden journalizing furnishings FAS +797 218002 37 embassies nested precipitable FAS +798 218003 37 males Lars discounts FAS +799 218004 37 shapelessly saplings excises FAS +800 143503 50 genres foothill Stalin +801 218006 37 mastering labeled despot FAS +802 218007 37 Newtonian imperiously ripeness FAS +803 218008 37 finishers reporters Arabia +804 218009 37 abates furnishings unruly +805 218010 37 teem precipitable mournfulness +806 218011 37 kiting discounts boom FAS +807 218020 37 stodgy excises slaughter A +808 218021 50 scalps Stalin Sabine +809 218022 37 feed despot handy FAS +810 218023 37 guitars ripeness rural +811 218024 37 airships Arabia organizer +812 218101 37 store unruly shipyard FAS +813 218102 37 denounces mournfulness civics FAS +814 218103 37 Pyle boom inaccuracy FAS +815 218201 37 Saxony slaughter rules FAS +816 218202 37 serializations Sabine juveniles FAS +817 218203 37 Peruvian handy comprised W +818 218204 37 taxonomically rural investigations +819 218205 37 kingdom organizer stabilizes A +820 218301 37 stint shipyard seminaries FAS +821 218302 37 Sault civics Hunter A +822 218401 37 faithful inaccuracy sporty FAS +823 218402 37 Ganymede rules test FAS +824 218403 37 tidiness juveniles weasels +825 218404 37 gainful comprised CERN +826 218407 37 contrary investigations tempering +827 218408 37 Tipperary stabilizes afore FAS +828 218409 37 tropics seminaries Galatean +829 218410 37 theorizers Hunter techniques W +830 226001 37 renew sporty error +831 226002 37 already test veranda +832 226003 37 terminal weasels severely +833 226004 37 Hegelian CERN Cassites FAS +834 226005 37 hypothesizer tempering forthcoming +835 226006 37 warningly afore guides +836 226007 37 journalizing Galatean vanish FAS +837 226008 37 nested techniques lied A +838 226203 37 Lars error sawtooth FAS +839 226204 37 saplings veranda fated FAS +840 226205 37 foothill severely gradually +841 226206 37 labeled Cassites widens +842 226207 37 imperiously forthcoming preclude +843 226208 37 reporters guides Jobrel +844 226209 37 furnishings vanish hooker +845 226210 37 precipitable lied rainstorm +846 226211 37 discounts sawtooth disconnects +847 228001 37 excises fated cruelty +848 228004 37 Stalin gradually exponentials A +849 228005 37 despot widens affective A +850 228006 37 ripeness preclude arteries +851 228007 37 Arabia Jobrel Crosby FAS +852 228008 37 unruly hooker acquaint +853 228009 37 mournfulness rainstorm evenhandedly +854 228101 37 boom disconnects percentage +855 228108 37 slaughter cruelty disobedience +856 228109 37 Sabine exponentials humility +857 228110 37 handy affective gleaning A +858 228111 37 rural arteries petted A +859 228112 37 organizer Crosby bloater A +860 228113 37 shipyard acquaint minion A +861 228114 37 civics evenhandedly marginal A +862 228115 37 inaccuracy percentage apiary A +863 228116 37 rules disobedience measures +864 228117 37 juveniles humility precaution +865 228118 37 comprised gleaning repelled +866 228119 37 investigations petted primary FAS +867 228120 37 stabilizes bloater coverings +868 228121 37 seminaries minion Artemia A +869 228122 37 Hunter marginal navigate +870 228201 37 sporty apiary spatial +871 228206 37 test measures Gurkha +872 228207 37 weasels precaution meanwhile A +873 228208 37 CERN repelled Melinda A +874 228209 37 tempering primary Butterfield +875 228210 37 afore coverings Aldrich A +876 228211 37 Galatean Artemia previewing A +877 228212 37 techniques navigate glut A +878 228213 37 error spatial unaffected +879 228214 37 veranda Gurkha inmate +880 228301 37 severely meanwhile mineral +881 228305 37 Cassites Melinda impending A +882 228306 37 forthcoming Butterfield meditation A +883 228307 37 guides Aldrich ideas +884 228308 37 vanish previewing miniaturizes W +885 228309 37 lied glut lewdly +886 228310 37 sawtooth unaffected title +887 228311 37 fated inmate youthfulness +888 228312 37 gradually mineral creak FAS +889 228313 37 widens impending Chippewa +890 228314 37 preclude meditation clamored +891 228401 65 Jobrel ideas freezes +892 228402 65 hooker miniaturizes forgivably FAS +893 228403 65 rainstorm lewdly reduce FAS +894 228404 65 disconnects title McGovern W +895 228405 65 cruelty youthfulness Nazis W +896 228406 65 exponentials creak epistle W +897 228407 65 affective Chippewa socializes W +898 228408 65 arteries clamored conceptions +899 228409 65 Crosby freezes Kevin +900 228410 65 acquaint forgivably uncovering +901 230301 37 evenhandedly reduce chews FAS +902 230302 37 percentage McGovern appendixes FAS +903 230303 37 disobedience Nazis raining +904 018062 37 humility epistle infest +905 230501 37 gleaning socializes compartment +906 230502 37 petted conceptions minting +907 230503 37 bloater Kevin ducks +908 230504 37 minion uncovering roped A +909 230505 37 marginal chews waltz +910 230506 37 apiary appendixes Lillian +911 230507 37 measures raining repressions A +912 230508 37 precaution infest chillingly +913 230509 37 repelled compartment noncritical +914 230901 37 primary minting lithograph +915 230902 37 coverings ducks spongers +916 230903 37 Artemia roped parenthood +917 230904 37 navigate waltz posed +918 230905 37 spatial Lillian instruments +919 230906 37 Gurkha repressions filial +920 230907 37 meanwhile chillingly fixedly +921 230908 37 Melinda noncritical relives +922 230909 37 Butterfield lithograph Pandora +923 230910 37 Aldrich spongers watering A +924 230911 37 previewing parenthood ungrateful +925 230912 37 glut posed secures +926 230913 37 unaffected instruments chastisers +927 230914 37 inmate filial icon +928 231304 37 mineral fixedly reuniting A +929 231305 37 impending relives imagining A +930 231306 37 meditation Pandora abiding A +931 231307 37 ideas watering omnisciently +932 231308 37 miniaturizes ungrateful Britannic +933 231309 37 lewdly secures scholastics A +934 231310 37 title chastisers mechanics A +935 231311 37 youthfulness icon humidly A +936 231312 37 creak reuniting masterpiece +937 231313 37 Chippewa imagining however +938 231314 37 clamored abiding Mendelian +939 231315 37 freezes omnisciently jarred +940 232102 37 forgivably Britannic scolds +941 232103 37 reduce scholastics infatuate +942 232104 37 McGovern mechanics willed A +943 232105 37 Nazis humidly joyfully +944 232106 37 epistle masterpiece Microsoft +945 232107 37 socializes however fibrosities +946 232108 37 conceptions Mendelian Baltimorean +947 232601 37 Kevin jarred equestrian +948 232602 37 uncovering scolds Goodrich +949 232603 37 chews infatuate apish A +950 232605 37 appendixes willed Adlerian +5950 1232605 37 appendixes willed Adlerian +5951 1232606 37 appendixes willed Adlerian +5952 1232607 37 appendixes willed Adlerian +5953 1232608 37 appendixes willed Adlerian +5954 1232609 37 appendixes willed Adlerian +951 232606 37 raining joyfully Tropez +952 232607 37 infest Microsoft nouns +953 232608 37 compartment fibrosities distracting +954 232609 37 minting Baltimorean mutton +955 236104 37 ducks equestrian bridgeable A +956 236105 37 roped Goodrich stickers A +957 236106 37 waltz apish transcontinental A +958 236107 37 Lillian Adlerian amateurish +959 236108 37 repressions Tropez Gandhian +960 236109 37 chillingly nouns stratified +961 236110 37 noncritical distracting chamberlains +962 236111 37 lithograph mutton creditably +963 236112 37 spongers bridgeable philosophic +964 236113 37 parenthood stickers ores +965 238005 37 posed transcontinental Carleton +966 238006 37 instruments amateurish tape A +967 238007 37 filial Gandhian afloat A +968 238008 37 fixedly stratified goodness A +969 238009 37 relives chamberlains welcoming +970 238010 37 Pandora creditably Pinsky FAS +971 238011 37 watering philosophic halting +972 238012 37 ungrateful ores bibliography +973 238013 37 secures Carleton decoding +974 240401 41 chastisers tape variance A +975 240402 41 icon afloat allowed A +976 240901 41 reuniting goodness dire A +977 240902 41 imagining welcoming dub A +978 241801 41 abiding Pinsky poisoning +979 242101 41 omnisciently halting Iraqis A +980 242102 41 Britannic bibliography heaving +981 242201 41 scholastics decoding population A +982 242202 41 mechanics variance bomb A +983 242501 41 humidly allowed Majorca A +984 242502 41 masterpiece dire Gershwins +985 246201 41 however dub explorers +986 246202 41 Mendelian poisoning libretto A +987 246203 41 jarred Iraqis occurred +988 246204 41 scolds heaving Lagos +989 246205 41 infatuate population rats +990 246301 41 willed bomb bankruptcies A +991 246302 41 joyfully Majorca crying +992 248001 41 Microsoft Gershwins unexpected +993 248002 41 fibrosities explorers accessed A +994 248003 41 Baltimorean libretto colorful A +995 248004 41 equestrian occurred versatility A +996 248005 41 Goodrich Lagos cosy +997 248006 41 apish rats Darius A +998 248007 41 Adlerian bankruptcies mastering A +999 248008 41 Tropez crying Asiaticizations A +1000 248009 41 nouns unexpected offerers A +1001 248010 41 distracting accessed uncles A +1002 248011 41 mutton colorful sleepwalk +1003 248012 41 bridgeable versatility Ernestine +1004 248013 41 stickers cosy checksumming +1005 248014 41 transcontinental Darius stopped +1006 248015 41 amateurish mastering sicker +1007 248016 41 Gandhian Asiaticizations Italianization +1008 248017 41 stratified offerers alphabetic +1009 248018 41 chamberlains uncles pharmaceutic +1010 248019 41 creditably sleepwalk creator +1011 248020 41 philosophic Ernestine chess +1012 248021 41 ores checksumming charcoal +1013 248101 41 Carleton stopped Epiphany A +1014 248102 41 tape sicker bulldozes A +1015 248201 41 afloat Italianization Pygmalion A +1016 248202 41 goodness alphabetic caressing A +1017 248203 41 welcoming pharmaceutic Palestine A +1018 248204 41 Pinsky creator regimented A +1019 248205 41 halting chess scars A +1020 248206 41 bibliography charcoal realest A +1021 248207 41 decoding Epiphany diffusing A +1022 248208 41 variance bulldozes clubroom A +1023 248209 41 allowed Pygmalion Blythe A +1024 248210 41 dire caressing ahead +1025 248211 50 dub Palestine reviver +1026 250501 34 poisoning regimented retransmitting A +1027 250502 34 Iraqis scars landslide +1028 250503 34 heaving realest Eiffel +1029 250504 34 population diffusing absentee +1030 250505 34 bomb clubroom aye +1031 250601 34 Majorca Blythe forked A +1032 250602 34 Gershwins ahead Peruvianizes +1033 250603 34 explorers reviver clerked +1034 250604 34 libretto retransmitting tutor +1035 250605 34 occurred landslide boulevard +1036 251001 34 Lagos Eiffel shuttered +1037 251002 34 rats absentee quotes A +1038 251003 34 bankruptcies aye Caltech +1039 251004 34 crying forked Mossberg +1040 251005 34 unexpected Peruvianizes kept +1041 251301 34 accessed clerked roundly +1042 251302 34 colorful tutor features A +1043 251303 34 versatility boulevard imaginable A +1044 251304 34 cosy shuttered controller +1045 251305 34 Darius quotes racial +1046 251401 34 mastering Caltech uprisings A +1047 251402 34 Asiaticizations Mossberg narrowed A +1048 251403 34 offerers kept cannot A +1049 251404 34 uncles roundly vest +1050 251405 34 sleepwalk features famine +1051 251406 34 Ernestine imaginable sugars +1052 251801 34 checksumming controller exterminated A +1053 251802 34 stopped racial belays +1054 252101 34 sicker uprisings Hodges A +1055 252102 34 Italianization narrowed translatable +1056 252301 34 alphabetic cannot duality A +1057 252302 34 pharmaceutic vest recording A +1058 252303 34 creator famine rouses A +1059 252304 34 chess sugars poison +1060 252305 34 charcoal exterminated attitude +1061 252306 34 Epiphany belays dusted +1062 252307 34 bulldozes Hodges encompasses +1063 252308 34 Pygmalion translatable presentation +1064 252309 34 caressing duality Kantian +1065 256001 34 Palestine recording imprecision A +1066 256002 34 regimented rouses saving +1067 256003 34 scars poison maternal +1068 256004 34 realest attitude hewed +1069 256005 34 diffusing dusted kerosene +1070 258001 34 clubroom encompasses Cubans +1071 258002 34 Blythe presentation photographers +1072 258003 34 ahead Kantian nymph A +1073 258004 34 reviver imprecision bedlam A +1074 258005 34 retransmitting saving north A +1075 258006 34 landslide maternal Schoenberg A +1076 258007 34 Eiffel hewed botany A +1077 258008 34 absentee kerosene curs +1078 258009 34 aye Cubans solidification +1079 258010 34 forked photographers inheritresses +1080 258011 34 Peruvianizes nymph stiller +1081 258101 68 clerked bedlam t1 A +1082 258102 68 tutor north suite A +1083 258103 34 boulevard Schoenberg ransomer +1084 258104 68 shuttered botany Willy +1085 258105 68 quotes curs Rena A +1086 258106 68 Caltech solidification Seattle A +1087 258107 68 Mossberg inheritresses relaxes A +1088 258108 68 kept stiller exclaim +1089 258109 68 roundly t1 implicated A +1090 258110 68 features suite distinguish +1091 258111 68 imaginable ransomer assayed +1092 258112 68 controller Willy homeowner +1093 258113 68 racial Rena and +1094 258201 34 uprisings Seattle stealth +1095 258202 34 narrowed relaxes coinciding A +1096 258203 34 cannot exclaim founder A +1097 258204 34 vest implicated environing +1098 258205 34 famine distinguish jewelry +1099 258301 34 sugars assayed lemons A +1100 258401 34 exterminated homeowner brokenness A +1101 258402 34 belays and bedpost A +1102 258403 34 Hodges stealth assurers A +1103 258404 34 translatable coinciding annoyers +1104 258405 34 duality founder affixed +1105 258406 34 recording environing warbling +1106 258407 34 rouses jewelry seriously +1107 228123 37 poison lemons boasted +1108 250606 34 attitude brokenness Chantilly +1109 208405 37 dusted bedpost Iranizes +1110 212101 37 encompasses assurers violinist +1111 218206 37 presentation annoyers extramarital +1112 150401 37 Kantian affixed spates +1113 248212 41 imprecision warbling cloakroom +1114 128026 00 saving seriously gazer +1115 128024 00 maternal boasted hand +1116 128027 00 hewed Chantilly tucked +1117 128025 00 kerosene Iranizes gems +1118 128109 00 Cubans violinist clinker +1119 128705 00 photographers extramarital refiner +1120 126303 00 nymph spates callus +1121 128308 00 bedlam cloakroom leopards +1122 128204 00 north gazer comfortingly +1123 128205 00 Schoenberg hand generically +1124 128206 00 botany tucked getters +1125 128207 00 curs gems sexually +1126 118205 00 solidification clinker spear +1127 116801 00 inheritresses refiner serums +1128 116803 00 stiller callus Italianization +1129 116804 00 t1 leopards attendants +1130 116802 00 suite comfortingly spies +1131 128605 00 ransomer generically Anthony +1132 118308 00 Willy getters planar +1133 113702 00 Rena sexually cupped +1134 113703 00 Seattle spear cleanser +1135 112103 00 relaxes serums commuters +1136 118009 00 exclaim Italianization honeysuckle +5136 1118009 00 exclaim Italianization honeysuckle +1137 138011 00 implicated attendants orphanage +1138 138010 00 distinguish spies skies +1139 138012 00 assayed Anthony crushers +1140 068304 00 homeowner planar Puritan +1141 078009 00 and cupped squeezer +1142 108013 00 stealth cleanser bruises +1143 084004 00 coinciding commuters bonfire +1144 083402 00 founder honeysuckle Colombo +1145 084003 00 environing orphanage nondecreasing +1146 088504 00 jewelry skies innocents +1147 088005 00 lemons crushers masked +1148 088007 00 brokenness Puritan file +1149 088006 00 bedpost squeezer brush +1150 148025 00 assurers bruises mutilate +1151 148024 00 annoyers bonfire mommy +1152 138305 00 affixed Colombo bulkheads +1153 138306 00 warbling nondecreasing undeclared +1154 152701 00 seriously innocents displacements +1155 148505 00 boasted masked nieces +1156 158003 00 Chantilly file coeducation +1157 156201 00 Iranizes brush brassy +1158 156202 00 violinist mutilate authenticator +1159 158307 00 extramarital mommy Washoe +1160 158402 00 spates bulkheads penny +1161 158401 00 cloakroom undeclared Flagler +1162 068013 00 gazer displacements stoned +1163 068012 00 hand nieces cranes +1164 068203 00 tucked coeducation masterful +1165 088205 00 gems brassy biracial +1166 068704 00 clinker authenticator steamships +1167 068604 00 refiner Washoe windmills +1168 158502 00 callus penny exploit +1169 123103 00 leopards Flagler riverfront +1170 148026 00 comfortingly stoned sisterly +1171 123302 00 generically cranes sharpshoot +1172 076503 00 getters masterful mittens +1173 126304 00 sexually biracial interdependency +1174 068306 00 spear steamships policy +1175 143504 00 serums windmills unleashing +1176 160201 00 Italianization exploit pretenders +1177 148028 00 attendants riverfront overstatements +1178 148027 00 spies sisterly birthed +1179 143505 00 Anthony sharpshoot opportunism +1180 108014 00 planar mittens showroom +1181 076104 00 cupped interdependency compromisingly +1182 078106 00 cleanser policy Medicare +1183 126102 00 commuters unleashing corresponds +1184 128029 00 honeysuckle pretenders hardware +1185 128028 00 orphanage overstatements implant +1186 018410 00 skies birthed Alicia +1187 128110 00 crushers opportunism requesting +1188 148506 00 Puritan showroom produced +1189 123303 00 squeezer compromisingly criticizes +1190 123304 00 bruises Medicare backer +1191 068504 00 bonfire corresponds positively +1192 068305 00 Colombo hardware colicky +1193 000000 00 nondecreasing implant thrillingly +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat','') , (2,011401,37,'breaking','dreaded','Steinberg','W') , (3,011402,37,'Romans','scholastics','jarring','') , (4,011403,37,'intercepted','audiology','tinily',''); +SELECT * FROM t2; auto fld1 companynr fld3 fld4 fld5 fld6 +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +5 011501 37 bewilderingly wallet balled +6 011701 37 astound parters persist W +7 011702 37 admonishing eschew attainments +8 011703 37 sumac quitter fanatic +9 012001 37 flanking neat measures FAS +10 012003 37 combed Steinberg rightfulness +11 012004 37 subjective jarring capably +12 012005 37 scatterbrain tinily impulsive +13 012301 37 Eulerian balled starlet +14 012302 36 dubbed persist terminators +15 012303 37 Kane attainments untying +16 012304 37 overlay fanatic announces FAS +17 012305 37 perturb measures featherweight FAS +18 012306 37 goblins rightfulness pessimist FAS +19 012501 37 annihilates capably daughter +20 012602 37 Wotan impulsive decliner FAS +21 012603 37 snatching starlet lawgiver +22 012604 37 concludes terminators stated +23 012605 37 laterally untying readable +24 012606 37 yelped announces attrition +25 012701 37 grazing featherweight cascade FAS +26 012702 37 Baird pessimist motors FAS +27 012703 37 celery daughter interrogate +28 012704 37 misunderstander decliner pests W +29 013601 37 handgun lawgiver stairway +30 013602 37 foldout stated dopers FAS +31 013603 37 mystic readable testicle W +32 013604 37 succumbed attrition Parsifal W +33 013605 37 Nabisco cascade leavings +34 013606 37 fingerings motors postulation W +35 013607 37 aging interrogate squeaking +36 013608 37 afield pests contrasted +37 013609 37 ammonium stairway leftover +38 013610 37 boat dopers whiteners +39 013801 37 intelligibility testicle erases W +40 013802 37 Augustine Parsifal Punjab W +41 013803 37 teethe leavings Merritt +42 013804 37 dreaded postulation Quixotism +43 013901 37 scholastics squeaking sweetish FAS +44 016001 37 audiology contrasted dogging FAS +45 016201 37 wallet leftover scornfully FAS +46 016202 37 parters whiteners bellow +47 016301 37 eschew erases bills +48 016302 37 quitter Punjab cupboard FAS +49 016303 37 neat Merritt sureties FAS +50 016304 37 Steinberg Quixotism puddings +51 018001 37 jarring sweetish tapestry +52 018002 37 tinily dogging fetters +53 018003 37 balled scornfully bivalves +54 018004 37 persist bellow incurring +55 018005 37 attainments bills Adolph +56 018007 37 fanatic cupboard pithed +57 018008 37 measures sureties emergency +58 018009 37 rightfulness puddings Miles +59 018010 37 capably tapestry trimmings +60 018012 37 impulsive fetters tragedies W +61 018013 37 starlet bivalves skulking W +62 018014 37 terminators incurring flint +63 018015 37 untying Adolph flopping W +64 018016 37 announces pithed relaxing FAS +65 018017 37 featherweight emergency offload FAS +66 018018 37 pessimist Miles suites W +67 018019 37 daughter trimmings lists FAS +68 018020 37 decliner tragedies animized FAS +69 018021 37 lawgiver skulking multilayer W +70 018022 37 stated flint standardizes FAS +71 018023 37 readable flopping Judas +72 018024 37 attrition relaxing vacuuming W +73 018025 37 cascade offload dentally W +74 018026 37 motors suites humanness W +75 018027 37 interrogate lists inch W +76 018028 37 pests animized Weissmuller W +77 018029 37 stairway multilayer irresponsibly W +78 018030 37 dopers standardizes luckily FAS +79 018032 37 testicle Judas culled W +80 018033 37 Parsifal vacuuming medical FAS +81 018034 37 leavings dentally bloodbath FAS +82 018035 37 postulation humanness subschema W +83 018036 37 squeaking inch animals W +84 018037 37 contrasted Weissmuller Micronesia +85 018038 37 leftover irresponsibly repetitions +86 018039 37 whiteners luckily Antares +87 018040 37 erases culled ventilate W +88 018041 37 Punjab medical pityingly +89 018042 37 Merritt bloodbath interdependent +90 018043 37 Quixotism subschema Graves FAS +91 018044 37 sweetish animals neonatal +92 018045 37 dogging Micronesia scribbled FAS +93 018046 37 scornfully repetitions chafe W +94 018048 37 bellow Antares honoring +95 018049 37 bills ventilate realtor +96 018050 37 cupboard pityingly elite +97 018051 37 sureties interdependent funereal +98 018052 37 puddings Graves abrogating +99 018053 50 tapestry neonatal sorters +100 018054 37 fetters scribbled Conley +101 018055 37 bivalves chafe lectured +102 018056 37 incurring honoring Abraham +103 018057 37 Adolph realtor Hawaii W +104 018058 37 pithed elite cage +105 018059 36 emergency funereal hushes +106 018060 37 Miles abrogating Simla +107 018061 37 trimmings sorters reporters +108 018101 37 tragedies Conley Dutchman FAS +109 018102 37 skulking lectured descendants FAS +110 018103 37 flint Abraham groupings FAS +111 018104 37 flopping Hawaii dissociate +112 018201 37 relaxing cage coexist W +113 018202 37 offload hushes Beebe +114 018402 37 suites Simla Taoism +115 018403 37 lists reporters Connally +116 018404 37 animized Dutchman fetched FAS +117 018405 37 multilayer descendants checkpoints FAS +118 018406 37 standardizes groupings rusting +119 018409 37 Judas dissociate galling +120 018601 37 vacuuming coexist obliterates +121 018602 37 dentally Beebe traitor +122 018603 37 humanness Taoism resumes FAS +123 018801 37 inch Connally analyzable FAS +124 018802 37 Weissmuller fetched terminator FAS +125 018803 37 irresponsibly checkpoints gritty FAS +126 018804 37 luckily rusting firearm W +127 018805 37 culled galling minima +128 018806 37 medical obliterates Selfridge +129 018807 37 bloodbath traitor disable +130 018808 37 subschema resumes witchcraft W +131 018809 37 animals analyzable betroth W +132 018810 37 Micronesia terminator Manhattanize +133 018811 37 repetitions gritty imprint +134 018812 37 Antares firearm peeked +135 019101 37 ventilate minima swelling +136 019102 37 pityingly Selfridge interrelationships W +137 019103 37 interdependent disable riser +138 019201 37 Graves witchcraft Gandhian W +139 030501 37 neonatal betroth peacock A +140 030502 50 scribbled Manhattanize bee A +141 030503 37 chafe imprint kanji +142 030504 37 honoring peeked dental +143 031901 37 realtor swelling scarf FAS +144 036001 37 elite interrelationships chasm A +145 036002 37 funereal riser insolence A +146 036004 37 abrogating Gandhian syndicate +147 036005 37 sorters peacock alike +148 038001 37 Conley bee imperial A +149 038002 37 lectured kanji convulsion A +150 038003 37 Abraham dental railway A +151 038004 37 Hawaii scarf validate A +152 038005 37 cage chasm normalizes A +153 038006 37 hushes insolence comprehensive +154 038007 37 Simla syndicate chewing +155 038008 37 reporters alike denizen +156 038009 37 Dutchman imperial schemer +157 038010 37 descendants convulsion chronicle +158 038011 37 groupings railway Kline +159 038012 37 dissociate validate Anatole +160 038013 37 coexist normalizes partridges +161 038014 37 Beebe comprehensive brunch +162 038015 37 Taoism chewing recruited +163 038016 37 Connally denizen dimensions W +164 038017 37 fetched schemer Chicana W +165 038018 37 checkpoints chronicle announced +166 038101 37 rusting Kline praised FAS +167 038102 37 galling Anatole employing +168 038103 37 obliterates partridges linear +169 038104 37 traitor brunch quagmire +170 038201 37 resumes recruited western A +171 038202 37 analyzable dimensions relishing +172 038203 37 terminator Chicana serving A +173 038204 37 gritty announced scheduling +174 038205 37 firearm praised lore +175 038206 37 minima employing eventful +176 038208 37 Selfridge linear arteriole A +177 042801 37 disable quagmire disentangle +178 042802 37 witchcraft western cured A +179 046101 37 betroth relishing Fenton W +180 048001 37 Manhattanize serving avoidable A +181 048002 37 imprint scheduling drains A +182 048003 37 peeked lore detectably FAS +183 048004 37 swelling eventful husky +184 048005 37 interrelationships arteriole impelling +185 048006 37 riser disentangle undoes +186 048007 37 Gandhian cured evened +187 048008 37 peacock Fenton squeezes +188 048101 37 bee avoidable destroyer FAS +189 048102 37 kanji drains rudeness +190 048201 37 dental detectably beaner FAS +191 048202 37 scarf husky boorish +192 048203 37 chasm impelling Everhart +193 048204 37 insolence undoes encompass A +194 048205 37 syndicate evened mushrooms +195 048301 37 alike squeezes Alison A +196 048302 37 imperial destroyer externally FAS +197 048303 37 convulsion rudeness pellagra +198 048304 37 railway beaner cult +199 048305 37 validate boorish creek A +200 048401 37 normalizes Everhart Huffman +201 048402 37 comprehensive encompass Majorca FAS +202 048403 37 chewing mushrooms governing A +203 048404 37 denizen Alison gadfly FAS +204 048405 37 schemer externally reassigned FAS +205 048406 37 chronicle pellagra intentness W +206 048407 37 Kline cult craziness +207 048408 37 Anatole creek psychic +208 048409 37 partridges Huffman squabbled +209 048410 37 brunch Majorca burlesque +210 048411 37 recruited governing capped +211 048412 37 dimensions gadfly extracted A +212 048413 37 Chicana reassigned DiMaggio +213 048601 37 announced intentness exclamation FAS +214 048602 37 praised craziness subdirectory +215 048603 37 employing psychic fangs +216 048604 37 linear squabbled buyer A +217 048801 37 quagmire burlesque pithing A +218 050901 37 western capped transistorizing A +219 051201 37 relishing extracted nonbiodegradable +220 056002 37 serving DiMaggio dislocate +221 056003 37 scheduling exclamation monochromatic FAS +222 056004 37 lore subdirectory batting +223 056102 37 eventful fangs postcondition A +224 056203 37 arteriole buyer catalog FAS +225 056204 37 disentangle pithing Remus +226 058003 37 cured transistorizing devices A +227 058004 37 Fenton nonbiodegradable bike A +228 058005 37 avoidable dislocate qualify +229 058006 37 drains monochromatic detained +230 058007 37 detectably batting commended +231 058101 37 husky postcondition civilize +232 058102 37 impelling catalog Elmhurst +233 058103 37 undoes Remus anesthetizing +234 058105 37 evened devices deaf +235 058111 37 squeezes bike Brigham +236 058112 37 destroyer qualify title +237 058113 37 rudeness detained coarse +238 058114 37 beaner commended combinations +239 058115 37 boorish civilize grayness +240 058116 37 Everhart Elmhurst innumerable FAS +241 058117 37 encompass anesthetizing Caroline A +242 058118 37 mushrooms deaf fatty FAS +243 058119 37 Alison Brigham eastbound +244 058120 37 externally title inexperienced +245 058121 37 pellagra coarse hoarder A +246 058122 37 cult combinations scotch W +247 058123 37 creek grayness passport A +248 058124 37 Huffman innumerable strategic FAS +249 058125 37 Majorca Caroline gated +250 058126 37 governing fatty flog +251 058127 37 gadfly eastbound Pipestone +252 058128 37 reassigned inexperienced Dar +253 058201 37 intentness hoarder Corcoran +254 058202 37 craziness scotch flyers A +255 058303 37 psychic passport competitions W +256 058304 37 squabbled strategic suppliers FAS +257 058602 37 burlesque gated skips +258 058603 37 capped flog institutes +259 058604 37 extracted Pipestone troop A +260 058605 37 DiMaggio Dar connective W +261 058606 37 exclamation Corcoran denies +262 058607 37 subdirectory flyers polka +263 060401 36 fangs competitions observations FAS +264 061701 36 buyer suppliers askers +265 066201 36 pithing skips homeless FAS +266 066501 36 transistorizing institutes Anna +267 068001 36 nonbiodegradable troop subdirectories W +268 068002 36 dislocate connective decaying FAS +269 068005 36 monochromatic denies outwitting W +270 068006 36 batting polka Harpy W +271 068007 36 postcondition observations crazed +272 068008 36 catalog askers suffocate +273 068009 36 Remus homeless provers FAS +274 068010 36 devices Anna technically +275 068011 36 bike subdirectories Franklinizations +276 068202 36 qualify decaying considered +277 068302 36 detained outwitting tinnily +278 068303 36 commended Harpy uninterruptedly +279 068401 36 civilize crazed whistled A +280 068501 36 Elmhurst suffocate automate +281 068502 36 anesthetizing provers gutting W +282 068503 36 deaf technically surreptitious +283 068602 36 Brigham Franklinizations Choctaw +284 068603 36 title considered cooks +285 068701 36 coarse tinnily millivolt FAS +286 068702 36 combinations uninterruptedly counterpoise +287 068703 36 grayness whistled Gothicism +288 076001 36 innumerable automate feminine +289 076002 36 Caroline gutting metaphysically W +290 076101 36 fatty surreptitious sanding A +291 076102 36 eastbound Choctaw contributorily +292 076103 36 inexperienced cooks receivers FAS +293 076302 36 hoarder millivolt adjourn +294 076303 36 scotch counterpoise straggled A +295 076304 36 passport Gothicism druggists +296 076305 36 strategic feminine thanking FAS +297 076306 36 gated metaphysically ostrich +298 076307 36 flog sanding hopelessness FAS +299 076402 36 Pipestone contributorily Eurydice +300 076501 36 Dar receivers excitation W +301 076502 36 Corcoran adjourn presumes FAS +302 076701 36 flyers straggled imaginable FAS +303 078001 36 competitions druggists concoct W +304 078002 36 suppliers thanking peering W +305 078003 36 skips ostrich Phelps FAS +306 078004 36 institutes hopelessness ferociousness FAS +307 078005 36 troop Eurydice sentences +308 078006 36 connective excitation unlocks +309 078007 36 denies presumes engrossing W +310 078008 36 polka imaginable Ruth +311 078101 36 observations concoct tying +312 078103 36 askers peering exclaimers +313 078104 36 homeless Phelps synergy +314 078105 36 Anna ferociousness Huey W +315 082101 36 subdirectories sentences merging +316 083401 36 decaying unlocks judges A +317 084001 36 outwitting engrossing Shylock W +318 084002 36 Harpy Ruth Miltonism +319 086001 36 crazed tying hen W +320 086102 36 suffocate exclaimers honeybee FAS +321 086201 36 provers synergy towers +322 088001 36 technically Huey dilutes W +323 088002 36 Franklinizations merging numerals FAS +324 088003 36 considered judges democracy FAS +325 088004 36 tinnily Shylock Ibero- +326 088101 36 uninterruptedly Miltonism invalids +327 088102 36 whistled hen behavior +328 088103 36 automate honeybee accruing +329 088104 36 gutting towers relics A +330 088105 36 surreptitious dilutes rackets +331 088106 36 Choctaw numerals Fischbein W +332 088201 36 cooks democracy phony W +333 088203 36 millivolt Ibero- cross FAS +334 088204 36 counterpoise invalids cleanup +335 088302 37 Gothicism behavior conspirator +336 088303 37 feminine accruing label FAS +337 088305 37 metaphysically relics university +338 088402 37 sanding rackets cleansed FAS +339 088501 36 contributorily Fischbein ballgown +340 088502 36 receivers phony starlet +341 088503 36 adjourn cross aqueous +342 098001 58 straggled cleanup portrayal A +343 098002 58 druggists conspirator despising W +344 098003 58 thanking label distort W +345 098004 58 ostrich university palmed +346 098005 58 hopelessness cleansed faced +347 098006 58 Eurydice ballgown silverware +348 141903 29 excitation starlet assessor +349 098008 58 presumes aqueous spiders +350 098009 58 imaginable portrayal artificially +351 098010 58 concoct despising reminiscence +352 098011 58 peering distort Mexican +353 098012 58 Phelps palmed obnoxious +354 098013 58 ferociousness faced fragile +355 098014 58 sentences silverware apprehensible +356 098015 58 unlocks assessor births +357 098016 58 engrossing spiders garages +358 098017 58 Ruth artificially panty +359 098018 58 tying reminiscence anteater +360 098019 58 exclaimers Mexican displacement A +361 098020 58 synergy obnoxious drovers A +362 098021 58 Huey fragile patenting A +363 098022 58 merging apprehensible far A +364 098023 58 judges births shrieks +365 098024 58 Shylock garages aligning W +366 098025 37 Miltonism panty pragmatism +367 106001 36 hen anteater fevers W +368 108001 36 honeybee displacement reexamines A +369 108002 36 towers drovers occupancies +370 108003 36 dilutes patenting sweats FAS +371 108004 36 numerals far modulators +372 108005 36 democracy shrieks demand W +373 108007 36 Ibero- aligning Madeira +374 108008 36 invalids pragmatism Viennese W +375 108009 36 behavior fevers chillier W +376 108010 36 accruing reexamines wildcats FAS +377 108011 36 relics occupancies gentle +378 108012 36 rackets sweats Angles W +379 108101 36 Fischbein modulators accuracies +380 108102 36 phony demand toggle +381 108103 36 cross Madeira Mendelssohn W +382 108111 50 cleanup Viennese behaviorally +383 108105 36 conspirator chillier Rochford +384 108106 36 label wildcats mirror W +385 108107 36 university gentle Modula +386 108108 50 cleansed Angles clobbering +387 108109 36 ballgown accuracies chronography +388 108110 36 starlet toggle Eskimoizeds +389 108201 36 aqueous Mendelssohn British W +390 108202 36 portrayal behaviorally pitfalls +391 108203 36 despising Rochford verify W +392 108204 36 distort mirror scatter FAS +393 108205 36 palmed Modula Aztecan +394 108301 36 faced clobbering acuity W +395 108302 36 silverware chronography sinking W +396 112101 36 assessor Eskimoizeds beasts FAS +397 112102 36 spiders British Witt W +398 113701 36 artificially pitfalls physicists FAS +399 116001 36 reminiscence verify folksong A +400 116201 36 Mexican scatter strokes FAS +401 116301 36 obnoxious Aztecan crowder +402 116302 36 fragile acuity merry +403 116601 36 apprehensible sinking cadenced +404 116602 36 births beasts alimony A +405 116603 36 garages Witt principled A +406 116701 36 panty physicists golfing +407 116702 36 anteater folksong undiscovered +408 118001 36 displacement strokes irritates +409 118002 36 drovers crowder patriots A +410 118003 36 patenting merry rooms FAS +411 118004 36 far cadenced towering W +412 118005 36 shrieks alimony displease +413 118006 36 aligning principled photosensitive +414 118007 36 pragmatism golfing inking +415 118008 36 fevers undiscovered gainers +416 118101 36 reexamines irritates leaning A +417 118102 36 occupancies patriots hydrant A +418 118103 36 sweats rooms preserve +419 118202 36 modulators towering blinded A +420 118203 36 demand displease interactions A +421 118204 36 Madeira photosensitive Barry +422 118302 36 Viennese inking whiteness A +423 118304 36 chillier gainers pastimes W +424 118305 36 wildcats leaning Edenization +425 118306 36 gentle hydrant Muscat +426 118307 36 Angles preserve assassinated +427 123101 36 accuracies blinded labeled +428 123102 36 toggle interactions glacial A +429 123301 36 Mendelssohn Barry implied W +430 126001 36 behaviorally whiteness bibliographies W +431 126002 36 Rochford pastimes Buchanan +432 126003 36 mirror Edenization forgivably FAS +433 126101 36 Modula Muscat innuendo A +434 126301 36 clobbering assassinated den FAS +435 126302 36 chronography labeled submarines W +436 126402 36 Eskimoizeds glacial mouthful A +437 126601 36 British implied expiring +438 126602 36 pitfalls bibliographies unfulfilled FAS +439 126702 36 verify Buchanan precession +440 128001 36 scatter forgivably nullified +441 128002 36 Aztecan innuendo affects +442 128003 36 acuity den Cynthia +443 128004 36 sinking submarines Chablis A +444 128005 36 beasts mouthful betterments FAS +445 128007 36 Witt expiring advertising +446 128008 36 physicists unfulfilled rubies A +447 128009 36 folksong precession southwest FAS +448 128010 36 strokes nullified superstitious A +449 128011 36 crowder affects tabernacle W +450 128012 36 merry Cynthia silk A +451 128013 36 cadenced Chablis handsomest A +452 128014 36 alimony betterments Persian A +453 128015 36 principled advertising analog W +454 128016 36 golfing rubies complex W +455 128017 36 undiscovered southwest Taoist +456 128018 36 irritates superstitious suspend +457 128019 36 patriots tabernacle relegated +458 128020 36 rooms silk awesome W +459 128021 36 towering handsomest Bruxelles +460 128022 36 displease Persian imprecisely A +461 128023 36 photosensitive analog televise +462 128101 36 inking complex braking +463 128102 36 gainers Taoist true FAS +464 128103 36 leaning suspend disappointing FAS +465 128104 36 hydrant relegated navally W +466 128106 36 preserve awesome circus +467 128107 36 blinded Bruxelles beetles +468 128108 36 interactions imprecisely trumps +469 128202 36 Barry televise fourscore W +470 128203 36 whiteness braking Blackfoots +471 128301 36 pastimes true Grady +472 128302 36 Edenization disappointing quiets FAS +473 128303 36 Muscat navally floundered FAS +474 128304 36 assassinated circus profundity W +475 128305 36 labeled beetles Garrisonian W +476 128307 36 glacial trumps Strauss +477 128401 36 implied fourscore cemented FAS +478 128502 36 bibliographies Blackfoots contrition A +479 128503 36 Buchanan Grady mutations +480 128504 36 forgivably quiets exhibits W +481 128505 36 innuendo floundered tits +482 128601 36 den profundity mate A +483 128603 36 submarines Garrisonian arches +484 128604 36 mouthful Strauss Moll +485 128702 36 expiring cemented ropers +486 128703 36 unfulfilled contrition bombast +487 128704 36 precession mutations difficultly A +488 138001 36 nullified exhibits adsorption +489 138002 36 affects tits definiteness FAS +490 138003 36 Cynthia mate cultivation A +491 138004 36 Chablis arches heals A +492 138005 36 betterments Moll Heusen W +493 138006 36 advertising ropers target FAS +494 138007 36 rubies bombast cited A +495 138008 36 southwest difficultly congresswoman W +496 138009 36 superstitious adsorption Katherine +497 138102 36 tabernacle definiteness titter A +498 138103 36 silk cultivation aspire A +499 138104 36 handsomest heals Mardis +500 138105 36 Persian Heusen Nadia W +501 138201 36 analog target estimating FAS +502 138302 36 complex cited stuck A +503 138303 36 Taoist congresswoman fifteenth A +504 138304 36 suspend Katherine Colombo +505 138401 29 relegated titter survey A +506 140102 29 awesome aspire staffing +507 140103 29 Bruxelles Mardis obtain +508 140104 29 imprecisely Nadia loaded +509 140105 29 televise estimating slaughtered +510 140201 29 braking stuck lights A +511 140701 29 true fifteenth circumference +512 141501 29 disappointing Colombo dull A +513 141502 29 navally survey weekly A +514 141901 29 circus staffing wetness +515 141902 29 beetles obtain visualized +516 142101 29 trumps loaded Tannenbaum +517 142102 29 fourscore slaughtered moribund +518 142103 29 Blackfoots lights demultiplex +519 142701 29 Grady circumference lockings +520 143001 29 quiets dull thugs FAS +521 143501 29 floundered weekly unnerves +522 143502 29 profundity wetness abut +523 148001 29 Garrisonian visualized Chippewa A +524 148002 29 Strauss Tannenbaum stratifications A +525 148003 29 cemented moribund signaled +526 148004 29 contrition demultiplex Italianizes A +527 148005 29 mutations lockings algorithmic A +528 148006 29 exhibits thugs paranoid FAS +529 148007 29 tits unnerves camping A +530 148009 29 mate abut signifying A +531 148010 29 arches Chippewa Patrice W +532 148011 29 Moll stratifications search A +533 148012 29 ropers signaled Angeles A +534 148013 29 bombast Italianizes semblance +535 148023 36 difficultly algorithmic taxed +536 148015 29 adsorption paranoid Beatrice +537 148016 29 definiteness camping retrace +538 148017 29 cultivation signifying lockout +539 148018 29 heals Patrice grammatic +540 148019 29 Heusen search helmsman +541 148020 29 target Angeles uniform W +542 148021 29 cited semblance hamming +543 148022 29 congresswoman taxed disobedience +544 148101 29 Katherine Beatrice captivated A +545 148102 29 titter retrace transferals A +546 148201 29 aspire lockout cartographer A +547 148401 29 Mardis grammatic aims FAS +548 148402 29 Nadia helmsman Pakistani +549 148501 29 estimating uniform burglarized FAS +550 148502 29 stuck hamming saucepans A +551 148503 29 fifteenth disobedience lacerating A +552 148504 29 Colombo captivated corny +553 148601 29 survey transferals megabytes FAS +554 148602 29 staffing cartographer chancellor +555 150701 29 obtain aims bulk A +556 152101 29 loaded Pakistani commits A +557 152102 29 slaughtered burglarized meson W +558 155202 36 lights saucepans deputies +559 155203 29 circumference lacerating northeaster A +560 155204 29 dull corny dipole +561 155205 29 weekly megabytes machining 0 +562 156001 29 wetness chancellor therefore +563 156002 29 visualized bulk Telefunken +564 156102 29 Tannenbaum commits salvaging +565 156301 29 moribund meson Corinthianizes A +566 156302 29 demultiplex deputies restlessly A +567 156303 29 lockings northeaster bromides +568 156304 29 thugs dipole generalized A +569 156305 29 unnerves machining mishaps +570 156306 29 abut therefore quelling +571 156501 29 Chippewa Telefunken spiritual A +572 158001 29 stratifications salvaging beguiles FAS +573 158002 29 signaled Corinthianizes Trobriand FAS +574 158101 29 Italianizes restlessly fleeing A +575 158102 29 algorithmic bromides Armour A +576 158103 29 paranoid generalized chin A +577 158201 29 camping mishaps provers A +578 158202 29 signifying quelling aeronautic A +579 158203 29 Patrice spiritual voltage W +580 158204 29 search beguiles sash +581 158301 29 Angeles Trobriand anaerobic A +582 158302 29 semblance fleeing simultaneous A +583 158303 29 taxed Armour accumulating A +584 158304 29 Beatrice chin Medusan A +585 158305 29 retrace provers shouted A +586 158306 29 lockout aeronautic freakish +587 158501 29 grammatic voltage index FAS +588 160301 29 helmsman sash commercially +589 166101 50 uniform anaerobic mistiness A +590 166102 50 hamming simultaneous endpoint +591 168001 29 disobedience accumulating straight A +592 168002 29 captivated Medusan flurried +593 168003 29 transferals shouted denotative A +594 168101 29 cartographer freakish coming FAS +595 168102 29 aims index commencements FAS +596 168103 29 Pakistani commercially gentleman +597 168104 29 burglarized mistiness gifted +598 168202 29 saucepans endpoint Shanghais +599 168301 29 lacerating straight sportswriting A +600 168502 29 corny flurried sloping A +601 168503 29 megabytes denotative navies +602 168601 29 chancellor coming leaflet A +603 173001 40 bulk commencements shooter +604 173701 40 commits gentleman Joplin FAS +605 173702 40 meson gifted babies +606 176001 40 deputies Shanghais subdivision FAS +607 176101 40 northeaster sportswriting burstiness W +608 176201 40 dipole sloping belted FAS +609 176401 40 machining navies assails FAS +610 176501 40 therefore leaflet admiring W +611 176601 40 Telefunken shooter swaying 0 +612 176602 40 salvaging Joplin Goldstine FAS +613 176603 40 Corinthianizes babies fitting +614 178001 40 restlessly subdivision Norwalk W +615 178002 40 bromides burstiness weakening W +616 178003 40 generalized belted analogy FAS +617 178004 40 mishaps assails deludes +618 178005 40 quelling admiring cokes +619 178006 40 spiritual swaying Clayton +620 178007 40 beguiles Goldstine exhausts +621 178008 40 Trobriand fitting causality +622 178101 40 fleeing Norwalk sating FAS +623 178102 40 Armour weakening icon +624 178103 40 chin analogy throttles +625 178201 40 provers deludes communicants FAS +626 178202 40 aeronautic cokes dehydrate FAS +627 178301 40 voltage Clayton priceless FAS +628 178302 40 sash exhausts publicly +629 178401 40 anaerobic causality incidentals FAS +630 178402 40 simultaneous sating commonplace +631 178403 40 accumulating icon mumbles +632 178404 40 Medusan throttles furthermore W +633 178501 40 shouted communicants cautioned W +634 186002 37 freakish dehydrate parametrized A +635 186102 37 index priceless registration A +636 186201 40 commercially publicly sadly FAS +637 186202 40 mistiness incidentals positioning +638 186203 40 endpoint commonplace babysitting +639 186302 37 straight mumbles eternal A +640 188007 37 flurried furthermore hoarder +641 188008 37 denotative cautioned congregates +642 188009 37 coming parametrized rains +643 188010 37 commencements registration workers W +644 188011 37 gentleman sadly sags A +645 188012 37 gifted positioning unplug W +646 188013 37 Shanghais babysitting garage A +647 188014 37 sportswriting eternal boulder A +648 188015 37 sloping hoarder hollowly A +649 188016 37 navies congregates specifics +650 188017 37 leaflet rains Teresa +651 188102 37 shooter workers Winsett +652 188103 37 Joplin sags convenient A +653 188202 37 babies unplug buckboards FAS +654 188301 40 subdivision garage amenities +655 188302 40 burstiness boulder resplendent FAS +656 188303 40 belted hollowly priding FAS +657 188401 37 assails specifics configurations +658 188402 37 admiring Teresa untidiness A +659 188503 37 swaying Winsett Brice W +660 188504 37 Goldstine convenient sews FAS +661 188505 37 fitting buckboards participated +662 190701 37 Norwalk amenities Simon FAS +663 190703 50 weakening resplendent certificates +664 191701 37 analogy priding Fitzpatrick +665 191702 37 deludes configurations Evanston A +666 191703 37 cokes untidiness misted +667 196001 37 Clayton Brice textures A +668 196002 37 exhausts sews save +669 196003 37 causality participated count +670 196101 37 sating Simon rightful A +671 196103 37 icon certificates chaperone +672 196104 37 throttles Fitzpatrick Lizzy A +673 196201 37 communicants Evanston clenched A +674 196202 37 dehydrate misted effortlessly +675 196203 37 priceless textures accessed +676 198001 37 publicly save beaters A +677 198003 37 incidentals count Hornblower FAS +678 198004 37 commonplace rightful vests A +679 198005 37 mumbles chaperone indulgences FAS +680 198006 37 furthermore Lizzy infallibly A +681 198007 37 cautioned clenched unwilling FAS +682 198008 37 parametrized effortlessly excrete FAS +683 198009 37 registration accessed spools A +684 198010 37 sadly beaters crunches FAS +685 198011 37 positioning Hornblower overestimating FAS +686 198012 37 babysitting vests ineffective +687 198013 37 eternal indulgences humiliation A +688 198014 37 hoarder infallibly sophomore +689 198015 37 congregates unwilling star +690 198017 37 rains excrete rifles +691 198018 37 workers spools dialysis +692 198019 37 sags crunches arriving +693 198020 37 unplug overestimating indulge +694 198021 37 garage ineffective clockers +695 198022 37 boulder humiliation languages +696 198023 50 hollowly sophomore Antarctica A +697 198024 37 specifics star percentage +698 198101 37 Teresa rifles ceiling A +699 198103 37 Winsett dialysis specification +700 198105 37 convenient arriving regimented A +701 198106 37 buckboards indulge ciphers +702 198201 37 amenities clockers pictures A +703 198204 37 resplendent languages serpents A +704 198301 53 priding Antarctica allot A +705 198302 53 configurations percentage realized A +706 198303 53 untidiness ceiling mayoral A +707 198304 53 Brice specification opaquely A +708 198401 37 sews regimented hostess FAS +709 198402 37 participated ciphers fiftieth +710 198403 37 Simon pictures incorrectly +711 202101 37 certificates serpents decomposition FAS +712 202301 37 Fitzpatrick allot stranglings +713 202302 37 Evanston realized mixture FAS +714 202303 37 misted mayoral electroencephalography FAS +715 202304 37 textures opaquely similarities FAS +716 202305 37 save hostess charges W +717 202601 37 count fiftieth freest FAS +718 202602 37 rightful incorrectly Greenberg FAS +719 202605 37 chaperone decomposition tinting +720 202606 37 Lizzy stranglings expelled W +721 202607 37 clenched mixture warm +722 202901 37 effortlessly electroencephalography smoothed +723 202902 37 accessed similarities deductions FAS +724 202903 37 beaters charges Romano W +725 202904 37 Hornblower freest bitterroot +726 202907 37 vests Greenberg corset +727 202908 37 indulgences tinting securing +728 203101 37 infallibly expelled environing FAS +729 203103 37 unwilling warm cute +730 203104 37 excrete smoothed Crays +731 203105 37 spools deductions heiress FAS +732 203401 37 crunches Romano inform FAS +733 203402 37 overestimating bitterroot avenge +734 203404 37 ineffective corset universals +735 203901 37 humiliation securing Kinsey W +736 203902 37 sophomore environing ravines FAS +737 203903 37 star cute bestseller +738 203906 37 rifles Crays equilibrium +739 203907 37 dialysis heiress extents 0 +740 203908 37 arriving inform relatively +741 203909 37 indulge avenge pressure FAS +742 206101 37 clockers universals critiques FAS +743 206201 37 languages Kinsey befouled +744 206202 37 Antarctica ravines rightfully FAS +745 206203 37 percentage bestseller mechanizing FAS +746 206206 37 ceiling equilibrium Latinizes +747 206207 37 specification extents timesharing +748 206208 37 regimented relatively Aden +749 208001 37 ciphers pressure embassies +750 208002 37 pictures critiques males FAS +751 208003 37 serpents befouled shapelessly FAS +752 208004 37 allot rightfully genres FAS +753 208008 37 realized mechanizing mastering +754 208009 37 mayoral Latinizes Newtonian +755 208010 37 opaquely timesharing finishers FAS +756 208011 37 hostess Aden abates +757 208101 37 fiftieth embassies teem +758 208102 37 incorrectly males kiting FAS +759 208103 37 decomposition shapelessly stodgy FAS +760 208104 37 stranglings genres scalps FAS +761 208105 37 mixture mastering feed FAS +762 208110 37 electroencephalography Newtonian guitars +763 208111 37 similarities finishers airships +764 208112 37 charges abates store +765 208113 37 freest teem denounces +766 208201 37 Greenberg kiting Pyle FAS +767 208203 37 tinting stodgy Saxony +768 208301 37 expelled scalps serializations FAS +769 208302 37 warm feed Peruvian FAS +770 208305 37 smoothed guitars taxonomically FAS +771 208401 37 deductions airships kingdom A +772 208402 37 Romano store stint A +773 208403 37 bitterroot denounces Sault A +774 208404 37 corset Pyle faithful +775 208501 37 securing Saxony Ganymede FAS +776 208502 37 environing serializations tidiness FAS +777 208503 37 cute Peruvian gainful FAS +778 208504 37 Crays taxonomically contrary FAS +779 208505 37 heiress kingdom Tipperary FAS +780 210101 37 inform stint tropics W +781 210102 37 avenge Sault theorizers +782 210103 37 universals faithful renew 0 +783 210104 37 Kinsey Ganymede already +784 210105 37 ravines tidiness terminal +785 210106 37 bestseller gainful Hegelian +786 210107 37 equilibrium contrary hypothesizer +787 210401 37 extents Tipperary warningly FAS +788 213201 37 relatively tropics journalizing FAS +789 213203 37 pressure theorizers nested +790 213204 37 critiques renew Lars +791 213205 37 befouled already saplings +792 213206 37 rightfully terminal foothill +793 213207 37 mechanizing Hegelian labeled +794 216101 37 Latinizes hypothesizer imperiously FAS +795 216103 37 timesharing warningly reporters FAS +796 218001 37 Aden journalizing furnishings FAS +797 218002 37 embassies nested precipitable FAS +798 218003 37 males Lars discounts FAS +799 218004 37 shapelessly saplings excises FAS +800 143503 50 genres foothill Stalin +801 218006 37 mastering labeled despot FAS +802 218007 37 Newtonian imperiously ripeness FAS +803 218008 37 finishers reporters Arabia +804 218009 37 abates furnishings unruly +805 218010 37 teem precipitable mournfulness +806 218011 37 kiting discounts boom FAS +807 218020 37 stodgy excises slaughter A +808 218021 50 scalps Stalin Sabine +809 218022 37 feed despot handy FAS +810 218023 37 guitars ripeness rural +811 218024 37 airships Arabia organizer +812 218101 37 store unruly shipyard FAS +813 218102 37 denounces mournfulness civics FAS +814 218103 37 Pyle boom inaccuracy FAS +815 218201 37 Saxony slaughter rules FAS +816 218202 37 serializations Sabine juveniles FAS +817 218203 37 Peruvian handy comprised W +818 218204 37 taxonomically rural investigations +819 218205 37 kingdom organizer stabilizes A +820 218301 37 stint shipyard seminaries FAS +821 218302 37 Sault civics Hunter A +822 218401 37 faithful inaccuracy sporty FAS +823 218402 37 Ganymede rules test FAS +824 218403 37 tidiness juveniles weasels +825 218404 37 gainful comprised CERN +826 218407 37 contrary investigations tempering +827 218408 37 Tipperary stabilizes afore FAS +828 218409 37 tropics seminaries Galatean +829 218410 37 theorizers Hunter techniques W +830 226001 37 renew sporty error +831 226002 37 already test veranda +832 226003 37 terminal weasels severely +833 226004 37 Hegelian CERN Cassites FAS +834 226005 37 hypothesizer tempering forthcoming +835 226006 37 warningly afore guides +836 226007 37 journalizing Galatean vanish FAS +837 226008 37 nested techniques lied A +838 226203 37 Lars error sawtooth FAS +839 226204 37 saplings veranda fated FAS +840 226205 37 foothill severely gradually +841 226206 37 labeled Cassites widens +842 226207 37 imperiously forthcoming preclude +843 226208 37 reporters guides Jobrel +844 226209 37 furnishings vanish hooker +845 226210 37 precipitable lied rainstorm +846 226211 37 discounts sawtooth disconnects +847 228001 37 excises fated cruelty +848 228004 37 Stalin gradually exponentials A +849 228005 37 despot widens affective A +850 228006 37 ripeness preclude arteries +851 228007 37 Arabia Jobrel Crosby FAS +852 228008 37 unruly hooker acquaint +853 228009 37 mournfulness rainstorm evenhandedly +854 228101 37 boom disconnects percentage +855 228108 37 slaughter cruelty disobedience +856 228109 37 Sabine exponentials humility +857 228110 37 handy affective gleaning A +858 228111 37 rural arteries petted A +859 228112 37 organizer Crosby bloater A +860 228113 37 shipyard acquaint minion A +861 228114 37 civics evenhandedly marginal A +862 228115 37 inaccuracy percentage apiary A +863 228116 37 rules disobedience measures +864 228117 37 juveniles humility precaution +865 228118 37 comprised gleaning repelled +866 228119 37 investigations petted primary FAS +867 228120 37 stabilizes bloater coverings +868 228121 37 seminaries minion Artemia A +869 228122 37 Hunter marginal navigate +870 228201 37 sporty apiary spatial +871 228206 37 test measures Gurkha +872 228207 37 weasels precaution meanwhile A +873 228208 37 CERN repelled Melinda A +874 228209 37 tempering primary Butterfield +875 228210 37 afore coverings Aldrich A +876 228211 37 Galatean Artemia previewing A +877 228212 37 techniques navigate glut A +878 228213 37 error spatial unaffected +879 228214 37 veranda Gurkha inmate +880 228301 37 severely meanwhile mineral +881 228305 37 Cassites Melinda impending A +882 228306 37 forthcoming Butterfield meditation A +883 228307 37 guides Aldrich ideas +884 228308 37 vanish previewing miniaturizes W +885 228309 37 lied glut lewdly +886 228310 37 sawtooth unaffected title +887 228311 37 fated inmate youthfulness +888 228312 37 gradually mineral creak FAS +889 228313 37 widens impending Chippewa +890 228314 37 preclude meditation clamored +891 228401 65 Jobrel ideas freezes +892 228402 65 hooker miniaturizes forgivably FAS +893 228403 65 rainstorm lewdly reduce FAS +894 228404 65 disconnects title McGovern W +895 228405 65 cruelty youthfulness Nazis W +896 228406 65 exponentials creak epistle W +897 228407 65 affective Chippewa socializes W +898 228408 65 arteries clamored conceptions +899 228409 65 Crosby freezes Kevin +900 228410 65 acquaint forgivably uncovering +901 230301 37 evenhandedly reduce chews FAS +902 230302 37 percentage McGovern appendixes FAS +903 230303 37 disobedience Nazis raining +904 018062 37 humility epistle infest +905 230501 37 gleaning socializes compartment +906 230502 37 petted conceptions minting +907 230503 37 bloater Kevin ducks +908 230504 37 minion uncovering roped A +909 230505 37 marginal chews waltz +910 230506 37 apiary appendixes Lillian +911 230507 37 measures raining repressions A +912 230508 37 precaution infest chillingly +913 230509 37 repelled compartment noncritical +914 230901 37 primary minting lithograph +915 230902 37 coverings ducks spongers +916 230903 37 Artemia roped parenthood +917 230904 37 navigate waltz posed +918 230905 37 spatial Lillian instruments +919 230906 37 Gurkha repressions filial +920 230907 37 meanwhile chillingly fixedly +921 230908 37 Melinda noncritical relives +922 230909 37 Butterfield lithograph Pandora +923 230910 37 Aldrich spongers watering A +924 230911 37 previewing parenthood ungrateful +925 230912 37 glut posed secures +926 230913 37 unaffected instruments chastisers +927 230914 37 inmate filial icon +928 231304 37 mineral fixedly reuniting A +929 231305 37 impending relives imagining A +930 231306 37 meditation Pandora abiding A +931 231307 37 ideas watering omnisciently +932 231308 37 miniaturizes ungrateful Britannic +933 231309 37 lewdly secures scholastics A +934 231310 37 title chastisers mechanics A +935 231311 37 youthfulness icon humidly A +936 231312 37 creak reuniting masterpiece +937 231313 37 Chippewa imagining however +938 231314 37 clamored abiding Mendelian +939 231315 37 freezes omnisciently jarred +940 232102 37 forgivably Britannic scolds +941 232103 37 reduce scholastics infatuate +942 232104 37 McGovern mechanics willed A +943 232105 37 Nazis humidly joyfully +944 232106 37 epistle masterpiece Microsoft +945 232107 37 socializes however fibrosities +946 232108 37 conceptions Mendelian Baltimorean +947 232601 37 Kevin jarred equestrian +948 232602 37 uncovering scolds Goodrich +949 232603 37 chews infatuate apish A +950 232605 37 appendixes willed Adlerian +5950 1232605 37 appendixes willed Adlerian +5951 1232606 37 appendixes willed Adlerian +5952 1232607 37 appendixes willed Adlerian +5953 1232608 37 appendixes willed Adlerian +5954 1232609 37 appendixes willed Adlerian +951 232606 37 raining joyfully Tropez +952 232607 37 infest Microsoft nouns +953 232608 37 compartment fibrosities distracting +954 232609 37 minting Baltimorean mutton +955 236104 37 ducks equestrian bridgeable A +956 236105 37 roped Goodrich stickers A +957 236106 37 waltz apish transcontinental A +958 236107 37 Lillian Adlerian amateurish +959 236108 37 repressions Tropez Gandhian +960 236109 37 chillingly nouns stratified +961 236110 37 noncritical distracting chamberlains +962 236111 37 lithograph mutton creditably +963 236112 37 spongers bridgeable philosophic +964 236113 37 parenthood stickers ores +965 238005 37 posed transcontinental Carleton +966 238006 37 instruments amateurish tape A +967 238007 37 filial Gandhian afloat A +968 238008 37 fixedly stratified goodness A +969 238009 37 relives chamberlains welcoming +970 238010 37 Pandora creditably Pinsky FAS +971 238011 37 watering philosophic halting +972 238012 37 ungrateful ores bibliography +973 238013 37 secures Carleton decoding +974 240401 41 chastisers tape variance A +975 240402 41 icon afloat allowed A +976 240901 41 reuniting goodness dire A +977 240902 41 imagining welcoming dub A +978 241801 41 abiding Pinsky poisoning +979 242101 41 omnisciently halting Iraqis A +980 242102 41 Britannic bibliography heaving +981 242201 41 scholastics decoding population A +982 242202 41 mechanics variance bomb A +983 242501 41 humidly allowed Majorca A +984 242502 41 masterpiece dire Gershwins +985 246201 41 however dub explorers +986 246202 41 Mendelian poisoning libretto A +987 246203 41 jarred Iraqis occurred +988 246204 41 scolds heaving Lagos +989 246205 41 infatuate population rats +990 246301 41 willed bomb bankruptcies A +991 246302 41 joyfully Majorca crying +992 248001 41 Microsoft Gershwins unexpected +993 248002 41 fibrosities explorers accessed A +994 248003 41 Baltimorean libretto colorful A +995 248004 41 equestrian occurred versatility A +996 248005 41 Goodrich Lagos cosy +997 248006 41 apish rats Darius A +998 248007 41 Adlerian bankruptcies mastering A +999 248008 41 Tropez crying Asiaticizations A +1000 248009 41 nouns unexpected offerers A +1001 248010 41 distracting accessed uncles A +1002 248011 41 mutton colorful sleepwalk +1003 248012 41 bridgeable versatility Ernestine +1004 248013 41 stickers cosy checksumming +1005 248014 41 transcontinental Darius stopped +1006 248015 41 amateurish mastering sicker +1007 248016 41 Gandhian Asiaticizations Italianization +1008 248017 41 stratified offerers alphabetic +1009 248018 41 chamberlains uncles pharmaceutic +1010 248019 41 creditably sleepwalk creator +1011 248020 41 philosophic Ernestine chess +1012 248021 41 ores checksumming charcoal +1013 248101 41 Carleton stopped Epiphany A +1014 248102 41 tape sicker bulldozes A +1015 248201 41 afloat Italianization Pygmalion A +1016 248202 41 goodness alphabetic caressing A +1017 248203 41 welcoming pharmaceutic Palestine A +1018 248204 41 Pinsky creator regimented A +1019 248205 41 halting chess scars A +1020 248206 41 bibliography charcoal realest A +1021 248207 41 decoding Epiphany diffusing A +1022 248208 41 variance bulldozes clubroom A +1023 248209 41 allowed Pygmalion Blythe A +1024 248210 41 dire caressing ahead +1025 248211 50 dub Palestine reviver +1026 250501 34 poisoning regimented retransmitting A +1027 250502 34 Iraqis scars landslide +1028 250503 34 heaving realest Eiffel +1029 250504 34 population diffusing absentee +1030 250505 34 bomb clubroom aye +1031 250601 34 Majorca Blythe forked A +1032 250602 34 Gershwins ahead Peruvianizes +1033 250603 34 explorers reviver clerked +1034 250604 34 libretto retransmitting tutor +1035 250605 34 occurred landslide boulevard +1036 251001 34 Lagos Eiffel shuttered +1037 251002 34 rats absentee quotes A +1038 251003 34 bankruptcies aye Caltech +1039 251004 34 crying forked Mossberg +1040 251005 34 unexpected Peruvianizes kept +1041 251301 34 accessed clerked roundly +1042 251302 34 colorful tutor features A +1043 251303 34 versatility boulevard imaginable A +1044 251304 34 cosy shuttered controller +1045 251305 34 Darius quotes racial +1046 251401 34 mastering Caltech uprisings A +1047 251402 34 Asiaticizations Mossberg narrowed A +1048 251403 34 offerers kept cannot A +1049 251404 34 uncles roundly vest +1050 251405 34 sleepwalk features famine +1051 251406 34 Ernestine imaginable sugars +1052 251801 34 checksumming controller exterminated A +1053 251802 34 stopped racial belays +1054 252101 34 sicker uprisings Hodges A +1055 252102 34 Italianization narrowed translatable +1056 252301 34 alphabetic cannot duality A +1057 252302 34 pharmaceutic vest recording A +1058 252303 34 creator famine rouses A +1059 252304 34 chess sugars poison +1060 252305 34 charcoal exterminated attitude +1061 252306 34 Epiphany belays dusted +1062 252307 34 bulldozes Hodges encompasses +1063 252308 34 Pygmalion translatable presentation +1064 252309 34 caressing duality Kantian +1065 256001 34 Palestine recording imprecision A +1066 256002 34 regimented rouses saving +1067 256003 34 scars poison maternal +1068 256004 34 realest attitude hewed +1069 256005 34 diffusing dusted kerosene +1070 258001 34 clubroom encompasses Cubans +1071 258002 34 Blythe presentation photographers +1072 258003 34 ahead Kantian nymph A +1073 258004 34 reviver imprecision bedlam A +1074 258005 34 retransmitting saving north A +1075 258006 34 landslide maternal Schoenberg A +1076 258007 34 Eiffel hewed botany A +1077 258008 34 absentee kerosene curs +1078 258009 34 aye Cubans solidification +1079 258010 34 forked photographers inheritresses +1080 258011 34 Peruvianizes nymph stiller +1081 258101 68 clerked bedlam t1 A +1082 258102 68 tutor north suite A +1083 258103 34 boulevard Schoenberg ransomer +1084 258104 68 shuttered botany Willy +1085 258105 68 quotes curs Rena A +1086 258106 68 Caltech solidification Seattle A +1087 258107 68 Mossberg inheritresses relaxes A +1088 258108 68 kept stiller exclaim +1089 258109 68 roundly t1 implicated A +1090 258110 68 features suite distinguish +1091 258111 68 imaginable ransomer assayed +1092 258112 68 controller Willy homeowner +1093 258113 68 racial Rena and +1094 258201 34 uprisings Seattle stealth +1095 258202 34 narrowed relaxes coinciding A +1096 258203 34 cannot exclaim founder A +1097 258204 34 vest implicated environing +1098 258205 34 famine distinguish jewelry +1099 258301 34 sugars assayed lemons A +1100 258401 34 exterminated homeowner brokenness A +1101 258402 34 belays and bedpost A +1102 258403 34 Hodges stealth assurers A +1103 258404 34 translatable coinciding annoyers +1104 258405 34 duality founder affixed +1105 258406 34 recording environing warbling +1106 258407 34 rouses jewelry seriously +1107 228123 37 poison lemons boasted +1108 250606 34 attitude brokenness Chantilly +1109 208405 37 dusted bedpost Iranizes +1110 212101 37 encompasses assurers violinist +1111 218206 37 presentation annoyers extramarital +1112 150401 37 Kantian affixed spates +1113 248212 41 imprecision warbling cloakroom +1114 128026 00 saving seriously gazer +1115 128024 00 maternal boasted hand +1116 128027 00 hewed Chantilly tucked +1117 128025 00 kerosene Iranizes gems +1118 128109 00 Cubans violinist clinker +1119 128705 00 photographers extramarital refiner +1120 126303 00 nymph spates callus +1121 128308 00 bedlam cloakroom leopards +1122 128204 00 north gazer comfortingly +1123 128205 00 Schoenberg hand generically +1124 128206 00 botany tucked getters +1125 128207 00 curs gems sexually +1126 118205 00 solidification clinker spear +1127 116801 00 inheritresses refiner serums +1128 116803 00 stiller callus Italianization +1129 116804 00 t1 leopards attendants +1130 116802 00 suite comfortingly spies +1131 128605 00 ransomer generically Anthony +1132 118308 00 Willy getters planar +1133 113702 00 Rena sexually cupped +1134 113703 00 Seattle spear cleanser +1135 112103 00 relaxes serums commuters +1136 118009 00 exclaim Italianization honeysuckle +5136 1118009 00 exclaim Italianization honeysuckle +1137 138011 00 implicated attendants orphanage +1138 138010 00 distinguish spies skies +1139 138012 00 assayed Anthony crushers +1140 068304 00 homeowner planar Puritan +1141 078009 00 and cupped squeezer +1142 108013 00 stealth cleanser bruises +1143 084004 00 coinciding commuters bonfire +1144 083402 00 founder honeysuckle Colombo +1145 084003 00 environing orphanage nondecreasing +1146 088504 00 jewelry skies innocents +1147 088005 00 lemons crushers masked +1148 088007 00 brokenness Puritan file +1149 088006 00 bedpost squeezer brush +1150 148025 00 assurers bruises mutilate +1151 148024 00 annoyers bonfire mommy +1152 138305 00 affixed Colombo bulkheads +1153 138306 00 warbling nondecreasing undeclared +1154 152701 00 seriously innocents displacements +1155 148505 00 boasted masked nieces +1156 158003 00 Chantilly file coeducation +1157 156201 00 Iranizes brush brassy +1158 156202 00 violinist mutilate authenticator +1159 158307 00 extramarital mommy Washoe +1160 158402 00 spates bulkheads penny +1161 158401 00 cloakroom undeclared Flagler +1162 068013 00 gazer displacements stoned +1163 068012 00 hand nieces cranes +1164 068203 00 tucked coeducation masterful +1165 088205 00 gems brassy biracial +1166 068704 00 clinker authenticator steamships +1167 068604 00 refiner Washoe windmills +1168 158502 00 callus penny exploit +1169 123103 00 leopards Flagler riverfront +1170 148026 00 comfortingly stoned sisterly +1171 123302 00 generically cranes sharpshoot +1172 076503 00 getters masterful mittens +1173 126304 00 sexually biracial interdependency +1174 068306 00 spear steamships policy +1175 143504 00 serums windmills unleashing +1176 160201 00 Italianization exploit pretenders +1177 148028 00 attendants riverfront overstatements +1178 148027 00 spies sisterly birthed +1179 143505 00 Anthony sharpshoot opportunism +1180 108014 00 planar mittens showroom +1181 076104 00 cupped interdependency compromisingly +1182 078106 00 cleanser policy Medicare +1183 126102 00 commuters unleashing corresponds +1184 128029 00 honeysuckle pretenders hardware +1185 128028 00 orphanage overstatements implant +1186 018410 00 skies birthed Alicia +1187 128110 00 crushers opportunism requesting +1188 148506 00 Puritan showroom produced +1189 123303 00 squeezer compromisingly criticizes +1190 123304 00 bruises Medicare backer 1191 068504 00 bonfire corresponds positively -select count(*) from t4; -count(*) -1203 +1192 068305 00 Colombo hardware colicky +1193 000000 00 nondecreasing implant thrillingly +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +1 000001 00 Omaha teethe neat +2 011401 37 breaking dreaded Steinberg W +3 011402 37 Romans scholastics jarring +4 011403 37 intercepted audiology tinily +INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); drop table t1, t2, t4; diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 9f3695cb1b1..61a42b004a9 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -163,7 +163,7 @@ last_insert_id() 255 insert into t1 set i = null; Warnings: -Warning 1264 Data truncated; out of range for column 'i' at row 1 +Warning 1264 Out of range value adjusted for column 'i' at row 1 select last_insert_id(); last_insert_id() 255 @@ -232,7 +232,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=6; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4 update t1 set a=300 where b=7; SET SQL_MODE=''; insert into t1(a,b)values(NULL,8); @@ -274,7 +274,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=13; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 9 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 9 update t1 set a=500 where b=14; select * from t1 order by b; a b @@ -355,3 +355,42 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY (`a`),UNIQUE KEY `b` (`b`)); +insert into t1 (b) values (1); +replace into t1 (b) values (2), (1), (3); +select * from t1; +a b +3 1 +2 2 +4 3 +truncate table t1; +insert into t1 (b) values (1); +replace into t1 (b) values (2); +replace into t1 (b) values (1); +replace into t1 (b) values (3); +select * from t1; +a b +3 1 +2 2 +4 3 +drop table t1; +create table t1 (rowid int not null auto_increment, val int not null,primary +key (rowid), unique(val)); +replace into t1 (val) values ('1'),('2'); +replace into t1 (val) values ('1'),('2'); +insert into t1 (val) values ('1'),('2'); +ERROR 23000: Duplicate entry '1' for key 2 +select * from t1; +rowid val +3 1 +4 2 +drop table t1; +create table t1 (a int not null auto_increment primary key, val int); +insert into t1 (val) values (1); +update t1 set a=2 where a=1; +insert into t1 (val) values (1); +select * from t1; +a val +2 1 +3 1 +drop table t1; diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index e53c3c3eb55..c7b4b1c4155 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -5,6 +5,8 @@ backup table t4 to '../bogus'; Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup status Operation failed +Warnings: +Error 1 Can't create/write to file 'MYSQL_TEST_DIR/var/bogus/t4.frm' (Errcode: X) backup table t4 to '../tmp'; Table Op Msg_type Msg_text test.t4 backup status OK @@ -12,6 +14,8 @@ backup table t4 to '../tmp'; Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) test.t4 backup status Operation failed +Warnings: +Error 1 Can't create/write to file 'MYSQL_TEST_DIR/var/tmp/t4.frm' (Errcode: X) drop table t4; restore table t4 from '../tmp'; Table Op Msg_type Msg_text @@ -28,6 +32,8 @@ drop table t1; restore table t1 from '../bogus'; Table Op Msg_type Msg_text t1 restore error Failed copying .frm file +Warnings: +Error 29 File 'MYSQL_TEST_DIR/var/bogus/t1.frm' not found (Errcode: X) restore table t1 from '../tmp'; Table Op Msg_type Msg_text test.t1 restore status OK diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 6da3dbb929d..d525b019c64 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -140,13 +140,13 @@ id parent_id level 1015 102 2 explain select level from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const 1 Using where; Using index +1 SIMPLE t1 ref level level 1 const X Using index explain select level,id from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const 1 Using where; Using index +1 SIMPLE t1 ref level level 1 const X Using index explain select level,id,parent_id from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const 1 Using where +1 SIMPLE t1 ref level level 1 const X select level,id from t1 where level=1; level id 1 1002 @@ -625,7 +625,7 @@ id parent_id level 1016 102 2 explain select level from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const 1 Using where; Using index +1 SIMPLE t1 ref level level 1 const X Using index select level,id from t1 where level=1; level id 1 1004 @@ -737,6 +737,11 @@ a 1 2 3 +select a from t1 natural join t1 as t2 where b >= @a order by a; +a +1 +2 +3 update t1 set a=5 where a=1; select a from t1; a @@ -1284,3 +1289,609 @@ SELECT id FROM t1 WHERE (list_id = 1) AND (term = "letterd"); id 4 DROP TABLE t1; +create temporary table t1 (a int, primary key(a)) engine=bdb; +select * from t1; +a +alter table t1 add b int; +select * from t1; +a b +drop table t1; +set storage_engine=bdb; +drop table if exists t1,t2,t3; +--- Testing varchar --- +--- Testing varchar --- +create table t1 (v varchar(10), c char(10), t text); +insert into t1 values('+ ', '+ ', '+ '); +set @a=repeat(' ',20); +insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); +Warnings: +Note 1265 Data truncated for column 'v' at row 1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+ *+*+ * +*+ *+*+ * +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +create table t3 select * from t1; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +alter table t1 modify c varchar(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` varchar(10) default NULL, + `t` text +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +alter table t1 modify v char(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` text +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +alter table t1 modify t varchar(10); +Warnings: +Note 1265 Data truncated for column 't' at row 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` varchar(10) default NULL +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+*+*+ * +*+*+*+ * +drop table t1,t2,t3; +create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `v` (`v`), + KEY `c` (`c`), + KEY `t` (`t`(10)) +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +270 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1))); +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where c='a'; +count(*) +10 +select count(*) from t1 where t='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where c='a '; +count(*) +10 +select count(*) from t1 where t='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where c like 'a%'; +count(*) +11 +select count(*) from t1 where t like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where +explain select count(*) from t1 where c='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 11 const # Using where +explain select count(*) from t1 where t='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range t t 13 NULL # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where +alter table t1 add unique(v); +ERROR 23000: Duplicate entry '{ ' for key 1 +alter table t1 add key(v); +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; +qq +*a*a*a* +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v,v_2 # 13 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(*) from t1 group by c limit 10; +c count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(*) from t1 group by t limit 10; +t count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); +Warnings: +Warning 1071 Specified key was too long; max key length is 255 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`(255)) +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 258 const # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL # Using where +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 258 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 drop key v, add key v (v(30)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`(30)) +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(600), drop key v, add key v (v); +Warnings: +Warning 1071 Specified key was too long; max key length is 255 bytes +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(600) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`(255)) +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +drop table t1; +create table t1 (a char(10), unique (a)); +insert into t1 values ('a '); +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a' for key 1 +alter table t1 modify a varchar(10); +insert into t1 values ('a '),('a '),('a '),('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +update t1 set a='a ' where a like 'a%'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='abc ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a %'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +drop table t1; +create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `v` (`v`(5)), + KEY `c` (`c`(5)), + KEY `t` (`t`(5)) +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v char(10) character set utf8); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) character set utf8 default NULL +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(10), c char(10)) row_format=fixed; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED +insert into t1 values('a','a'),('a ','a '); +select concat('*',v,'*',c,'*') from t1; +concat('*',v,'*',c,'*') +*a*a* +*a *a* +drop table t1; +create table t1 (v varchar(65530), key(v(10))); +insert into t1 values(repeat('a',65530)); +select length(v) from t1 where v=repeat('a',65530); +length(v) +65530 +drop table t1; +create table t1(a int, b varchar(12), key ba(b, a)); +insert into t1 values (1, 'A'), (20, NULL); +explain select * from t1 where a=20 and b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref ba ba 20 const,const 1 Using where +select * from t1 where a=20 and b is null; +a b +20 NULL +drop table t1; +create table t1 (v varchar(65530), key(v)); +Warnings: +Warning 1071 Specified key was too long; max key length is 255 bytes +drop table if exists t1; +create table t1 (v varchar(65536)); +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65530) character set utf8); +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext character set utf8 +) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1 +drop table t1; +set storage_engine=MyISAM; diff --git a/mysql-test/r/bench_count_distinct.result b/mysql-test/r/bench_count_distinct.result index fcc0c0948b3..62312870f59 100644 --- a/mysql-test/r/bench_count_distinct.result +++ b/mysql-test/r/bench_count_distinct.result @@ -7,5 +7,5 @@ explain extended select count(distinct n) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL n 4 NULL 200 Using index Warnings: -Note 1003 select count(distinct test.t1.n) AS `count(distinct n)` from test.t1 +Note 1003 select count(distinct `test`.`t1`.`n`) AS `count(distinct n)` from `test`.`t1` drop table t1; diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index e9a457c9dfa..1b5619eb18d 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -7,7 +7,7 @@ select 9223372036854775807,-009223372036854775808; 9223372036854775807 -9223372036854775808 select +9999999999999999999,-9999999999999999999; 9999999999999999999 -9999999999999999999 -9999999999999999999 -10000000000000000000 +9999999999999999999 -9999999999999999999 select cast(9223372036854775808 as unsigned)+1; cast(9223372036854775808 as unsigned)+1 9223372036854775809 @@ -16,13 +16,13 @@ select 9223372036854775808+1; 9223372036854775809 select -(0-3),round(-(0-3)), round(9999999999999999999); -(0-3) round(-(0-3)) round(9999999999999999999) -3 3 10000000000000000000 +3 3 9999999999999999999 select 1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001; 1 11 101 1001 10001 100001 1000001 10000001 100000001 1000000001 10000000001 100000000001 1000000000001 10000000000001 100000000000001 1000000000000001 10000000000000001 100000000000000001 1000000000000000001 10000000000000000001 1 11 101 1001 10001 100001 1000001 10000001 100000001 1000000001 10000000001 100000000001 1000000000001 10000000000001 100000000000001 1000000000000001 10000000000000001 100000000000000001 1000000000000000001 10000000000000000001 select -1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001; -1 -11 -101 -1001 -10001 -100001 -1000001 -10000001 -100000001 -1000000001 -10000000001 -100000000001 -1000000000001 -10000000000001 -100000000000001 -1000000000000001 -10000000000000001 -100000000000000001 -1000000000000000001 -10000000000000000001 --1 -11 -101 -1001 -10001 -100001 -1000001 -10000001 -100000001 -1000000001 -10000000001 -100000000001 -1000000000001 -10000000000001 -100000000000001 -1000000000000001 -10000000000000001 -100000000000000001 -1000000000000000001 -10000000000000000000 +-1 -11 -101 -1001 -10001 -100001 -1000001 -10000001 -100000001 -1000000001 -10000000001 -100000000001 -1000000000001 -10000000000001 -100000000000001 -1000000000000001 -10000000000000001 -100000000000000001 -1000000000000000001 -10000000000000000001 select conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16); conv(1,10,16) conv((1<<2)-1,10,16) conv((1<<10)-2,10,16) conv((1<<16)-3,10,16) conv((1<<25)-4,10,16) conv((1<<31)-5,10,16) conv((1<<36)-6,10,16) conv((1<<47)-7,10,16) conv((1<<48)-8,10,16) conv((1<<55)-9,10,16) conv((1<<56)-10,10,16) conv((1<<63)-11,10,16) 1 3 3FE FFFD 1FFFFFC 7FFFFFFB FFFFFFFFA 7FFFFFFFFFF9 FFFFFFFFFFF8 7FFFFFFFFFFFF7 FFFFFFFFFFFFF6 7FFFFFFFFFFFFFF5 @@ -96,6 +96,8 @@ drop table t1; SELECT '0x8000000000000001'+0; '0x8000000000000001'+0 0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0x8000000000000001' create table t1 ( value64 bigint unsigned not null, value32 integer not null, @@ -135,3 +137,20 @@ t2.value64=t1.value64; value64 value32 value64 value32 9223372036854775807 2 9223372036854775807 4 drop table t1, t2; +create table t1 select 1 as 'a'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(1) NOT NULL default '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select 9223372036854775809 as 'a'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(19) unsigned NOT NULL default '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from t1; +a +9223372036854775809 +drop table t1; diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result new file mode 100644 index 00000000000..5d5b78abe29 --- /dev/null +++ b/mysql-test/r/binlog.result @@ -0,0 +1,135 @@ +drop table if exists t1, t2; +reset master; +create table t1 (a int) engine=bdb; +create table t2 (a int) engine=innodb; +begin; +insert t1 values (5); +commit; +begin; +insert t2 values (5); +commit; +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=bdb +master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert t1 values (5) +master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert t2 values (5) +master-bin.000001 # Xid 1 # COMMIT /* xid=11 */ +drop table t1,t2; +reset master; +create table t1 (n int) engine=innodb; +begin; +commit; +drop table t1; +show binlog events in 'master-bin.000001' from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(97 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(96 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(95 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(94 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(93 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(92 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(91 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(90 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(89 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(88 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(87 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(86 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(85 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(84 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(83 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(82 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(81 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(80 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(79 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(78 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(77 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(76 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(75 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(74 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(73 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(72 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(71 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(70 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(69 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(68 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(67 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(66 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(65 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(64 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(63 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(62 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(61 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(60 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(59 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(58 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(57 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(56 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(55 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(54 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(53 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(52 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(51 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(50 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(49 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(48 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(47 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(46 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(45 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(44 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(43 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(42 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(41 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(40 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(39 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(38 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(37 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(36 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(35 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(34 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(33 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(32 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(31 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(30 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(29 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(28 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(27 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(26 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(25 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(24 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(23 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(22 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(21 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(20 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(19 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(18 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(17 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(16 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(15 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(14 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(13 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(12 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(11 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(10 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(9 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(8 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(7 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(6 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(5 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(4 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4) +master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4) +master-bin.000001 # Xid 1 # COMMIT /* xid=18 */ +master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 +show binlog events in 'master-bin.000002' from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query 1 # use `test`; drop table t1 diff --git a/mysql-test/r/blackhole.result b/mysql-test/r/blackhole.result index 4b779094376..38e548490fe 100644 --- a/mysql-test/r/blackhole.result +++ b/mysql-test/r/blackhole.result @@ -73,7 +73,7 @@ explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 fulltext a a 0 1 Using where Warnings: -Note 1003 select test.t1.a AS `a`,test.t1.b AS `b` from test.t1 where (match test.t1.a,test.t1.b against (_latin1'collections')) +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'collections')) select * from t1 where MATCH(a,b) AGAINST ("indexes"); a b Full-text indexes are called collections @@ -105,8 +105,8 @@ a select * from t3; a show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; drop table t1,t2 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole master-bin.000001 # Query 1 # use `test`; delete from t1 where a=10 @@ -115,8 +115,8 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values(1) master-bin.000001 # Query 1 # use `test`; insert ignore into t1 values(1) master-bin.000001 # Query 1 # use `test`; replace into t1 values(100) master-bin.000001 # Query 1 # use `test`; create table t2 (a varchar(200)) engine=blackhole -master-bin.000001 # Create_file 1 # db=test;table=t2;file_id=1;block_len=581 -master-bin.000001 # Exec_load 1 # ;file_id=1 +master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581 +master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../../std_data/words.dat' into table t2 ;file_id=1 master-bin.000001 # Query 1 # use `test`; alter table t1 add b int master-bin.000001 # Query 1 # use `test`; alter table t1 drop b master-bin.000001 # Query 1 # use `test`; create table t3 like t1 diff --git a/mysql-test/r/bool.result b/mysql-test/r/bool.result index a054eceec0c..184046a2d6f 100644 --- a/mysql-test/r/bool.result +++ b/mysql-test/r/bool.result @@ -33,6 +33,24 @@ a SELECT * FROM t1 where (1 AND a) IS NULL; a NULL +set sql_mode='high_not_precedence'; +select * from t1 where not a between 2 and 3; +a +set sql_mode=default; +select * from t1 where not a between 2 and 3; +a +0 +1 +select a, a is false, a is true, a is unknown from t1; +a a is false a is true a is unknown +0 1 0 0 +1 0 1 0 +NULL 0 0 1 +select a, a is not false, a is not true, a is not unknown from t1; +a a is not false a is not true a is not unknown +0 0 1 1 +1 1 0 1 +NULL 1 1 0 SET @a=0, @b=0; SELECT * FROM t1 WHERE NULL AND (@a:=@a+1); a diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index fb0bc19a67e..b02f85132aa 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -66,7 +66,7 @@ explain extended select case a when 1 then 2 when 2 then 3 else 0 end as fcase, id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort Warnings: -Note 1003 select (case test.t1.a when 1 then 2 when 2 then 3 else 0 end) AS `fcase`,count(0) AS `count(*)` from test.t1 group by (case test.t1.a when 1 then 2 when 2 then 3 else 0 end) +Note 1003 select (case `test`.`t1`.`a` when 1 then 2 when 2 then 3 else 0 end) AS `fcase`,count(0) AS `count(*)` from `test`.`t1` group by (case `test`.`t1`.`a` when 1 then 2 when 2 then 3 else 0 end) select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase; fcase count(*) nothing 2 @@ -91,20 +91,26 @@ CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5, CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6, CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7, CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8, -CASE WHEN 1 THEN 1.0 END AS c9 +CASE WHEN 1 THEN 1.0 END AS c9, +CASE WHEN 1 THEN 0.1e1 else 0.1 END AS c10, +CASE WHEN 1 THEN 0.1e1 else 1 END AS c11, +CASE WHEN 1 THEN 0.1e1 else '1' END AS c12 ; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '', - `c2` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '', - `c3` binary(1) NOT NULL default '', - `c4` binary(1) NOT NULL default '', - `c5` binary(3) NOT NULL default '', - `c6` binary(3) NOT NULL default '', - `c7` double(3,1) NOT NULL default '0.0', - `c8` double(3,1) NOT NULL default '0.0', - `c9` double(3,1) default NULL + `c1` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '', + `c2` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '', + `c3` varbinary(1) NOT NULL default '', + `c4` varbinary(1) NOT NULL default '', + `c5` varbinary(4) NOT NULL default '', + `c6` varbinary(4) NOT NULL default '', + `c7` decimal(2,1) NOT NULL default '0.0', + `c8` decimal(2,1) NOT NULL default '0.0', + `c9` decimal(2,1) default NULL, + `c10` double NOT NULL default '0', + `c11` double NOT NULL default '0', + `c12` varbinary(5) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SELECT CASE @@ -141,17 +147,17 @@ COALESCE('a' COLLATE latin1_bin,'b'); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select coalesce(1) AS `COALESCE(1)`,coalesce(1.0) AS `COALESCE(1.0)`,coalesce(_latin1'a') AS `COALESCE('a')`,coalesce(1,1.0) AS `COALESCE(1,1.0)`,coalesce(1,_latin1'1') AS `COALESCE(1,'1')`,coalesce(1.1,_latin1'1') AS `COALESCE(1.1,'1')`,coalesce((_latin1'a' collate _latin1'latin1_bin'),_latin1'b') AS `COALESCE('a' COLLATE latin1_bin,'b')` +Note 1003 select coalesce(1) AS `COALESCE(1)`,coalesce(1.0) AS `COALESCE(1.0)`,coalesce(_latin1'a') AS `COALESCE('a')`,coalesce(1,1.0) AS `COALESCE(1,1.0)`,coalesce(1,_latin1'1') AS `COALESCE(1,'1')`,coalesce(1.1,_latin1'1') AS `COALESCE(1.1,'1')`,coalesce((_latin1'a' collate latin1_bin),_latin1'b') AS `COALESCE('a' COLLATE latin1_bin,'b')` SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `COALESCE(1)` int(1) NOT NULL default '0', - `COALESCE(1.0)` double(3,1) NOT NULL default '0.0', - `COALESCE('a')` char(1) NOT NULL default '', - `COALESCE(1,1.0)` double(3,1) NOT NULL default '0.0', - `COALESCE(1,'1')` binary(1) NOT NULL default '', - `COALESCE(1.1,'1')` binary(3) NOT NULL default '', - `COALESCE('a' COLLATE latin1_bin,'b')` char(1) character set latin1 collate latin1_bin NOT NULL default '' + `COALESCE(1.0)` decimal(2,1) NOT NULL default '0.0', + `COALESCE('a')` varchar(1) NOT NULL default '', + `COALESCE(1,1.0)` decimal(2,1) NOT NULL default '0.0', + `COALESCE(1,'1')` varbinary(1) NOT NULL default '', + `COALESCE(1.1,'1')` varbinary(4) NOT NULL default '', + `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) character set latin1 collate latin1_bin NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SELECT 'case+union+test' @@ -169,3 +175,20 @@ SELECT CASE '1' WHEN '2' THEN 'BUG' ELSE 'nobug' END; case+union+test case+union+test nobug +CREATE TABLE t1 (EMPNUM INT); +INSERT INTO t1 VALUES (0), (2); +CREATE TABLE t2 (EMPNUM DECIMAL (4, 2)); +INSERT INTO t2 VALUES (0.0), (9.0); +SELECT COALESCE(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM, +t1.EMPNUM AS EMPMUM1, t2.EMPNUM AS EMPNUM2 +FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM; +CEMPNUM EMPMUM1 EMPNUM2 +0.00 0 0.00 +2.00 2 NULL +SELECT IFNULL(t2.EMPNUM,t1.EMPNUM) AS CEMPNUM, +t1.EMPNUM AS EMPMUM1, t2.EMPNUM AS EMPNUM2 +FROM t1 LEFT JOIN t2 ON t1.EMPNUM=t2.EMPNUM; +CEMPNUM EMPMUM1 EMPNUM2 +0.00 0 0.00 +2.00 2 NULL +DROP TABLE t1,t2; diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 7cd0934f7a3..1b5bdf98afd 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -4,6 +4,11 @@ CAST(1-2 AS UNSIGNED) select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER) -1 +select CAST('10 ' as unsigned integer); +CAST('10 ' as unsigned integer) +10 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '10 ' select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1; cast(-5 as unsigned) | 1 cast(-5 as unsigned) & -1 18446744073709551611 18446744073709551611 @@ -39,6 +44,15 @@ cast("1:2:3" as TIME) select CONVERT("2004-01-22 21:45:33",DATE); CONVERT("2004-01-22 21:45:33",DATE) 2004-01-22 +select 10+'10'; +10+'10' +20 +select 10.0+'10'; +10.0+'10' +20 +select 10E+0+'10'; +10E+0+'10' +20 select CONVERT(DATE "2004-01-22 21:45:33" USING latin1); CONVERT(DATE "2004-01-22 21:45:33" USING latin1) 2004-01-22 21:45:33 @@ -48,12 +62,43 @@ CONVERT(DATE "2004-01-22 21:45:33",CHAR) select CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)); CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)) 2004 +Warnings: +Warning 1292 Truncated incorrect CHAR(4) value: '2004-01-22 21:45:33' select CONVERT(DATE "2004-01-22 21:45:33",BINARY(4)); CONVERT(DATE "2004-01-22 21:45:33",BINARY(4)) 2004 +Warnings: +Warning 1292 Truncated incorrect CHAR(4) value: '2004-01-22 21:45:33' select CAST(DATE "2004-01-22 21:45:33" AS BINARY(4)); CAST(DATE "2004-01-22 21:45:33" AS BINARY(4)) 2004 +Warnings: +Warning 1292 Truncated incorrect CHAR(4) value: '2004-01-22 21:45:33' +select cast('-10a' as signed integer); +cast('-10a' as signed integer) +-10 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-10a' +select cast('a10' as unsigned integer); +cast('a10' as unsigned integer) +0 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'a10' +select 10+'a'; +10+'a' +10 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'a' +select 10.0+cast('a' as decimal); +10.0+cast('a' as decimal) +10.00 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: 'a' +select 10E+0+'a'; +10E+0+'a' +10 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'a' select cast('18446744073709551616' as unsigned); cast('18446744073709551616' as unsigned) 18446744073709551615 @@ -100,7 +145,7 @@ create table t1 select cast(_koi8r'ÔÅÓÔ' as char character set cp1251) as t; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `t` char(4) character set cp1251 NOT NULL default '' + `t` varchar(4) character set cp1251 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select @@ -111,23 +156,34 @@ cast(_latin1'a ' AS char(2)) as c4, cast(_latin1'a' AS char(2)) as c5; c1 c2 c3 c4 c5 ab a ab a a +Warnings: +Warning 1292 Truncated incorrect CHAR(2) value: 'abc' +Warning 1292 Truncated incorrect CHAR(2) value: 'a ' +select cast(1000 as CHAR(3)); +cast(1000 as CHAR(3)) +100 +Warnings: +Warning 1292 Truncated incorrect CHAR(3) value: '1000' create table t1 select cast(_latin1'ab' AS char) as c1, cast(_latin1'a ' AS char) as c2, cast(_latin1'abc' AS char(2)) as c3, cast(_latin1'a ' AS char(2)) as c4, cast(_latin1'a' AS char(2)) as c5; +Warnings: +Warning 1292 Truncated incorrect CHAR(2) value: 'abc' +Warning 1292 Truncated incorrect CHAR(2) value: 'a ' select * from t1; c1 c2 c3 c4 c5 -ab a ab a a +ab a ab a a show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` binary(2) NOT NULL default '', - `c2` binary(2) NOT NULL default '', - `c3` binary(2) NOT NULL default '', - `c4` binary(2) NOT NULL default '', - `c5` binary(2) NOT NULL default '' + `c1` varbinary(2) NOT NULL default '', + `c2` varbinary(2) NOT NULL default '', + `c3` varbinary(2) NOT NULL default '', + `c4` varbinary(2) NOT NULL default '', + `c5` varbinary(2) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select @@ -138,23 +194,29 @@ cast(_koi8r'Æ ' AS nchar(2)) as c4, cast(_koi8r'Æ' AS nchar(2)) as c5; c1 c2 c3 c4 c5 Ñг Ñ Ñг Ñ Ñ +Warnings: +Warning 1292 Truncated incorrect CHAR(4) value: 'ÑгÑ
' +Warning 1292 Truncated incorrect CHAR(3) value: 'Ñ ' create table t1 select cast(_koi8r'ÆÇ' AS nchar) as c1, cast(_koi8r'Æ ' AS nchar) as c2, cast(_koi8r'ÆÇÈ' AS nchar(2)) as c3, cast(_koi8r'Æ ' AS nchar(2)) as c4, cast(_koi8r'Æ' AS nchar(2)) as c5; +Warnings: +Warning 1292 Truncated incorrect CHAR(4) value: 'ÑгÑ
' +Warning 1292 Truncated incorrect CHAR(3) value: 'Ñ ' select * from t1; c1 c2 c3 c4 c5 -Ñг Ñ Ñг Ñ Ñ +Ñг Ñ Ñг Ñ Ñ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(2) character set utf8 NOT NULL default '', - `c2` char(2) character set utf8 NOT NULL default '', - `c3` char(2) character set utf8 NOT NULL default '', - `c4` char(2) character set utf8 NOT NULL default '', - `c5` char(2) character set utf8 NOT NULL default '' + `c1` varchar(2) character set utf8 NOT NULL default '', + `c2` varchar(2) character set utf8 NOT NULL default '', + `c3` varchar(2) character set utf8 NOT NULL default '', + `c4` varchar(2) character set utf8 NOT NULL default '', + `c5` varchar(2) character set utf8 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a binary(10), b char(10) character set koi8r); @@ -199,6 +261,10 @@ a CAST(a AS CHAR(3)) aac aac aab aab aaa aaa +Warnings: +Warning 1292 Truncated incorrect CHAR(2) value: 'aaa' +Warning 1292 Truncated incorrect CHAR(2) value: 'aab' +Warning 1292 Truncated incorrect CHAR(2) value: 'aac' SELECT a, CAST(a AS UNSIGNED) FROM t1 ORDER BY CAST(a AS CHAR) ; a CAST(a AS UNSIGNED) aaa 3 @@ -209,6 +275,10 @@ a CAST(a AS CHAR(2)) aaa aa aab aa aac aa +Warnings: +Warning 1292 Truncated incorrect CHAR(2) value: 'aaa' +Warning 1292 Truncated incorrect CHAR(2) value: 'aab' +Warning 1292 Truncated incorrect CHAR(2) value: 'aac' DROP TABLE t1; select date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour); date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour) @@ -252,3 +322,36 @@ cast(repeat('1',20) as signed) -7335632962598440505 Warnings: Warning 1105 Cast to signed converted positive out-of-range integer to it's negative complement +select cast('1.2' as decimal(3,2)); +cast('1.2' as decimal(3,2)) +1.20 +select 1e18 * cast('1.2' as decimal(3,2)); +1e18 * cast('1.2' as decimal(3,2)) +1.2e+18 +select cast(cast('1.2' as decimal(3,2)) as signed); +cast(cast('1.2' as decimal(3,2)) as signed) +1 +set @v1=1e18; +select cast(@v1 as decimal(22, 2)); +cast(@v1 as decimal(22, 2)) +1000000000000000000.00 +select cast(-1e18 as decimal(22,2)); +cast(-1e18 as decimal(22,2)) +-1000000000000000000.00 +create table t1(s1 time); +insert into t1 values ('11:11:11'); +select cast(s1 as decimal(7,2)) from t1; +cast(s1 as decimal(7,2)) +111111.00 +drop table t1; +CREATE TABLE t1 (v varchar(10), tt tinytext, t text, +mt mediumtext, lt longtext); +INSERT INTO t1 VALUES ('1.01', '2.02', '3.03', '4.04', '5.05'); +SELECT CAST(v AS DECIMAL), CAST(tt AS DECIMAL), CAST(t AS DECIMAL), +CAST(mt AS DECIMAL), CAST(lt AS DECIMAL) from t1; +CAST(v AS DECIMAL) CAST(tt AS DECIMAL) CAST(t AS DECIMAL) CAST(mt AS DECIMAL) CAST(lt AS DECIMAL) +1.01 2.02 3.03 4.04 5.05 +DROP TABLE t1; +select cast(NULL as decimal(6)) as t1; +t1 +NULL diff --git a/mysql-test/r/check.result b/mysql-test/r/check.result index ecaa13642bd..4c565f4f1b1 100644 --- a/mysql-test/r/check.result +++ b/mysql-test/r/check.result @@ -5,3 +5,12 @@ insert into t1 values (200000); Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +Create table t1(f1 int); +Create table t2(f1 int); +Create view v1 as Select * from t1; +Check Table v1,t2; +Table Op Msg_type Msg_text +test.v1 check status OK +test.t2 check status OK +drop view v1; +drop table t1, t2; diff --git a/mysql-test/r/client_xml.result b/mysql-test/r/client_xml.result new file mode 100644 index 00000000000..24c05c7f9d6 --- /dev/null +++ b/mysql-test/r/client_xml.result @@ -0,0 +1,74 @@ +create table t1 ( +`a&b` int, +`a<b` int, +`a>b` text +); +insert into t1 values (1, 2, 'a&b a<b a>b'); +<?xml version="1.0"?> + +<resultset statement="select * from t1 +"> + <row> + <field name="a&b">1</field> + <field name="a<b">2</field> + <field name="a>b">a&b a<b a>b</field> + </row> +</resultset> +<?xml version="1.0"?> +<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<database name="test"> + <table_structure name="t1"> + <field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" /> + <field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" /> + <field Field="a>b" Type="text" Null="YES" Key="" Extra="" /> + </table_structure> + <table_data name="t1"> + <row> + <field name="a&b">1</field> + <field name="a<b">2</field> + <field name="a>b">a&b a<b a>b</field> + </row> + </table_data> +</database> +</mysqldump> +<?xml version="1.0"?> + +<resultset statement="select count(*) from t1 +"> + <row> + <field name="count(*)">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 < 2 from dual +"> + <row> + <field name="1 < 2">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 > 2 from dual +"> + <row> + <field name="1 > 2">0</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 & 3 from dual +"> + <row> + <field name="1 & 3">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select null from dual +"> + <row> + <field name="NULL">NULL</field> + </row> +</resultset> +drop table t1; diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index edf30e7f6e4..fef813371c8 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -8,6 +8,8 @@ help_keyword help_relation help_topic host +proc +procs_priv tables_priv time_zone time_zone_leap_second @@ -29,6 +31,8 @@ help_keyword help_relation help_topic host +proc +procs_priv tables_priv time_zone time_zone_leap_second @@ -54,6 +58,8 @@ help_keyword help_relation help_topic host +proc +procs_priv tables_priv time_zone time_zone_leap_second diff --git a/mysql-test/r/count_distinct.result b/mysql-test/r/count_distinct.result index 16460580d6c..a21748359b9 100644 --- a/mysql-test/r/count_distinct.result +++ b/mysql-test/r/count_distinct.result @@ -53,3 +53,16 @@ select count(distinct f) from t1; count(distinct f) 0 drop table t1; +create table t1 (a char(3), b char(20), primary key (a, b)); +insert into t1 values ('ABW', 'Dutch'), ('ABW', 'English'); +select count(distinct a) from t1 group by b; +count(distinct a) +1 +1 +drop table t1; +create table t1 (f1 int, f2 int); +insert into t1 values (0,1),(1,2); +select count(distinct if(f1,3,f2)) from t1; +count(distinct if(f1,3,f2)) +2 +drop table t1; diff --git a/mysql-test/r/count_distinct2.result b/mysql-test/r/count_distinct2.result index 131e3b325ec..b92665b5c56 100644 --- a/mysql-test/r/count_distinct2.result +++ b/mysql-test/r/count_distinct2.result @@ -116,7 +116,7 @@ count(distinct n) 5000 show status like 'Created_tmp_disk_tables'; Variable_name Value -Created_tmp_disk_tables 1 +Created_tmp_disk_tables 0 drop table t1; create table t1 (s text); flush status; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 00bc0320028..82a5ccc3e82 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -11,7 +11,7 @@ create table t1 (b char(0) not null); create table if not exists t1 (b char(0) not null); insert into t1 values (""),(null); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 select * from t1; b @@ -44,12 +44,24 @@ create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int); ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long -create table test (a datetime default now()); +create table t1 (a datetime default now()); ERROR 42000: Invalid default value for 'a' -create table test (a datetime on update now()); +create table t1 (a datetime on update now()); ERROR HY000: Invalid ON UPDATE clause for 'a' column -create table test (a int default 100 auto_increment); +create table t1 (a int default 100 auto_increment); ERROR 42000: Invalid default value for 'a' +create table t1 (a tinyint default 1000); +ERROR 42000: Invalid default value for 'a' +create table t1 (a varchar(5) default 'abcdef'); +ERROR 42000: Invalid default value for 'a' +create table t1 (a varchar(5) default 'abcde'); +insert into t1 values(); +select * from t1; +a +abcde +alter table t1 alter column a set default 'abcdef'; +ERROR 42000: Invalid default value for 'a' +drop table t1; create table 1ea10 (1a20 int,1e int); insert into 1ea10 values(1,1); select 1ea10.1a20,1e+ 1e+10 from 1ea10; @@ -100,12 +112,12 @@ drop table t2; create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f; describe t2; Field Type Null Key Default Extra -a datetime 0000-00-00 00:00:00 -b time 00:00:00 -c date 0000-00-00 -d bigint(17) 0 -e double(18,1) 0.0 -f bigint(17) 0 +a datetime NO 0000-00-00 00:00:00 +b time NO 00:00:00 +c date NO 0000-00-00 +d int(3) NO 0 +e decimal(3,1) NO 0.0 +f bigint(19) NO 0 drop table t2; create table t2 select CAST("2001-12-29" AS DATE) as d, CAST("20:45:11" AS TIME) as t, CAST("2001-12-29 20:45:11" AS DATETIME) as dt; describe t2; @@ -152,7 +164,7 @@ create table t1 (a int not null, b int, primary key(a), key (b), key (b), key (b show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` int(11) default NULL, PRIMARY KEY (`a`), KEY `b` (`b`), @@ -198,25 +210,25 @@ drop table if exists t1; SET SESSION storage_engine="heap"; SELECT @@storage_engine; @@storage_engine -HEAP +MEMORY CREATE TABLE t1 (a int not null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0' -) ENGINE=HEAP DEFAULT CHARSET=latin1 + `a` int(11) NOT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 drop table t1; SET SESSION storage_engine="gemini"; ERROR 42000: Unknown table engine 'gemini' SELECT @@storage_engine; @@storage_engine -HEAP +MEMORY CREATE TABLE t1 (a int not null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0' -) ENGINE=HEAP DEFAULT CHARSET=latin1 + `a` int(11) NOT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 SET SESSION storage_engine=default; drop table t1; create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2)); @@ -255,11 +267,15 @@ drop table t1; create table t1 (a int not null, b int, primary key (a)); insert into t1 values (1,1); create table if not exists t1 select 2; +Warnings: +Warning 1364 Field 'a' doesn't have a default value select * from t1; a b 1 1 0 2 create table if not exists t1 select 3 as 'a',4 as 'b'; +Warnings: +Warning 1364 Field 'a' doesn't have a default value create table if not exists t1 select 3 as 'a',3 as 'b'; ERROR 23000: Duplicate entry '3' for key 1 select * from t1; @@ -291,14 +307,14 @@ create table t3 like t1; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, `name` char(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id name create table if not exists t3 like t1; Warnings: -Warning 1050 Table 't3' already exists +Note 1050 Table 't3' already exists select @@warning_count; @@warning_count 1 @@ -306,7 +322,7 @@ create temporary table t3 like t2; show create table t3; Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( - `id` int(11) NOT NULL default '0' + `id` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3; id @@ -314,7 +330,7 @@ drop table t3; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, `name` char(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t3; @@ -326,14 +342,14 @@ create temporary table t3 like mysqltest.t3; show create table t3; Table Create Table t3 CREATE TEMPORARY TABLE `t3` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, `name` char(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 like t3; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, `name` char(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; @@ -355,25 +371,25 @@ drop database mysqltest; SET SESSION storage_engine="heap"; SELECT @@storage_engine; @@storage_engine -HEAP +MEMORY CREATE TABLE t1 (a int not null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0' -) ENGINE=HEAP DEFAULT CHARSET=latin1 + `a` int(11) NOT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 drop table t1; SET SESSION storage_engine="gemini"; ERROR 42000: Unknown table engine 'gemini' SELECT @@storage_engine; @@storage_engine -HEAP +MEMORY CREATE TABLE t1 (a int not null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0' -) ENGINE=HEAP DEFAULT CHARSET=latin1 + `a` int(11) NOT NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 SET SESSION storage_engine=default; drop table t1; create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob); @@ -412,13 +428,13 @@ from t1; explain t2; Field Type Null Key Default Extra a int(11) YES NULL -b bigint(11) 0 -c bigint(11) 0 +b bigint(11) NO 0 +c bigint(11) NO 0 d date YES NULL -e char(1) +e varchar(1) NO f datetime YES NULL g time YES NULL -h longblob +h longblob NO dd time YES NULL select * from t2; a b c d e f g h dd @@ -442,9 +458,9 @@ t2 CREATE TABLE `t2` ( `ifnull(j,j)` date default NULL, `ifnull(k,k)` datetime NOT NULL default '0000-00-00 00:00:00', `ifnull(l,l)` datetime default NULL, - `ifnull(m,m)` char(1) default NULL, - `ifnull(n,n)` char(3) default NULL, - `ifnull(o,o)` char(10) default NULL + `ifnull(m,m)` varchar(1) default NULL, + `ifnull(n,n)` varchar(3) default NULL, + `ifnull(o,o)` varchar(10) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2; create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14'); @@ -586,3 +602,10 @@ drop database mysqltest; create table test.t1 like x; ERROR 42000: Incorrect database name 'NULL' drop table if exists test.t1; +create database mysqltest; +use mysqltest; +create view v1 as select 'foo' from dual; +create table t1 like v1; +ERROR HY000: 'mysqltest.v1' is not BASE TABLE +drop view v1; +drop database mysqltest; diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index cdf890f2c6c..66266d40fb3 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -484,11 +484,11 @@ ERROR HY000: Unknown collation: 'koi8r' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `latin1_f` char(32) NOT NULL default '' + `latin1_f` char(32) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW FIELDS FROM t1; Field Type Null Key Default Extra -latin1_f char(32) +latin1_f char(32) NO ALTER TABLE t1 CHANGE latin1_f latin1_f CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin; SHOW CREATE TABLE t1; diff --git a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result index d8221a58b9e..08206a91b7b 100644..100755 --- a/mysql-test/r/ctype_cp932.result +++ b/mysql-test/r/ctype_cp932.result @@ -360,7 +360,7 @@ INSERT INTO t1 VALUES (0xF9E8),(0xF9E9),(0xF9EA),(0xF9EB),(0xF9EC),(0xF9ED),(0xF9EE),(0xF9EF), (0xF9F0),(0xF9F1),(0xF9F2),(0xF9F3),(0xF9F4),(0xF9F5),(0xF9F6),(0xF9F7), (0xF9F8),(0xF9F9),(0xF9FA),(0xF9FB),(0xF9FC); -SELECT HEX(c1) FROM t1 ORDER BY BINARY c1; +SELECT HEX(c1) FROM t1; HEX(c1) 05 7E @@ -829,6 +829,394 @@ EEF9 EEFA EEFB EEFC +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +FA4A +FA4B +FA4C +FA4D +FA4E +FA4F +FA50 +FA51 +FA52 +FA53 +FA54 +FA55 +FA56 +FA57 +FA58 +FA59 +FA5A +FA5B +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B F040 F041 F042 @@ -2709,459 +3097,19 @@ F9F9 F9FA F9FB F9FC -FA40 -FA41 -FA42 -FA43 -FA44 -FA45 -FA46 -FA47 -FA48 -FA49 -FA4A -FA4B -FA4C -FA4D -FA4E -FA4F -FA50 -FA51 -FA52 -FA53 -FA54 -FA55 -FA56 -FA57 -FA58 -FA59 -FA5A -FA5B -FA5C -FA5D -FA5E -FA5F -FA60 -FA61 -FA62 -FA63 -FA64 -FA65 -FA66 -FA67 -FA68 -FA69 -FA6A -FA6B -FA6C -FA6D -FA6E -FA6F -FA70 -FA71 -FA72 -FA73 -FA74 -FA75 -FA76 -FA77 -FA78 -FA79 -FA7A -FA7B -FA7C -FA7D -FA7E -FA80 -FA81 -FA82 -FA83 -FA84 -FA85 -FA86 -FA87 -FA88 -FA89 -FA8A -FA8B -FA8C -FA8D -FA8E -FA8F -FA90 -FA91 -FA92 -FA93 -FA94 -FA95 -FA96 -FA97 -FA98 -FA99 -FA9A -FA9B -FA9C -FA9D -FA9E -FA9F -FAA0 -FAA1 -FAA2 -FAA3 -FAA4 -FAA5 -FAA6 -FAA7 -FAA8 -FAA9 -FAAA -FAAB -FAAC -FAAD -FAAE -FAAF -FAB0 -FAB1 -FAB2 -FAB3 -FAB4 -FAB5 -FAB6 -FAB7 -FAB8 -FAB9 -FABA -FABB -FABC -FABD -FABE -FABF -FAC0 -FAC1 -FAC2 -FAC3 -FAC4 -FAC5 -FAC6 -FAC7 -FAC8 -FAC9 -FACA -FACB -FACC -FACD -FACE -FACF -FAD0 -FAD1 -FAD2 -FAD3 -FAD4 -FAD5 -FAD6 -FAD7 -FAD8 -FAD9 -FADA -FADB -FADC -FADD -FADE -FADF -FAE0 -FAE1 -FAE2 -FAE3 -FAE4 -FAE5 -FAE6 -FAE7 -FAE8 -FAE9 -FAEA -FAEB -FAEC -FAED -FAEE -FAEF -FAF0 -FAF1 -FAF2 -FAF3 -FAF4 -FAF5 -FAF6 -FAF7 -FAF8 -FAF9 -FAFA -FAFB -FAFC -FB40 -FB41 -FB42 -FB43 -FB44 -FB45 -FB46 -FB47 -FB48 -FB49 -FB4A -FB4B -FB4C -FB4D -FB4E -FB4F -FB50 -FB51 -FB52 -FB53 -FB54 -FB55 -FB56 -FB57 -FB58 -FB59 -FB5A -FB5B -FB5C -FB5D -FB5E -FB5F -FB60 -FB61 -FB62 -FB63 -FB64 -FB65 -FB66 -FB67 -FB68 -FB69 -FB6A -FB6B -FB6C -FB6D -FB6E -FB6F -FB70 -FB71 -FB72 -FB73 -FB74 -FB75 -FB76 -FB77 -FB78 -FB79 -FB7A -FB7B -FB7C -FB7D -FB7E -FB80 -FB81 -FB82 -FB83 -FB84 -FB85 -FB86 -FB87 -FB88 -FB89 -FB8A -FB8B -FB8C -FB8D -FB8E -FB8F -FB90 -FB91 -FB92 -FB93 -FB94 -FB95 -FB96 -FB97 -FB98 -FB99 -FB9A -FB9B -FB9C -FB9D -FB9E -FB9F -FBA0 -FBA1 -FBA2 -FBA3 -FBA4 -FBA5 -FBA6 -FBA7 -FBA8 -FBA9 -FBAA -FBAB -FBAC -FBAD -FBAE -FBAF -FBB0 -FBB1 -FBB2 -FBB3 -FBB4 -FBB5 -FBB6 -FBB7 -FBB8 -FBB9 -FBBA -FBBB -FBBC -FBBD -FBBE -FBBF -FBC0 -FBC1 -FBC2 -FBC3 -FBC4 -FBC5 -FBC6 -FBC7 -FBC8 -FBC9 -FBCA -FBCB -FBCC -FBCD -FBCE -FBCF -FBD0 -FBD1 -FBD2 -FBD3 -FBD4 -FBD5 -FBD6 -FBD7 -FBD8 -FBD9 -FBDA -FBDB -FBDC -FBDD -FBDE -FBDF -FBE0 -FBE1 -FBE2 -FBE3 -FBE4 -FBE5 -FBE6 -FBE7 -FBE8 -FBE9 -FBEA -FBEB -FBEC -FBED -FBEE -FBEF -FBF0 -FBF1 -FBF2 -FBF3 -FBF4 -FBF5 -FBF6 -FBF7 -FBF8 -FBF9 -FBFA -FBFB -FBFC -FC40 -FC41 -FC42 -FC43 -FC44 -FC45 -FC46 -FC47 -FC48 -FC49 -FC4A -FC4B -CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1 ORDER BY BINARY c1; -SELECT HEX(c1) FROM t2 ORDER BY BINARY c1; +CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1; +SELECT HEX(c1) FROM t2; HEX(c1) 0005 007E 2015 -2116 -2116 -2121 -2121 -2160 -2160 -2161 -2161 -2162 -2162 -2163 -2163 -2164 -2164 -2165 -2165 -2166 -2166 -2167 -2167 -2168 -2168 -2169 -2169 -2170 -2170 -2171 -2171 -2172 -2172 -2173 -2173 -2174 -2174 -2175 -2175 -2176 -2176 -2177 -2177 -2178 -2178 -2179 -2179 -2211 -221A -221F -2220 +FF3C +FF5E 2225 -2229 -222A -222B -222E -2235 -2235 -2252 -2261 -22A5 -22BF +FF0D +FFE0 +FFE1 +FFE2 2460 2461 2462 @@ -3182,696 +3130,830 @@ HEX(c1) 2471 2472 2473 -301D -301F -3231 -3231 -3232 -3239 -32A4 -32A5 -32A6 -32A7 -32A8 -3303 -330D +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +3349 3314 -3318 3322 -3323 -3326 +334D +3318 3327 -332B +3303 3336 -333B -3349 -334A -334D 3351 3357 -337B -337C -337D -337E -338E -338F +330D +3326 +3323 +332B +334A +333B 339C 339D 339E -33A1 +338E +338F 33C4 +33A1 +337B +301D +301F +2116 33CD +2121 +32A4 +32A5 +32A6 +32A7 +32A8 +3231 +3232 +3239 +337E +337D +337C +2252 +2261 +222B +222E +2211 +221A +22A5 +2220 +221F +22BF +2235 +2229 +222A +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 4E28 -4E28 -4EE1 4EE1 4EFC -4EFC -4F00 4F00 4F03 -4F03 -4F39 4F39 4F56 -4F56 -4F8A -4F8A -4F92 4F92 -4F94 -4F94 -4F9A +4F8A 4F9A -4FC9 -4FC9 -4FCD +4F94 4FCD +5040 +5022 4FFF -4FFF -501E 501E -5022 -5022 -5040 -5040 -5042 -5042 -5046 5046 5070 -5070 -5094 +5042 5094 -50D8 -50D8 -50F4 50F4 -514A +50D8 514A 5164 -5164 -519D 519D 51BE -51BE 51EC -51EC -5215 5215 529C -529C -52A6 52A6 -52AF -52AF -52C0 52C0 52DB -52DB -5300 5300 5307 -5307 -5324 5324 5372 -5372 -5393 5393 53B2 -53B2 53DD -53DD -548A -548A -549C +FA0E 549C +548A 54A9 -54A9 -54FF 54FF 5586 -5586 -5759 5759 5765 -5765 -57AC 57AC -57C7 -57C7 -57C8 57C8 -589E +57C7 +FA0F +FA10 589E 58B2 -58B2 -590B 590B 5953 -5953 595B -595B -595D 595D 5963 -5963 -59A4 59A4 59BA -59BA -5B56 5B56 5BC0 -5BC0 -5BD8 +752F 5BD8 5BEC -5BEC -5C1E 5C1E 5CA6 -5CA6 -5CBA 5CBA 5CF5 -5CF5 -5D27 5D27 -5D42 -5D42 5D53 -5D53 -5D6D +FA11 +5D42 5D6D 5DB8 -5DB8 5DB9 -5DB9 -5DD0 5DD0 5F21 -5F21 -5F34 5F34 -5F45 -5F45 -5F67 5F67 5FB7 -5FB7 -5FDE 5FDE 605D -605D -6085 6085 608A -608A -60D5 -60D5 60DE -60DE -60F2 +60D5 +6120 60F2 6111 -6111 -6120 -6120 -6130 -6130 -6137 6137 -6198 +6130 6198 6213 -6213 -62A6 62A6 63F5 -63F5 6460 -6460 -649D 649D 64CE -64CE -654E 654E 6600 -6600 -6609 -6609 6615 -6615 -661E +663B +6609 +662E 661E 6624 -6624 -662E -662E -6631 -6631 -663B -663B -6657 +6665 6657 6659 -6659 -6665 -6665 -6673 +FA12 6673 6699 -6699 -66A0 66A0 66B2 -66B2 66BF -66BF -66FA 66FA -66FB -66FB 670E -670E -6766 +F929 6766 67BB -67BB -67C0 +6852 67C0 6801 -6801 6844 -6844 -6852 -6852 -68C8 -68C8 68CF -68CF -6968 +FA13 6968 +FA14 6998 -6998 -69E2 69E2 6A30 -6A30 -6A46 -6A46 -6A6B 6A6B +6A46 6A73 -6A73 -6A7E 6A7E 6AE2 -6AE2 -6AE4 6AE4 6BD6 -6BD6 -6C3F 6C3F 6C5C -6C5C -6C6F -6C6F 6C86 -6C86 -6CDA +6C6F 6CDA 6D04 -6D04 -6D6F -6D6F -6D87 6D87 -6D96 +6D6F 6D96 6DAC -6DAC -6DCF 6DCF -6DF2 -6DF2 6DF8 -6DF8 -6DFC +6DF2 6DFC -6E27 -6E27 -6E39 6E39 -6E3C -6E3C -6E5C 6E5C +6E27 +6E3C 6EBF -6EBF -6F88 6F88 6FB5 -6FB5 -6FF5 6FF5 7005 -7005 7007 -7007 -7028 7028 7085 -7085 -70AB 70AB -70BB -70BB -7104 -7104 -710F 710F +7104 +715C 7146 -7146 -7147 7147 -715C -715C -71C1 +FA15 71C1 71FE -71FE -72B1 72B1 72BE -72BE -7324 7324 +FA16 7377 -7377 -73BD 73BD 73C9 -73C9 -73D2 -73D2 -73D6 73D6 73E3 -73E3 -73F5 -73F5 -7407 +73D2 7407 +73F5 7426 -7426 -7429 -7429 -742A 742A -742E +7429 742E 7462 -7462 -7489 7489 749F -749F -7501 7501 -752F -752F 756F -756F -7682 7682 -769B -769B -769C 769C 769E -769E -76A6 +769B 76A6 +FA17 7746 -7746 -7821 +52AF 7821 784E -784E -7864 7864 787A -787A -7930 7930 +FA18 +FA19 +FA1A 7994 -7994 -799B +FA1B 799B 7AD1 -7AD1 7AE7 -7AE7 -7AEB +FA1C 7AEB 7B9E -7B9E -7D48 +FA1D 7D48 7D5C -7D5C -7DA0 -7DA0 -7DB7 7DB7 +7DA0 7DD6 -7DD6 -7E52 7E52 -7E8A -7E8A 7F47 -7F47 -7FA1 7FA1 +FA1E 8301 -8301 -8362 8362 837F -837F -83C7 83C7 83F6 -83F6 -8448 8448 84B4 -84B4 -84DC -84DC 8553 -8553 -8559 8559 856B -856B -85B0 +FA1F 85B0 -8807 +FA20 +FA21 8807 88F5 -88F5 -891C -891C -8A12 8A12 8A37 -8A37 8A79 -8A79 -8AA7 8AA7 8ABE -8ABE -8ADF 8ADF +FA22 8AF6 -8AF6 -8B53 8B53 8B7F -8B7F -8CF0 8CF0 8CF4 -8CF4 -8D12 8D12 8D76 -8D76 -8ECF +FA23 8ECF +FA24 +FA25 9067 -9067 -90DE 90DE -9115 +FA26 9115 9127 -9127 -91D7 -91D7 -91DA 91DA +91D7 91DE -91DE -91E4 -91E4 -91E5 -91E5 -91ED 91ED 91EE -91EE -9206 +91E4 +91E5 9206 -920A -920A -9210 9210 -9239 -9239 -923A +920A 923A -923C -923C -9240 9240 +923C 924E -924E -9251 -9251 9259 -9259 -9267 +9251 +9239 9267 -9277 +92A7 9277 9278 -9278 -9288 -9288 -92A7 -92A7 -92D0 +92E7 +92D7 +92D9 92D0 -92D3 -92D3 -92D5 +FA27 92D5 -92D7 +92E0 +92D3 +9325 +9321 +92FB +FA28 +931E +92FF +931D +9302 +9370 +9357 +93A4 +93C6 +93DE +93F8 +9431 +9445 +9448 +9592 +F9DC +FA29 +969D +96AF +9733 +973B +9743 +974D +974F +9751 +9755 +9857 +9865 +FA2A +FA2B +9927 +FA2C +999E +9A4E +9AD9 +9ADC +9B75 +9B72 +9B8F +9BB1 +9BBB +9C00 +9D70 +9D6B +FA2D +9E19 +9ED1 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +FFE2 +FFE4 +FF07 +FF02 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +FFE2 +FFE4 +FF07 +FF02 +3231 +2116 +2121 +2235 +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 +4E28 +4EE1 +4EFC +4F00 +4F03 +4F39 +4F56 +4F92 +4F8A +4F9A +4F94 +4FCD +5040 +5022 +4FFF +501E +5046 +5070 +5042 +5094 +50F4 +50D8 +514A +5164 +519D +51BE +51EC +5215 +529C +52A6 +52C0 +52DB +5300 +5307 +5324 +5372 +5393 +53B2 +53DD +FA0E +549C +548A +54A9 +54FF +5586 +5759 +5765 +57AC +57C8 +57C7 +FA0F +FA10 +589E +58B2 +590B +5953 +595B +595D +5963 +59A4 +59BA +5B56 +5BC0 +752F +5BD8 +5BEC +5C1E +5CA6 +5CBA +5CF5 +5D27 +5D53 +FA11 +5D42 +5D6D +5DB8 +5DB9 +5DD0 +5F21 +5F34 +5F67 +5FB7 +5FDE +605D +6085 +608A +60DE +60D5 +6120 +60F2 +6111 +6137 +6130 +6198 +6213 +62A6 +63F5 +6460 +649D +64CE +654E +6600 +6615 +663B +6609 +662E +661E +6624 +6665 +6657 +6659 +FA12 +6673 +6699 +66A0 +66B2 +66BF +66FA +670E +F929 +6766 +67BB +6852 +67C0 +6801 +6844 +68CF +FA13 +6968 +FA14 +6998 +69E2 +6A30 +6A6B +6A46 +6A73 +6A7E +6AE2 +6AE4 +6BD6 +6C3F +6C5C +6C86 +6C6F +6CDA +6D04 +6D87 +6D6F +6D96 +6DAC +6DCF +6DF8 +6DF2 +6DFC +6E39 +6E5C +6E27 +6E3C +6EBF +6F88 +6FB5 +6FF5 +7005 +7007 +7028 +7085 +70AB +710F +7104 +715C +7146 +7147 +FA15 +71C1 +71FE +72B1 +72BE +7324 +FA16 +7377 +73BD +73C9 +73D6 +73E3 +73D2 +7407 +73F5 +7426 +742A +7429 +742E +7462 +7489 +749F +7501 +756F +7682 +769C +769E +769B +76A6 +FA17 +7746 +52AF +7821 +784E +7864 +787A +7930 +FA18 +FA19 +FA1A +7994 +FA1B +799B +7AD1 +7AE7 +FA1C +7AEB +7B9E +FA1D +7D48 +7D5C +7DB7 +7DA0 +7DD6 +7E52 +7F47 +7FA1 +FA1E +8301 +8362 +837F +83C7 +83F6 +8448 +84B4 +8553 +8559 +856B +FA1F +85B0 +FA20 +FA21 +8807 +88F5 +8A12 +8A37 +8A79 +8AA7 +8ABE +8ADF +FA22 +8AF6 +8B53 +8B7F +8CF0 +8CF4 +8D12 +8D76 +FA23 +8ECF +FA24 +FA25 +9067 +90DE +FA26 +9115 +9127 +91DA +91D7 +91DE +91ED +91EE +91E4 +91E5 +9206 +9210 +920A +923A +9240 +923C +924E +9259 +9251 +9239 +9267 +92A7 +9277 +9278 +92E7 92D7 92D9 -92D9 -92E0 +92D0 +FA27 +92D5 92E0 -92E7 -92E7 -92F9 -92F9 -92FB +92D3 +9325 +9321 92FB +FA28 +931E 92FF -92FF -9302 -9302 931D -931D -931E -931E -9321 -9321 -9325 -9325 -9348 -9348 -9357 -9357 -9370 +9302 9370 +9357 93A4 -93A4 -93C6 93C6 93DE -93DE -93F8 93F8 9431 -9431 -9445 9445 9448 -9448 -9592 9592 -969D +F9DC +FA29 969D 96AF -96AF -9733 9733 973B -973B -9743 9743 974D -974D -974F 974F 9751 -9751 -9755 9755 9857 -9857 -9865 9865 +FA2A +FA2B 9927 -9927 -999E +FA2C 999E 9A4E -9A4E -9AD9 9AD9 9ADC -9ADC -9B72 -9B72 9B75 -9B75 -9B8F +9B72 9B8F 9BB1 -9BB1 9BBB -9BBB -9C00 9C00 -9D6B -9D6B -9D70 9D70 +9D6B +FA2D 9E19 -9E19 -9ED1 9ED1 E000 E001 @@ -5753,90 +5835,8 @@ E754 E755 E756 E757 -F929 -F929 -F9DC -F9DC -FA0E -FA0E -FA0F -FA0F -FA10 -FA10 -FA11 -FA11 -FA12 -FA12 -FA13 -FA13 -FA14 -FA14 -FA15 -FA15 -FA16 -FA16 -FA17 -FA17 -FA18 -FA18 -FA19 -FA19 -FA1A -FA1A -FA1B -FA1B -FA1C -FA1C -FA1D -FA1D -FA1E -FA1E -FA1F -FA1F -FA20 -FA20 -FA21 -FA21 -FA22 -FA22 -FA23 -FA23 -FA24 -FA24 -FA25 -FA25 -FA26 -FA26 -FA27 -FA27 -FA28 -FA28 -FA29 -FA29 -FA2A -FA2A -FA2B -FA2B -FA2C -FA2C -FA2D -FA2D -FF02 -FF02 -FF07 -FF07 -FF0D -FF3C -FF5E -FFE0 -FFE1 -FFE2 -FFE2 -FFE2 -FFE4 -FFE4 -CREATE TABLE t3 SELECT CONVERT(c1 USING cp932) AS c1 FROM t2 ORDER BY BINARY c1; -SELECT HEX(c1) FROM t3 ORDER BY BINARY c1; +CREATE TABLE t3 SELECT CONVERT(c1 USING cp932) AS c1 FROM t2; +SELECT HEX(c1) FROM t3; HEX(c1) 05 7E @@ -5847,19 +5847,7 @@ HEX(c1) 817C 8191 8192 -81BE -81BF 81CA -81CA -81CA -81DA -81DB -81DF -81E0 -81E3 -81E6 -81E6 -81E7 8740 8741 8742 @@ -5881,24 +5869,14 @@ HEX(c1) 8752 8753 8754 -8754 8755 -8755 -8756 8756 8757 -8757 -8758 8758 8759 -8759 -875A 875A 875B -875B 875C -875C -875D 875D 875F 8760 @@ -5927,26 +5905,794 @@ HEX(c1) 8780 8781 8782 -8782 8783 8784 -8784 8785 8786 8787 8788 8789 878A -878A 878B 878C 878D 878E 878F +81E0 +81DF +81E7 8793 8794 +81E3 +81DB +81DA 8798 8799 +81E6 +81BF +81BE +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +81CA +FA55 +FA56 +FA57 +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +81CA +FA55 +FA56 +FA57 +878A +8782 +8784 +81E6 +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B F040 F041 F042 @@ -7827,767 +8573,2758 @@ F9F9 F9FA F9FB F9FC -FA40 -FA40 -FA41 -FA41 -FA42 -FA42 -FA43 -FA43 -FA44 -FA44 -FA45 -FA45 -FA46 -FA46 -FA47 -FA47 -FA48 -FA48 -FA49 -FA49 -FA55 -FA55 -FA56 -FA56 -FA57 -FA57 -FA5C -FA5C -FA5D -FA5D -FA5E -FA5E -FA5F -FA5F -FA60 -FA60 -FA61 -FA61 -FA62 -FA62 -FA63 -FA63 -FA64 -FA64 -FA65 -FA65 -FA66 -FA66 -FA67 -FA67 -FA68 -FA68 -FA69 -FA69 -FA6A -FA6A -FA6B -FA6B -FA6C -FA6C -FA6D -FA6D -FA6E -FA6E -FA6F -FA6F -FA70 -FA70 -FA71 -FA71 -FA72 -FA72 -FA73 -FA73 -FA74 -FA74 -FA75 -FA75 -FA76 -FA76 -FA77 -FA77 -FA78 -FA78 -FA79 -FA79 -FA7A -FA7A -FA7B -FA7B -FA7C -FA7C -FA7D -FA7D -FA7E -FA7E -FA80 -FA80 -FA81 -FA81 -FA82 -FA82 -FA83 -FA83 -FA84 -FA84 -FA85 -FA85 -FA86 -FA86 -FA87 -FA87 -FA88 -FA88 -FA89 -FA89 -FA8A -FA8A -FA8B -FA8B -FA8C -FA8C -FA8D -FA8D -FA8E -FA8E -FA8F -FA8F -FA90 -FA90 -FA91 -FA91 -FA92 -FA92 -FA93 -FA93 -FA94 -FA94 -FA95 -FA95 -FA96 -FA96 -FA97 -FA97 -FA98 -FA98 -FA99 -FA99 -FA9A -FA9A -FA9B -FA9B -FA9C -FA9C -FA9D -FA9D -FA9E -FA9E -FA9F -FA9F -FAA0 -FAA0 -FAA1 +CREATE TABLE t4 SELECT CONVERT(c1 USING eucjpms) AS c1 FROM t1; +SELECT HEX(c1) FROM t4; +HEX(c1) +05 +7E +A1BD +A1C0 +A1C1 +A1C2 +A1DD +A1F1 +A1F2 +A2CC +ADA1 +ADA2 +ADA3 +ADA4 +ADA5 +ADA6 +ADA7 +ADA8 +ADA9 +ADAA +ADAB +ADAC +ADAD +ADAE +ADAF +ADB0 +ADB1 +ADB2 +ADB3 +ADB4 +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +ADC0 +ADC1 +ADC2 +ADC3 +ADC4 +ADC5 +ADC6 +ADC7 +ADC8 +ADC9 +ADCA +ADCB +ADCC +ADCD +ADCE +ADCF +ADD0 +ADD1 +ADD2 +ADD3 +ADD4 +ADD5 +ADD6 +ADDF +ADE0 +ADE1 +ADE2 +ADE3 +ADE4 +ADE5 +ADE6 +ADE7 +ADE8 +ADE9 +ADEA +ADEB +ADEC +ADED +ADEE +ADEF +A2E2 +A2E1 +A2E9 +ADF3 +ADF4 +A2E5 +A2DD +A2DC +ADF8 +ADF9 +A2E8 +A2C1 +A2C0 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +A2CC +8FA2C3 +8FF4A9 +8FF4AA +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +A2CC +8FA2C3 +8FF4A9 +8FF4AA +ADEA +ADE2 +ADE4 +A2E8 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F5FD +F5FE +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F6FD +F6FE +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F7FD +F7FE +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F8FD +F8FE +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +F9FD +F9FE FAA1 FAA2 -FAA2 -FAA3 FAA3 FAA4 -FAA4 -FAA5 FAA5 FAA6 -FAA6 -FAA7 FAA7 FAA8 -FAA8 -FAA9 FAA9 FAAA -FAAA -FAAB FAAB FAAC -FAAC FAAD -FAAD -FAAE FAAE FAAF -FAAF -FAB0 FAB0 FAB1 -FAB1 -FAB2 FAB2 FAB3 -FAB3 FAB4 -FAB4 -FAB5 FAB5 FAB6 -FAB6 -FAB7 FAB7 FAB8 -FAB8 -FAB9 FAB9 FABA -FABA FABB -FABB -FABC FABC FABD -FABD -FABE FABE FABF -FABF -FAC0 FAC0 FAC1 -FAC1 -FAC2 FAC2 FAC3 -FAC3 -FAC4 FAC4 FAC5 -FAC5 -FAC6 FAC6 FAC7 -FAC7 -FAC8 FAC8 FAC9 -FAC9 FACA -FACA -FACB FACB FACC -FACC -FACD FACD FACE -FACE -FACF FACF FAD0 -FAD0 FAD1 -FAD1 -FAD2 FAD2 FAD3 -FAD3 -FAD4 FAD4 FAD5 -FAD5 -FAD6 FAD6 FAD7 -FAD7 FAD8 -FAD8 -FAD9 FAD9 FADA -FADA -FADB FADB FADC -FADC -FADD FADD FADE -FADE -FADF FADF FAE0 -FAE0 -FAE1 FAE1 FAE2 -FAE2 -FAE3 FAE3 FAE4 -FAE4 -FAE5 FAE5 FAE6 -FAE6 FAE7 -FAE7 -FAE8 FAE8 FAE9 -FAE9 -FAEA FAEA FAEB -FAEB -FAEC FAEC FAED -FAED FAEE -FAEE -FAEF FAEF FAF0 -FAF0 -FAF1 FAF1 FAF2 -FAF2 -FAF3 FAF3 FAF4 -FAF4 FAF5 -FAF5 -FAF6 FAF6 FAF7 -FAF7 -FAF8 FAF8 FAF9 -FAF9 -FAFA FAFA FAFB -FAFB -FAFC FAFC -FB40 -FB40 -FB41 -FB41 -FB42 -FB42 -FB43 -FB43 -FB44 -FB44 -FB45 -FB45 -FB46 -FB46 -FB47 -FB47 -FB48 -FB48 -FB49 -FB49 -FB4A -FB4A -FB4B -FB4B -FB4C -FB4C -FB4D -FB4D -FB4E -FB4E -FB4F -FB4F -FB50 -FB50 -FB51 -FB51 -FB52 -FB52 -FB53 -FB53 -FB54 -FB54 -FB55 -FB55 -FB56 -FB56 -FB57 -FB57 -FB58 -FB58 -FB59 -FB59 -FB5A -FB5A -FB5B -FB5B -FB5C -FB5C -FB5D -FB5D -FB5E -FB5E -FB5F -FB5F -FB60 -FB60 -FB61 -FB61 -FB62 -FB62 -FB63 -FB63 -FB64 -FB64 -FB65 -FB65 -FB66 -FB66 -FB67 -FB67 -FB68 -FB68 -FB69 -FB69 -FB6A -FB6A -FB6B -FB6B -FB6C -FB6C -FB6D -FB6D -FB6E -FB6E -FB6F -FB6F -FB70 -FB70 -FB71 -FB71 -FB72 -FB72 -FB73 -FB73 -FB74 -FB74 -FB75 -FB75 -FB76 -FB76 -FB77 -FB77 -FB78 -FB78 -FB79 -FB79 -FB7A -FB7A -FB7B -FB7B -FB7C -FB7C -FB7D -FB7D -FB7E -FB7E -FB80 -FB80 -FB81 -FB81 -FB82 -FB82 -FB83 -FB83 -FB84 -FB84 -FB85 -FB85 -FB86 -FB86 -FB87 -FB87 -FB88 -FB88 -FB89 -FB89 -FB8A -FB8A -FB8B -FB8B -FB8C -FB8C -FB8D -FB8D -FB8E -FB8E -FB8F -FB8F -FB90 -FB90 -FB91 -FB91 -FB92 -FB92 -FB93 -FB93 -FB94 -FB94 -FB95 -FB95 -FB96 -FB96 -FB97 -FB97 -FB98 -FB98 -FB99 -FB99 -FB9A -FB9A -FB9B -FB9B -FB9C -FB9C -FB9D -FB9D -FB9E -FB9E -FB9F -FB9F -FBA0 -FBA0 +FAFD +FAFE FBA1 -FBA1 -FBA2 FBA2 FBA3 -FBA3 FBA4 -FBA4 -FBA5 FBA5 FBA6 -FBA6 -FBA7 FBA7 FBA8 -FBA8 -FBA9 FBA9 FBAA -FBAA -FBAB FBAB FBAC -FBAC -FBAD FBAD FBAE -FBAE -FBAF FBAF FBB0 -FBB0 -FBB1 FBB1 FBB2 -FBB2 FBB3 -FBB3 -FBB4 FBB4 FBB5 -FBB5 -FBB6 FBB6 FBB7 -FBB7 -FBB8 FBB8 FBB9 -FBB9 FBBA -FBBA -FBBB FBBB FBBC -FBBC -FBBD FBBD FBBE -FBBE -FBBF FBBF FBC0 -FBC0 FBC1 -FBC1 -FBC2 FBC2 FBC3 -FBC3 -FBC4 FBC4 FBC5 -FBC5 -FBC6 FBC6 FBC7 -FBC7 -FBC8 FBC8 FBC9 -FBC9 -FBCA FBCA FBCB -FBCB -FBCC FBCC FBCD -FBCD -FBCE FBCE FBCF -FBCF FBD0 -FBD0 -FBD1 FBD1 FBD2 -FBD2 -FBD3 FBD3 FBD4 -FBD4 -FBD5 FBD5 FBD6 -FBD6 FBD7 -FBD7 -FBD8 FBD8 FBD9 -FBD9 -FBDA FBDA FBDB -FBDB -FBDC FBDC FBDD -FBDD FBDE -FBDE -FBDF FBDF FBE0 -FBE0 -FBE1 FBE1 FBE2 -FBE2 -FBE3 FBE3 FBE4 -FBE4 -FBE5 FBE5 FBE6 -FBE6 -FBE7 FBE7 FBE8 -FBE8 -FBE9 FBE9 FBEA -FBEA -FBEB FBEB FBEC -FBEC FBED -FBED -FBEE FBEE FBEF -FBEF -FBF0 FBF0 FBF1 -FBF1 -FBF2 FBF2 FBF3 -FBF3 FBF4 -FBF4 -FBF5 FBF5 FBF6 -FBF6 -FBF7 FBF7 FBF8 -FBF8 -FBF9 FBF9 FBFA -FBFA FBFB -FBFB -FBFC FBFC -FC40 -FC40 -FC41 -FC41 -FC42 -FC42 -FC43 -FC43 -FC44 -FC44 -FC45 -FC45 -FC46 -FC46 -FC47 -FC47 -FC48 -FC48 -FC49 -FC49 -FC4A -FC4A -FC4B -FC4B +FBFD +FBFE +FCA1 +FCA2 +FCA3 +FCA4 +FCA5 +FCA6 +FCA7 +FCA8 +FCA9 +FCAA +FCAB +FCAC +FCAD +FCAE +FCAF +FCB0 +FCB1 +FCB2 +FCB3 +FCB4 +FCB5 +FCB6 +FCB7 +FCB8 +FCB9 +FCBA +FCBB +FCBC +FCBD +FCBE +FCBF +FCC0 +FCC1 +FCC2 +FCC3 +FCC4 +FCC5 +FCC6 +FCC7 +FCC8 +FCC9 +FCCA +FCCB +FCCC +FCCD +FCCE +FCCF +FCD0 +FCD1 +FCD2 +FCD3 +FCD4 +FCD5 +FCD6 +FCD7 +FCD8 +FCD9 +FCDA +FCDB +FCDC +FCDD +FCDE +FCDF +FCE0 +FCE1 +FCE2 +FCE3 +FCE4 +FCE5 +FCE6 +FCE7 +FCE8 +FCE9 +FCEA +FCEB +FCEC +FCED +FCEE +FCEF +FCF0 +FCF1 +FCF2 +FCF3 +FCF4 +FCF5 +FCF6 +FCF7 +FCF8 +FCF9 +FCFA +FCFB +FCFC +FCFD +FCFE +FDA1 +FDA2 +FDA3 +FDA4 +FDA5 +FDA6 +FDA7 +FDA8 +FDA9 +FDAA +FDAB +FDAC +FDAD +FDAE +FDAF +FDB0 +FDB1 +FDB2 +FDB3 +FDB4 +FDB5 +FDB6 +FDB7 +FDB8 +FDB9 +FDBA +FDBB +FDBC +FDBD +FDBE +FDBF +FDC0 +FDC1 +FDC2 +FDC3 +FDC4 +FDC5 +FDC6 +FDC7 +FDC8 +FDC9 +FDCA +FDCB +FDCC +FDCD +FDCE +FDCF +FDD0 +FDD1 +FDD2 +FDD3 +FDD4 +FDD5 +FDD6 +FDD7 +FDD8 +FDD9 +FDDA +FDDB +FDDC +FDDD +FDDE +FDDF +FDE0 +FDE1 +FDE2 +FDE3 +FDE4 +FDE5 +FDE6 +FDE7 +FDE8 +FDE9 +FDEA +FDEB +FDEC +FDED +FDEE +FDEF +FDF0 +FDF1 +FDF2 +FDF3 +FDF4 +FDF5 +FDF6 +FDF7 +FDF8 +FDF9 +FDFA +FDFB +FDFC +FDFD +FDFE +FEA1 +FEA2 +FEA3 +FEA4 +FEA5 +FEA6 +FEA7 +FEA8 +FEA9 +FEAA +FEAB +FEAC +FEAD +FEAE +FEAF +FEB0 +FEB1 +FEB2 +FEB3 +FEB4 +FEB5 +FEB6 +FEB7 +FEB8 +FEB9 +FEBA +FEBB +FEBC +FEBD +FEBE +FEBF +FEC0 +FEC1 +FEC2 +FEC3 +FEC4 +FEC5 +FEC6 +FEC7 +FEC8 +FEC9 +FECA +FECB +FECC +FECD +FECE +FECF +FED0 +FED1 +FED2 +FED3 +FED4 +FED5 +FED6 +FED7 +FED8 +FED9 +FEDA +FEDB +FEDC +FEDD +FEDE +FEDF +FEE0 +FEE1 +FEE2 +FEE3 +FEE4 +FEE5 +FEE6 +FEE7 +FEE8 +FEE9 +FEEA +FEEB +FEEC +FEED +FEEE +FEEF +FEF0 +FEF1 +FEF2 +FEF3 +FEF4 +FEF5 +FEF6 +FEF7 +FEF8 +FEF9 +FEFA +FEFB +FEFC +FEFD +FEFE +8FF5A1 +8FF5A2 +8FF5A3 +8FF5A4 +8FF5A5 +8FF5A6 +8FF5A7 +8FF5A8 +8FF5A9 +8FF5AA +8FF5AB +8FF5AC +8FF5AD +8FF5AE +8FF5AF +8FF5B0 +8FF5B1 +8FF5B2 +8FF5B3 +8FF5B4 +8FF5B5 +8FF5B6 +8FF5B7 +8FF5B8 +8FF5B9 +8FF5BA +8FF5BB +8FF5BC +8FF5BD +8FF5BE +8FF5BF +8FF5C0 +8FF5C1 +8FF5C2 +8FF5C3 +8FF5C4 +8FF5C5 +8FF5C6 +8FF5C7 +8FF5C8 +8FF5C9 +8FF5CA +8FF5CB +8FF5CC +8FF5CD +8FF5CE +8FF5CF +8FF5D0 +8FF5D1 +8FF5D2 +8FF5D3 +8FF5D4 +8FF5D5 +8FF5D6 +8FF5D7 +8FF5D8 +8FF5D9 +8FF5DA +8FF5DB +8FF5DC +8FF5DD +8FF5DE +8FF5DF +8FF5E0 +8FF5E1 +8FF5E2 +8FF5E3 +8FF5E4 +8FF5E5 +8FF5E6 +8FF5E7 +8FF5E8 +8FF5E9 +8FF5EA +8FF5EB +8FF5EC +8FF5ED +8FF5EE +8FF5EF +8FF5F0 +8FF5F1 +8FF5F2 +8FF5F3 +8FF5F4 +8FF5F5 +8FF5F6 +8FF5F7 +8FF5F8 +8FF5F9 +8FF5FA +8FF5FB +8FF5FC +8FF5FD +8FF5FE +8FF6A1 +8FF6A2 +8FF6A3 +8FF6A4 +8FF6A5 +8FF6A6 +8FF6A7 +8FF6A8 +8FF6A9 +8FF6AA +8FF6AB +8FF6AC +8FF6AD +8FF6AE +8FF6AF +8FF6B0 +8FF6B1 +8FF6B2 +8FF6B3 +8FF6B4 +8FF6B5 +8FF6B6 +8FF6B7 +8FF6B8 +8FF6B9 +8FF6BA +8FF6BB +8FF6BC +8FF6BD +8FF6BE +8FF6BF +8FF6C0 +8FF6C1 +8FF6C2 +8FF6C3 +8FF6C4 +8FF6C5 +8FF6C6 +8FF6C7 +8FF6C8 +8FF6C9 +8FF6CA +8FF6CB +8FF6CC +8FF6CD +8FF6CE +8FF6CF +8FF6D0 +8FF6D1 +8FF6D2 +8FF6D3 +8FF6D4 +8FF6D5 +8FF6D6 +8FF6D7 +8FF6D8 +8FF6D9 +8FF6DA +8FF6DB +8FF6DC +8FF6DD +8FF6DE +8FF6DF +8FF6E0 +8FF6E1 +8FF6E2 +8FF6E3 +8FF6E4 +8FF6E5 +8FF6E6 +8FF6E7 +8FF6E8 +8FF6E9 +8FF6EA +8FF6EB +8FF6EC +8FF6ED +8FF6EE +8FF6EF +8FF6F0 +8FF6F1 +8FF6F2 +8FF6F3 +8FF6F4 +8FF6F5 +8FF6F6 +8FF6F7 +8FF6F8 +8FF6F9 +8FF6FA +8FF6FB +8FF6FC +8FF6FD +8FF6FE +8FF7A1 +8FF7A2 +8FF7A3 +8FF7A4 +8FF7A5 +8FF7A6 +8FF7A7 +8FF7A8 +8FF7A9 +8FF7AA +8FF7AB +8FF7AC +8FF7AD +8FF7AE +8FF7AF +8FF7B0 +8FF7B1 +8FF7B2 +8FF7B3 +8FF7B4 +8FF7B5 +8FF7B6 +8FF7B7 +8FF7B8 +8FF7B9 +8FF7BA +8FF7BB +8FF7BC +8FF7BD +8FF7BE +8FF7BF +8FF7C0 +8FF7C1 +8FF7C2 +8FF7C3 +8FF7C4 +8FF7C5 +8FF7C6 +8FF7C7 +8FF7C8 +8FF7C9 +8FF7CA +8FF7CB +8FF7CC +8FF7CD +8FF7CE +8FF7CF +8FF7D0 +8FF7D1 +8FF7D2 +8FF7D3 +8FF7D4 +8FF7D5 +8FF7D6 +8FF7D7 +8FF7D8 +8FF7D9 +8FF7DA +8FF7DB +8FF7DC +8FF7DD +8FF7DE +8FF7DF +8FF7E0 +8FF7E1 +8FF7E2 +8FF7E3 +8FF7E4 +8FF7E5 +8FF7E6 +8FF7E7 +8FF7E8 +8FF7E9 +8FF7EA +8FF7EB +8FF7EC +8FF7ED +8FF7EE +8FF7EF +8FF7F0 +8FF7F1 +8FF7F2 +8FF7F3 +8FF7F4 +8FF7F5 +8FF7F6 +8FF7F7 +8FF7F8 +8FF7F9 +8FF7FA +8FF7FB +8FF7FC +8FF7FD +8FF7FE +8FF8A1 +8FF8A2 +8FF8A3 +8FF8A4 +8FF8A5 +8FF8A6 +8FF8A7 +8FF8A8 +8FF8A9 +8FF8AA +8FF8AB +8FF8AC +8FF8AD +8FF8AE +8FF8AF +8FF8B0 +8FF8B1 +8FF8B2 +8FF8B3 +8FF8B4 +8FF8B5 +8FF8B6 +8FF8B7 +8FF8B8 +8FF8B9 +8FF8BA +8FF8BB +8FF8BC +8FF8BD +8FF8BE +8FF8BF +8FF8C0 +8FF8C1 +8FF8C2 +8FF8C3 +8FF8C4 +8FF8C5 +8FF8C6 +8FF8C7 +8FF8C8 +8FF8C9 +8FF8CA +8FF8CB +8FF8CC +8FF8CD +8FF8CE +8FF8CF +8FF8D0 +8FF8D1 +8FF8D2 +8FF8D3 +8FF8D4 +8FF8D5 +8FF8D6 +8FF8D7 +8FF8D8 +8FF8D9 +8FF8DA +8FF8DB +8FF8DC +8FF8DD +8FF8DE +8FF8DF +8FF8E0 +8FF8E1 +8FF8E2 +8FF8E3 +8FF8E4 +8FF8E5 +8FF8E6 +8FF8E7 +8FF8E8 +8FF8E9 +8FF8EA +8FF8EB +8FF8EC +8FF8ED +8FF8EE +8FF8EF +8FF8F0 +8FF8F1 +8FF8F2 +8FF8F3 +8FF8F4 +8FF8F5 +8FF8F6 +8FF8F7 +8FF8F8 +8FF8F9 +8FF8FA +8FF8FB +8FF8FC +8FF8FD +8FF8FE +8FF9A1 +8FF9A2 +8FF9A3 +8FF9A4 +8FF9A5 +8FF9A6 +8FF9A7 +8FF9A8 +8FF9A9 +8FF9AA +8FF9AB +8FF9AC +8FF9AD +8FF9AE +8FF9AF +8FF9B0 +8FF9B1 +8FF9B2 +8FF9B3 +8FF9B4 +8FF9B5 +8FF9B6 +8FF9B7 +8FF9B8 +8FF9B9 +8FF9BA +8FF9BB +8FF9BC +8FF9BD +8FF9BE +8FF9BF +8FF9C0 +8FF9C1 +8FF9C2 +8FF9C3 +8FF9C4 +8FF9C5 +8FF9C6 +8FF9C7 +8FF9C8 +8FF9C9 +8FF9CA +8FF9CB +8FF9CC +8FF9CD +8FF9CE +8FF9CF +8FF9D0 +8FF9D1 +8FF9D2 +8FF9D3 +8FF9D4 +8FF9D5 +8FF9D6 +8FF9D7 +8FF9D8 +8FF9D9 +8FF9DA +8FF9DB +8FF9DC +8FF9DD +8FF9DE +8FF9DF +8FF9E0 +8FF9E1 +8FF9E2 +8FF9E3 +8FF9E4 +8FF9E5 +8FF9E6 +8FF9E7 +8FF9E8 +8FF9E9 +8FF9EA +8FF9EB +8FF9EC +8FF9ED +8FF9EE +8FF9EF +8FF9F0 +8FF9F1 +8FF9F2 +8FF9F3 +8FF9F4 +8FF9F5 +8FF9F6 +8FF9F7 +8FF9F8 +8FF9F9 +8FF9FA +8FF9FB +8FF9FC +8FF9FD +8FF9FE +8FFAA1 +8FFAA2 +8FFAA3 +8FFAA4 +8FFAA5 +8FFAA6 +8FFAA7 +8FFAA8 +8FFAA9 +8FFAAA +8FFAAB +8FFAAC +8FFAAD +8FFAAE +8FFAAF +8FFAB0 +8FFAB1 +8FFAB2 +8FFAB3 +8FFAB4 +8FFAB5 +8FFAB6 +8FFAB7 +8FFAB8 +8FFAB9 +8FFABA +8FFABB +8FFABC +8FFABD +8FFABE +8FFABF +8FFAC0 +8FFAC1 +8FFAC2 +8FFAC3 +8FFAC4 +8FFAC5 +8FFAC6 +8FFAC7 +8FFAC8 +8FFAC9 +8FFACA +8FFACB +8FFACC +8FFACD +8FFACE +8FFACF +8FFAD0 +8FFAD1 +8FFAD2 +8FFAD3 +8FFAD4 +8FFAD5 +8FFAD6 +8FFAD7 +8FFAD8 +8FFAD9 +8FFADA +8FFADB +8FFADC +8FFADD +8FFADE +8FFADF +8FFAE0 +8FFAE1 +8FFAE2 +8FFAE3 +8FFAE4 +8FFAE5 +8FFAE6 +8FFAE7 +8FFAE8 +8FFAE9 +8FFAEA +8FFAEB +8FFAEC +8FFAED +8FFAEE +8FFAEF +8FFAF0 +8FFAF1 +8FFAF2 +8FFAF3 +8FFAF4 +8FFAF5 +8FFAF6 +8FFAF7 +8FFAF8 +8FFAF9 +8FFAFA +8FFAFB +8FFAFC +8FFAFD +8FFAFE +8FFBA1 +8FFBA2 +8FFBA3 +8FFBA4 +8FFBA5 +8FFBA6 +8FFBA7 +8FFBA8 +8FFBA9 +8FFBAA +8FFBAB +8FFBAC +8FFBAD +8FFBAE +8FFBAF +8FFBB0 +8FFBB1 +8FFBB2 +8FFBB3 +8FFBB4 +8FFBB5 +8FFBB6 +8FFBB7 +8FFBB8 +8FFBB9 +8FFBBA +8FFBBB +8FFBBC +8FFBBD +8FFBBE +8FFBBF +8FFBC0 +8FFBC1 +8FFBC2 +8FFBC3 +8FFBC4 +8FFBC5 +8FFBC6 +8FFBC7 +8FFBC8 +8FFBC9 +8FFBCA +8FFBCB +8FFBCC +8FFBCD +8FFBCE +8FFBCF +8FFBD0 +8FFBD1 +8FFBD2 +8FFBD3 +8FFBD4 +8FFBD5 +8FFBD6 +8FFBD7 +8FFBD8 +8FFBD9 +8FFBDA +8FFBDB +8FFBDC +8FFBDD +8FFBDE +8FFBDF +8FFBE0 +8FFBE1 +8FFBE2 +8FFBE3 +8FFBE4 +8FFBE5 +8FFBE6 +8FFBE7 +8FFBE8 +8FFBE9 +8FFBEA +8FFBEB +8FFBEC +8FFBED +8FFBEE +8FFBEF +8FFBF0 +8FFBF1 +8FFBF2 +8FFBF3 +8FFBF4 +8FFBF5 +8FFBF6 +8FFBF7 +8FFBF8 +8FFBF9 +8FFBFA +8FFBFB +8FFBFC +8FFBFD +8FFBFE +8FFCA1 +8FFCA2 +8FFCA3 +8FFCA4 +8FFCA5 +8FFCA6 +8FFCA7 +8FFCA8 +8FFCA9 +8FFCAA +8FFCAB +8FFCAC +8FFCAD +8FFCAE +8FFCAF +8FFCB0 +8FFCB1 +8FFCB2 +8FFCB3 +8FFCB4 +8FFCB5 +8FFCB6 +8FFCB7 +8FFCB8 +8FFCB9 +8FFCBA +8FFCBB +8FFCBC +8FFCBD +8FFCBE +8FFCBF +8FFCC0 +8FFCC1 +8FFCC2 +8FFCC3 +8FFCC4 +8FFCC5 +8FFCC6 +8FFCC7 +8FFCC8 +8FFCC9 +8FFCCA +8FFCCB +8FFCCC +8FFCCD +8FFCCE +8FFCCF +8FFCD0 +8FFCD1 +8FFCD2 +8FFCD3 +8FFCD4 +8FFCD5 +8FFCD6 +8FFCD7 +8FFCD8 +8FFCD9 +8FFCDA +8FFCDB +8FFCDC +8FFCDD +8FFCDE +8FFCDF +8FFCE0 +8FFCE1 +8FFCE2 +8FFCE3 +8FFCE4 +8FFCE5 +8FFCE6 +8FFCE7 +8FFCE8 +8FFCE9 +8FFCEA +8FFCEB +8FFCEC +8FFCED +8FFCEE +8FFCEF +8FFCF0 +8FFCF1 +8FFCF2 +8FFCF3 +8FFCF4 +8FFCF5 +8FFCF6 +8FFCF7 +8FFCF8 +8FFCF9 +8FFCFA +8FFCFB +8FFCFC +8FFCFD +8FFCFE +8FFDA1 +8FFDA2 +8FFDA3 +8FFDA4 +8FFDA5 +8FFDA6 +8FFDA7 +8FFDA8 +8FFDA9 +8FFDAA +8FFDAB +8FFDAC +8FFDAD +8FFDAE +8FFDAF +8FFDB0 +8FFDB1 +8FFDB2 +8FFDB3 +8FFDB4 +8FFDB5 +8FFDB6 +8FFDB7 +8FFDB8 +8FFDB9 +8FFDBA +8FFDBB +8FFDBC +8FFDBD +8FFDBE +8FFDBF +8FFDC0 +8FFDC1 +8FFDC2 +8FFDC3 +8FFDC4 +8FFDC5 +8FFDC6 +8FFDC7 +8FFDC8 +8FFDC9 +8FFDCA +8FFDCB +8FFDCC +8FFDCD +8FFDCE +8FFDCF +8FFDD0 +8FFDD1 +8FFDD2 +8FFDD3 +8FFDD4 +8FFDD5 +8FFDD6 +8FFDD7 +8FFDD8 +8FFDD9 +8FFDDA +8FFDDB +8FFDDC +8FFDDD +8FFDDE +8FFDDF +8FFDE0 +8FFDE1 +8FFDE2 +8FFDE3 +8FFDE4 +8FFDE5 +8FFDE6 +8FFDE7 +8FFDE8 +8FFDE9 +8FFDEA +8FFDEB +8FFDEC +8FFDED +8FFDEE +8FFDEF +8FFDF0 +8FFDF1 +8FFDF2 +8FFDF3 +8FFDF4 +8FFDF5 +8FFDF6 +8FFDF7 +8FFDF8 +8FFDF9 +8FFDFA +8FFDFB +8FFDFC +8FFDFD +8FFDFE +8FFEA1 +8FFEA2 +8FFEA3 +8FFEA4 +8FFEA5 +8FFEA6 +8FFEA7 +8FFEA8 +8FFEA9 +8FFEAA +8FFEAB +8FFEAC +8FFEAD +8FFEAE +8FFEAF +8FFEB0 +8FFEB1 +8FFEB2 +8FFEB3 +8FFEB4 +8FFEB5 +8FFEB6 +8FFEB7 +8FFEB8 +8FFEB9 +8FFEBA +8FFEBB +8FFEBC +8FFEBD +8FFEBE +8FFEBF +8FFEC0 +8FFEC1 +8FFEC2 +8FFEC3 +8FFEC4 +8FFEC5 +8FFEC6 +8FFEC7 +8FFEC8 +8FFEC9 +8FFECA +8FFECB +8FFECC +8FFECD +8FFECE +8FFECF +8FFED0 +8FFED1 +8FFED2 +8FFED3 +8FFED4 +8FFED5 +8FFED6 +8FFED7 +8FFED8 +8FFED9 +8FFEDA +8FFEDB +8FFEDC +8FFEDD +8FFEDE +8FFEDF +8FFEE0 +8FFEE1 +8FFEE2 +8FFEE3 +8FFEE4 +8FFEE5 +8FFEE6 +8FFEE7 +8FFEE8 +8FFEE9 +8FFEEA +8FFEEB +8FFEEC +8FFEED +8FFEEE +8FFEEF +8FFEF0 +8FFEF1 +8FFEF2 +8FFEF3 +8FFEF4 +8FFEF5 +8FFEF6 +8FFEF7 +8FFEF8 +8FFEF9 +8FFEFA +8FFEFB +8FFEFC +8FFEFD +8FFEFE DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; +DROP TABLE t4; RESET MASTER; CREATE TABLE t1(f1 blob); PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; SET @var1= x'8300'; EXECUTE stmt1 USING @var1; -SHOW BINLOG EVENTS FROM 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=95,COLLATION_CONNECTION=95,COLLATION_DATABASE=95,COLLATION_SERVER=8 -master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=95,COLLATION_CONNECTION=95,COLLATION_DATABASE=95,COLLATION_SERVER=8 -master-bin.000001 # User var 1 # @`var1`=_binary 0x8300 COLLATE binary -master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES(@'var1') +SHOW BINLOG EVENTS FROM 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 185 use `test`; CREATE TABLE t1(f1 blob) +master-bin.000001 185 User var 1 224 @`var1`=_binary 0x8300 COLLATE binary +master-bin.000001 224 Query 1 317 use `test`; INSERT INTO t1 VALUES(@'var1') SELECT HEX(f1) FROM t1; HEX(f1) 8300 @@ -8602,28 +11339,6 @@ cp932_japanese_ci 6109 cp932_japanese_ci 61 cp932_japanese_ci 6120 drop table t1; -create table t1 engine=innodb select repeat('a',50) as c1; -alter table t1 add index(c1(5)); -insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); -select collation(c1) from t1 limit 1; -collation(c1) -cp932_japanese_ci -select c1 from t1 where c1 like 'abcdef%' order by c1; -c1 -abcdefg -select c1 from t1 where c1 like 'abcde1%' order by c1; -c1 -abcde100 -abcde110 -abcde111 -select c1 from t1 where c1 like 'abcde11%' order by c1; -c1 -abcde110 -abcde111 -select c1 from t1 where c1 like 'abcde111%' order by c1; -c1 -abcde111 -drop table t1; SET collation_connection='cp932_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -8634,25 +11349,3 @@ cp932_bin 6109 cp932_bin 61 cp932_bin 6120 drop table t1; -create table t1 engine=innodb select repeat('a',50) as c1; -alter table t1 add index(c1(5)); -insert into t1 values ('abcdefg'),('abcde100'),('abcde110'),('abcde111'); -select collation(c1) from t1 limit 1; -collation(c1) -cp932_bin -select c1 from t1 where c1 like 'abcdef%' order by c1; -c1 -abcdefg -select c1 from t1 where c1 like 'abcde1%' order by c1; -c1 -abcde100 -abcde110 -abcde111 -select c1 from t1 where c1 like 'abcde11%' order by c1; -c1 -abcde110 -abcde111 -select c1 from t1 where c1 like 'abcde111%' order by c1; -c1 -abcde111 -drop table t1; diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result new file mode 100755 index 00000000000..cdb28cd0fdd --- /dev/null +++ b/mysql-test/r/ctype_eucjpms.result @@ -0,0 +1,9821 @@ +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop table if exists t4; +set names eucjpms; +set character_set_database = eucjpms; +CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = eucjpms; +INSERT INTO t1 VALUES +(0x5C),(0x7E),(0xA1B1),(0xA1BD),(0xA1C0),(0xA1C1),(0xA1C2),(0xA1DD),(0xA1F1),(0xA1F2),(0xA1EF),(0xA2CC),(0x8FA2B7),(0x8FA2C3); +INSERT INTO t1 VALUES +(0xADA1),(0xADA2),(0xADA3),(0xADA4),(0xADA5),(0xADA6),(0xADA7),(0xADA8), +(0xADA9),(0xADAA),(0xADAB),(0xADAC),(0xADAD),(0xADAE),(0xADAF),(0xADB0), +(0xADB1),(0xADB2),(0xADB3),(0xADB4),(0xADB5),(0xADB6),(0xADB7),(0xADB8), +(0xADB9),(0xADBA),(0xADBB),(0xADBC),(0xADBD),(0xADBE),(0xADC0),(0xADC1), +(0xADC2),(0xADC3),(0xADC4),(0xADC5),(0xADC6),(0xADC7),(0xADC8),(0xADC9), +(0xADCA),(0xADCB),(0xADCC),(0xADCD),(0xADCE),(0xADCF),(0xADD0),(0xADD1), +(0xADD2),(0xADD3),(0xADD4),(0xADD5),(0xADD6),(0xADDF),(0xADE0),(0xADE1), +(0xADE2),(0xADE3),(0xADE4),(0xADE5),(0xADE6),(0xADE7),(0xADE8),(0xADE9), +(0xADEA),(0xADEB),(0xADEC),(0xADED),(0xADEE),(0xADEF),(0xADF0),(0xADF1), +(0xADF2),(0xADF3),(0xADF4),(0xADF5),(0xADF6),(0xADF7),(0xADF8),(0xADF9), +(0xADFA),(0xADFB),(0xADFC); +INSERT INTO t1 VALUES +(0x8FF3F3),(0x8FF3F4),(0x8FF3F5),(0x8FF3F6),(0x8FF3F7),(0x8FF3F8),(0x8FF3F9),(0x8FF3FA), +(0x8FF3FB),(0x8FF3FC),(0x8FF3FD),(0x8FF3FE),(0x8FF4A1),(0x8FF4A2),(0x8FF4A3),(0x8FF4A4), +(0x8FF4A5),(0x8FF4A6),(0x8FF4A7),(0x8FF4A8),(0xA2CC),(0x8FA2C3),(0x8FF4A9),(0x8FF4AA), +(0x8FF4AB),(0x8FF4AC),(0x8FF4AD),(0xA2E8),(0x8FD4E3),(0x8FDCDF),(0x8FE4E9),(0x8FE3F8), +(0x8FD9A1),(0x8FB1BB),(0x8FF4AE),(0x8FC2AD),(0x8FC3FC),(0x8FE4D0),(0x8FC2BF),(0x8FBCF4), +(0x8FB0A9),(0x8FB0C8),(0x8FF4AF),(0x8FB0D2),(0x8FB0D4),(0x8FB0E3),(0x8FB0EE),(0x8FB1A7), +(0x8FB1A3),(0x8FB1AC),(0x8FB1A9),(0x8FB1BE),(0x8FB1DF),(0x8FB1D8),(0x8FB1C8),(0x8FB1D7), +(0x8FB1E3),(0x8FB1F4),(0x8FB1E1),(0x8FB2A3),(0x8FF4B0),(0x8FB2BB),(0x8FB2E6),(0x8FB2ED), +(0x8FB2F5),(0x8FB2FC),(0x8FF4B1),(0x8FB3B5),(0x8FB3D8),(0x8FB3DB),(0x8FB3E5),(0x8FB3EE), +(0x8FB3FB),(0x8FF4B2),(0x8FF4B3),(0x8FB4C0),(0x8FB4C7),(0x8FB4D0),(0x8FB4DE),(0x8FF4B4), +(0x8FB5AA),(0x8FF4B5),(0x8FB5AF),(0x8FB5C4),(0x8FB5E8),(0x8FF4B6),(0x8FB7C2),(0x8FB7E4), +(0x8FB7E8),(0x8FB7E7),(0x8FF4B7),(0x8FF4B8),(0x8FF4B9),(0x8FB8CE),(0x8FB8E1),(0x8FB8F5), +(0x8FB8F7),(0x8FB8F8),(0x8FB8FC),(0x8FB9AF),(0x8FB9B7),(0x8FBABE),(0x8FBADB),(0x8FCDAA), +(0x8FBAE1),(0x8FF4BA),(0x8FBAEB),(0x8FBBB3),(0x8FBBB8),(0x8FF4BB),(0x8FBBCA),(0x8FF4BC), +(0x8FF4BD),(0x8FBBD0),(0x8FBBDE),(0x8FBBF4),(0x8FBBF5),(0x8FBBF9),(0x8FBCE4),(0x8FBCED), +(0x8FBCFE),(0x8FF4BE),(0x8FBDC2),(0x8FBDE7),(0x8FF4BF),(0x8FBDF0),(0x8FBEB0),(0x8FBEAC), +(0x8FF4C0),(0x8FBEB3),(0x8FBEBD),(0x8FBECD),(0x8FBEC9),(0x8FBEE4),(0x8FBFA8),(0x8FBFC9), +(0x8FC0C4),(0x8FC0E4),(0x8FC0F4),(0x8FC1A6),(0x8FF4C1),(0x8FC1F5),(0x8FC1FC),(0x8FF4C2), +(0x8FC1F8),(0x8FC2AB),(0x8FC2A1),(0x8FC2A5),(0x8FF4C3),(0x8FC2B8),(0x8FC2BA),(0x8FF4C4), +(0x8FC2C4),(0x8FC2D2),(0x8FC2D7),(0x8FC2DB),(0x8FC2DE),(0x8FC2ED),(0x8FC2F0),(0x8FF4C5), +(0x8FC3A1),(0x8FC3B5),(0x8FC3C9),(0x8FC3B9),(0x8FF4C6),(0x8FC3D8),(0x8FC3FE),(0x8FF4C7), +(0x8FC4CC),(0x8FF4C8),(0x8FC4D9),(0x8FC4EA),(0x8FC4FD),(0x8FF4C9),(0x8FC5A7),(0x8FC5B5), +(0x8FC5B6),(0x8FF4CA),(0x8FC5D5),(0x8FC6B8),(0x8FC6D7),(0x8FC6E0),(0x8FC6EA),(0x8FC6E3), +(0x8FC7A1),(0x8FC7AB),(0x8FC7C7),(0x8FC7C3),(0x8FC7CB),(0x8FC7CF),(0x8FC7D9),(0x8FF4CB), +(0x8FF4CC),(0x8FC7E6),(0x8FC7EE),(0x8FC7FC),(0x8FC7EB),(0x8FC7F0),(0x8FC8B1),(0x8FC8E5), +(0x8FC8F8),(0x8FC9A6),(0x8FC9AB),(0x8FC9AD),(0x8FF4CD),(0x8FC9CA),(0x8FC9D3),(0x8FC9E9), +(0x8FC9E3),(0x8FC9FC),(0x8FC9F4),(0x8FC9F5),(0x8FF4CE),(0x8FCAB3),(0x8FCABD),(0x8FCAEF), +(0x8FCAF1),(0x8FCBAE),(0x8FF4CF),(0x8FCBCA),(0x8FCBE6),(0x8FCBEA),(0x8FCBF0),(0x8FCBF4), +(0x8FCBEE),(0x8FCCA5),(0x8FCBF9),(0x8FCCAB),(0x8FCCAE),(0x8FCCAD),(0x8FCCB2),(0x8FCCC2), +(0x8FCCD0),(0x8FCCD9),(0x8FF4D0),(0x8FCDBB),(0x8FF4D1),(0x8FCEBB),(0x8FF4D2),(0x8FCEBA), +(0x8FCEC3),(0x8FF4D3),(0x8FCEF2),(0x8FB3DD),(0x8FCFD5),(0x8FCFE2),(0x8FCFE9),(0x8FCFED), +(0x8FF4D4),(0x8FF4D5),(0x8FF4D6),(0x8FF4D7),(0x8FD0E5),(0x8FF4D8),(0x8FD0E9),(0x8FD1E8), +(0x8FF4D9),(0x8FF4DA),(0x8FD1EC),(0x8FD2BB),(0x8FF4DB),(0x8FD3E1),(0x8FD3E8),(0x8FD4A7), +(0x8FF4DC),(0x8FF4DD),(0x8FD4D4),(0x8FD4F2),(0x8FD5AE),(0x8FF4DE),(0x8FD7DE),(0x8FF4DF), +(0x8FD8A2),(0x8FD8B7),(0x8FD8C1),(0x8FD8D1),(0x8FD8F4),(0x8FD9C6),(0x8FD9C8),(0x8FD9D1), +(0x8FF4E0),(0x8FF4E1),(0x8FF4E2),(0x8FF4E3),(0x8FF4E4),(0x8FDCD3),(0x8FDDC8),(0x8FDDD4), +(0x8FDDEA),(0x8FDDFA),(0x8FDEA4),(0x8FDEB0),(0x8FF4E5),(0x8FDEB5),(0x8FDECB),(0x8FF4E6), +(0x8FDFB9),(0x8FF4E7),(0x8FDFC3),(0x8FF4E8),(0x8FF4E9),(0x8FE0D9),(0x8FF4EA),(0x8FF4EB), +(0x8FE1E2),(0x8FF4EC),(0x8FF4ED),(0x8FF4EE),(0x8FE2C7),(0x8FE3A8),(0x8FE3A6),(0x8FE3A9), +(0x8FE3AF),(0x8FE3B0),(0x8FE3AA),(0x8FE3AB),(0x8FE3BC),(0x8FE3C1),(0x8FE3BF),(0x8FE3D5), +(0x8FE3D8),(0x8FE3D6),(0x8FE3DF),(0x8FE3E3),(0x8FE3E1),(0x8FE3D4),(0x8FE3E9),(0x8FE4A6), +(0x8FE3F1),(0x8FE3F2),(0x8FE4CB),(0x8FE4C1),(0x8FE4C3),(0x8FE4BE),(0x8FF4EF),(0x8FE4C0), +(0x8FE4C7),(0x8FE4BF),(0x8FE4E0),(0x8FE4DE),(0x8FE4D1),(0x8FF4F0),(0x8FE4DC),(0x8FE4D2), +(0x8FE4DB),(0x8FE4D4),(0x8FE4FA),(0x8FE4EF),(0x8FE5B3),(0x8FE5BF),(0x8FE5C9),(0x8FE5D0), +(0x8FE5E2),(0x8FE5EA),(0x8FE5EB),(0x8FF4F1),(0x8FF4F2),(0x8FF4F3),(0x8FE6E8),(0x8FE6EF), +(0x8FE7AC),(0x8FF4F4),(0x8FE7AE),(0x8FF4F5),(0x8FE7B1),(0x8FF4F6),(0x8FE7B2),(0x8FE8B1), +(0x8FE8B6),(0x8FF4F7),(0x8FF4F8),(0x8FE8DD),(0x8FF4F9),(0x8FF4FA),(0x8FE9D1),(0x8FF4FB), +(0x8FE9ED),(0x8FEACD),(0x8FF4FC),(0x8FEADB),(0x8FEAE6),(0x8FEAEA),(0x8FEBA5),(0x8FEBFB), +(0x8FEBFA),(0x8FF4FD),(0x8FECD6),(0x8FF4FE); +INSERT INTO t1 VALUES +(0xF5A1),(0xF5A2),(0xF5A3),(0xF5A4),(0xF5A5),(0xF5A6),(0xF5A7),(0xF5A8), +(0xF5A9),(0xF5AA),(0xF5AB),(0xF5AC),(0xF5AD),(0xF5AE),(0xF5AF),(0xF5B0), +(0xF5B1),(0xF5B2),(0xF5B3),(0xF5B4),(0xF5B5),(0xF5B6),(0xF5B7),(0xF5B8), +(0xF5B9),(0xF5BA),(0xF5BB),(0xF5BC),(0xF5BD),(0xF5BE),(0xF5BF),(0xF5C0), +(0xF5C1),(0xF5C2),(0xF5C3),(0xF5C4),(0xF5C5),(0xF5C6),(0xF5C7),(0xF5C8), +(0xF5C9),(0xF5CA),(0xF5CB),(0xF5CC),(0xF5CD),(0xF5CE),(0xF5CF),(0xF5D0), +(0xF5D1),(0xF5D2),(0xF5D3),(0xF5D4),(0xF5D5),(0xF5D6),(0xF5D7),(0xF5D8), +(0xF5D9),(0xF5DA),(0xF5DB),(0xF5DC),(0xF5DD),(0xF5DE),(0xF5DF),(0xF5E0), +(0xF5E1),(0xF5E2),(0xF5E3),(0xF5E4),(0xF5E5),(0xF5E6),(0xF5E7),(0xF5E8), +(0xF5E9),(0xF5EA),(0xF5EB),(0xF5EC),(0xF5ED),(0xF5EE),(0xF5EF),(0xF5F0), +(0xF5F1),(0xF5F2),(0xF5F3),(0xF5F4),(0xF5F5),(0xF5F6),(0xF5F7),(0xF5F8), +(0xF5F9),(0xF5FA),(0xF5FB),(0xF5FC),(0xF5FD),(0xF5FE), +(0xF6A1),(0xF6A2),(0xF6A3),(0xF6A4),(0xF6A5),(0xF6A6),(0xF6A7),(0xF6A8), +(0xF6A9),(0xF6AA),(0xF6AB),(0xF6AC),(0xF6AD),(0xF6AE),(0xF6AF),(0xF6B0), +(0xF6B1),(0xF6B2),(0xF6B3),(0xF6B4),(0xF6B5),(0xF6B6),(0xF6B7),(0xF6B8), +(0xF6B9),(0xF6BA),(0xF6BB),(0xF6BC),(0xF6BD),(0xF6BE),(0xF6BF),(0xF6C0), +(0xF6C1),(0xF6C2),(0xF6C3),(0xF6C4),(0xF6C5),(0xF6C6),(0xF6C7),(0xF6C8), +(0xF6C9),(0xF6CA),(0xF6CB),(0xF6CC),(0xF6CD),(0xF6CE),(0xF6CF),(0xF6D0), +(0xF6D1),(0xF6D2),(0xF6D3),(0xF6D4),(0xF6D5),(0xF6D6),(0xF6D7),(0xF6D8), +(0xF6D9),(0xF6DA),(0xF6DB),(0xF6DC),(0xF6DD),(0xF6DE),(0xF6DF),(0xF6E0), +(0xF6E1),(0xF6E2),(0xF6E3),(0xF6E4),(0xF6E5),(0xF6E6),(0xF6E7),(0xF6E8), +(0xF6E9),(0xF6EA),(0xF6EB),(0xF6EC),(0xF6ED),(0xF6EE),(0xF6EF),(0xF6F0), +(0xF6F1),(0xF6F2),(0xF6F3),(0xF6F4),(0xF6F5),(0xF6F6),(0xF6F7),(0xF6F8), +(0xF6F9),(0xF6FA),(0xF6FB),(0xF6FC),(0xF6FD),(0xF6FE), +(0xF7A1),(0xF7A2),(0xF7A3),(0xF7A4),(0xF7A5),(0xF7A6),(0xF7A7),(0xF7A8), +(0xF7A9),(0xF7AA),(0xF7AB),(0xF7AC),(0xF7AD),(0xF7AE),(0xF7AF),(0xF7B0), +(0xF7B1),(0xF7B2),(0xF7B3),(0xF7B4),(0xF7B5),(0xF7B6),(0xF7B7),(0xF7B8), +(0xF7B9),(0xF7BA),(0xF7BB),(0xF7BC),(0xF7BD),(0xF7BE),(0xF7BF),(0xF7C0), +(0xF7C1),(0xF7C2),(0xF7C3),(0xF7C4),(0xF7C5),(0xF7C6),(0xF7C7),(0xF7C8), +(0xF7C9),(0xF7CA),(0xF7CB),(0xF7CC),(0xF7CD),(0xF7CE),(0xF7CF),(0xF7D0), +(0xF7D1),(0xF7D2),(0xF7D3),(0xF7D4),(0xF7D5),(0xF7D6),(0xF7D7),(0xF7D8), +(0xF7D9),(0xF7DA),(0xF7DB),(0xF7DC),(0xF7DD),(0xF7DE),(0xF7DF),(0xF7E0), +(0xF7E1),(0xF7E2),(0xF7E3),(0xF7E4),(0xF7E5),(0xF7E6),(0xF7E7),(0xF7E8), +(0xF7E9),(0xF7EA),(0xF7EB),(0xF7EC),(0xF7ED),(0xF7EE),(0xF7EF),(0xF7F0), +(0xF7F1),(0xF7F2),(0xF7F3),(0xF7F4),(0xF7F5),(0xF7F6),(0xF7F7),(0xF7F8), +(0xF7F9),(0xF7FA),(0xF7FB),(0xF7FC),(0xF7FD),(0xF7FE), +(0xF8A1),(0xF8A2),(0xF8A3),(0xF8A4),(0xF8A5),(0xF8A6),(0xF8A7),(0xF8A8), +(0xF8A9),(0xF8AA),(0xF8AB),(0xF8AC),(0xF8AD),(0xF8AE),(0xF8AF),(0xF8B0), +(0xF8B1),(0xF8B2),(0xF8B3),(0xF8B4),(0xF8B5),(0xF8B6),(0xF8B7),(0xF8B8), +(0xF8B9),(0xF8BA),(0xF8BB),(0xF8BC),(0xF8BD),(0xF8BE),(0xF8BF),(0xF8C0), +(0xF8C1),(0xF8C2),(0xF8C3),(0xF8C4),(0xF8C5),(0xF8C6),(0xF8C7),(0xF8C8), +(0xF8C9),(0xF8CA),(0xF8CB),(0xF8CC),(0xF8CD),(0xF8CE),(0xF8CF),(0xF8D0), +(0xF8D1),(0xF8D2),(0xF8D3),(0xF8D4),(0xF8D5),(0xF8D6),(0xF8D7),(0xF8D8), +(0xF8D9),(0xF8DA),(0xF8DB),(0xF8DC),(0xF8DD),(0xF8DE),(0xF8DF),(0xF8E0), +(0xF8E1),(0xF8E2),(0xF8E3),(0xF8E4),(0xF8E5),(0xF8E6),(0xF8E7),(0xF8E8), +(0xF8E9),(0xF8EA),(0xF8EB),(0xF8EC),(0xF8ED),(0xF8EE),(0xF8EF),(0xF8F0), +(0xF8F1),(0xF8F2),(0xF8F3),(0xF8F4),(0xF8F5),(0xF8F6),(0xF8F7),(0xF8F8), +(0xF8F9),(0xF8FA),(0xF8FB),(0xF8FC),(0xF8FD),(0xF8FE), +(0xF9A1),(0xF9A2),(0xF9A3),(0xF9A4),(0xF9A5),(0xF9A6),(0xF9A7),(0xF9A8), +(0xF9A9),(0xF9AA),(0xF9AB),(0xF9AC),(0xF9AD),(0xF9AE),(0xF9AF),(0xF9B0), +(0xF9B1),(0xF9B2),(0xF9B3),(0xF9B4),(0xF9B5),(0xF9B6),(0xF9B7),(0xF9B8), +(0xF9B9),(0xF9BA),(0xF9BB),(0xF9BC),(0xF9BD),(0xF9BE),(0xF9BF),(0xF9C0), +(0xF9C1),(0xF9C2),(0xF9C3),(0xF9C4),(0xF9C5),(0xF9C6),(0xF9C7),(0xF9C8), +(0xF9C9),(0xF9CA),(0xF9CB),(0xF9CC),(0xF9CD),(0xF9CE),(0xF9CF),(0xF9D0), +(0xF9D1),(0xF9D2),(0xF9D3),(0xF9D4),(0xF9D5),(0xF9D6),(0xF9D7),(0xF9D8), +(0xF9D9),(0xF9DA),(0xF9DB),(0xF9DC),(0xF9DD),(0xF9DE),(0xF9DF),(0xF9E0), +(0xF9E1),(0xF9E2),(0xF9E3),(0xF9E4),(0xF9E5),(0xF9E6),(0xF9E7),(0xF9E8), +(0xF9E9),(0xF9EA),(0xF9EB),(0xF9EC),(0xF9ED),(0xF9EE),(0xF9EF),(0xF9F0), +(0xF9F1),(0xF9F2),(0xF9F3),(0xF9F4),(0xF9F5),(0xF9F6),(0xF9F7),(0xF9F8), +(0xF9F9),(0xF9FA),(0xF9FB),(0xF9FC),(0xF9FD),(0xF9FE), +(0xFAA1),(0xFAA2),(0xFAA3),(0xFAA4),(0xFAA5),(0xFAA6),(0xFAA7),(0xFAA8), +(0xFAA9),(0xFAAA),(0xFAAB),(0xFAAC),(0xFAAD),(0xFAAE),(0xFAAF),(0xFAB0), +(0xFAB1),(0xFAB2),(0xFAB3),(0xFAB4),(0xFAB5),(0xFAB6),(0xFAB7),(0xFAB8), +(0xFAB9),(0xFABA),(0xFABB),(0xFABC),(0xFABD),(0xFABE),(0xFABF),(0xFAC0), +(0xFAC1),(0xFAC2),(0xFAC3),(0xFAC4),(0xFAC5),(0xFAC6),(0xFAC7),(0xFAC8), +(0xFAC9),(0xFACA),(0xFACB),(0xFACC),(0xFACD),(0xFACE),(0xFACF),(0xFAD0), +(0xFAD1),(0xFAD2),(0xFAD3),(0xFAD4),(0xFAD5),(0xFAD6),(0xFAD7),(0xFAD8), +(0xFAD9),(0xFADA),(0xFADB),(0xFADC),(0xFADD),(0xFADE),(0xFADF),(0xFAE0), +(0xFAE1),(0xFAE2),(0xFAE3),(0xFAE4),(0xFAE5),(0xFAE6),(0xFAE7),(0xFAE8), +(0xFAE9),(0xFAEA),(0xFAEB),(0xFAEC),(0xFAED),(0xFAEE),(0xFAEF),(0xFAF0), +(0xFAF1),(0xFAF2),(0xFAF3),(0xFAF4),(0xFAF5),(0xFAF6),(0xFAF7),(0xFAF8), +(0xFAF9),(0xFAFA),(0xFAFB),(0xFAFC),(0xFAFD),(0xFAFE), +(0xFBA1),(0xFBA2),(0xFBA3),(0xFBA4),(0xFBA5),(0xFBA6),(0xFBA7),(0xFBA8), +(0xFBA9),(0xFBAA),(0xFBAB),(0xFBAC),(0xFBAD),(0xFBAE),(0xFBAF),(0xFBB0), +(0xFBB1),(0xFBB2),(0xFBB3),(0xFBB4),(0xFBB5),(0xFBB6),(0xFBB7),(0xFBB8), +(0xFBB9),(0xFBBA),(0xFBBB),(0xFBBC),(0xFBBD),(0xFBBE),(0xFBBF),(0xFBC0), +(0xFBC1),(0xFBC2),(0xFBC3),(0xFBC4),(0xFBC5),(0xFBC6),(0xFBC7),(0xFBC8), +(0xFBC9),(0xFBCA),(0xFBCB),(0xFBCC),(0xFBCD),(0xFBCE),(0xFBCF),(0xFBD0), +(0xFBD1),(0xFBD2),(0xFBD3),(0xFBD4),(0xFBD5),(0xFBD6),(0xFBD7),(0xFBD8), +(0xFBD9),(0xFBDA),(0xFBDB),(0xFBDC),(0xFBDD),(0xFBDE),(0xFBDF),(0xFBE0), +(0xFBE1),(0xFBE2),(0xFBE3),(0xFBE4),(0xFBE5),(0xFBE6),(0xFBE7),(0xFBE8), +(0xFBE9),(0xFBEA),(0xFBEB),(0xFBEC),(0xFBED),(0xFBEE),(0xFBEF),(0xFBF0), +(0xFBF1),(0xFBF2),(0xFBF3),(0xFBF4),(0xFBF5),(0xFBF6),(0xFBF7),(0xFBF8), +(0xFBF9),(0xFBFA),(0xFBFB),(0xFBFC),(0xFBFD),(0xFBFE), +(0xFCA1),(0xFCA2),(0xFCA3),(0xFCA4),(0xFCA5),(0xFCA6),(0xFCA7),(0xFCA8), +(0xFCA9),(0xFCAA),(0xFCAB),(0xFCAC),(0xFCAD),(0xFCAE),(0xFCAF),(0xFCB0), +(0xFCB1),(0xFCB2),(0xFCB3),(0xFCB4),(0xFCB5),(0xFCB6),(0xFCB7),(0xFCB8), +(0xFCB9),(0xFCBA),(0xFCBB),(0xFCBC),(0xFCBD),(0xFCBE),(0xFCBF),(0xFCC0), +(0xFCC1),(0xFCC2),(0xFCC3),(0xFCC4),(0xFCC5),(0xFCC6),(0xFCC7),(0xFCC8), +(0xFCC9),(0xFCCA),(0xFCCB),(0xFCCC),(0xFCCD),(0xFCCE),(0xFCCF),(0xFCD0), +(0xFCD1),(0xFCD2),(0xFCD3),(0xFCD4),(0xFCD5),(0xFCD6),(0xFCD7),(0xFCD8), +(0xFCD9),(0xFCDA),(0xFCDB),(0xFCDC),(0xFCDD),(0xFCDE),(0xFCDF),(0xFCE0), +(0xFCE1),(0xFCE2),(0xFCE3),(0xFCE4),(0xFCE5),(0xFCE6),(0xFCE7),(0xFCE8), +(0xFCE9),(0xFCEA),(0xFCEB),(0xFCEC),(0xFCED),(0xFCEE),(0xFCEF),(0xFCF0), +(0xFCF1),(0xFCF2),(0xFCF3),(0xFCF4),(0xFCF5),(0xFCF6),(0xFCF7),(0xFCF8), +(0xFCF9),(0xFCFA),(0xFCFB),(0xFCFC),(0xFCFD),(0xFCFE), +(0xFDA1),(0xFDA2),(0xFDA3),(0xFDA4),(0xFDA5),(0xFDA6),(0xFDA7),(0xFDA8), +(0xFDA9),(0xFDAA),(0xFDAB),(0xFDAC),(0xFDAD),(0xFDAE),(0xFDAF),(0xFDB0), +(0xFDB1),(0xFDB2),(0xFDB3),(0xFDB4),(0xFDB5),(0xFDB6),(0xFDB7),(0xFDB8), +(0xFDB9),(0xFDBA),(0xFDBB),(0xFDBC),(0xFDBD),(0xFDBE),(0xFDBF),(0xFDC0), +(0xFDC1),(0xFDC2),(0xFDC3),(0xFDC4),(0xFDC5),(0xFDC6),(0xFDC7),(0xFDC8), +(0xFDC9),(0xFDCA),(0xFDCB),(0xFDCC),(0xFDCD),(0xFDCE),(0xFDCF),(0xFDD0), +(0xFDD1),(0xFDD2),(0xFDD3),(0xFDD4),(0xFDD5),(0xFDD6),(0xFDD7),(0xFDD8), +(0xFDD9),(0xFDDA),(0xFDDB),(0xFDDC),(0xFDDD),(0xFDDE),(0xFDDF),(0xFDE0), +(0xFDE1),(0xFDE2),(0xFDE3),(0xFDE4),(0xFDE5),(0xFDE6),(0xFDE7),(0xFDE8), +(0xFDE9),(0xFDEA),(0xFDEB),(0xFDEC),(0xFDED),(0xFDEE),(0xFDEF),(0xFDF0), +(0xFDF1),(0xFDF2),(0xFDF3),(0xFDF4),(0xFDF5),(0xFDF6),(0xFDF7),(0xFDF8), +(0xFDF9),(0xFDFA),(0xFDFB),(0xFDFC),(0xFDFD),(0xFDFE), +(0xFEA1),(0xFEA2),(0xFEA3),(0xFEA4),(0xFEA5),(0xFEA6),(0xFEA7),(0xFEA8), +(0xFEA9),(0xFEAA),(0xFEAB),(0xFEAC),(0xFEAD),(0xFEAE),(0xFEAF),(0xFEB0), +(0xFEB1),(0xFEB2),(0xFEB3),(0xFEB4),(0xFEB5),(0xFEB6),(0xFEB7),(0xFEB8), +(0xFEB9),(0xFEBA),(0xFEBB),(0xFEBC),(0xFEBD),(0xFEBE),(0xFEBF),(0xFEC0), +(0xFEC1),(0xFEC2),(0xFEC3),(0xFEC4),(0xFEC5),(0xFEC6),(0xFEC7),(0xFEC8), +(0xFEC9),(0xFECA),(0xFECB),(0xFECC),(0xFECD),(0xFECE),(0xFECF),(0xFED0), +(0xFED1),(0xFED2),(0xFED3),(0xFED4),(0xFED5),(0xFED6),(0xFED7),(0xFED8), +(0xFED9),(0xFEDA),(0xFEDB),(0xFEDC),(0xFEDD),(0xFEDE),(0xFEDF),(0xFEE0), +(0xFEE1),(0xFEE2),(0xFEE3),(0xFEE4),(0xFEE5),(0xFEE6),(0xFEE7),(0xFEE8), +(0xFEE9),(0xFEEA),(0xFEEB),(0xFEEC),(0xFEED),(0xFEEE),(0xFEEF),(0xFEF0), +(0xFEF1),(0xFEF2),(0xFEF3),(0xFEF4),(0xFEF5),(0xFEF6),(0xFEF7),(0xFEF8), +(0xFEF9),(0xFEFA),(0xFEFB),(0xFEFC),(0xFEFD),(0xFEFE), +(0x8FF5A1),(0x8FF5A2),(0x8FF5A3),(0x8FF5A4),(0x8FF5A5),(0x8FF5A6),(0x8FF5A7),(0x8FF5A8), +(0x8FF5A9),(0x8FF5AA),(0x8FF5AB),(0x8FF5AC),(0x8FF5AD),(0x8FF5AE),(0x8FF5AF),(0x8FF5B0), +(0x8FF5B1),(0x8FF5B2),(0x8FF5B3),(0x8FF5B4),(0x8FF5B5),(0x8FF5B6),(0x8FF5B7),(0x8FF5B8), +(0x8FF5B9),(0x8FF5BA),(0x8FF5BB),(0x8FF5BC),(0x8FF5BD),(0x8FF5BE),(0x8FF5BF),(0x8FF5C0), +(0x8FF5C1),(0x8FF5C2),(0x8FF5C3),(0x8FF5C4),(0x8FF5C5),(0x8FF5C6),(0x8FF5C7),(0x8FF5C8), +(0x8FF5C9),(0x8FF5CA),(0x8FF5CB),(0x8FF5CC),(0x8FF5CD),(0x8FF5CE),(0x8FF5CF),(0x8FF5D0), +(0x8FF5D1),(0x8FF5D2),(0x8FF5D3),(0x8FF5D4),(0x8FF5D5),(0x8FF5D6),(0x8FF5D7),(0x8FF5D8), +(0x8FF5D9),(0x8FF5DA),(0x8FF5DB),(0x8FF5DC),(0x8FF5DD),(0x8FF5DE),(0x8FF5DF),(0x8FF5E0), +(0x8FF5E1),(0x8FF5E2),(0x8FF5E3),(0x8FF5E4),(0x8FF5E5),(0x8FF5E6),(0x8FF5E7),(0x8FF5E8), +(0x8FF5E9),(0x8FF5EA),(0x8FF5EB),(0x8FF5EC),(0x8FF5ED),(0x8FF5EE),(0x8FF5EF),(0x8FF5F0), +(0x8FF5F1),(0x8FF5F2),(0x8FF5F3),(0x8FF5F4),(0x8FF5F5),(0x8FF5F6),(0x8FF5F7),(0x8FF5F8), +(0x8FF5F9),(0x8FF5FA),(0x8FF5FB),(0x8FF5FC),(0x8FF5FD),(0x8FF5FE), +(0x8FF6A1),(0x8FF6A2),(0x8FF6A3),(0x8FF6A4),(0x8FF6A5),(0x8FF6A6),(0x8FF6A7),(0x8FF6A8), +(0x8FF6A9),(0x8FF6AA),(0x8FF6AB),(0x8FF6AC),(0x8FF6AD),(0x8FF6AE),(0x8FF6AF),(0x8FF6B0), +(0x8FF6B1),(0x8FF6B2),(0x8FF6B3),(0x8FF6B4),(0x8FF6B5),(0x8FF6B6),(0x8FF6B7),(0x8FF6B8), +(0x8FF6B9),(0x8FF6BA),(0x8FF6BB),(0x8FF6BC),(0x8FF6BD),(0x8FF6BE),(0x8FF6BF),(0x8FF6C0), +(0x8FF6C1),(0x8FF6C2),(0x8FF6C3),(0x8FF6C4),(0x8FF6C5),(0x8FF6C6),(0x8FF6C7),(0x8FF6C8), +(0x8FF6C9),(0x8FF6CA),(0x8FF6CB),(0x8FF6CC),(0x8FF6CD),(0x8FF6CE),(0x8FF6CF),(0x8FF6D0), +(0x8FF6D1),(0x8FF6D2),(0x8FF6D3),(0x8FF6D4),(0x8FF6D5),(0x8FF6D6),(0x8FF6D7),(0x8FF6D8), +(0x8FF6D9),(0x8FF6DA),(0x8FF6DB),(0x8FF6DC),(0x8FF6DD),(0x8FF6DE),(0x8FF6DF),(0x8FF6E0), +(0x8FF6E1),(0x8FF6E2),(0x8FF6E3),(0x8FF6E4),(0x8FF6E5),(0x8FF6E6),(0x8FF6E7),(0x8FF6E8), +(0x8FF6E9),(0x8FF6EA),(0x8FF6EB),(0x8FF6EC),(0x8FF6ED),(0x8FF6EE),(0x8FF6EF),(0x8FF6F0), +(0x8FF6F1),(0x8FF6F2),(0x8FF6F3),(0x8FF6F4),(0x8FF6F5),(0x8FF6F6),(0x8FF6F7),(0x8FF6F8), +(0x8FF6F9),(0x8FF6FA),(0x8FF6FB),(0x8FF6FC),(0x8FF6FD),(0x8FF6FE), +(0x8FF7A1),(0x8FF7A2),(0x8FF7A3),(0x8FF7A4),(0x8FF7A5),(0x8FF7A6),(0x8FF7A7),(0x8FF7A8), +(0x8FF7A9),(0x8FF7AA),(0x8FF7AB),(0x8FF7AC),(0x8FF7AD),(0x8FF7AE),(0x8FF7AF),(0x8FF7B0), +(0x8FF7B1),(0x8FF7B2),(0x8FF7B3),(0x8FF7B4),(0x8FF7B5),(0x8FF7B6),(0x8FF7B7),(0x8FF7B8), +(0x8FF7B9),(0x8FF7BA),(0x8FF7BB),(0x8FF7BC),(0x8FF7BD),(0x8FF7BE),(0x8FF7BF),(0x8FF7C0), +(0x8FF7C1),(0x8FF7C2),(0x8FF7C3),(0x8FF7C4),(0x8FF7C5),(0x8FF7C6),(0x8FF7C7),(0x8FF7C8), +(0x8FF7C9),(0x8FF7CA),(0x8FF7CB),(0x8FF7CC),(0x8FF7CD),(0x8FF7CE),(0x8FF7CF),(0x8FF7D0), +(0x8FF7D1),(0x8FF7D2),(0x8FF7D3),(0x8FF7D4),(0x8FF7D5),(0x8FF7D6),(0x8FF7D7),(0x8FF7D8), +(0x8FF7D9),(0x8FF7DA),(0x8FF7DB),(0x8FF7DC),(0x8FF7DD),(0x8FF7DE),(0x8FF7DF),(0x8FF7E0), +(0x8FF7E1),(0x8FF7E2),(0x8FF7E3),(0x8FF7E4),(0x8FF7E5),(0x8FF7E6),(0x8FF7E7),(0x8FF7E8), +(0x8FF7E9),(0x8FF7EA),(0x8FF7EB),(0x8FF7EC),(0x8FF7ED),(0x8FF7EE),(0x8FF7EF),(0x8FF7F0), +(0x8FF7F1),(0x8FF7F2),(0x8FF7F3),(0x8FF7F4),(0x8FF7F5),(0x8FF7F6),(0x8FF7F7),(0x8FF7F8), +(0x8FF7F9),(0x8FF7FA),(0x8FF7FB),(0x8FF7FC),(0x8FF7FD),(0x8FF7FE), +(0x8FF8A1),(0x8FF8A2),(0x8FF8A3),(0x8FF8A4),(0x8FF8A5),(0x8FF8A6),(0x8FF8A7),(0x8FF8A8), +(0x8FF8A9),(0x8FF8AA),(0x8FF8AB),(0x8FF8AC),(0x8FF8AD),(0x8FF8AE),(0x8FF8AF),(0x8FF8B0), +(0x8FF8B1),(0x8FF8B2),(0x8FF8B3),(0x8FF8B4),(0x8FF8B5),(0x8FF8B6),(0x8FF8B7),(0x8FF8B8), +(0x8FF8B9),(0x8FF8BA),(0x8FF8BB),(0x8FF8BC),(0x8FF8BD),(0x8FF8BE),(0x8FF8BF),(0x8FF8C0), +(0x8FF8C1),(0x8FF8C2),(0x8FF8C3),(0x8FF8C4),(0x8FF8C5),(0x8FF8C6),(0x8FF8C7),(0x8FF8C8), +(0x8FF8C9),(0x8FF8CA),(0x8FF8CB),(0x8FF8CC),(0x8FF8CD),(0x8FF8CE),(0x8FF8CF),(0x8FF8D0), +(0x8FF8D1),(0x8FF8D2),(0x8FF8D3),(0x8FF8D4),(0x8FF8D5),(0x8FF8D6),(0x8FF8D7),(0x8FF8D8), +(0x8FF8D9),(0x8FF8DA),(0x8FF8DB),(0x8FF8DC),(0x8FF8DD),(0x8FF8DE),(0x8FF8DF),(0x8FF8E0), +(0x8FF8E1),(0x8FF8E2),(0x8FF8E3),(0x8FF8E4),(0x8FF8E5),(0x8FF8E6),(0x8FF8E7),(0x8FF8E8), +(0x8FF8E9),(0x8FF8EA),(0x8FF8EB),(0x8FF8EC),(0x8FF8ED),(0x8FF8EE),(0x8FF8EF),(0x8FF8F0), +(0x8FF8F1),(0x8FF8F2),(0x8FF8F3),(0x8FF8F4),(0x8FF8F5),(0x8FF8F6),(0x8FF8F7),(0x8FF8F8), +(0x8FF8F9),(0x8FF8FA),(0x8FF8FB),(0x8FF8FC),(0x8FF8FD),(0x8FF8FE), +(0x8FF9A1),(0x8FF9A2),(0x8FF9A3),(0x8FF9A4),(0x8FF9A5),(0x8FF9A6),(0x8FF9A7),(0x8FF9A8), +(0x8FF9A9),(0x8FF9AA),(0x8FF9AB),(0x8FF9AC),(0x8FF9AD),(0x8FF9AE),(0x8FF9AF),(0x8FF9B0), +(0x8FF9B1),(0x8FF9B2),(0x8FF9B3),(0x8FF9B4),(0x8FF9B5),(0x8FF9B6),(0x8FF9B7),(0x8FF9B8), +(0x8FF9B9),(0x8FF9BA),(0x8FF9BB),(0x8FF9BC),(0x8FF9BD),(0x8FF9BE),(0x8FF9BF),(0x8FF9C0), +(0x8FF9C1),(0x8FF9C2),(0x8FF9C3),(0x8FF9C4),(0x8FF9C5),(0x8FF9C6),(0x8FF9C7),(0x8FF9C8), +(0x8FF9C9),(0x8FF9CA),(0x8FF9CB),(0x8FF9CC),(0x8FF9CD),(0x8FF9CE),(0x8FF9CF),(0x8FF9D0), +(0x8FF9D1),(0x8FF9D2),(0x8FF9D3),(0x8FF9D4),(0x8FF9D5),(0x8FF9D6),(0x8FF9D7),(0x8FF9D8), +(0x8FF9D9),(0x8FF9DA),(0x8FF9DB),(0x8FF9DC),(0x8FF9DD),(0x8FF9DE),(0x8FF9DF),(0x8FF9E0), +(0x8FF9E1),(0x8FF9E2),(0x8FF9E3),(0x8FF9E4),(0x8FF9E5),(0x8FF9E6),(0x8FF9E7),(0x8FF9E8), +(0x8FF9E9),(0x8FF9EA),(0x8FF9EB),(0x8FF9EC),(0x8FF9ED),(0x8FF9EE),(0x8FF9EF),(0x8FF9F0), +(0x8FF9F1),(0x8FF9F2),(0x8FF9F3),(0x8FF9F4),(0x8FF9F5),(0x8FF9F6),(0x8FF9F7),(0x8FF9F8), +(0x8FF9F9),(0x8FF9FA),(0x8FF9FB),(0x8FF9FC),(0x8FF9FD),(0x8FF9FE), +(0x8FFAA1),(0x8FFAA2),(0x8FFAA3),(0x8FFAA4),(0x8FFAA5),(0x8FFAA6),(0x8FFAA7),(0x8FFAA8), +(0x8FFAA9),(0x8FFAAA),(0x8FFAAB),(0x8FFAAC),(0x8FFAAD),(0x8FFAAE),(0x8FFAAF),(0x8FFAB0), +(0x8FFAB1),(0x8FFAB2),(0x8FFAB3),(0x8FFAB4),(0x8FFAB5),(0x8FFAB6),(0x8FFAB7),(0x8FFAB8), +(0x8FFAB9),(0x8FFABA),(0x8FFABB),(0x8FFABC),(0x8FFABD),(0x8FFABE),(0x8FFABF),(0x8FFAC0), +(0x8FFAC1),(0x8FFAC2),(0x8FFAC3),(0x8FFAC4),(0x8FFAC5),(0x8FFAC6),(0x8FFAC7),(0x8FFAC8), +(0x8FFAC9),(0x8FFACA),(0x8FFACB),(0x8FFACC),(0x8FFACD),(0x8FFACE),(0x8FFACF),(0x8FFAD0), +(0x8FFAD1),(0x8FFAD2),(0x8FFAD3),(0x8FFAD4),(0x8FFAD5),(0x8FFAD6),(0x8FFAD7),(0x8FFAD8), +(0x8FFAD9),(0x8FFADA),(0x8FFADB),(0x8FFADC),(0x8FFADD),(0x8FFADE),(0x8FFADF),(0x8FFAE0), +(0x8FFAE1),(0x8FFAE2),(0x8FFAE3),(0x8FFAE4),(0x8FFAE5),(0x8FFAE6),(0x8FFAE7),(0x8FFAE8), +(0x8FFAE9),(0x8FFAEA),(0x8FFAEB),(0x8FFAEC),(0x8FFAED),(0x8FFAEE),(0x8FFAEF),(0x8FFAF0), +(0x8FFAF1),(0x8FFAF2),(0x8FFAF3),(0x8FFAF4),(0x8FFAF5),(0x8FFAF6),(0x8FFAF7),(0x8FFAF8), +(0x8FFAF9),(0x8FFAFA),(0x8FFAFB),(0x8FFAFC),(0x8FFAFD),(0x8FFAFE), +(0x8FFBA1),(0x8FFBA2),(0x8FFBA3),(0x8FFBA4),(0x8FFBA5),(0x8FFBA6),(0x8FFBA7),(0x8FFBA8), +(0x8FFBA9),(0x8FFBAA),(0x8FFBAB),(0x8FFBAC),(0x8FFBAD),(0x8FFBAE),(0x8FFBAF),(0x8FFBB0), +(0x8FFBB1),(0x8FFBB2),(0x8FFBB3),(0x8FFBB4),(0x8FFBB5),(0x8FFBB6),(0x8FFBB7),(0x8FFBB8), +(0x8FFBB9),(0x8FFBBA),(0x8FFBBB),(0x8FFBBC),(0x8FFBBD),(0x8FFBBE),(0x8FFBBF),(0x8FFBC0), +(0x8FFBC1),(0x8FFBC2),(0x8FFBC3),(0x8FFBC4),(0x8FFBC5),(0x8FFBC6),(0x8FFBC7),(0x8FFBC8), +(0x8FFBC9),(0x8FFBCA),(0x8FFBCB),(0x8FFBCC),(0x8FFBCD),(0x8FFBCE),(0x8FFBCF),(0x8FFBD0), +(0x8FFBD1),(0x8FFBD2),(0x8FFBD3),(0x8FFBD4),(0x8FFBD5),(0x8FFBD6),(0x8FFBD7),(0x8FFBD8), +(0x8FFBD9),(0x8FFBDA),(0x8FFBDB),(0x8FFBDC),(0x8FFBDD),(0x8FFBDE),(0x8FFBDF),(0x8FFBE0), +(0x8FFBE1),(0x8FFBE2),(0x8FFBE3),(0x8FFBE4),(0x8FFBE5),(0x8FFBE6),(0x8FFBE7),(0x8FFBE8), +(0x8FFBE9),(0x8FFBEA),(0x8FFBEB),(0x8FFBEC),(0x8FFBED),(0x8FFBEE),(0x8FFBEF),(0x8FFBF0), +(0x8FFBF1),(0x8FFBF2),(0x8FFBF3),(0x8FFBF4),(0x8FFBF5),(0x8FFBF6),(0x8FFBF7),(0x8FFBF8), +(0x8FFBF9),(0x8FFBFA),(0x8FFBFB),(0x8FFBFC),(0x8FFBFD),(0x8FFBFE), +(0x8FFCA1),(0x8FFCA2),(0x8FFCA3),(0x8FFCA4),(0x8FFCA5),(0x8FFCA6),(0x8FFCA7),(0x8FFCA8), +(0x8FFCA9),(0x8FFCAA),(0x8FFCAB),(0x8FFCAC),(0x8FFCAD),(0x8FFCAE),(0x8FFCAF),(0x8FFCB0), +(0x8FFCB1),(0x8FFCB2),(0x8FFCB3),(0x8FFCB4),(0x8FFCB5),(0x8FFCB6),(0x8FFCB7),(0x8FFCB8), +(0x8FFCB9),(0x8FFCBA),(0x8FFCBB),(0x8FFCBC),(0x8FFCBD),(0x8FFCBE),(0x8FFCBF),(0x8FFCC0), +(0x8FFCC1),(0x8FFCC2),(0x8FFCC3),(0x8FFCC4),(0x8FFCC5),(0x8FFCC6),(0x8FFCC7),(0x8FFCC8), +(0x8FFCC9),(0x8FFCCA),(0x8FFCCB),(0x8FFCCC),(0x8FFCCD),(0x8FFCCE),(0x8FFCCF),(0x8FFCD0), +(0x8FFCD1),(0x8FFCD2),(0x8FFCD3),(0x8FFCD4),(0x8FFCD5),(0x8FFCD6),(0x8FFCD7),(0x8FFCD8), +(0x8FFCD9),(0x8FFCDA),(0x8FFCDB),(0x8FFCDC),(0x8FFCDD),(0x8FFCDE),(0x8FFCDF),(0x8FFCE0), +(0x8FFCE1),(0x8FFCE2),(0x8FFCE3),(0x8FFCE4),(0x8FFCE5),(0x8FFCE6),(0x8FFCE7),(0x8FFCE8), +(0x8FFCE9),(0x8FFCEA),(0x8FFCEB),(0x8FFCEC),(0x8FFCED),(0x8FFCEE),(0x8FFCEF),(0x8FFCF0), +(0x8FFCF1),(0x8FFCF2),(0x8FFCF3),(0x8FFCF4),(0x8FFCF5),(0x8FFCF6),(0x8FFCF7),(0x8FFCF8), +(0x8FFCF9),(0x8FFCFA),(0x8FFCFB),(0x8FFCFC),(0x8FFCFD),(0x8FFCFE), +(0x8FFDA1),(0x8FFDA2),(0x8FFDA3),(0x8FFDA4),(0x8FFDA5),(0x8FFDA6),(0x8FFDA7),(0x8FFDA8), +(0x8FFDA9),(0x8FFDAA),(0x8FFDAB),(0x8FFDAC),(0x8FFDAD),(0x8FFDAE),(0x8FFDAF),(0x8FFDB0), +(0x8FFDB1),(0x8FFDB2),(0x8FFDB3),(0x8FFDB4),(0x8FFDB5),(0x8FFDB6),(0x8FFDB7),(0x8FFDB8), +(0x8FFDB9),(0x8FFDBA),(0x8FFDBB),(0x8FFDBC),(0x8FFDBD),(0x8FFDBE),(0x8FFDBF),(0x8FFDC0), +(0x8FFDC1),(0x8FFDC2),(0x8FFDC3),(0x8FFDC4),(0x8FFDC5),(0x8FFDC6),(0x8FFDC7),(0x8FFDC8), +(0x8FFDC9),(0x8FFDCA),(0x8FFDCB),(0x8FFDCC),(0x8FFDCD),(0x8FFDCE),(0x8FFDCF),(0x8FFDD0), +(0x8FFDD1),(0x8FFDD2),(0x8FFDD3),(0x8FFDD4),(0x8FFDD5),(0x8FFDD6),(0x8FFDD7),(0x8FFDD8), +(0x8FFDD9),(0x8FFDDA),(0x8FFDDB),(0x8FFDDC),(0x8FFDDD),(0x8FFDDE),(0x8FFDDF),(0x8FFDE0), +(0x8FFDE1),(0x8FFDE2),(0x8FFDE3),(0x8FFDE4),(0x8FFDE5),(0x8FFDE6),(0x8FFDE7),(0x8FFDE8), +(0x8FFDE9),(0x8FFDEA),(0x8FFDEB),(0x8FFDEC),(0x8FFDED),(0x8FFDEE),(0x8FFDEF),(0x8FFDF0), +(0x8FFDF1),(0x8FFDF2),(0x8FFDF3),(0x8FFDF4),(0x8FFDF5),(0x8FFDF6),(0x8FFDF7),(0x8FFDF8), +(0x8FFDF9),(0x8FFDFA),(0x8FFDFB),(0x8FFDFC),(0x8FFDFD),(0x8FFDFE), +(0x8FFEA1),(0x8FFEA2),(0x8FFEA3),(0x8FFEA4),(0x8FFEA5),(0x8FFEA6),(0x8FFEA7),(0x8FFEA8), +(0x8FFEA9),(0x8FFEAA),(0x8FFEAB),(0x8FFEAC),(0x8FFEAD),(0x8FFEAE),(0x8FFEAF),(0x8FFEB0), +(0x8FFEB1),(0x8FFEB2),(0x8FFEB3),(0x8FFEB4),(0x8FFEB5),(0x8FFEB6),(0x8FFEB7),(0x8FFEB8), +(0x8FFEB9),(0x8FFEBA),(0x8FFEBB),(0x8FFEBC),(0x8FFEBD),(0x8FFEBE),(0x8FFEBF),(0x8FFEC0), +(0x8FFEC1),(0x8FFEC2),(0x8FFEC3),(0x8FFEC4),(0x8FFEC5),(0x8FFEC6),(0x8FFEC7),(0x8FFEC8), +(0x8FFEC9),(0x8FFECA),(0x8FFECB),(0x8FFECC),(0x8FFECD),(0x8FFECE),(0x8FFECF),(0x8FFED0), +(0x8FFED1),(0x8FFED2),(0x8FFED3),(0x8FFED4),(0x8FFED5),(0x8FFED6),(0x8FFED7),(0x8FFED8), +(0x8FFED9),(0x8FFEDA),(0x8FFEDB),(0x8FFEDC),(0x8FFEDD),(0x8FFEDE),(0x8FFEDF),(0x8FFEE0), +(0x8FFEE1),(0x8FFEE2),(0x8FFEE3),(0x8FFEE4),(0x8FFEE5),(0x8FFEE6),(0x8FFEE7),(0x8FFEE8), +(0x8FFEE9),(0x8FFEEA),(0x8FFEEB),(0x8FFEEC),(0x8FFEED),(0x8FFEEE),(0x8FFEEF),(0x8FFEF0), +(0x8FFEF1),(0x8FFEF2),(0x8FFEF3),(0x8FFEF4),(0x8FFEF5),(0x8FFEF6),(0x8FFEF7),(0x8FFEF8), +(0x8FFEF9),(0x8FFEFA),(0x8FFEFB),(0x8FFEFC),(0x8FFEFD),(0x8FFEFE); +SELECT HEX(c1) FROM t1; +HEX(c1) +5C +7E +A1B1 +A1BD +A1C0 +A1C1 +A1C2 +A1DD +A1F1 +A1F2 +A1EF +A2CC +8FA2B7 +8FA2C3 +ADA1 +ADA2 +ADA3 +ADA4 +ADA5 +ADA6 +ADA7 +ADA8 +ADA9 +ADAA +ADAB +ADAC +ADAD +ADAE +ADAF +ADB0 +ADB1 +ADB2 +ADB3 +ADB4 +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +ADC0 +ADC1 +ADC2 +ADC3 +ADC4 +ADC5 +ADC6 +ADC7 +ADC8 +ADC9 +ADCA +ADCB +ADCC +ADCD +ADCE +ADCF +ADD0 +ADD1 +ADD2 +ADD3 +ADD4 +ADD5 +ADD6 +ADDF +ADE0 +ADE1 +ADE2 +ADE3 +ADE4 +ADE5 +ADE6 +ADE7 +ADE8 +ADE9 +ADEA +ADEB +ADEC +ADED +ADEE +ADEF +ADF0 +ADF1 +ADF2 +ADF3 +ADF4 +ADF5 +ADF6 +ADF7 +ADF8 +ADF9 +ADFA +ADFB +ADFC +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +8FF3FD +8FF3FE +8FF4A1 +8FF4A2 +8FF4A3 +8FF4A4 +8FF4A5 +8FF4A6 +8FF4A7 +8FF4A8 +A2CC +8FA2C3 +8FF4A9 +8FF4AA +8FF4AB +8FF4AC +8FF4AD +A2E8 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F5FD +F5FE +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F6FD +F6FE +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F7FD +F7FE +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F8FD +F8FE +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +F9FD +F9FE +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FAFD +FAFE +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FBFD +FBFE +FCA1 +FCA2 +FCA3 +FCA4 +FCA5 +FCA6 +FCA7 +FCA8 +FCA9 +FCAA +FCAB +FCAC +FCAD +FCAE +FCAF +FCB0 +FCB1 +FCB2 +FCB3 +FCB4 +FCB5 +FCB6 +FCB7 +FCB8 +FCB9 +FCBA +FCBB +FCBC +FCBD +FCBE +FCBF +FCC0 +FCC1 +FCC2 +FCC3 +FCC4 +FCC5 +FCC6 +FCC7 +FCC8 +FCC9 +FCCA +FCCB +FCCC +FCCD +FCCE +FCCF +FCD0 +FCD1 +FCD2 +FCD3 +FCD4 +FCD5 +FCD6 +FCD7 +FCD8 +FCD9 +FCDA +FCDB +FCDC +FCDD +FCDE +FCDF +FCE0 +FCE1 +FCE2 +FCE3 +FCE4 +FCE5 +FCE6 +FCE7 +FCE8 +FCE9 +FCEA +FCEB +FCEC +FCED +FCEE +FCEF +FCF0 +FCF1 +FCF2 +FCF3 +FCF4 +FCF5 +FCF6 +FCF7 +FCF8 +FCF9 +FCFA +FCFB +FCFC +FCFD +FCFE +FDA1 +FDA2 +FDA3 +FDA4 +FDA5 +FDA6 +FDA7 +FDA8 +FDA9 +FDAA +FDAB +FDAC +FDAD +FDAE +FDAF +FDB0 +FDB1 +FDB2 +FDB3 +FDB4 +FDB5 +FDB6 +FDB7 +FDB8 +FDB9 +FDBA +FDBB +FDBC +FDBD +FDBE +FDBF +FDC0 +FDC1 +FDC2 +FDC3 +FDC4 +FDC5 +FDC6 +FDC7 +FDC8 +FDC9 +FDCA +FDCB +FDCC +FDCD +FDCE +FDCF +FDD0 +FDD1 +FDD2 +FDD3 +FDD4 +FDD5 +FDD6 +FDD7 +FDD8 +FDD9 +FDDA +FDDB +FDDC +FDDD +FDDE +FDDF +FDE0 +FDE1 +FDE2 +FDE3 +FDE4 +FDE5 +FDE6 +FDE7 +FDE8 +FDE9 +FDEA +FDEB +FDEC +FDED +FDEE +FDEF +FDF0 +FDF1 +FDF2 +FDF3 +FDF4 +FDF5 +FDF6 +FDF7 +FDF8 +FDF9 +FDFA +FDFB +FDFC +FDFD +FDFE +FEA1 +FEA2 +FEA3 +FEA4 +FEA5 +FEA6 +FEA7 +FEA8 +FEA9 +FEAA +FEAB +FEAC +FEAD +FEAE +FEAF +FEB0 +FEB1 +FEB2 +FEB3 +FEB4 +FEB5 +FEB6 +FEB7 +FEB8 +FEB9 +FEBA +FEBB +FEBC +FEBD +FEBE +FEBF +FEC0 +FEC1 +FEC2 +FEC3 +FEC4 +FEC5 +FEC6 +FEC7 +FEC8 +FEC9 +FECA +FECB +FECC +FECD +FECE +FECF +FED0 +FED1 +FED2 +FED3 +FED4 +FED5 +FED6 +FED7 +FED8 +FED9 +FEDA +FEDB +FEDC +FEDD +FEDE +FEDF +FEE0 +FEE1 +FEE2 +FEE3 +FEE4 +FEE5 +FEE6 +FEE7 +FEE8 +FEE9 +FEEA +FEEB +FEEC +FEED +FEEE +FEEF +FEF0 +FEF1 +FEF2 +FEF3 +FEF4 +FEF5 +FEF6 +FEF7 +FEF8 +FEF9 +FEFA +FEFB +FEFC +FEFD +FEFE +8FF5A1 +8FF5A2 +8FF5A3 +8FF5A4 +8FF5A5 +8FF5A6 +8FF5A7 +8FF5A8 +8FF5A9 +8FF5AA +8FF5AB +8FF5AC +8FF5AD +8FF5AE +8FF5AF +8FF5B0 +8FF5B1 +8FF5B2 +8FF5B3 +8FF5B4 +8FF5B5 +8FF5B6 +8FF5B7 +8FF5B8 +8FF5B9 +8FF5BA +8FF5BB +8FF5BC +8FF5BD +8FF5BE +8FF5BF +8FF5C0 +8FF5C1 +8FF5C2 +8FF5C3 +8FF5C4 +8FF5C5 +8FF5C6 +8FF5C7 +8FF5C8 +8FF5C9 +8FF5CA +8FF5CB +8FF5CC +8FF5CD +8FF5CE +8FF5CF +8FF5D0 +8FF5D1 +8FF5D2 +8FF5D3 +8FF5D4 +8FF5D5 +8FF5D6 +8FF5D7 +8FF5D8 +8FF5D9 +8FF5DA +8FF5DB +8FF5DC +8FF5DD +8FF5DE +8FF5DF +8FF5E0 +8FF5E1 +8FF5E2 +8FF5E3 +8FF5E4 +8FF5E5 +8FF5E6 +8FF5E7 +8FF5E8 +8FF5E9 +8FF5EA +8FF5EB +8FF5EC +8FF5ED +8FF5EE +8FF5EF +8FF5F0 +8FF5F1 +8FF5F2 +8FF5F3 +8FF5F4 +8FF5F5 +8FF5F6 +8FF5F7 +8FF5F8 +8FF5F9 +8FF5FA +8FF5FB +8FF5FC +8FF5FD +8FF5FE +8FF6A1 +8FF6A2 +8FF6A3 +8FF6A4 +8FF6A5 +8FF6A6 +8FF6A7 +8FF6A8 +8FF6A9 +8FF6AA +8FF6AB +8FF6AC +8FF6AD +8FF6AE +8FF6AF +8FF6B0 +8FF6B1 +8FF6B2 +8FF6B3 +8FF6B4 +8FF6B5 +8FF6B6 +8FF6B7 +8FF6B8 +8FF6B9 +8FF6BA +8FF6BB +8FF6BC +8FF6BD +8FF6BE +8FF6BF +8FF6C0 +8FF6C1 +8FF6C2 +8FF6C3 +8FF6C4 +8FF6C5 +8FF6C6 +8FF6C7 +8FF6C8 +8FF6C9 +8FF6CA +8FF6CB +8FF6CC +8FF6CD +8FF6CE +8FF6CF +8FF6D0 +8FF6D1 +8FF6D2 +8FF6D3 +8FF6D4 +8FF6D5 +8FF6D6 +8FF6D7 +8FF6D8 +8FF6D9 +8FF6DA +8FF6DB +8FF6DC +8FF6DD +8FF6DE +8FF6DF +8FF6E0 +8FF6E1 +8FF6E2 +8FF6E3 +8FF6E4 +8FF6E5 +8FF6E6 +8FF6E7 +8FF6E8 +8FF6E9 +8FF6EA +8FF6EB +8FF6EC +8FF6ED +8FF6EE +8FF6EF +8FF6F0 +8FF6F1 +8FF6F2 +8FF6F3 +8FF6F4 +8FF6F5 +8FF6F6 +8FF6F7 +8FF6F8 +8FF6F9 +8FF6FA +8FF6FB +8FF6FC +8FF6FD +8FF6FE +8FF7A1 +8FF7A2 +8FF7A3 +8FF7A4 +8FF7A5 +8FF7A6 +8FF7A7 +8FF7A8 +8FF7A9 +8FF7AA +8FF7AB +8FF7AC +8FF7AD +8FF7AE +8FF7AF +8FF7B0 +8FF7B1 +8FF7B2 +8FF7B3 +8FF7B4 +8FF7B5 +8FF7B6 +8FF7B7 +8FF7B8 +8FF7B9 +8FF7BA +8FF7BB +8FF7BC +8FF7BD +8FF7BE +8FF7BF +8FF7C0 +8FF7C1 +8FF7C2 +8FF7C3 +8FF7C4 +8FF7C5 +8FF7C6 +8FF7C7 +8FF7C8 +8FF7C9 +8FF7CA +8FF7CB +8FF7CC +8FF7CD +8FF7CE +8FF7CF +8FF7D0 +8FF7D1 +8FF7D2 +8FF7D3 +8FF7D4 +8FF7D5 +8FF7D6 +8FF7D7 +8FF7D8 +8FF7D9 +8FF7DA +8FF7DB +8FF7DC +8FF7DD +8FF7DE +8FF7DF +8FF7E0 +8FF7E1 +8FF7E2 +8FF7E3 +8FF7E4 +8FF7E5 +8FF7E6 +8FF7E7 +8FF7E8 +8FF7E9 +8FF7EA +8FF7EB +8FF7EC +8FF7ED +8FF7EE +8FF7EF +8FF7F0 +8FF7F1 +8FF7F2 +8FF7F3 +8FF7F4 +8FF7F5 +8FF7F6 +8FF7F7 +8FF7F8 +8FF7F9 +8FF7FA +8FF7FB +8FF7FC +8FF7FD +8FF7FE +8FF8A1 +8FF8A2 +8FF8A3 +8FF8A4 +8FF8A5 +8FF8A6 +8FF8A7 +8FF8A8 +8FF8A9 +8FF8AA +8FF8AB +8FF8AC +8FF8AD +8FF8AE +8FF8AF +8FF8B0 +8FF8B1 +8FF8B2 +8FF8B3 +8FF8B4 +8FF8B5 +8FF8B6 +8FF8B7 +8FF8B8 +8FF8B9 +8FF8BA +8FF8BB +8FF8BC +8FF8BD +8FF8BE +8FF8BF +8FF8C0 +8FF8C1 +8FF8C2 +8FF8C3 +8FF8C4 +8FF8C5 +8FF8C6 +8FF8C7 +8FF8C8 +8FF8C9 +8FF8CA +8FF8CB +8FF8CC +8FF8CD +8FF8CE +8FF8CF +8FF8D0 +8FF8D1 +8FF8D2 +8FF8D3 +8FF8D4 +8FF8D5 +8FF8D6 +8FF8D7 +8FF8D8 +8FF8D9 +8FF8DA +8FF8DB +8FF8DC +8FF8DD +8FF8DE +8FF8DF +8FF8E0 +8FF8E1 +8FF8E2 +8FF8E3 +8FF8E4 +8FF8E5 +8FF8E6 +8FF8E7 +8FF8E8 +8FF8E9 +8FF8EA +8FF8EB +8FF8EC +8FF8ED +8FF8EE +8FF8EF +8FF8F0 +8FF8F1 +8FF8F2 +8FF8F3 +8FF8F4 +8FF8F5 +8FF8F6 +8FF8F7 +8FF8F8 +8FF8F9 +8FF8FA +8FF8FB +8FF8FC +8FF8FD +8FF8FE +8FF9A1 +8FF9A2 +8FF9A3 +8FF9A4 +8FF9A5 +8FF9A6 +8FF9A7 +8FF9A8 +8FF9A9 +8FF9AA +8FF9AB +8FF9AC +8FF9AD +8FF9AE +8FF9AF +8FF9B0 +8FF9B1 +8FF9B2 +8FF9B3 +8FF9B4 +8FF9B5 +8FF9B6 +8FF9B7 +8FF9B8 +8FF9B9 +8FF9BA +8FF9BB +8FF9BC +8FF9BD +8FF9BE +8FF9BF +8FF9C0 +8FF9C1 +8FF9C2 +8FF9C3 +8FF9C4 +8FF9C5 +8FF9C6 +8FF9C7 +8FF9C8 +8FF9C9 +8FF9CA +8FF9CB +8FF9CC +8FF9CD +8FF9CE +8FF9CF +8FF9D0 +8FF9D1 +8FF9D2 +8FF9D3 +8FF9D4 +8FF9D5 +8FF9D6 +8FF9D7 +8FF9D8 +8FF9D9 +8FF9DA +8FF9DB +8FF9DC +8FF9DD +8FF9DE +8FF9DF +8FF9E0 +8FF9E1 +8FF9E2 +8FF9E3 +8FF9E4 +8FF9E5 +8FF9E6 +8FF9E7 +8FF9E8 +8FF9E9 +8FF9EA +8FF9EB +8FF9EC +8FF9ED +8FF9EE +8FF9EF +8FF9F0 +8FF9F1 +8FF9F2 +8FF9F3 +8FF9F4 +8FF9F5 +8FF9F6 +8FF9F7 +8FF9F8 +8FF9F9 +8FF9FA +8FF9FB +8FF9FC +8FF9FD +8FF9FE +8FFAA1 +8FFAA2 +8FFAA3 +8FFAA4 +8FFAA5 +8FFAA6 +8FFAA7 +8FFAA8 +8FFAA9 +8FFAAA +8FFAAB +8FFAAC +8FFAAD +8FFAAE +8FFAAF +8FFAB0 +8FFAB1 +8FFAB2 +8FFAB3 +8FFAB4 +8FFAB5 +8FFAB6 +8FFAB7 +8FFAB8 +8FFAB9 +8FFABA +8FFABB +8FFABC +8FFABD +8FFABE +8FFABF +8FFAC0 +8FFAC1 +8FFAC2 +8FFAC3 +8FFAC4 +8FFAC5 +8FFAC6 +8FFAC7 +8FFAC8 +8FFAC9 +8FFACA +8FFACB +8FFACC +8FFACD +8FFACE +8FFACF +8FFAD0 +8FFAD1 +8FFAD2 +8FFAD3 +8FFAD4 +8FFAD5 +8FFAD6 +8FFAD7 +8FFAD8 +8FFAD9 +8FFADA +8FFADB +8FFADC +8FFADD +8FFADE +8FFADF +8FFAE0 +8FFAE1 +8FFAE2 +8FFAE3 +8FFAE4 +8FFAE5 +8FFAE6 +8FFAE7 +8FFAE8 +8FFAE9 +8FFAEA +8FFAEB +8FFAEC +8FFAED +8FFAEE +8FFAEF +8FFAF0 +8FFAF1 +8FFAF2 +8FFAF3 +8FFAF4 +8FFAF5 +8FFAF6 +8FFAF7 +8FFAF8 +8FFAF9 +8FFAFA +8FFAFB +8FFAFC +8FFAFD +8FFAFE +8FFBA1 +8FFBA2 +8FFBA3 +8FFBA4 +8FFBA5 +8FFBA6 +8FFBA7 +8FFBA8 +8FFBA9 +8FFBAA +8FFBAB +8FFBAC +8FFBAD +8FFBAE +8FFBAF +8FFBB0 +8FFBB1 +8FFBB2 +8FFBB3 +8FFBB4 +8FFBB5 +8FFBB6 +8FFBB7 +8FFBB8 +8FFBB9 +8FFBBA +8FFBBB +8FFBBC +8FFBBD +8FFBBE +8FFBBF +8FFBC0 +8FFBC1 +8FFBC2 +8FFBC3 +8FFBC4 +8FFBC5 +8FFBC6 +8FFBC7 +8FFBC8 +8FFBC9 +8FFBCA +8FFBCB +8FFBCC +8FFBCD +8FFBCE +8FFBCF +8FFBD0 +8FFBD1 +8FFBD2 +8FFBD3 +8FFBD4 +8FFBD5 +8FFBD6 +8FFBD7 +8FFBD8 +8FFBD9 +8FFBDA +8FFBDB +8FFBDC +8FFBDD +8FFBDE +8FFBDF +8FFBE0 +8FFBE1 +8FFBE2 +8FFBE3 +8FFBE4 +8FFBE5 +8FFBE6 +8FFBE7 +8FFBE8 +8FFBE9 +8FFBEA +8FFBEB +8FFBEC +8FFBED +8FFBEE +8FFBEF +8FFBF0 +8FFBF1 +8FFBF2 +8FFBF3 +8FFBF4 +8FFBF5 +8FFBF6 +8FFBF7 +8FFBF8 +8FFBF9 +8FFBFA +8FFBFB +8FFBFC +8FFBFD +8FFBFE +8FFCA1 +8FFCA2 +8FFCA3 +8FFCA4 +8FFCA5 +8FFCA6 +8FFCA7 +8FFCA8 +8FFCA9 +8FFCAA +8FFCAB +8FFCAC +8FFCAD +8FFCAE +8FFCAF +8FFCB0 +8FFCB1 +8FFCB2 +8FFCB3 +8FFCB4 +8FFCB5 +8FFCB6 +8FFCB7 +8FFCB8 +8FFCB9 +8FFCBA +8FFCBB +8FFCBC +8FFCBD +8FFCBE +8FFCBF +8FFCC0 +8FFCC1 +8FFCC2 +8FFCC3 +8FFCC4 +8FFCC5 +8FFCC6 +8FFCC7 +8FFCC8 +8FFCC9 +8FFCCA +8FFCCB +8FFCCC +8FFCCD +8FFCCE +8FFCCF +8FFCD0 +8FFCD1 +8FFCD2 +8FFCD3 +8FFCD4 +8FFCD5 +8FFCD6 +8FFCD7 +8FFCD8 +8FFCD9 +8FFCDA +8FFCDB +8FFCDC +8FFCDD +8FFCDE +8FFCDF +8FFCE0 +8FFCE1 +8FFCE2 +8FFCE3 +8FFCE4 +8FFCE5 +8FFCE6 +8FFCE7 +8FFCE8 +8FFCE9 +8FFCEA +8FFCEB +8FFCEC +8FFCED +8FFCEE +8FFCEF +8FFCF0 +8FFCF1 +8FFCF2 +8FFCF3 +8FFCF4 +8FFCF5 +8FFCF6 +8FFCF7 +8FFCF8 +8FFCF9 +8FFCFA +8FFCFB +8FFCFC +8FFCFD +8FFCFE +8FFDA1 +8FFDA2 +8FFDA3 +8FFDA4 +8FFDA5 +8FFDA6 +8FFDA7 +8FFDA8 +8FFDA9 +8FFDAA +8FFDAB +8FFDAC +8FFDAD +8FFDAE +8FFDAF +8FFDB0 +8FFDB1 +8FFDB2 +8FFDB3 +8FFDB4 +8FFDB5 +8FFDB6 +8FFDB7 +8FFDB8 +8FFDB9 +8FFDBA +8FFDBB +8FFDBC +8FFDBD +8FFDBE +8FFDBF +8FFDC0 +8FFDC1 +8FFDC2 +8FFDC3 +8FFDC4 +8FFDC5 +8FFDC6 +8FFDC7 +8FFDC8 +8FFDC9 +8FFDCA +8FFDCB +8FFDCC +8FFDCD +8FFDCE +8FFDCF +8FFDD0 +8FFDD1 +8FFDD2 +8FFDD3 +8FFDD4 +8FFDD5 +8FFDD6 +8FFDD7 +8FFDD8 +8FFDD9 +8FFDDA +8FFDDB +8FFDDC +8FFDDD +8FFDDE +8FFDDF +8FFDE0 +8FFDE1 +8FFDE2 +8FFDE3 +8FFDE4 +8FFDE5 +8FFDE6 +8FFDE7 +8FFDE8 +8FFDE9 +8FFDEA +8FFDEB +8FFDEC +8FFDED +8FFDEE +8FFDEF +8FFDF0 +8FFDF1 +8FFDF2 +8FFDF3 +8FFDF4 +8FFDF5 +8FFDF6 +8FFDF7 +8FFDF8 +8FFDF9 +8FFDFA +8FFDFB +8FFDFC +8FFDFD +8FFDFE +8FFEA1 +8FFEA2 +8FFEA3 +8FFEA4 +8FFEA5 +8FFEA6 +8FFEA7 +8FFEA8 +8FFEA9 +8FFEAA +8FFEAB +8FFEAC +8FFEAD +8FFEAE +8FFEAF +8FFEB0 +8FFEB1 +8FFEB2 +8FFEB3 +8FFEB4 +8FFEB5 +8FFEB6 +8FFEB7 +8FFEB8 +8FFEB9 +8FFEBA +8FFEBB +8FFEBC +8FFEBD +8FFEBE +8FFEBF +8FFEC0 +8FFEC1 +8FFEC2 +8FFEC3 +8FFEC4 +8FFEC5 +8FFEC6 +8FFEC7 +8FFEC8 +8FFEC9 +8FFECA +8FFECB +8FFECC +8FFECD +8FFECE +8FFECF +8FFED0 +8FFED1 +8FFED2 +8FFED3 +8FFED4 +8FFED5 +8FFED6 +8FFED7 +8FFED8 +8FFED9 +8FFEDA +8FFEDB +8FFEDC +8FFEDD +8FFEDE +8FFEDF +8FFEE0 +8FFEE1 +8FFEE2 +8FFEE3 +8FFEE4 +8FFEE5 +8FFEE6 +8FFEE7 +8FFEE8 +8FFEE9 +8FFEEA +8FFEEB +8FFEEC +8FFEED +8FFEEE +8FFEEF +8FFEF0 +8FFEF1 +8FFEF2 +8FFEF3 +8FFEF4 +8FFEF5 +8FFEF6 +8FFEF7 +8FFEF8 +8FFEF9 +8FFEFA +8FFEFB +8FFEFC +8FFEFD +8FFEFE +CREATE TABLE t2 SELECT CONVERT(c1 USING ucs2) AS c1 FROM t1; +SELECT HEX(c1) FROM t2; +HEX(c1) +005C +007E +FFE3 +2015 +FF3C +FF5E +2225 +FF0D +FFE0 +FFE1 +FFE5 +FFE2 +FF5E +FFE4 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +246A +246B +246C +246D +246E +246F +2470 +2471 +2472 +2473 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +3349 +3314 +3322 +334D +3318 +3327 +3303 +3336 +3351 +3357 +330D +3326 +3323 +332B +334A +333B +339C +339D +339E +338E +338F +33C4 +33A1 +337B +301D +301F +2116 +33CD +2121 +32A4 +32A5 +32A6 +32A7 +32A8 +3231 +3232 +3239 +337E +337D +337C +2252 +2261 +222B +222E +2211 +221A +22A5 +2220 +221F +22BF +2235 +2229 +222A +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +FFE2 +FFE4 +FF07 +FF02 +3231 +2116 +2121 +2235 +7E8A +891C +9348 +9288 +84DC +4FC9 +70BB +6631 +68C8 +92F9 +66FB +5F45 +4E28 +4EE1 +4EFC +4F00 +4F03 +4F39 +4F56 +4F92 +4F8A +4F9A +4F94 +4FCD +5040 +5022 +4FFF +501E +5046 +5070 +5042 +5094 +50F4 +50D8 +514A +5164 +519D +51BE +51EC +5215 +529C +52A6 +52C0 +52DB +5300 +5307 +5324 +5372 +5393 +53B2 +53DD +FA0E +549C +548A +54A9 +54FF +5586 +5759 +5765 +57AC +57C8 +57C7 +FA0F +FA10 +589E +58B2 +590B +5953 +595B +595D +5963 +59A4 +59BA +5B56 +5BC0 +752F +5BD8 +5BEC +5C1E +5CA6 +5CBA +5CF5 +5D27 +5D53 +FA11 +5D42 +5D6D +5DB8 +5DB9 +5DD0 +5F21 +5F34 +5F67 +5FB7 +5FDE +605D +6085 +608A +60DE +60D5 +6120 +60F2 +6111 +6137 +6130 +6198 +6213 +62A6 +63F5 +6460 +649D +64CE +654E +6600 +6615 +663B +6609 +662E +661E +6624 +6665 +6657 +6659 +FA12 +6673 +6699 +66A0 +66B2 +66BF +66FA +670E +F929 +6766 +67BB +6852 +67C0 +6801 +6844 +68CF +FA13 +6968 +FA14 +6998 +69E2 +6A30 +6A6B +6A46 +6A73 +6A7E +6AE2 +6AE4 +6BD6 +6C3F +6C5C +6C86 +6C6F +6CDA +6D04 +6D87 +6D6F +6D96 +6DAC +6DCF +6DF8 +6DF2 +6DFC +6E39 +6E5C +6E27 +6E3C +6EBF +6F88 +6FB5 +6FF5 +7005 +7007 +7028 +7085 +70AB +710F +7104 +715C +7146 +7147 +FA15 +71C1 +71FE +72B1 +72BE +7324 +FA16 +7377 +73BD +73C9 +73D6 +73E3 +73D2 +7407 +73F5 +7426 +742A +7429 +742E +7462 +7489 +749F +7501 +756F +7682 +769C +769E +769B +76A6 +FA17 +7746 +52AF +7821 +784E +7864 +787A +7930 +FA18 +FA19 +FA1A +7994 +FA1B +799B +7AD1 +7AE7 +FA1C +7AEB +7B9E +FA1D +7D48 +7D5C +7DB7 +7DA0 +7DD6 +7E52 +7F47 +7FA1 +FA1E +8301 +8362 +837F +83C7 +83F6 +8448 +84B4 +8553 +8559 +856B +FA1F +85B0 +FA20 +FA21 +8807 +88F5 +8A12 +8A37 +8A79 +8AA7 +8ABE +8ADF +FA22 +8AF6 +8B53 +8B7F +8CF0 +8CF4 +8D12 +8D76 +FA23 +8ECF +FA24 +FA25 +9067 +90DE +FA26 +9115 +9127 +91DA +91D7 +91DE +91ED +91EE +91E4 +91E5 +9206 +9210 +920A +923A +9240 +923C +924E +9259 +9251 +9239 +9267 +92A7 +9277 +9278 +92E7 +92D7 +92D9 +92D0 +FA27 +92D5 +92E0 +92D3 +9325 +9321 +92FB +FA28 +931E +92FF +931D +9302 +9370 +9357 +93A4 +93C6 +93DE +93F8 +9431 +9445 +9448 +9592 +F9DC +FA29 +969D +96AF +9733 +973B +9743 +974D +974F +9751 +9755 +9857 +9865 +FA2A +FA2B +9927 +FA2C +999E +9A4E +9AD9 +9ADC +9B75 +9B72 +9B8F +9BB1 +9BBB +9C00 +9D70 +9D6B +FA2D +9E19 +9ED1 +E000 +E001 +E002 +E003 +E004 +E005 +E006 +E007 +E008 +E009 +E00A +E00B +E00C +E00D +E00E +E00F +E010 +E011 +E012 +E013 +E014 +E015 +E016 +E017 +E018 +E019 +E01A +E01B +E01C +E01D +E01E +E01F +E020 +E021 +E022 +E023 +E024 +E025 +E026 +E027 +E028 +E029 +E02A +E02B +E02C +E02D +E02E +E02F +E030 +E031 +E032 +E033 +E034 +E035 +E036 +E037 +E038 +E039 +E03A +E03B +E03C +E03D +E03E +E03F +E040 +E041 +E042 +E043 +E044 +E045 +E046 +E047 +E048 +E049 +E04A +E04B +E04C +E04D +E04E +E04F +E050 +E051 +E052 +E053 +E054 +E055 +E056 +E057 +E058 +E059 +E05A +E05B +E05C +E05D +E05E +E05F +E060 +E061 +E062 +E063 +E064 +E065 +E066 +E067 +E068 +E069 +E06A +E06B +E06C +E06D +E06E +E06F +E070 +E071 +E072 +E073 +E074 +E075 +E076 +E077 +E078 +E079 +E07A +E07B +E07C +E07D +E07E +E07F +E080 +E081 +E082 +E083 +E084 +E085 +E086 +E087 +E088 +E089 +E08A +E08B +E08C +E08D +E08E +E08F +E090 +E091 +E092 +E093 +E094 +E095 +E096 +E097 +E098 +E099 +E09A +E09B +E09C +E09D +E09E +E09F +E0A0 +E0A1 +E0A2 +E0A3 +E0A4 +E0A5 +E0A6 +E0A7 +E0A8 +E0A9 +E0AA +E0AB +E0AC +E0AD +E0AE +E0AF +E0B0 +E0B1 +E0B2 +E0B3 +E0B4 +E0B5 +E0B6 +E0B7 +E0B8 +E0B9 +E0BA +E0BB +E0BC +E0BD +E0BE +E0BF +E0C0 +E0C1 +E0C2 +E0C3 +E0C4 +E0C5 +E0C6 +E0C7 +E0C8 +E0C9 +E0CA +E0CB +E0CC +E0CD +E0CE +E0CF +E0D0 +E0D1 +E0D2 +E0D3 +E0D4 +E0D5 +E0D6 +E0D7 +E0D8 +E0D9 +E0DA +E0DB +E0DC +E0DD +E0DE +E0DF +E0E0 +E0E1 +E0E2 +E0E3 +E0E4 +E0E5 +E0E6 +E0E7 +E0E8 +E0E9 +E0EA +E0EB +E0EC +E0ED +E0EE +E0EF +E0F0 +E0F1 +E0F2 +E0F3 +E0F4 +E0F5 +E0F6 +E0F7 +E0F8 +E0F9 +E0FA +E0FB +E0FC +E0FD +E0FE +E0FF +E100 +E101 +E102 +E103 +E104 +E105 +E106 +E107 +E108 +E109 +E10A +E10B +E10C +E10D +E10E +E10F +E110 +E111 +E112 +E113 +E114 +E115 +E116 +E117 +E118 +E119 +E11A +E11B +E11C +E11D +E11E +E11F +E120 +E121 +E122 +E123 +E124 +E125 +E126 +E127 +E128 +E129 +E12A +E12B +E12C +E12D +E12E +E12F +E130 +E131 +E132 +E133 +E134 +E135 +E136 +E137 +E138 +E139 +E13A +E13B +E13C +E13D +E13E +E13F +E140 +E141 +E142 +E143 +E144 +E145 +E146 +E147 +E148 +E149 +E14A +E14B +E14C +E14D +E14E +E14F +E150 +E151 +E152 +E153 +E154 +E155 +E156 +E157 +E158 +E159 +E15A +E15B +E15C +E15D +E15E +E15F +E160 +E161 +E162 +E163 +E164 +E165 +E166 +E167 +E168 +E169 +E16A +E16B +E16C +E16D +E16E +E16F +E170 +E171 +E172 +E173 +E174 +E175 +E176 +E177 +E178 +E179 +E17A +E17B +E17C +E17D +E17E +E17F +E180 +E181 +E182 +E183 +E184 +E185 +E186 +E187 +E188 +E189 +E18A +E18B +E18C +E18D +E18E +E18F +E190 +E191 +E192 +E193 +E194 +E195 +E196 +E197 +E198 +E199 +E19A +E19B +E19C +E19D +E19E +E19F +E1A0 +E1A1 +E1A2 +E1A3 +E1A4 +E1A5 +E1A6 +E1A7 +E1A8 +E1A9 +E1AA +E1AB +E1AC +E1AD +E1AE +E1AF +E1B0 +E1B1 +E1B2 +E1B3 +E1B4 +E1B5 +E1B6 +E1B7 +E1B8 +E1B9 +E1BA +E1BB +E1BC +E1BD +E1BE +E1BF +E1C0 +E1C1 +E1C2 +E1C3 +E1C4 +E1C5 +E1C6 +E1C7 +E1C8 +E1C9 +E1CA +E1CB +E1CC +E1CD +E1CE +E1CF +E1D0 +E1D1 +E1D2 +E1D3 +E1D4 +E1D5 +E1D6 +E1D7 +E1D8 +E1D9 +E1DA +E1DB +E1DC +E1DD +E1DE +E1DF +E1E0 +E1E1 +E1E2 +E1E3 +E1E4 +E1E5 +E1E6 +E1E7 +E1E8 +E1E9 +E1EA +E1EB +E1EC +E1ED +E1EE +E1EF +E1F0 +E1F1 +E1F2 +E1F3 +E1F4 +E1F5 +E1F6 +E1F7 +E1F8 +E1F9 +E1FA +E1FB +E1FC +E1FD +E1FE +E1FF +E200 +E201 +E202 +E203 +E204 +E205 +E206 +E207 +E208 +E209 +E20A +E20B +E20C +E20D +E20E +E20F +E210 +E211 +E212 +E213 +E214 +E215 +E216 +E217 +E218 +E219 +E21A +E21B +E21C +E21D +E21E +E21F +E220 +E221 +E222 +E223 +E224 +E225 +E226 +E227 +E228 +E229 +E22A +E22B +E22C +E22D +E22E +E22F +E230 +E231 +E232 +E233 +E234 +E235 +E236 +E237 +E238 +E239 +E23A +E23B +E23C +E23D +E23E +E23F +E240 +E241 +E242 +E243 +E244 +E245 +E246 +E247 +E248 +E249 +E24A +E24B +E24C +E24D +E24E +E24F +E250 +E251 +E252 +E253 +E254 +E255 +E256 +E257 +E258 +E259 +E25A +E25B +E25C +E25D +E25E +E25F +E260 +E261 +E262 +E263 +E264 +E265 +E266 +E267 +E268 +E269 +E26A +E26B +E26C +E26D +E26E +E26F +E270 +E271 +E272 +E273 +E274 +E275 +E276 +E277 +E278 +E279 +E27A +E27B +E27C +E27D +E27E +E27F +E280 +E281 +E282 +E283 +E284 +E285 +E286 +E287 +E288 +E289 +E28A +E28B +E28C +E28D +E28E +E28F +E290 +E291 +E292 +E293 +E294 +E295 +E296 +E297 +E298 +E299 +E29A +E29B +E29C +E29D +E29E +E29F +E2A0 +E2A1 +E2A2 +E2A3 +E2A4 +E2A5 +E2A6 +E2A7 +E2A8 +E2A9 +E2AA +E2AB +E2AC +E2AD +E2AE +E2AF +E2B0 +E2B1 +E2B2 +E2B3 +E2B4 +E2B5 +E2B6 +E2B7 +E2B8 +E2B9 +E2BA +E2BB +E2BC +E2BD +E2BE +E2BF +E2C0 +E2C1 +E2C2 +E2C3 +E2C4 +E2C5 +E2C6 +E2C7 +E2C8 +E2C9 +E2CA +E2CB +E2CC +E2CD +E2CE +E2CF +E2D0 +E2D1 +E2D2 +E2D3 +E2D4 +E2D5 +E2D6 +E2D7 +E2D8 +E2D9 +E2DA +E2DB +E2DC +E2DD +E2DE +E2DF +E2E0 +E2E1 +E2E2 +E2E3 +E2E4 +E2E5 +E2E6 +E2E7 +E2E8 +E2E9 +E2EA +E2EB +E2EC +E2ED +E2EE +E2EF +E2F0 +E2F1 +E2F2 +E2F3 +E2F4 +E2F5 +E2F6 +E2F7 +E2F8 +E2F9 +E2FA +E2FB +E2FC +E2FD +E2FE +E2FF +E300 +E301 +E302 +E303 +E304 +E305 +E306 +E307 +E308 +E309 +E30A +E30B +E30C +E30D +E30E +E30F +E310 +E311 +E312 +E313 +E314 +E315 +E316 +E317 +E318 +E319 +E31A +E31B +E31C +E31D +E31E +E31F +E320 +E321 +E322 +E323 +E324 +E325 +E326 +E327 +E328 +E329 +E32A +E32B +E32C +E32D +E32E +E32F +E330 +E331 +E332 +E333 +E334 +E335 +E336 +E337 +E338 +E339 +E33A +E33B +E33C +E33D +E33E +E33F +E340 +E341 +E342 +E343 +E344 +E345 +E346 +E347 +E348 +E349 +E34A +E34B +E34C +E34D +E34E +E34F +E350 +E351 +E352 +E353 +E354 +E355 +E356 +E357 +E358 +E359 +E35A +E35B +E35C +E35D +E35E +E35F +E360 +E361 +E362 +E363 +E364 +E365 +E366 +E367 +E368 +E369 +E36A +E36B +E36C +E36D +E36E +E36F +E370 +E371 +E372 +E373 +E374 +E375 +E376 +E377 +E378 +E379 +E37A +E37B +E37C +E37D +E37E +E37F +E380 +E381 +E382 +E383 +E384 +E385 +E386 +E387 +E388 +E389 +E38A +E38B +E38C +E38D +E38E +E38F +E390 +E391 +E392 +E393 +E394 +E395 +E396 +E397 +E398 +E399 +E39A +E39B +E39C +E39D +E39E +E39F +E3A0 +E3A1 +E3A2 +E3A3 +E3A4 +E3A5 +E3A6 +E3A7 +E3A8 +E3A9 +E3AA +E3AB +E3AC +E3AD +E3AE +E3AF +E3B0 +E3B1 +E3B2 +E3B3 +E3B4 +E3B5 +E3B6 +E3B7 +E3B8 +E3B9 +E3BA +E3BB +E3BC +E3BD +E3BE +E3BF +E3C0 +E3C1 +E3C2 +E3C3 +E3C4 +E3C5 +E3C6 +E3C7 +E3C8 +E3C9 +E3CA +E3CB +E3CC +E3CD +E3CE +E3CF +E3D0 +E3D1 +E3D2 +E3D3 +E3D4 +E3D5 +E3D6 +E3D7 +E3D8 +E3D9 +E3DA +E3DB +E3DC +E3DD +E3DE +E3DF +E3E0 +E3E1 +E3E2 +E3E3 +E3E4 +E3E5 +E3E6 +E3E7 +E3E8 +E3E9 +E3EA +E3EB +E3EC +E3ED +E3EE +E3EF +E3F0 +E3F1 +E3F2 +E3F3 +E3F4 +E3F5 +E3F6 +E3F7 +E3F8 +E3F9 +E3FA +E3FB +E3FC +E3FD +E3FE +E3FF +E400 +E401 +E402 +E403 +E404 +E405 +E406 +E407 +E408 +E409 +E40A +E40B +E40C +E40D +E40E +E40F +E410 +E411 +E412 +E413 +E414 +E415 +E416 +E417 +E418 +E419 +E41A +E41B +E41C +E41D +E41E +E41F +E420 +E421 +E422 +E423 +E424 +E425 +E426 +E427 +E428 +E429 +E42A +E42B +E42C +E42D +E42E +E42F +E430 +E431 +E432 +E433 +E434 +E435 +E436 +E437 +E438 +E439 +E43A +E43B +E43C +E43D +E43E +E43F +E440 +E441 +E442 +E443 +E444 +E445 +E446 +E447 +E448 +E449 +E44A +E44B +E44C +E44D +E44E +E44F +E450 +E451 +E452 +E453 +E454 +E455 +E456 +E457 +E458 +E459 +E45A +E45B +E45C +E45D +E45E +E45F +E460 +E461 +E462 +E463 +E464 +E465 +E466 +E467 +E468 +E469 +E46A +E46B +E46C +E46D +E46E +E46F +E470 +E471 +E472 +E473 +E474 +E475 +E476 +E477 +E478 +E479 +E47A +E47B +E47C +E47D +E47E +E47F +E480 +E481 +E482 +E483 +E484 +E485 +E486 +E487 +E488 +E489 +E48A +E48B +E48C +E48D +E48E +E48F +E490 +E491 +E492 +E493 +E494 +E495 +E496 +E497 +E498 +E499 +E49A +E49B +E49C +E49D +E49E +E49F +E4A0 +E4A1 +E4A2 +E4A3 +E4A4 +E4A5 +E4A6 +E4A7 +E4A8 +E4A9 +E4AA +E4AB +E4AC +E4AD +E4AE +E4AF +E4B0 +E4B1 +E4B2 +E4B3 +E4B4 +E4B5 +E4B6 +E4B7 +E4B8 +E4B9 +E4BA +E4BB +E4BC +E4BD +E4BE +E4BF +E4C0 +E4C1 +E4C2 +E4C3 +E4C4 +E4C5 +E4C6 +E4C7 +E4C8 +E4C9 +E4CA +E4CB +E4CC +E4CD +E4CE +E4CF +E4D0 +E4D1 +E4D2 +E4D3 +E4D4 +E4D5 +E4D6 +E4D7 +E4D8 +E4D9 +E4DA +E4DB +E4DC +E4DD +E4DE +E4DF +E4E0 +E4E1 +E4E2 +E4E3 +E4E4 +E4E5 +E4E6 +E4E7 +E4E8 +E4E9 +E4EA +E4EB +E4EC +E4ED +E4EE +E4EF +E4F0 +E4F1 +E4F2 +E4F3 +E4F4 +E4F5 +E4F6 +E4F7 +E4F8 +E4F9 +E4FA +E4FB +E4FC +E4FD +E4FE +E4FF +E500 +E501 +E502 +E503 +E504 +E505 +E506 +E507 +E508 +E509 +E50A +E50B +E50C +E50D +E50E +E50F +E510 +E511 +E512 +E513 +E514 +E515 +E516 +E517 +E518 +E519 +E51A +E51B +E51C +E51D +E51E +E51F +E520 +E521 +E522 +E523 +E524 +E525 +E526 +E527 +E528 +E529 +E52A +E52B +E52C +E52D +E52E +E52F +E530 +E531 +E532 +E533 +E534 +E535 +E536 +E537 +E538 +E539 +E53A +E53B +E53C +E53D +E53E +E53F +E540 +E541 +E542 +E543 +E544 +E545 +E546 +E547 +E548 +E549 +E54A +E54B +E54C +E54D +E54E +E54F +E550 +E551 +E552 +E553 +E554 +E555 +E556 +E557 +E558 +E559 +E55A +E55B +E55C +E55D +E55E +E55F +E560 +E561 +E562 +E563 +E564 +E565 +E566 +E567 +E568 +E569 +E56A +E56B +E56C +E56D +E56E +E56F +E570 +E571 +E572 +E573 +E574 +E575 +E576 +E577 +E578 +E579 +E57A +E57B +E57C +E57D +E57E +E57F +E580 +E581 +E582 +E583 +E584 +E585 +E586 +E587 +E588 +E589 +E58A +E58B +E58C +E58D +E58E +E58F +E590 +E591 +E592 +E593 +E594 +E595 +E596 +E597 +E598 +E599 +E59A +E59B +E59C +E59D +E59E +E59F +E5A0 +E5A1 +E5A2 +E5A3 +E5A4 +E5A5 +E5A6 +E5A7 +E5A8 +E5A9 +E5AA +E5AB +E5AC +E5AD +E5AE +E5AF +E5B0 +E5B1 +E5B2 +E5B3 +E5B4 +E5B5 +E5B6 +E5B7 +E5B8 +E5B9 +E5BA +E5BB +E5BC +E5BD +E5BE +E5BF +E5C0 +E5C1 +E5C2 +E5C3 +E5C4 +E5C5 +E5C6 +E5C7 +E5C8 +E5C9 +E5CA +E5CB +E5CC +E5CD +E5CE +E5CF +E5D0 +E5D1 +E5D2 +E5D3 +E5D4 +E5D5 +E5D6 +E5D7 +E5D8 +E5D9 +E5DA +E5DB +E5DC +E5DD +E5DE +E5DF +E5E0 +E5E1 +E5E2 +E5E3 +E5E4 +E5E5 +E5E6 +E5E7 +E5E8 +E5E9 +E5EA +E5EB +E5EC +E5ED +E5EE +E5EF +E5F0 +E5F1 +E5F2 +E5F3 +E5F4 +E5F5 +E5F6 +E5F7 +E5F8 +E5F9 +E5FA +E5FB +E5FC +E5FD +E5FE +E5FF +E600 +E601 +E602 +E603 +E604 +E605 +E606 +E607 +E608 +E609 +E60A +E60B +E60C +E60D +E60E +E60F +E610 +E611 +E612 +E613 +E614 +E615 +E616 +E617 +E618 +E619 +E61A +E61B +E61C +E61D +E61E +E61F +E620 +E621 +E622 +E623 +E624 +E625 +E626 +E627 +E628 +E629 +E62A +E62B +E62C +E62D +E62E +E62F +E630 +E631 +E632 +E633 +E634 +E635 +E636 +E637 +E638 +E639 +E63A +E63B +E63C +E63D +E63E +E63F +E640 +E641 +E642 +E643 +E644 +E645 +E646 +E647 +E648 +E649 +E64A +E64B +E64C +E64D +E64E +E64F +E650 +E651 +E652 +E653 +E654 +E655 +E656 +E657 +E658 +E659 +E65A +E65B +E65C +E65D +E65E +E65F +E660 +E661 +E662 +E663 +E664 +E665 +E666 +E667 +E668 +E669 +E66A +E66B +E66C +E66D +E66E +E66F +E670 +E671 +E672 +E673 +E674 +E675 +E676 +E677 +E678 +E679 +E67A +E67B +E67C +E67D +E67E +E67F +E680 +E681 +E682 +E683 +E684 +E685 +E686 +E687 +E688 +E689 +E68A +E68B +E68C +E68D +E68E +E68F +E690 +E691 +E692 +E693 +E694 +E695 +E696 +E697 +E698 +E699 +E69A +E69B +E69C +E69D +E69E +E69F +E6A0 +E6A1 +E6A2 +E6A3 +E6A4 +E6A5 +E6A6 +E6A7 +E6A8 +E6A9 +E6AA +E6AB +E6AC +E6AD +E6AE +E6AF +E6B0 +E6B1 +E6B2 +E6B3 +E6B4 +E6B5 +E6B6 +E6B7 +E6B8 +E6B9 +E6BA +E6BB +E6BC +E6BD +E6BE +E6BF +E6C0 +E6C1 +E6C2 +E6C3 +E6C4 +E6C5 +E6C6 +E6C7 +E6C8 +E6C9 +E6CA +E6CB +E6CC +E6CD +E6CE +E6CF +E6D0 +E6D1 +E6D2 +E6D3 +E6D4 +E6D5 +E6D6 +E6D7 +E6D8 +E6D9 +E6DA +E6DB +E6DC +E6DD +E6DE +E6DF +E6E0 +E6E1 +E6E2 +E6E3 +E6E4 +E6E5 +E6E6 +E6E7 +E6E8 +E6E9 +E6EA +E6EB +E6EC +E6ED +E6EE +E6EF +E6F0 +E6F1 +E6F2 +E6F3 +E6F4 +E6F5 +E6F6 +E6F7 +E6F8 +E6F9 +E6FA +E6FB +E6FC +E6FD +E6FE +E6FF +E700 +E701 +E702 +E703 +E704 +E705 +E706 +E707 +E708 +E709 +E70A +E70B +E70C +E70D +E70E +E70F +E710 +E711 +E712 +E713 +E714 +E715 +E716 +E717 +E718 +E719 +E71A +E71B +E71C +E71D +E71E +E71F +E720 +E721 +E722 +E723 +E724 +E725 +E726 +E727 +E728 +E729 +E72A +E72B +E72C +E72D +E72E +E72F +E730 +E731 +E732 +E733 +E734 +E735 +E736 +E737 +E738 +E739 +E73A +E73B +E73C +E73D +E73E +E73F +E740 +E741 +E742 +E743 +E744 +E745 +E746 +E747 +E748 +E749 +E74A +E74B +E74C +E74D +E74E +E74F +E750 +E751 +E752 +E753 +E754 +E755 +E756 +E757 +CREATE TABLE t3 SELECT CONVERT(c1 USING eucjpms) AS c1 FROM t2; +SELECT HEX(c1) FROM t3; +HEX(c1) +5C +7E +A1B1 +A1BD +A1C0 +A1C1 +A1C2 +A1DD +A1F1 +A1F2 +A1EF +A2CC +A1C1 +8FA2C3 +ADA1 +ADA2 +ADA3 +ADA4 +ADA5 +ADA6 +ADA7 +ADA8 +ADA9 +ADAA +ADAB +ADAC +ADAD +ADAE +ADAF +ADB0 +ADB1 +ADB2 +ADB3 +ADB4 +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +ADC0 +ADC1 +ADC2 +ADC3 +ADC4 +ADC5 +ADC6 +ADC7 +ADC8 +ADC9 +ADCA +ADCB +ADCC +ADCD +ADCE +ADCF +ADD0 +ADD1 +ADD2 +ADD3 +ADD4 +ADD5 +ADD6 +ADDF +ADE0 +ADE1 +ADE2 +ADE3 +ADE4 +ADE5 +ADE6 +ADE7 +ADE8 +ADE9 +ADEA +ADEB +ADEC +ADED +ADEE +ADEF +A2E2 +A2E1 +A2E9 +ADF3 +ADF4 +A2E5 +A2DD +A2DC +ADF8 +ADF9 +A2E8 +A2C1 +A2C0 +8FF3F3 +8FF3F4 +8FF3F5 +8FF3F6 +8FF3F7 +8FF3F8 +8FF3F9 +8FF3FA +8FF3FB +8FF3FC +ADB5 +ADB6 +ADB7 +ADB8 +ADB9 +ADBA +ADBB +ADBC +ADBD +ADBE +A2CC +8FA2C3 +8FF4A9 +8FF4AA +ADEA +ADE2 +ADE4 +A2E8 +8FD4E3 +8FDCDF +8FE4E9 +8FE3F8 +8FD9A1 +8FB1BB +8FF4AE +8FC2AD +8FC3FC +8FE4D0 +8FC2BF +8FBCF4 +8FB0A9 +8FB0C8 +8FF4AF +8FB0D2 +8FB0D4 +8FB0E3 +8FB0EE +8FB1A7 +8FB1A3 +8FB1AC +8FB1A9 +8FB1BE +8FB1DF +8FB1D8 +8FB1C8 +8FB1D7 +8FB1E3 +8FB1F4 +8FB1E1 +8FB2A3 +8FF4B0 +8FB2BB +8FB2E6 +8FB2ED +8FB2F5 +8FB2FC +8FF4B1 +8FB3B5 +8FB3D8 +8FB3DB +8FB3E5 +8FB3EE +8FB3FB +8FF4B2 +8FF4B3 +8FB4C0 +8FB4C7 +8FB4D0 +8FB4DE +8FF4B4 +8FB5AA +8FF4B5 +8FB5AF +8FB5C4 +8FB5E8 +8FF4B6 +8FB7C2 +8FB7E4 +8FB7E8 +8FB7E7 +8FF4B7 +8FF4B8 +8FF4B9 +8FB8CE +8FB8E1 +8FB8F5 +8FB8F7 +8FB8F8 +8FB8FC +8FB9AF +8FB9B7 +8FBABE +8FBADB +8FCDAA +8FBAE1 +8FF4BA +8FBAEB +8FBBB3 +8FBBB8 +8FF4BB +8FBBCA +8FF4BC +8FF4BD +8FBBD0 +8FBBDE +8FBBF4 +8FBBF5 +8FBBF9 +8FBCE4 +8FBCED +8FBCFE +8FF4BE +8FBDC2 +8FBDE7 +8FF4BF +8FBDF0 +8FBEB0 +8FBEAC +8FF4C0 +8FBEB3 +8FBEBD +8FBECD +8FBEC9 +8FBEE4 +8FBFA8 +8FBFC9 +8FC0C4 +8FC0E4 +8FC0F4 +8FC1A6 +8FF4C1 +8FC1F5 +8FC1FC +8FF4C2 +8FC1F8 +8FC2AB +8FC2A1 +8FC2A5 +8FF4C3 +8FC2B8 +8FC2BA +8FF4C4 +8FC2C4 +8FC2D2 +8FC2D7 +8FC2DB +8FC2DE +8FC2ED +8FC2F0 +8FF4C5 +8FC3A1 +8FC3B5 +8FC3C9 +8FC3B9 +8FF4C6 +8FC3D8 +8FC3FE +8FF4C7 +8FC4CC +8FF4C8 +8FC4D9 +8FC4EA +8FC4FD +8FF4C9 +8FC5A7 +8FC5B5 +8FC5B6 +8FF4CA +8FC5D5 +8FC6B8 +8FC6D7 +8FC6E0 +8FC6EA +8FC6E3 +8FC7A1 +8FC7AB +8FC7C7 +8FC7C3 +8FC7CB +8FC7CF +8FC7D9 +8FF4CB +8FF4CC +8FC7E6 +8FC7EE +8FC7FC +8FC7EB +8FC7F0 +8FC8B1 +8FC8E5 +8FC8F8 +8FC9A6 +8FC9AB +8FC9AD +8FF4CD +8FC9CA +8FC9D3 +8FC9E9 +8FC9E3 +8FC9FC +8FC9F4 +8FC9F5 +8FF4CE +8FCAB3 +8FCABD +8FCAEF +8FCAF1 +8FCBAE +8FF4CF +8FCBCA +8FCBE6 +8FCBEA +8FCBF0 +8FCBF4 +8FCBEE +8FCCA5 +8FCBF9 +8FCCAB +8FCCAE +8FCCAD +8FCCB2 +8FCCC2 +8FCCD0 +8FCCD9 +8FF4D0 +8FCDBB +8FF4D1 +8FCEBB +8FF4D2 +8FCEBA +8FCEC3 +8FF4D3 +8FCEF2 +8FB3DD +8FCFD5 +8FCFE2 +8FCFE9 +8FCFED +8FF4D4 +8FF4D5 +8FF4D6 +8FF4D7 +8FD0E5 +8FF4D8 +8FD0E9 +8FD1E8 +8FF4D9 +8FF4DA +8FD1EC +8FD2BB +8FF4DB +8FD3E1 +8FD3E8 +8FD4A7 +8FF4DC +8FF4DD +8FD4D4 +8FD4F2 +8FD5AE +8FF4DE +8FD7DE +8FF4DF +8FD8A2 +8FD8B7 +8FD8C1 +8FD8D1 +8FD8F4 +8FD9C6 +8FD9C8 +8FD9D1 +8FF4E0 +8FF4E1 +8FF4E2 +8FF4E3 +8FF4E4 +8FDCD3 +8FDDC8 +8FDDD4 +8FDDEA +8FDDFA +8FDEA4 +8FDEB0 +8FF4E5 +8FDEB5 +8FDECB +8FF4E6 +8FDFB9 +8FF4E7 +8FDFC3 +8FF4E8 +8FF4E9 +8FE0D9 +8FF4EA +8FF4EB +8FE1E2 +8FF4EC +8FF4ED +8FF4EE +8FE2C7 +8FE3A8 +8FE3A6 +8FE3A9 +8FE3AF +8FE3B0 +8FE3AA +8FE3AB +8FE3BC +8FE3C1 +8FE3BF +8FE3D5 +8FE3D8 +8FE3D6 +8FE3DF +8FE3E3 +8FE3E1 +8FE3D4 +8FE3E9 +8FE4A6 +8FE3F1 +8FE3F2 +8FE4CB +8FE4C1 +8FE4C3 +8FE4BE +8FF4EF +8FE4C0 +8FE4C7 +8FE4BF +8FE4E0 +8FE4DE +8FE4D1 +8FF4F0 +8FE4DC +8FE4D2 +8FE4DB +8FE4D4 +8FE4FA +8FE4EF +8FE5B3 +8FE5BF +8FE5C9 +8FE5D0 +8FE5E2 +8FE5EA +8FE5EB +8FF4F1 +8FF4F2 +8FF4F3 +8FE6E8 +8FE6EF +8FE7AC +8FF4F4 +8FE7AE +8FF4F5 +8FE7B1 +8FF4F6 +8FE7B2 +8FE8B1 +8FE8B6 +8FF4F7 +8FF4F8 +8FE8DD +8FF4F9 +8FF4FA +8FE9D1 +8FF4FB +8FE9ED +8FEACD +8FF4FC +8FEADB +8FEAE6 +8FEAEA +8FEBA5 +8FEBFB +8FEBFA +8FF4FD +8FECD6 +8FF4FE +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F5FD +F5FE +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F6FD +F6FE +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F7FD +F7FE +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F8FD +F8FE +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +F9FD +F9FE +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FAFD +FAFE +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FBFD +FBFE +FCA1 +FCA2 +FCA3 +FCA4 +FCA5 +FCA6 +FCA7 +FCA8 +FCA9 +FCAA +FCAB +FCAC +FCAD +FCAE +FCAF +FCB0 +FCB1 +FCB2 +FCB3 +FCB4 +FCB5 +FCB6 +FCB7 +FCB8 +FCB9 +FCBA +FCBB +FCBC +FCBD +FCBE +FCBF +FCC0 +FCC1 +FCC2 +FCC3 +FCC4 +FCC5 +FCC6 +FCC7 +FCC8 +FCC9 +FCCA +FCCB +FCCC +FCCD +FCCE +FCCF +FCD0 +FCD1 +FCD2 +FCD3 +FCD4 +FCD5 +FCD6 +FCD7 +FCD8 +FCD9 +FCDA +FCDB +FCDC +FCDD +FCDE +FCDF +FCE0 +FCE1 +FCE2 +FCE3 +FCE4 +FCE5 +FCE6 +FCE7 +FCE8 +FCE9 +FCEA +FCEB +FCEC +FCED +FCEE +FCEF +FCF0 +FCF1 +FCF2 +FCF3 +FCF4 +FCF5 +FCF6 +FCF7 +FCF8 +FCF9 +FCFA +FCFB +FCFC +FCFD +FCFE +FDA1 +FDA2 +FDA3 +FDA4 +FDA5 +FDA6 +FDA7 +FDA8 +FDA9 +FDAA +FDAB +FDAC +FDAD +FDAE +FDAF +FDB0 +FDB1 +FDB2 +FDB3 +FDB4 +FDB5 +FDB6 +FDB7 +FDB8 +FDB9 +FDBA +FDBB +FDBC +FDBD +FDBE +FDBF +FDC0 +FDC1 +FDC2 +FDC3 +FDC4 +FDC5 +FDC6 +FDC7 +FDC8 +FDC9 +FDCA +FDCB +FDCC +FDCD +FDCE +FDCF +FDD0 +FDD1 +FDD2 +FDD3 +FDD4 +FDD5 +FDD6 +FDD7 +FDD8 +FDD9 +FDDA +FDDB +FDDC +FDDD +FDDE +FDDF +FDE0 +FDE1 +FDE2 +FDE3 +FDE4 +FDE5 +FDE6 +FDE7 +FDE8 +FDE9 +FDEA +FDEB +FDEC +FDED +FDEE +FDEF +FDF0 +FDF1 +FDF2 +FDF3 +FDF4 +FDF5 +FDF6 +FDF7 +FDF8 +FDF9 +FDFA +FDFB +FDFC +FDFD +FDFE +FEA1 +FEA2 +FEA3 +FEA4 +FEA5 +FEA6 +FEA7 +FEA8 +FEA9 +FEAA +FEAB +FEAC +FEAD +FEAE +FEAF +FEB0 +FEB1 +FEB2 +FEB3 +FEB4 +FEB5 +FEB6 +FEB7 +FEB8 +FEB9 +FEBA +FEBB +FEBC +FEBD +FEBE +FEBF +FEC0 +FEC1 +FEC2 +FEC3 +FEC4 +FEC5 +FEC6 +FEC7 +FEC8 +FEC9 +FECA +FECB +FECC +FECD +FECE +FECF +FED0 +FED1 +FED2 +FED3 +FED4 +FED5 +FED6 +FED7 +FED8 +FED9 +FEDA +FEDB +FEDC +FEDD +FEDE +FEDF +FEE0 +FEE1 +FEE2 +FEE3 +FEE4 +FEE5 +FEE6 +FEE7 +FEE8 +FEE9 +FEEA +FEEB +FEEC +FEED +FEEE +FEEF +FEF0 +FEF1 +FEF2 +FEF3 +FEF4 +FEF5 +FEF6 +FEF7 +FEF8 +FEF9 +FEFA +FEFB +FEFC +FEFD +FEFE +8FF5A1 +8FF5A2 +8FF5A3 +8FF5A4 +8FF5A5 +8FF5A6 +8FF5A7 +8FF5A8 +8FF5A9 +8FF5AA +8FF5AB +8FF5AC +8FF5AD +8FF5AE +8FF5AF +8FF5B0 +8FF5B1 +8FF5B2 +8FF5B3 +8FF5B4 +8FF5B5 +8FF5B6 +8FF5B7 +8FF5B8 +8FF5B9 +8FF5BA +8FF5BB +8FF5BC +8FF5BD +8FF5BE +8FF5BF +8FF5C0 +8FF5C1 +8FF5C2 +8FF5C3 +8FF5C4 +8FF5C5 +8FF5C6 +8FF5C7 +8FF5C8 +8FF5C9 +8FF5CA +8FF5CB +8FF5CC +8FF5CD +8FF5CE +8FF5CF +8FF5D0 +8FF5D1 +8FF5D2 +8FF5D3 +8FF5D4 +8FF5D5 +8FF5D6 +8FF5D7 +8FF5D8 +8FF5D9 +8FF5DA +8FF5DB +8FF5DC +8FF5DD +8FF5DE +8FF5DF +8FF5E0 +8FF5E1 +8FF5E2 +8FF5E3 +8FF5E4 +8FF5E5 +8FF5E6 +8FF5E7 +8FF5E8 +8FF5E9 +8FF5EA +8FF5EB +8FF5EC +8FF5ED +8FF5EE +8FF5EF +8FF5F0 +8FF5F1 +8FF5F2 +8FF5F3 +8FF5F4 +8FF5F5 +8FF5F6 +8FF5F7 +8FF5F8 +8FF5F9 +8FF5FA +8FF5FB +8FF5FC +8FF5FD +8FF5FE +8FF6A1 +8FF6A2 +8FF6A3 +8FF6A4 +8FF6A5 +8FF6A6 +8FF6A7 +8FF6A8 +8FF6A9 +8FF6AA +8FF6AB +8FF6AC +8FF6AD +8FF6AE +8FF6AF +8FF6B0 +8FF6B1 +8FF6B2 +8FF6B3 +8FF6B4 +8FF6B5 +8FF6B6 +8FF6B7 +8FF6B8 +8FF6B9 +8FF6BA +8FF6BB +8FF6BC +8FF6BD +8FF6BE +8FF6BF +8FF6C0 +8FF6C1 +8FF6C2 +8FF6C3 +8FF6C4 +8FF6C5 +8FF6C6 +8FF6C7 +8FF6C8 +8FF6C9 +8FF6CA +8FF6CB +8FF6CC +8FF6CD +8FF6CE +8FF6CF +8FF6D0 +8FF6D1 +8FF6D2 +8FF6D3 +8FF6D4 +8FF6D5 +8FF6D6 +8FF6D7 +8FF6D8 +8FF6D9 +8FF6DA +8FF6DB +8FF6DC +8FF6DD +8FF6DE +8FF6DF +8FF6E0 +8FF6E1 +8FF6E2 +8FF6E3 +8FF6E4 +8FF6E5 +8FF6E6 +8FF6E7 +8FF6E8 +8FF6E9 +8FF6EA +8FF6EB +8FF6EC +8FF6ED +8FF6EE +8FF6EF +8FF6F0 +8FF6F1 +8FF6F2 +8FF6F3 +8FF6F4 +8FF6F5 +8FF6F6 +8FF6F7 +8FF6F8 +8FF6F9 +8FF6FA +8FF6FB +8FF6FC +8FF6FD +8FF6FE +8FF7A1 +8FF7A2 +8FF7A3 +8FF7A4 +8FF7A5 +8FF7A6 +8FF7A7 +8FF7A8 +8FF7A9 +8FF7AA +8FF7AB +8FF7AC +8FF7AD +8FF7AE +8FF7AF +8FF7B0 +8FF7B1 +8FF7B2 +8FF7B3 +8FF7B4 +8FF7B5 +8FF7B6 +8FF7B7 +8FF7B8 +8FF7B9 +8FF7BA +8FF7BB +8FF7BC +8FF7BD +8FF7BE +8FF7BF +8FF7C0 +8FF7C1 +8FF7C2 +8FF7C3 +8FF7C4 +8FF7C5 +8FF7C6 +8FF7C7 +8FF7C8 +8FF7C9 +8FF7CA +8FF7CB +8FF7CC +8FF7CD +8FF7CE +8FF7CF +8FF7D0 +8FF7D1 +8FF7D2 +8FF7D3 +8FF7D4 +8FF7D5 +8FF7D6 +8FF7D7 +8FF7D8 +8FF7D9 +8FF7DA +8FF7DB +8FF7DC +8FF7DD +8FF7DE +8FF7DF +8FF7E0 +8FF7E1 +8FF7E2 +8FF7E3 +8FF7E4 +8FF7E5 +8FF7E6 +8FF7E7 +8FF7E8 +8FF7E9 +8FF7EA +8FF7EB +8FF7EC +8FF7ED +8FF7EE +8FF7EF +8FF7F0 +8FF7F1 +8FF7F2 +8FF7F3 +8FF7F4 +8FF7F5 +8FF7F6 +8FF7F7 +8FF7F8 +8FF7F9 +8FF7FA +8FF7FB +8FF7FC +8FF7FD +8FF7FE +8FF8A1 +8FF8A2 +8FF8A3 +8FF8A4 +8FF8A5 +8FF8A6 +8FF8A7 +8FF8A8 +8FF8A9 +8FF8AA +8FF8AB +8FF8AC +8FF8AD +8FF8AE +8FF8AF +8FF8B0 +8FF8B1 +8FF8B2 +8FF8B3 +8FF8B4 +8FF8B5 +8FF8B6 +8FF8B7 +8FF8B8 +8FF8B9 +8FF8BA +8FF8BB +8FF8BC +8FF8BD +8FF8BE +8FF8BF +8FF8C0 +8FF8C1 +8FF8C2 +8FF8C3 +8FF8C4 +8FF8C5 +8FF8C6 +8FF8C7 +8FF8C8 +8FF8C9 +8FF8CA +8FF8CB +8FF8CC +8FF8CD +8FF8CE +8FF8CF +8FF8D0 +8FF8D1 +8FF8D2 +8FF8D3 +8FF8D4 +8FF8D5 +8FF8D6 +8FF8D7 +8FF8D8 +8FF8D9 +8FF8DA +8FF8DB +8FF8DC +8FF8DD +8FF8DE +8FF8DF +8FF8E0 +8FF8E1 +8FF8E2 +8FF8E3 +8FF8E4 +8FF8E5 +8FF8E6 +8FF8E7 +8FF8E8 +8FF8E9 +8FF8EA +8FF8EB +8FF8EC +8FF8ED +8FF8EE +8FF8EF +8FF8F0 +8FF8F1 +8FF8F2 +8FF8F3 +8FF8F4 +8FF8F5 +8FF8F6 +8FF8F7 +8FF8F8 +8FF8F9 +8FF8FA +8FF8FB +8FF8FC +8FF8FD +8FF8FE +8FF9A1 +8FF9A2 +8FF9A3 +8FF9A4 +8FF9A5 +8FF9A6 +8FF9A7 +8FF9A8 +8FF9A9 +8FF9AA +8FF9AB +8FF9AC +8FF9AD +8FF9AE +8FF9AF +8FF9B0 +8FF9B1 +8FF9B2 +8FF9B3 +8FF9B4 +8FF9B5 +8FF9B6 +8FF9B7 +8FF9B8 +8FF9B9 +8FF9BA +8FF9BB +8FF9BC +8FF9BD +8FF9BE +8FF9BF +8FF9C0 +8FF9C1 +8FF9C2 +8FF9C3 +8FF9C4 +8FF9C5 +8FF9C6 +8FF9C7 +8FF9C8 +8FF9C9 +8FF9CA +8FF9CB +8FF9CC +8FF9CD +8FF9CE +8FF9CF +8FF9D0 +8FF9D1 +8FF9D2 +8FF9D3 +8FF9D4 +8FF9D5 +8FF9D6 +8FF9D7 +8FF9D8 +8FF9D9 +8FF9DA +8FF9DB +8FF9DC +8FF9DD +8FF9DE +8FF9DF +8FF9E0 +8FF9E1 +8FF9E2 +8FF9E3 +8FF9E4 +8FF9E5 +8FF9E6 +8FF9E7 +8FF9E8 +8FF9E9 +8FF9EA +8FF9EB +8FF9EC +8FF9ED +8FF9EE +8FF9EF +8FF9F0 +8FF9F1 +8FF9F2 +8FF9F3 +8FF9F4 +8FF9F5 +8FF9F6 +8FF9F7 +8FF9F8 +8FF9F9 +8FF9FA +8FF9FB +8FF9FC +8FF9FD +8FF9FE +8FFAA1 +8FFAA2 +8FFAA3 +8FFAA4 +8FFAA5 +8FFAA6 +8FFAA7 +8FFAA8 +8FFAA9 +8FFAAA +8FFAAB +8FFAAC +8FFAAD +8FFAAE +8FFAAF +8FFAB0 +8FFAB1 +8FFAB2 +8FFAB3 +8FFAB4 +8FFAB5 +8FFAB6 +8FFAB7 +8FFAB8 +8FFAB9 +8FFABA +8FFABB +8FFABC +8FFABD +8FFABE +8FFABF +8FFAC0 +8FFAC1 +8FFAC2 +8FFAC3 +8FFAC4 +8FFAC5 +8FFAC6 +8FFAC7 +8FFAC8 +8FFAC9 +8FFACA +8FFACB +8FFACC +8FFACD +8FFACE +8FFACF +8FFAD0 +8FFAD1 +8FFAD2 +8FFAD3 +8FFAD4 +8FFAD5 +8FFAD6 +8FFAD7 +8FFAD8 +8FFAD9 +8FFADA +8FFADB +8FFADC +8FFADD +8FFADE +8FFADF +8FFAE0 +8FFAE1 +8FFAE2 +8FFAE3 +8FFAE4 +8FFAE5 +8FFAE6 +8FFAE7 +8FFAE8 +8FFAE9 +8FFAEA +8FFAEB +8FFAEC +8FFAED +8FFAEE +8FFAEF +8FFAF0 +8FFAF1 +8FFAF2 +8FFAF3 +8FFAF4 +8FFAF5 +8FFAF6 +8FFAF7 +8FFAF8 +8FFAF9 +8FFAFA +8FFAFB +8FFAFC +8FFAFD +8FFAFE +8FFBA1 +8FFBA2 +8FFBA3 +8FFBA4 +8FFBA5 +8FFBA6 +8FFBA7 +8FFBA8 +8FFBA9 +8FFBAA +8FFBAB +8FFBAC +8FFBAD +8FFBAE +8FFBAF +8FFBB0 +8FFBB1 +8FFBB2 +8FFBB3 +8FFBB4 +8FFBB5 +8FFBB6 +8FFBB7 +8FFBB8 +8FFBB9 +8FFBBA +8FFBBB +8FFBBC +8FFBBD +8FFBBE +8FFBBF +8FFBC0 +8FFBC1 +8FFBC2 +8FFBC3 +8FFBC4 +8FFBC5 +8FFBC6 +8FFBC7 +8FFBC8 +8FFBC9 +8FFBCA +8FFBCB +8FFBCC +8FFBCD +8FFBCE +8FFBCF +8FFBD0 +8FFBD1 +8FFBD2 +8FFBD3 +8FFBD4 +8FFBD5 +8FFBD6 +8FFBD7 +8FFBD8 +8FFBD9 +8FFBDA +8FFBDB +8FFBDC +8FFBDD +8FFBDE +8FFBDF +8FFBE0 +8FFBE1 +8FFBE2 +8FFBE3 +8FFBE4 +8FFBE5 +8FFBE6 +8FFBE7 +8FFBE8 +8FFBE9 +8FFBEA +8FFBEB +8FFBEC +8FFBED +8FFBEE +8FFBEF +8FFBF0 +8FFBF1 +8FFBF2 +8FFBF3 +8FFBF4 +8FFBF5 +8FFBF6 +8FFBF7 +8FFBF8 +8FFBF9 +8FFBFA +8FFBFB +8FFBFC +8FFBFD +8FFBFE +8FFCA1 +8FFCA2 +8FFCA3 +8FFCA4 +8FFCA5 +8FFCA6 +8FFCA7 +8FFCA8 +8FFCA9 +8FFCAA +8FFCAB +8FFCAC +8FFCAD +8FFCAE +8FFCAF +8FFCB0 +8FFCB1 +8FFCB2 +8FFCB3 +8FFCB4 +8FFCB5 +8FFCB6 +8FFCB7 +8FFCB8 +8FFCB9 +8FFCBA +8FFCBB +8FFCBC +8FFCBD +8FFCBE +8FFCBF +8FFCC0 +8FFCC1 +8FFCC2 +8FFCC3 +8FFCC4 +8FFCC5 +8FFCC6 +8FFCC7 +8FFCC8 +8FFCC9 +8FFCCA +8FFCCB +8FFCCC +8FFCCD +8FFCCE +8FFCCF +8FFCD0 +8FFCD1 +8FFCD2 +8FFCD3 +8FFCD4 +8FFCD5 +8FFCD6 +8FFCD7 +8FFCD8 +8FFCD9 +8FFCDA +8FFCDB +8FFCDC +8FFCDD +8FFCDE +8FFCDF +8FFCE0 +8FFCE1 +8FFCE2 +8FFCE3 +8FFCE4 +8FFCE5 +8FFCE6 +8FFCE7 +8FFCE8 +8FFCE9 +8FFCEA +8FFCEB +8FFCEC +8FFCED +8FFCEE +8FFCEF +8FFCF0 +8FFCF1 +8FFCF2 +8FFCF3 +8FFCF4 +8FFCF5 +8FFCF6 +8FFCF7 +8FFCF8 +8FFCF9 +8FFCFA +8FFCFB +8FFCFC +8FFCFD +8FFCFE +8FFDA1 +8FFDA2 +8FFDA3 +8FFDA4 +8FFDA5 +8FFDA6 +8FFDA7 +8FFDA8 +8FFDA9 +8FFDAA +8FFDAB +8FFDAC +8FFDAD +8FFDAE +8FFDAF +8FFDB0 +8FFDB1 +8FFDB2 +8FFDB3 +8FFDB4 +8FFDB5 +8FFDB6 +8FFDB7 +8FFDB8 +8FFDB9 +8FFDBA +8FFDBB +8FFDBC +8FFDBD +8FFDBE +8FFDBF +8FFDC0 +8FFDC1 +8FFDC2 +8FFDC3 +8FFDC4 +8FFDC5 +8FFDC6 +8FFDC7 +8FFDC8 +8FFDC9 +8FFDCA +8FFDCB +8FFDCC +8FFDCD +8FFDCE +8FFDCF +8FFDD0 +8FFDD1 +8FFDD2 +8FFDD3 +8FFDD4 +8FFDD5 +8FFDD6 +8FFDD7 +8FFDD8 +8FFDD9 +8FFDDA +8FFDDB +8FFDDC +8FFDDD +8FFDDE +8FFDDF +8FFDE0 +8FFDE1 +8FFDE2 +8FFDE3 +8FFDE4 +8FFDE5 +8FFDE6 +8FFDE7 +8FFDE8 +8FFDE9 +8FFDEA +8FFDEB +8FFDEC +8FFDED +8FFDEE +8FFDEF +8FFDF0 +8FFDF1 +8FFDF2 +8FFDF3 +8FFDF4 +8FFDF5 +8FFDF6 +8FFDF7 +8FFDF8 +8FFDF9 +8FFDFA +8FFDFB +8FFDFC +8FFDFD +8FFDFE +8FFEA1 +8FFEA2 +8FFEA3 +8FFEA4 +8FFEA5 +8FFEA6 +8FFEA7 +8FFEA8 +8FFEA9 +8FFEAA +8FFEAB +8FFEAC +8FFEAD +8FFEAE +8FFEAF +8FFEB0 +8FFEB1 +8FFEB2 +8FFEB3 +8FFEB4 +8FFEB5 +8FFEB6 +8FFEB7 +8FFEB8 +8FFEB9 +8FFEBA +8FFEBB +8FFEBC +8FFEBD +8FFEBE +8FFEBF +8FFEC0 +8FFEC1 +8FFEC2 +8FFEC3 +8FFEC4 +8FFEC5 +8FFEC6 +8FFEC7 +8FFEC8 +8FFEC9 +8FFECA +8FFECB +8FFECC +8FFECD +8FFECE +8FFECF +8FFED0 +8FFED1 +8FFED2 +8FFED3 +8FFED4 +8FFED5 +8FFED6 +8FFED7 +8FFED8 +8FFED9 +8FFEDA +8FFEDB +8FFEDC +8FFEDD +8FFEDE +8FFEDF +8FFEE0 +8FFEE1 +8FFEE2 +8FFEE3 +8FFEE4 +8FFEE5 +8FFEE6 +8FFEE7 +8FFEE8 +8FFEE9 +8FFEEA +8FFEEB +8FFEEC +8FFEED +8FFEEE +8FFEEF +8FFEF0 +8FFEF1 +8FFEF2 +8FFEF3 +8FFEF4 +8FFEF5 +8FFEF6 +8FFEF7 +8FFEF8 +8FFEF9 +8FFEFA +8FFEFB +8FFEFC +8FFEFD +8FFEFE +CREATE TABLE t4 SELECT CONVERT(c1 USING cp932) AS c1 FROM t1; +SELECT HEX(c1) FROM t4; +HEX(c1) +5C +7E +8150 +815C +815F +8160 +8161 +817C +8191 +8192 +818F +81CA +8160 +FA55 +8740 +8741 +8742 +8743 +8744 +8745 +8746 +8747 +8748 +8749 +874A +874B +874C +874D +874E +874F +8750 +8751 +8752 +8753 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +875F +8760 +8761 +8762 +8763 +8764 +8765 +8766 +8767 +8768 +8769 +876A +876B +876C +876D +876E +876F +8770 +8771 +8772 +8773 +8774 +8775 +877E +8780 +8781 +8782 +8783 +8784 +8785 +8786 +8787 +8788 +8789 +878A +878B +878C +878D +878E +878F +81E0 +81DF +81E7 +8793 +8794 +81E3 +81DB +81DA +8798 +8799 +81E6 +81BF +81BE +FA40 +FA41 +FA42 +FA43 +FA44 +FA45 +FA46 +FA47 +FA48 +FA49 +8754 +8755 +8756 +8757 +8758 +8759 +875A +875B +875C +875D +81CA +FA55 +FA56 +FA57 +878A +8782 +8784 +81E6 +FA5C +FA5D +FA5E +FA5F +FA60 +FA61 +FA62 +FA63 +FA64 +FA65 +FA66 +FA67 +FA68 +FA69 +FA6A +FA6B +FA6C +FA6D +FA6E +FA6F +FA70 +FA71 +FA72 +FA73 +FA74 +FA75 +FA76 +FA77 +FA78 +FA79 +FA7A +FA7B +FA7C +FA7D +FA7E +FA80 +FA81 +FA82 +FA83 +FA84 +FA85 +FA86 +FA87 +FA88 +FA89 +FA8A +FA8B +FA8C +FA8D +FA8E +FA8F +FA90 +FA91 +FA92 +FA93 +FA94 +FA95 +FA96 +FA97 +FA98 +FA99 +FA9A +FA9B +FA9C +FA9D +FA9E +FA9F +FAA0 +FAA1 +FAA2 +FAA3 +FAA4 +FAA5 +FAA6 +FAA7 +FAA8 +FAA9 +FAAA +FAAB +FAAC +FAAD +FAAE +FAAF +FAB0 +FAB1 +FAB2 +FAB3 +FAB4 +FAB5 +FAB6 +FAB7 +FAB8 +FAB9 +FABA +FABB +FABC +FABD +FABE +FABF +FAC0 +FAC1 +FAC2 +FAC3 +FAC4 +FAC5 +FAC6 +FAC7 +FAC8 +FAC9 +FACA +FACB +FACC +FACD +FACE +FACF +FAD0 +FAD1 +FAD2 +FAD3 +FAD4 +FAD5 +FAD6 +FAD7 +FAD8 +FAD9 +FADA +FADB +FADC +FADD +FADE +FADF +FAE0 +FAE1 +FAE2 +FAE3 +FAE4 +FAE5 +FAE6 +FAE7 +FAE8 +FAE9 +FAEA +FAEB +FAEC +FAED +FAEE +FAEF +FAF0 +FAF1 +FAF2 +FAF3 +FAF4 +FAF5 +FAF6 +FAF7 +FAF8 +FAF9 +FAFA +FAFB +FAFC +FB40 +FB41 +FB42 +FB43 +FB44 +FB45 +FB46 +FB47 +FB48 +FB49 +FB4A +FB4B +FB4C +FB4D +FB4E +FB4F +FB50 +FB51 +FB52 +FB53 +FB54 +FB55 +FB56 +FB57 +FB58 +FB59 +FB5A +FB5B +FB5C +FB5D +FB5E +FB5F +FB60 +FB61 +FB62 +FB63 +FB64 +FB65 +FB66 +FB67 +FB68 +FB69 +FB6A +FB6B +FB6C +FB6D +FB6E +FB6F +FB70 +FB71 +FB72 +FB73 +FB74 +FB75 +FB76 +FB77 +FB78 +FB79 +FB7A +FB7B +FB7C +FB7D +FB7E +FB80 +FB81 +FB82 +FB83 +FB84 +FB85 +FB86 +FB87 +FB88 +FB89 +FB8A +FB8B +FB8C +FB8D +FB8E +FB8F +FB90 +FB91 +FB92 +FB93 +FB94 +FB95 +FB96 +FB97 +FB98 +FB99 +FB9A +FB9B +FB9C +FB9D +FB9E +FB9F +FBA0 +FBA1 +FBA2 +FBA3 +FBA4 +FBA5 +FBA6 +FBA7 +FBA8 +FBA9 +FBAA +FBAB +FBAC +FBAD +FBAE +FBAF +FBB0 +FBB1 +FBB2 +FBB3 +FBB4 +FBB5 +FBB6 +FBB7 +FBB8 +FBB9 +FBBA +FBBB +FBBC +FBBD +FBBE +FBBF +FBC0 +FBC1 +FBC2 +FBC3 +FBC4 +FBC5 +FBC6 +FBC7 +FBC8 +FBC9 +FBCA +FBCB +FBCC +FBCD +FBCE +FBCF +FBD0 +FBD1 +FBD2 +FBD3 +FBD4 +FBD5 +FBD6 +FBD7 +FBD8 +FBD9 +FBDA +FBDB +FBDC +FBDD +FBDE +FBDF +FBE0 +FBE1 +FBE2 +FBE3 +FBE4 +FBE5 +FBE6 +FBE7 +FBE8 +FBE9 +FBEA +FBEB +FBEC +FBED +FBEE +FBEF +FBF0 +FBF1 +FBF2 +FBF3 +FBF4 +FBF5 +FBF6 +FBF7 +FBF8 +FBF9 +FBFA +FBFB +FBFC +FC40 +FC41 +FC42 +FC43 +FC44 +FC45 +FC46 +FC47 +FC48 +FC49 +FC4A +FC4B +F040 +F041 +F042 +F043 +F044 +F045 +F046 +F047 +F048 +F049 +F04A +F04B +F04C +F04D +F04E +F04F +F050 +F051 +F052 +F053 +F054 +F055 +F056 +F057 +F058 +F059 +F05A +F05B +F05C +F05D +F05E +F05F +F060 +F061 +F062 +F063 +F064 +F065 +F066 +F067 +F068 +F069 +F06A +F06B +F06C +F06D +F06E +F06F +F070 +F071 +F072 +F073 +F074 +F075 +F076 +F077 +F078 +F079 +F07A +F07B +F07C +F07D +F07E +F080 +F081 +F082 +F083 +F084 +F085 +F086 +F087 +F088 +F089 +F08A +F08B +F08C +F08D +F08E +F08F +F090 +F091 +F092 +F093 +F094 +F095 +F096 +F097 +F098 +F099 +F09A +F09B +F09C +F09D +F09E +F09F +F0A0 +F0A1 +F0A2 +F0A3 +F0A4 +F0A5 +F0A6 +F0A7 +F0A8 +F0A9 +F0AA +F0AB +F0AC +F0AD +F0AE +F0AF +F0B0 +F0B1 +F0B2 +F0B3 +F0B4 +F0B5 +F0B6 +F0B7 +F0B8 +F0B9 +F0BA +F0BB +F0BC +F0BD +F0BE +F0BF +F0C0 +F0C1 +F0C2 +F0C3 +F0C4 +F0C5 +F0C6 +F0C7 +F0C8 +F0C9 +F0CA +F0CB +F0CC +F0CD +F0CE +F0CF +F0D0 +F0D1 +F0D2 +F0D3 +F0D4 +F0D5 +F0D6 +F0D7 +F0D8 +F0D9 +F0DA +F0DB +F0DC +F0DD +F0DE +F0DF +F0E0 +F0E1 +F0E2 +F0E3 +F0E4 +F0E5 +F0E6 +F0E7 +F0E8 +F0E9 +F0EA +F0EB +F0EC +F0ED +F0EE +F0EF +F0F0 +F0F1 +F0F2 +F0F3 +F0F4 +F0F5 +F0F6 +F0F7 +F0F8 +F0F9 +F0FA +F0FB +F0FC +F140 +F141 +F142 +F143 +F144 +F145 +F146 +F147 +F148 +F149 +F14A +F14B +F14C +F14D +F14E +F14F +F150 +F151 +F152 +F153 +F154 +F155 +F156 +F157 +F158 +F159 +F15A +F15B +F15C +F15D +F15E +F15F +F160 +F161 +F162 +F163 +F164 +F165 +F166 +F167 +F168 +F169 +F16A +F16B +F16C +F16D +F16E +F16F +F170 +F171 +F172 +F173 +F174 +F175 +F176 +F177 +F178 +F179 +F17A +F17B +F17C +F17D +F17E +F180 +F181 +F182 +F183 +F184 +F185 +F186 +F187 +F188 +F189 +F18A +F18B +F18C +F18D +F18E +F18F +F190 +F191 +F192 +F193 +F194 +F195 +F196 +F197 +F198 +F199 +F19A +F19B +F19C +F19D +F19E +F19F +F1A0 +F1A1 +F1A2 +F1A3 +F1A4 +F1A5 +F1A6 +F1A7 +F1A8 +F1A9 +F1AA +F1AB +F1AC +F1AD +F1AE +F1AF +F1B0 +F1B1 +F1B2 +F1B3 +F1B4 +F1B5 +F1B6 +F1B7 +F1B8 +F1B9 +F1BA +F1BB +F1BC +F1BD +F1BE +F1BF +F1C0 +F1C1 +F1C2 +F1C3 +F1C4 +F1C5 +F1C6 +F1C7 +F1C8 +F1C9 +F1CA +F1CB +F1CC +F1CD +F1CE +F1CF +F1D0 +F1D1 +F1D2 +F1D3 +F1D4 +F1D5 +F1D6 +F1D7 +F1D8 +F1D9 +F1DA +F1DB +F1DC +F1DD +F1DE +F1DF +F1E0 +F1E1 +F1E2 +F1E3 +F1E4 +F1E5 +F1E6 +F1E7 +F1E8 +F1E9 +F1EA +F1EB +F1EC +F1ED +F1EE +F1EF +F1F0 +F1F1 +F1F2 +F1F3 +F1F4 +F1F5 +F1F6 +F1F7 +F1F8 +F1F9 +F1FA +F1FB +F1FC +F240 +F241 +F242 +F243 +F244 +F245 +F246 +F247 +F248 +F249 +F24A +F24B +F24C +F24D +F24E +F24F +F250 +F251 +F252 +F253 +F254 +F255 +F256 +F257 +F258 +F259 +F25A +F25B +F25C +F25D +F25E +F25F +F260 +F261 +F262 +F263 +F264 +F265 +F266 +F267 +F268 +F269 +F26A +F26B +F26C +F26D +F26E +F26F +F270 +F271 +F272 +F273 +F274 +F275 +F276 +F277 +F278 +F279 +F27A +F27B +F27C +F27D +F27E +F280 +F281 +F282 +F283 +F284 +F285 +F286 +F287 +F288 +F289 +F28A +F28B +F28C +F28D +F28E +F28F +F290 +F291 +F292 +F293 +F294 +F295 +F296 +F297 +F298 +F299 +F29A +F29B +F29C +F29D +F29E +F29F +F2A0 +F2A1 +F2A2 +F2A3 +F2A4 +F2A5 +F2A6 +F2A7 +F2A8 +F2A9 +F2AA +F2AB +F2AC +F2AD +F2AE +F2AF +F2B0 +F2B1 +F2B2 +F2B3 +F2B4 +F2B5 +F2B6 +F2B7 +F2B8 +F2B9 +F2BA +F2BB +F2BC +F2BD +F2BE +F2BF +F2C0 +F2C1 +F2C2 +F2C3 +F2C4 +F2C5 +F2C6 +F2C7 +F2C8 +F2C9 +F2CA +F2CB +F2CC +F2CD +F2CE +F2CF +F2D0 +F2D1 +F2D2 +F2D3 +F2D4 +F2D5 +F2D6 +F2D7 +F2D8 +F2D9 +F2DA +F2DB +F2DC +F2DD +F2DE +F2DF +F2E0 +F2E1 +F2E2 +F2E3 +F2E4 +F2E5 +F2E6 +F2E7 +F2E8 +F2E9 +F2EA +F2EB +F2EC +F2ED +F2EE +F2EF +F2F0 +F2F1 +F2F2 +F2F3 +F2F4 +F2F5 +F2F6 +F2F7 +F2F8 +F2F9 +F2FA +F2FB +F2FC +F340 +F341 +F342 +F343 +F344 +F345 +F346 +F347 +F348 +F349 +F34A +F34B +F34C +F34D +F34E +F34F +F350 +F351 +F352 +F353 +F354 +F355 +F356 +F357 +F358 +F359 +F35A +F35B +F35C +F35D +F35E +F35F +F360 +F361 +F362 +F363 +F364 +F365 +F366 +F367 +F368 +F369 +F36A +F36B +F36C +F36D +F36E +F36F +F370 +F371 +F372 +F373 +F374 +F375 +F376 +F377 +F378 +F379 +F37A +F37B +F37C +F37D +F37E +F380 +F381 +F382 +F383 +F384 +F385 +F386 +F387 +F388 +F389 +F38A +F38B +F38C +F38D +F38E +F38F +F390 +F391 +F392 +F393 +F394 +F395 +F396 +F397 +F398 +F399 +F39A +F39B +F39C +F39D +F39E +F39F +F3A0 +F3A1 +F3A2 +F3A3 +F3A4 +F3A5 +F3A6 +F3A7 +F3A8 +F3A9 +F3AA +F3AB +F3AC +F3AD +F3AE +F3AF +F3B0 +F3B1 +F3B2 +F3B3 +F3B4 +F3B5 +F3B6 +F3B7 +F3B8 +F3B9 +F3BA +F3BB +F3BC +F3BD +F3BE +F3BF +F3C0 +F3C1 +F3C2 +F3C3 +F3C4 +F3C5 +F3C6 +F3C7 +F3C8 +F3C9 +F3CA +F3CB +F3CC +F3CD +F3CE +F3CF +F3D0 +F3D1 +F3D2 +F3D3 +F3D4 +F3D5 +F3D6 +F3D7 +F3D8 +F3D9 +F3DA +F3DB +F3DC +F3DD +F3DE +F3DF +F3E0 +F3E1 +F3E2 +F3E3 +F3E4 +F3E5 +F3E6 +F3E7 +F3E8 +F3E9 +F3EA +F3EB +F3EC +F3ED +F3EE +F3EF +F3F0 +F3F1 +F3F2 +F3F3 +F3F4 +F3F5 +F3F6 +F3F7 +F3F8 +F3F9 +F3FA +F3FB +F3FC +F440 +F441 +F442 +F443 +F444 +F445 +F446 +F447 +F448 +F449 +F44A +F44B +F44C +F44D +F44E +F44F +F450 +F451 +F452 +F453 +F454 +F455 +F456 +F457 +F458 +F459 +F45A +F45B +F45C +F45D +F45E +F45F +F460 +F461 +F462 +F463 +F464 +F465 +F466 +F467 +F468 +F469 +F46A +F46B +F46C +F46D +F46E +F46F +F470 +F471 +F472 +F473 +F474 +F475 +F476 +F477 +F478 +F479 +F47A +F47B +F47C +F47D +F47E +F480 +F481 +F482 +F483 +F484 +F485 +F486 +F487 +F488 +F489 +F48A +F48B +F48C +F48D +F48E +F48F +F490 +F491 +F492 +F493 +F494 +F495 +F496 +F497 +F498 +F499 +F49A +F49B +F49C +F49D +F49E +F49F +F4A0 +F4A1 +F4A2 +F4A3 +F4A4 +F4A5 +F4A6 +F4A7 +F4A8 +F4A9 +F4AA +F4AB +F4AC +F4AD +F4AE +F4AF +F4B0 +F4B1 +F4B2 +F4B3 +F4B4 +F4B5 +F4B6 +F4B7 +F4B8 +F4B9 +F4BA +F4BB +F4BC +F4BD +F4BE +F4BF +F4C0 +F4C1 +F4C2 +F4C3 +F4C4 +F4C5 +F4C6 +F4C7 +F4C8 +F4C9 +F4CA +F4CB +F4CC +F4CD +F4CE +F4CF +F4D0 +F4D1 +F4D2 +F4D3 +F4D4 +F4D5 +F4D6 +F4D7 +F4D8 +F4D9 +F4DA +F4DB +F4DC +F4DD +F4DE +F4DF +F4E0 +F4E1 +F4E2 +F4E3 +F4E4 +F4E5 +F4E6 +F4E7 +F4E8 +F4E9 +F4EA +F4EB +F4EC +F4ED +F4EE +F4EF +F4F0 +F4F1 +F4F2 +F4F3 +F4F4 +F4F5 +F4F6 +F4F7 +F4F8 +F4F9 +F4FA +F4FB +F4FC +F540 +F541 +F542 +F543 +F544 +F545 +F546 +F547 +F548 +F549 +F54A +F54B +F54C +F54D +F54E +F54F +F550 +F551 +F552 +F553 +F554 +F555 +F556 +F557 +F558 +F559 +F55A +F55B +F55C +F55D +F55E +F55F +F560 +F561 +F562 +F563 +F564 +F565 +F566 +F567 +F568 +F569 +F56A +F56B +F56C +F56D +F56E +F56F +F570 +F571 +F572 +F573 +F574 +F575 +F576 +F577 +F578 +F579 +F57A +F57B +F57C +F57D +F57E +F580 +F581 +F582 +F583 +F584 +F585 +F586 +F587 +F588 +F589 +F58A +F58B +F58C +F58D +F58E +F58F +F590 +F591 +F592 +F593 +F594 +F595 +F596 +F597 +F598 +F599 +F59A +F59B +F59C +F59D +F59E +F59F +F5A0 +F5A1 +F5A2 +F5A3 +F5A4 +F5A5 +F5A6 +F5A7 +F5A8 +F5A9 +F5AA +F5AB +F5AC +F5AD +F5AE +F5AF +F5B0 +F5B1 +F5B2 +F5B3 +F5B4 +F5B5 +F5B6 +F5B7 +F5B8 +F5B9 +F5BA +F5BB +F5BC +F5BD +F5BE +F5BF +F5C0 +F5C1 +F5C2 +F5C3 +F5C4 +F5C5 +F5C6 +F5C7 +F5C8 +F5C9 +F5CA +F5CB +F5CC +F5CD +F5CE +F5CF +F5D0 +F5D1 +F5D2 +F5D3 +F5D4 +F5D5 +F5D6 +F5D7 +F5D8 +F5D9 +F5DA +F5DB +F5DC +F5DD +F5DE +F5DF +F5E0 +F5E1 +F5E2 +F5E3 +F5E4 +F5E5 +F5E6 +F5E7 +F5E8 +F5E9 +F5EA +F5EB +F5EC +F5ED +F5EE +F5EF +F5F0 +F5F1 +F5F2 +F5F3 +F5F4 +F5F5 +F5F6 +F5F7 +F5F8 +F5F9 +F5FA +F5FB +F5FC +F640 +F641 +F642 +F643 +F644 +F645 +F646 +F647 +F648 +F649 +F64A +F64B +F64C +F64D +F64E +F64F +F650 +F651 +F652 +F653 +F654 +F655 +F656 +F657 +F658 +F659 +F65A +F65B +F65C +F65D +F65E +F65F +F660 +F661 +F662 +F663 +F664 +F665 +F666 +F667 +F668 +F669 +F66A +F66B +F66C +F66D +F66E +F66F +F670 +F671 +F672 +F673 +F674 +F675 +F676 +F677 +F678 +F679 +F67A +F67B +F67C +F67D +F67E +F680 +F681 +F682 +F683 +F684 +F685 +F686 +F687 +F688 +F689 +F68A +F68B +F68C +F68D +F68E +F68F +F690 +F691 +F692 +F693 +F694 +F695 +F696 +F697 +F698 +F699 +F69A +F69B +F69C +F69D +F69E +F69F +F6A0 +F6A1 +F6A2 +F6A3 +F6A4 +F6A5 +F6A6 +F6A7 +F6A8 +F6A9 +F6AA +F6AB +F6AC +F6AD +F6AE +F6AF +F6B0 +F6B1 +F6B2 +F6B3 +F6B4 +F6B5 +F6B6 +F6B7 +F6B8 +F6B9 +F6BA +F6BB +F6BC +F6BD +F6BE +F6BF +F6C0 +F6C1 +F6C2 +F6C3 +F6C4 +F6C5 +F6C6 +F6C7 +F6C8 +F6C9 +F6CA +F6CB +F6CC +F6CD +F6CE +F6CF +F6D0 +F6D1 +F6D2 +F6D3 +F6D4 +F6D5 +F6D6 +F6D7 +F6D8 +F6D9 +F6DA +F6DB +F6DC +F6DD +F6DE +F6DF +F6E0 +F6E1 +F6E2 +F6E3 +F6E4 +F6E5 +F6E6 +F6E7 +F6E8 +F6E9 +F6EA +F6EB +F6EC +F6ED +F6EE +F6EF +F6F0 +F6F1 +F6F2 +F6F3 +F6F4 +F6F5 +F6F6 +F6F7 +F6F8 +F6F9 +F6FA +F6FB +F6FC +F740 +F741 +F742 +F743 +F744 +F745 +F746 +F747 +F748 +F749 +F74A +F74B +F74C +F74D +F74E +F74F +F750 +F751 +F752 +F753 +F754 +F755 +F756 +F757 +F758 +F759 +F75A +F75B +F75C +F75D +F75E +F75F +F760 +F761 +F762 +F763 +F764 +F765 +F766 +F767 +F768 +F769 +F76A +F76B +F76C +F76D +F76E +F76F +F770 +F771 +F772 +F773 +F774 +F775 +F776 +F777 +F778 +F779 +F77A +F77B +F77C +F77D +F77E +F780 +F781 +F782 +F783 +F784 +F785 +F786 +F787 +F788 +F789 +F78A +F78B +F78C +F78D +F78E +F78F +F790 +F791 +F792 +F793 +F794 +F795 +F796 +F797 +F798 +F799 +F79A +F79B +F79C +F79D +F79E +F79F +F7A0 +F7A1 +F7A2 +F7A3 +F7A4 +F7A5 +F7A6 +F7A7 +F7A8 +F7A9 +F7AA +F7AB +F7AC +F7AD +F7AE +F7AF +F7B0 +F7B1 +F7B2 +F7B3 +F7B4 +F7B5 +F7B6 +F7B7 +F7B8 +F7B9 +F7BA +F7BB +F7BC +F7BD +F7BE +F7BF +F7C0 +F7C1 +F7C2 +F7C3 +F7C4 +F7C5 +F7C6 +F7C7 +F7C8 +F7C9 +F7CA +F7CB +F7CC +F7CD +F7CE +F7CF +F7D0 +F7D1 +F7D2 +F7D3 +F7D4 +F7D5 +F7D6 +F7D7 +F7D8 +F7D9 +F7DA +F7DB +F7DC +F7DD +F7DE +F7DF +F7E0 +F7E1 +F7E2 +F7E3 +F7E4 +F7E5 +F7E6 +F7E7 +F7E8 +F7E9 +F7EA +F7EB +F7EC +F7ED +F7EE +F7EF +F7F0 +F7F1 +F7F2 +F7F3 +F7F4 +F7F5 +F7F6 +F7F7 +F7F8 +F7F9 +F7FA +F7FB +F7FC +F840 +F841 +F842 +F843 +F844 +F845 +F846 +F847 +F848 +F849 +F84A +F84B +F84C +F84D +F84E +F84F +F850 +F851 +F852 +F853 +F854 +F855 +F856 +F857 +F858 +F859 +F85A +F85B +F85C +F85D +F85E +F85F +F860 +F861 +F862 +F863 +F864 +F865 +F866 +F867 +F868 +F869 +F86A +F86B +F86C +F86D +F86E +F86F +F870 +F871 +F872 +F873 +F874 +F875 +F876 +F877 +F878 +F879 +F87A +F87B +F87C +F87D +F87E +F880 +F881 +F882 +F883 +F884 +F885 +F886 +F887 +F888 +F889 +F88A +F88B +F88C +F88D +F88E +F88F +F890 +F891 +F892 +F893 +F894 +F895 +F896 +F897 +F898 +F899 +F89A +F89B +F89C +F89D +F89E +F89F +F8A0 +F8A1 +F8A2 +F8A3 +F8A4 +F8A5 +F8A6 +F8A7 +F8A8 +F8A9 +F8AA +F8AB +F8AC +F8AD +F8AE +F8AF +F8B0 +F8B1 +F8B2 +F8B3 +F8B4 +F8B5 +F8B6 +F8B7 +F8B8 +F8B9 +F8BA +F8BB +F8BC +F8BD +F8BE +F8BF +F8C0 +F8C1 +F8C2 +F8C3 +F8C4 +F8C5 +F8C6 +F8C7 +F8C8 +F8C9 +F8CA +F8CB +F8CC +F8CD +F8CE +F8CF +F8D0 +F8D1 +F8D2 +F8D3 +F8D4 +F8D5 +F8D6 +F8D7 +F8D8 +F8D9 +F8DA +F8DB +F8DC +F8DD +F8DE +F8DF +F8E0 +F8E1 +F8E2 +F8E3 +F8E4 +F8E5 +F8E6 +F8E7 +F8E8 +F8E9 +F8EA +F8EB +F8EC +F8ED +F8EE +F8EF +F8F0 +F8F1 +F8F2 +F8F3 +F8F4 +F8F5 +F8F6 +F8F7 +F8F8 +F8F9 +F8FA +F8FB +F8FC +F940 +F941 +F942 +F943 +F944 +F945 +F946 +F947 +F948 +F949 +F94A +F94B +F94C +F94D +F94E +F94F +F950 +F951 +F952 +F953 +F954 +F955 +F956 +F957 +F958 +F959 +F95A +F95B +F95C +F95D +F95E +F95F +F960 +F961 +F962 +F963 +F964 +F965 +F966 +F967 +F968 +F969 +F96A +F96B +F96C +F96D +F96E +F96F +F970 +F971 +F972 +F973 +F974 +F975 +F976 +F977 +F978 +F979 +F97A +F97B +F97C +F97D +F97E +F980 +F981 +F982 +F983 +F984 +F985 +F986 +F987 +F988 +F989 +F98A +F98B +F98C +F98D +F98E +F98F +F990 +F991 +F992 +F993 +F994 +F995 +F996 +F997 +F998 +F999 +F99A +F99B +F99C +F99D +F99E +F99F +F9A0 +F9A1 +F9A2 +F9A3 +F9A4 +F9A5 +F9A6 +F9A7 +F9A8 +F9A9 +F9AA +F9AB +F9AC +F9AD +F9AE +F9AF +F9B0 +F9B1 +F9B2 +F9B3 +F9B4 +F9B5 +F9B6 +F9B7 +F9B8 +F9B9 +F9BA +F9BB +F9BC +F9BD +F9BE +F9BF +F9C0 +F9C1 +F9C2 +F9C3 +F9C4 +F9C5 +F9C6 +F9C7 +F9C8 +F9C9 +F9CA +F9CB +F9CC +F9CD +F9CE +F9CF +F9D0 +F9D1 +F9D2 +F9D3 +F9D4 +F9D5 +F9D6 +F9D7 +F9D8 +F9D9 +F9DA +F9DB +F9DC +F9DD +F9DE +F9DF +F9E0 +F9E1 +F9E2 +F9E3 +F9E4 +F9E5 +F9E6 +F9E7 +F9E8 +F9E9 +F9EA +F9EB +F9EC +F9ED +F9EE +F9EF +F9F0 +F9F1 +F9F2 +F9F3 +F9F4 +F9F5 +F9F6 +F9F7 +F9F8 +F9F9 +F9FA +F9FB +F9FC +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; +CREATE TABLE t1(c1 varchar(10)) default character set = eucjpms; +insert into t1 values(_ucs2 0x00F7); +insert into t1 values(_eucjpms 0xA1E0); +insert into t1 values(_ujis 0xA1E0); +insert into t1 values(_sjis 0x8180); +insert into t1 values(_cp932 0x8180); +SELECT HEX(c1) FROM t1; +HEX(c1) +A1E0 +A1E0 +A1E0 +A1E0 +A1E0 +DROP TABLE t1; +SET collation_connection='eucjpms_japanese_ci'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +eucjpms_japanese_ci 6109 +eucjpms_japanese_ci 61 +eucjpms_japanese_ci 6120 +drop table t1; +SET collation_connection='eucjpms_bin'; +create table t1 select repeat('a',4000) a; +delete from t1; +insert into t1 values ('a'), ('a '), ('a\t'); +select collation(a),hex(a) from t1 order by a; +collation(a) hex(a) +eucjpms_bin 6109 +eucjpms_bin 61 +eucjpms_bin 6120 +drop table t1; diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index f57d8c191bf..f60dc175cd6 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -220,11 +220,11 @@ select * from t1 where match a against ("te*" in boolean mode)+0; a test drop table t1; -create table t1 (word varchar(255) not null, word2 varchar(255) not null, index(word)); +create table t1 (word varchar(255) not null, word2 varchar(255) not null default '', index(word)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `word` varchar(255) collate latin1_german2_ci NOT NULL default '', + `word` varchar(255) collate latin1_german2_ci NOT NULL, `word2` varchar(255) collate latin1_german2_ci NOT NULL default '', KEY `word` (`word`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci @@ -338,3 +338,9 @@ ss ss ß DROP TABLE t1; +create table t1 (s1 char(5) character set latin1 collate latin1_german2_ci); +insert into t1 values (0xf6) /* this is o-umlaut */; +select * from t1 where length(s1)=1 and s1='oe'; +s1 +ö +drop table t1; diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result index 8bfc6e98226..87b83acfe0f 100644 --- a/mysql-test/r/ctype_many.result +++ b/mysql-test/r/ctype_many.result @@ -2,44 +2,44 @@ DROP TABLE IF EXISTS t1; SET CHARACTER SET latin1; CREATE TABLE t1 ( comment CHAR(32) ASCII NOT NULL, -koi8_ru_f CHAR(32) CHARACTER SET koi8r NOT NULL +koi8_ru_f CHAR(32) CHARACTER SET koi8r NOT NULL default '' ) CHARSET=latin5; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) character set latin1 NOT NULL default '', + `comment` char(32) character set latin1 NOT NULL, `koi8_ru_f` char(32) character set koi8r NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 CHANGE comment comment CHAR(32) CHARACTER SET latin2 NOT NULL; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) character set latin2 NOT NULL default '', + `comment` char(32) character set latin2 NOT NULL, `koi8_ru_f` char(32) character set koi8r NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 ADD latin5_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) character set latin2 NOT NULL default '', + `comment` char(32) character set latin2 NOT NULL, `koi8_ru_f` char(32) character set koi8r NOT NULL default '', - `latin5_f` char(32) NOT NULL default '' + `latin5_f` char(32) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin5 ALTER TABLE t1 DEFAULT CHARSET=latin2; ALTER TABLE t1 ADD latin2_f CHAR(32) NOT NULL; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) NOT NULL default '', + `comment` char(32) NOT NULL, `koi8_ru_f` char(32) character set koi8r NOT NULL default '', - `latin5_f` char(32) character set latin5 NOT NULL default '', - `latin2_f` char(32) NOT NULL default '' + `latin5_f` char(32) character set latin5 NOT NULL, + `latin2_f` char(32) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin2 ALTER TABLE t1 DROP latin2_f, DROP latin5_f; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `comment` char(32) NOT NULL default '', + `comment` char(32) NOT NULL, `koi8_ru_f` char(32) character set koi8r NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin2 INSERT INTO t1 (koi8_ru_f,comment) VALUES ('a','LAT SMALL A'); @@ -219,7 +219,7 @@ z LAT CAPIT Z 2 Ñ CYR CAPIT E 2 Ñ CYR CAPIT YU 2 Ñ CYR CAPIT YA 2 -ALTER TABLE t1 ADD utf8_f CHAR(32) CHARACTER SET utf8 NOT NULL; +ALTER TABLE t1 ADD utf8_f CHAR(32) CHARACTER SET utf8 NOT NULL default ''; UPDATE t1 SET utf8_f=CONVERT(koi8_ru_f USING utf8); SET CHARACTER SET koi8r; SELECT * FROM t1; @@ -340,7 +340,7 @@ CYR CAPIT SOFT SIGN ø ø CYR CAPIT E ü ü CYR CAPIT YU à à CYR CAPIT YA ñ ñ -ALTER TABLE t1 ADD bin_f CHAR(32) BYTE NOT NULL; +ALTER TABLE t1 ADD bin_f CHAR(32) BYTE NOT NULL default ''; UPDATE t1 SET bin_f=koi8_ru_f; SELECT COUNT(DISTINCT bin_f),COUNT(DISTINCT koi8_ru_f),COUNT(DISTINCT utf8_f) FROM t1; COUNT(DISTINCT bin_f) COUNT(DISTINCT koi8_ru_f) COUNT(DISTINCT utf8_f) diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result index dbdb9c1343c..f6e14e1a78f 100644 --- a/mysql-test/r/ctype_mb.result +++ b/mysql-test/r/ctype_mb.result @@ -3,16 +3,16 @@ CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'ÑеÑÑ' as c2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(4) character set utf8 NOT NULL default '', - `c2` char(4) character set utf8 NOT NULL default '' + `c1` varchar(4) character set utf8 NOT NULL default '', + `c2` varchar(4) character set utf8 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DELETE FROM t1; ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(4) character set utf8 NOT NULL default '', - `c2` char(4) character set utf8 NOT NULL default '', + `c1` varchar(4) character set utf8 NOT NULL default '', + `c2` varchar(4) character set utf8 NOT NULL default '', `c3` char(4) character set utf8 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd'); diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 1c75988fd21..da0007fdfbe 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -50,11 +50,11 @@ Tables_in_test SHOW CREATE TABLE ÔÁÂÌÉÃÁ; Table Create Table ÔÁÂÌÉÃÁ CREATE TABLE `ÔÁÂÌÉÃÁ` ( - `ÐÏÌÅ` char(32) character set koi8r NOT NULL default '' COMMENT 'ËÏÍÍÅÎÔÁÒÉÊ ÐÏÌÑ' + `ÐÏÌÅ` char(32) character set koi8r NOT NULL COMMENT 'ËÏÍÍÅÎÔÁÒÉÊ ÐÏÌÑ' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ËÏÍÍÅÎÔÁÒÉÊ ÔÁÂÌÉÃÙ' SHOW FIELDS FROM ÔÁÂÌÉÃÁ; Field Type Null Key Default Extra -ÐÏÌÅ char(32) +ÐÏÌÅ char(32) NO SET CHARACTER SET cp1251; SHOW TABLES; Tables_in_test @@ -62,11 +62,11 @@ Tables_in_test SHOW CREATE TABLE òàáëèöà; Table Create Table òàáëèöà CREATE TABLE `òàáëèöà` ( - `ïîëå` char(32) character set koi8r NOT NULL default '' COMMENT 'êîììåíòàðèé ïîëÿ' + `ïîëå` char(32) character set koi8r NOT NULL COMMENT 'êîììåíòàðèé ïîëÿ' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='êîììåíòàðèé òàáëèöû' SHOW FIELDS FROM òàáëèöà; Field Type Null Key Default Extra -ïîëå char(32) +ïîëå char(32) NO SET CHARACTER SET utf8; SHOW TABLES; Tables_in_test @@ -74,11 +74,11 @@ Tables_in_test SHOW CREATE TABLE ÑаблОÑа; Table Create Table ÑаблОÑа CREATE TABLE `ÑаблОÑа` ( - `пПле` char(32) character set koi8r NOT NULL default '' COMMENT 'кПЌЌеМÑаÑОй пПлÑ' + `пПле` char(32) character set koi8r NOT NULL COMMENT 'кПЌЌеМÑаÑОй пПлÑ' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='кПЌЌеМÑаÑОй ÑаблОÑÑ' SHOW FIELDS FROM ÑаблОÑа; Field Type Null Key Default Extra -пПле char(32) +пПле char(32) NO SET CHARACTER SET koi8r; DROP TABLE ÔÁÂÌÉÃÁ; SET CHARACTER SET default; diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result index 6d8bfe74c4b..5734f7cac86 100644 --- a/mysql-test/r/ctype_tis620.result +++ b/mysql-test/r/ctype_tis620.result @@ -259,8 +259,8 @@ WU ¡Ñ³°ªÒ ¡Ñ³°Ô¡Ò ¡Ñ³·ÔÁÒ -¡Ñ¹µì ¡Ñ¹µÔ¡Ã +¡Ñ¹µì ¡Ñ¹žÔªÒ ¡Ñ¹žÔÁÒ ¡Ñ¹ÂÒÃѵ¹ì @@ -272,8 +272,8 @@ WU ¡Òš¹ÇÃó ¡Òš¹Ò ¡Ò¹ŽÒ -¡Ò¹µì ¡Ò¹µìÃÇÕ +¡Ò¹µì ¡ÒÂÊÔ·žÔì ¡ÒÃÇÔÍà ¡ÒÃØ³Õ @@ -350,8 +350,8 @@ WU à¡ÕÂõÔÈÑ¡ŽÔì à¡ÕÂõÔÊÇÑÊŽÔì à¡×éÍ¡ÙÅ -á¡éÇ á¡éÇãš +á¡éÇ â¡Áşѹžì â¡àÁÈ â¡ÅºÍÅ €Í¹à¹ç€ªÑè¹Êì @@ -368,8 +368,8 @@ WU ¢šÃà¡ÕÂÃµÔ ¢šÃÈÃÕ ¢šÃÈÑ¡ŽÔì -¢¹ÔÉ°ì ¢¹ÔÉ°Ò +¢¹ÔÉ°ì ¢ÇÑãš ¢ÇѪÑ ¢ÇÑàŽ×͹ @@ -412,8 +412,8 @@ WU à€ ÊËÒÂÍÔÁà»ê¡«ì à€.«Õ.ŸÕ. áÁªªÕ¹à¹ÍÃÕè à€·Õ·ÕÅÔÊ«Ôè§ -à€¹ áÁ¡«ì (»ÃÐà·Èä·Â) à€¹ áÁç¡«ì (»ÃÐà·Èä·Â) +à€¹ áÁ¡«ì (»ÃÐà·Èä·Â) à€Ã×ÍÇÑÅÂì ္¹Ù ÍÔ¹àµÍÃìà·ÃŽ á€ÐšéÍ @@ -494,12 +494,12 @@ WU šÓàÃÔ šÓÅͧ šÔ³³ì -šÔµµì šÔµµì¹ÔÉÒ šÔµµÁÒÊ šÔµµÒ šÔµµÔ šÔµµÔ¹¹Ñ¹·ì +šÔµµì šÔµÃÅŽÒ šÔµÃÒ šÔµÃÒÀóì @@ -627,10 +627,10 @@ WU ªÇ¹ŸÔÈ ªÇÅÔµ ªÇÔÈÒ -ªèÍ ªèͩѵà ªèÍ·ÔŸÂì ªèÍÍÑªÑ +ªèÍ ªÐ¹ÔÅ ªÐÍé͹ ªÑªªÑ @@ -758,12 +758,12 @@ WU ³žÔµÒ ³ÀÑ·Ã ³Àѷáóì -³Ã§€ì ³Ã§€ìªÑ ³Ã§€ìŸÑªÃì ³Ã§€ìÄ·žÔì ³Ã§€ìÇÔ·Âì ³Ã§€ìÈÑ¡ŽÔì +³Ã§€ì ³Ã§ÃÑ¡Éì ³Ã§Ä·žÔì ³Ã§ÈÑ¡ŽÔì @@ -862,11 +862,11 @@ WU µÐÇѹ µÑ觚Ñè§ËÅÍŽä¿ µÒà¿çŽ -µØê µØê¡µÒ µØéÁ µØë µØÅÒÅѡɳì +µØê àµçÁàŽª àµ×͹㚠àµ×͹µÒ @@ -917,8 +917,8 @@ WU ·Ñº·ÔÁ ·ÑȹÇÃó ·Ñȹ՟à -·ÑȹÕÂì ·ÑȹÕÂÒ +·ÑȹÕÂì ·ÑÈÇÃó ·èÒ·ÃÒÂášé§ÇѲ¹Ò ·ÔŠÑÁŸÃ @@ -1088,8 +1088,8 @@ WU ¹ÃŸÅ ¹ÃÀÑ·Ãì ¹ÃÒ -¹ÃÔ¹·Ãì ¹ÃÔ¹·ÃìàŽª +¹ÃÔ¹·Ãì ¹ÃÔÈ ¹ÃÔÉ° ¹ÃÕ @@ -1115,8 +1115,8 @@ WU ¹Ñ·žÁ¹ ¹Ñ¹ªÑ ¹Ñ¹·ªÑ -¹Ñ¹·¹ì ¹Ñ¹·¹Ò +¹Ñ¹·¹ì ¹Ñ¹·ŸÃ ¹Ñ¹·ŸÅ ¹Ñ¹·ÁÒÊ @@ -1148,14 +1148,14 @@ WU ¹Ôà«Ð ¹ÔŽ ¹ÔŽÒ -¹ÔµÂì ¹ÔµÂÒ +¹ÔµÂì ¹ÔµÔ ¹ÔµÔŸ§Éì ¹ÔµÔÁÒ ¹Ô·ÃÒ -¹Ô·ÑÈ¹ì ¹Ô·ÑȹÕÂì +¹Ô·ÑÈ¹ì ¹ÔžÔÇŽÕ ¹Ô»»Í¹àŸ¹µì(»ÃÐà·Èä·Â) ¹ÔŸ¹žì @@ -1349,8 +1349,8 @@ WU »ÃÒ³ÕÂì »ÃÒâÁ·Âì »ÃÒö¹Ò -»ÃÔì »ÃÔÒ +»ÃÔì »ÃÔŽÒ »ÃÔ³ŽÒ »ÃÔ·ÑÈ @@ -1454,10 +1454,10 @@ WU Ÿ§ÉìÈÑ¡ŽÔì Ÿ§ÉìÊѹµì Ÿ§Éì͹ѹµì -Ÿš¹ì Ÿš¹Ò Ÿš¹Òö Ÿš¹ÕÂì +Ÿš¹ì ŸšÁÒ¹ ŸšÁÒÅÂì Ÿ¹Á @@ -1504,8 +1504,8 @@ WU ŸÃÊÇÃÃ€ì ŸÃËÁŸÑ²¹ì ŸÃéÍÁªÑ -ŸÃлÃÐᎧ Î͹ŽéÒ€ÒÃìÊì ŸÃлÃÐᎧ Î͹ŽéÒ€ÒÃìÊì šÓ¡ÑŽ +ŸÃлÃÐᎧ Î͹ŽéÒ€ÒÃìÊì ŸÃÐÃÒÁ 3 €ÒÃìà«ç¹àµÍÃì ŸÃÐÃÒÁ 3 Î͹ŽéÒ€ÒÃìÊì ŸÃÔéÁàŸÃÒ @@ -1604,10 +1604,10 @@ WU ŸÙŷͧŸÃçÍŸàŸÍÃìµÕé_ ŸÙŌŠàŸç§ ¿Ù ËÅÔ¹ -àŸçªÃì àŸªÃÃѵ¹ì àŸªÃÅŽÒ àŸªÃÔ¹·Ãì +àŸçªÃì àŸçšÑ¹·Ãì àŸç·ÔŸÂì àŸç¹ÀÒ @@ -1831,7 +1831,6 @@ WU ÃÒàÁÈÃì ÃÒÂÕ¹ Ã×è¹ÇÃÒËì -ÃØé§ ÃØ觷ԟÂì ÃØ觷ÔÇÒ ÃØ觹ÀÒ @@ -1840,11 +1839,12 @@ WU ÃØè§Ãѵ¹ì ÃØè§ÃÑÈÁÕ ÃØè§àÃ×ͧ -ÃØè§âÚ¹ì ÃØè§âڹ좹Êè§ +ÃØè§âÚ¹ì ÃØé§ÅÒÇÃó ÃØè§ÇÔ·Âì ÃØè§ÍÃس +ÃØé§ ÃØšÒ ÃØšÒÀÒ ÃØËÐ¹Ò @@ -1861,8 +1861,8 @@ WU áßៀ €Í¹ÊµÃÑ€ªÑè¹ âç§Ò¹àËÅç¡¡ÃØ§à·ŸÏ âÚ¹ì»ÃÐàÊÃÔ° -Ä·žÔì Ä·žÔªÑ +Ä·žÔì ÅÅÔŽÒ ÅÅÔµÒ ÅÐÁèÍÁ @@ -2050,8 +2050,8 @@ WU ÇÔäÅÇÃó ÇÔÇ ÇÔÇÃÞ¹ì -ÇÔÇѲ¹ì ÇÔÇѲ¹ìªÑ +ÇÔÇѲ¹ì ÇÔÈ¹Õ ÇÔÈÃص ÇÔÈÒÅ @@ -2146,11 +2146,11 @@ WU ÈÈÔÇÔÁÅ ÈÈÔÉÒ ÈÑ¡ŽÒ -ÈÑ¡ŽÔì ÈÑ¡ŽÔìªÑ ÈÑ¡ŽÔìàªÇ§ ÈÑ¡ŽÔìŽÒ ÈÑ¡ŽÔìÇÔºÙÅÂì +ÈÑ¡ŽÔì ÈÑ¡ÃÔ¹·Ãì ÈѹʹÕÂì ÈÒ¹µÔᏎì @@ -2348,18 +2348,18 @@ WU ÊÓÃÒ ÊÓÄ·žÔì ÊÓÅÕ -ÊÔ§Ëì ÊÔ§ËìŸÅ ÊÔ§ËÒ +ÊÔ§Ëì ÊԵҹѹ ÊÔµÒŸÃ ÊÔ·žÒ -ÊÔ·žÔì ÊÔ·žÔªÑ ÊÔ·žÔàŽª ÊÔ·žÔŸÃ ÊÔ·žÔŸÃó ÊÔ·žÔŸÅ +ÊÔ·žÔì ÊÔ¹·ÇÕ ÊÔÃԪѠÊÔÃÔàŽª @@ -2393,15 +2393,15 @@ WU ÊØ¢ÊÇÑÊŽÔì¡Å¡Òà ÊØ¢Êѹµì ÊØ¢ØÁ -ÊØ€¹žì ÊØ€¹žÒ +ÊØ€¹žì ÊØšÒÃÕ ÊØšÔµ ÊØšÔµµÒ ÊØšÔµÃÒ ÊØšÔ¹ŽÒ -ÊØšÔ¹µì ÊØšÔ¹µ¹ì +ÊØšÔ¹µì ÊتŠÊتÑ ÊØªÒŽÒ @@ -2443,13 +2443,13 @@ WU ÊØžÔŽÒ ÊØžÔÈÑ¡ŽÔì ÊØžÕ -ÊØžÕÃì ÊØžÕÃÒ +ÊØžÕÃì Êع·Ã Êع·ÃÕ Êعѷ·Õ -Êعѹ·ì Êعѹ·Ò +Êعѹ·ì ÊØ¹ÔµÒ ÊعÔÈÒ ÊعÔÉÒ @@ -2511,10 +2511,10 @@ WU ÊØÃÈÑ¡ŽÔì ÊØÃÊÔ·žÔì ÊØÃѪ¹Õ¡Ã -ÊØÃѵ¹ì ÊØÃѵ¹ÇŽÕ ÊØÃѵ¹ìÇŽÕ ÊØÃѵ¹Ò +ÊØÃѵ¹ì ÊØÃѵÂÒ ÊØÃÒ§€¹Ò ÊØÃԪѠ@@ -2529,8 +2529,8 @@ WU ÊØÃÕžÒŸÃ ÊØÃÕŸÃ ÊØÃÕÁÒÈ -ÊØÃÕÂì ÊØÃÕÂìŸÃ +ÊØÃÕÂì ÊØÃÕÃѵ¹ì ÊØÅÑŽŽÒ ÊØÇÀÑ·Ãì @@ -2540,9 +2540,9 @@ WU ÊØÇÃÃ³Õ ÊØÇÃóÕÂì ÊØÇÃѵ¹ì -ÊØÇѲ¹ì ÊØÇѲ¹ìªÑ ÊØÇѲ¹Ò +ÊØÇѲ¹ì ÊØÇѵªÑ ÊØÇÒÃÕ ÊØÇԪѠ@@ -2623,8 +2623,8 @@ WU ͹¹·ì ͹ÇѪ ͹ÑÒ -͹ѹµì ͹ѹµÈÑ¡ŽÔì +͹ѹµì Í¹Ø¡ÔµÔ Í¹Ø¡ÙÅ Í¹ØªÒ @@ -2770,8 +2770,8 @@ WU ÍÒÃÒŸÃ ÍÒÃÔÂÒ ÍÒÃÕ -ÍÒÃÕÂì ÍÒÃÕÂì àÊÁÒ©ÔÁ (ä·Âູ¡Ñ¹ +ÍÒÃÕÂì ÍÒÃÕÃѵ¹ì ÍÒÃÕÇÃó ÍӹǠdiff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index c6e803904a3..3803dd932d7 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -2396,3 +2396,27 @@ utf8_unicode_ci 6109 utf8_unicode_ci 61 utf8_unicode_ci 6120 drop table t1; +CREATE TABLE t1 (id int, a varchar(30) character set utf8); +INSERT INTO t1 VALUES (1, _ucs2 0x01310069), (2, _ucs2 0x01310131); +INSERT INTO t1 VALUES (3, _ucs2 0x00690069), (4, _ucs2 0x01300049); +INSERT INTO t1 VALUES (5, _ucs2 0x01300130), (6, _ucs2 0x00490049); +SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu +FROM t1 ORDER BY id; +a la l ll u lu +ıi 3 ıi 3 II 2 +ıı 4 ıı 4 II 2 +ii 2 ii 2 II 2 +Ä°I 3 ii 2 Ä°I 3 +Ä°Ä° 4 ii 2 Ä°Ä° 4 +II 2 ii 2 II 2 +ALTER TABLE t1 MODIFY a VARCHAR(30) character set utf8 collate utf8_turkish_ci; +SELECT a, length(a) la, @l:=lower(a) l, length(@l) ll, @u:=upper(a) u, length(@u) lu +FROM t1 ORDER BY id; +a la l ll u lu +ıi 3 ıi 3 IÄ° 3 +ıı 4 ıı 4 II 2 +ii 2 ii 2 Ä°Ä° 4 +Ä°I 3 iı 3 Ä°I 3 +Ä°Ä° 4 ii 2 Ä°Ä° 4 +II 2 ıı 4 II 2 +DROP TABLE t1; diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 6d00f13737d..4bc2ed0fdc8 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -23,16 +23,24 @@ select binary 'a a' > 'a', binary 'a \0' > 'a', binary 'a\0' > 'a'; binary 'a a' > 'a' binary 'a \0' > 'a' binary 'a\0' > 'a' 1 1 1 SET CHARACTER SET koi8r; -CREATE TABLE t1 (word VARCHAR(64) CHARACTER SET ucs2); -INSERT INTO t1 VALUES (_koi8r'ò'), (X'2004'); +CREATE TABLE t1 (word VARCHAR(64) CHARACTER SET ucs2, word2 CHAR(64) CHARACTER SET ucs2); +INSERT INTO t1 VALUES (_koi8r'ò',_koi8r'ò'), (X'2004',X'2004'); SELECT hex(word) FROM t1 ORDER BY word; hex(word) 0420 2004 +SELECT hex(word2) FROM t1 ORDER BY word2; +hex(word2) +0420 +2004 DELETE FROM t1; -INSERT INTO t1 VALUES (X'042000200020'), (X'200400200020'); +INSERT INTO t1 VALUES (X'042000200020',X'042000200020'), (X'200400200020', X'200400200020'); SELECT hex(word) FROM t1 ORDER BY word; hex(word) +042000200020 +200400200020 +SELECT hex(word2) FROM t1 ORDER BY word2; +hex(word2) 0420 2004 DROP TABLE t1; @@ -66,8 +74,8 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `l` char(10) character set ucs2 NOT NULL default '', - `r` char(10) character set ucs2 NOT NULL default '' + `l` varchar(10) character set ucs2 NOT NULL default '', + `r` varchar(10) character set ucs2 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; create table t2(f1 Char(30)); @@ -85,10 +93,10 @@ create table t1 (a varchar(10) character set ucs2, key(a)); insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); explain select * from t1 where a like 'abc%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 21 NULL 1 Using where; Using index +1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index explain select * from t1 where a like concat('abc','%'); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 21 NULL 1 Using where; Using index +1 SIMPLE t1 range a a 23 NULL 1 Using where; Using index select * from t1 where a like "abc%"; a abc @@ -313,7 +321,7 @@ aardvark 0 aardvarz 0 EXPLAIN SELECT word FROM t1 ORDER BY word; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 128 NULL 6 Using index +1 SIMPLE t1 index NULL PRIMARY 130 NULL 6 Using index SELECT word FROM t1 ORDER by word; word a @@ -337,7 +345,7 @@ INSERT INTO t1 (word) VALUES ("aardvara"); INSERT INTO t1 (word) VALUES ("aardvarz"); EXPLAIN SELECT * FROM t1 ORDER BY WORD; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 128 NULL 6 Using index +1 SIMPLE t1 index NULL PRIMARY 130 NULL 6 Using index SELECT * FROM t1 ORDER BY word; word a @@ -627,7 +635,7 @@ DROP TABLE t1; CREATE TABLE t1 (Field1 int(10) unsigned default '0'); INSERT INTO t1 VALUES ('-1'); Warnings: -Warning 1265 Data truncated for column 'Field1' at row 1 +Warning 1264 Out of range value adjusted for column 'Field1' at row 1 DROP TABLE t1; SET NAMES latin1; CREATE TABLE t1 ( @@ -641,3 +649,30 @@ hex(a) 005B 803D drop table t1; +CREATE TABLE t1 (a varchar(64) character set ucs2, b decimal(10,3)); +INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0); +update t1 set b=a; +SELECT * FROM t1; +a b +1.1 1.100 +2.1 2.100 +DROP TABLE t1; +create table t1 (utext varchar(20) character set ucs2); +insert into t1 values ("lily"); +insert into t1 values ("river"); +prepare stmt from 'select utext from t1 where utext like ?'; +set @param1='%%'; +execute stmt using @param1; +utext +lily +river +execute stmt using @param1; +utext +lily +river +select utext from t1 where utext like '%%'; +utext +lily +river +drop table t1; +deallocate prepare stmt; diff --git a/mysql-test/r/ctype_ucs_binlog.result b/mysql-test/r/ctype_ucs_binlog.result index 29718fa32a1..4267e495959 100644 --- a/mysql-test/r/ctype_ucs_binlog.result +++ b/mysql-test/r/ctype_ucs_binlog.result @@ -3,13 +3,20 @@ create table t2 (c char(30)) charset=ucs2; set @v=convert('abc' using ucs2); reset master; insert into t2 values (@v); -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 User var 1 79 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci -master-bin.000001 119 Query 1 119 use `test`; insert into t2 values (@v) +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 User var 1 138 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci +master-bin.000001 138 Query 1 227 use `test`; insert into t2 values (@v) /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`; use test; SET TIMESTAMP=10000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t2 values (@v); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; drop table t2; diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result index dec1baf4a4b..0bc101d491d 100644 --- a/mysql-test/r/ctype_ujis.result +++ b/mysql-test/r/ctype_ujis.result @@ -123,7 +123,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=ujis SHOW COLUMNS FROM t1; Field Type Null Key Default Extra -a char(1) +a char(1) NO b enum('€¢','€€') YES NULL DROP TABLE t1; CREATE TABLE t1 diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index bb3222ca98b..64c693a292a 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -124,7 +124,7 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d"); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` binary(10) default NULL + `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; date_format("2004-01-19 10:10:10", "%Y-%m-%d") @@ -285,7 +285,7 @@ create table t2 select ifnull(a,a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `ifnull(a,a)` char(5) character set utf8 default NULL + `ifnull(a,a)` varchar(5) character set utf8 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t2; ifnull(a,a) @@ -413,7 +413,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 default NULL, UNIQUE KEY `a` USING HASH (`c`(1)) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t1 values ('aa'); ERROR 23000: Duplicate entry 'aa' for key 1 @@ -449,7 +449,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 default NULL, UNIQUE KEY `a` USING BTREE (`c`(1)) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t1 values ('aa'); ERROR 23000: Duplicate entry 'aa' for key 1 @@ -571,7 +571,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 collate utf8_bin default NULL, UNIQUE KEY `a` USING HASH (`c`(1)) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t1 values ('aa'); ERROR 23000: Duplicate entry 'aa' for key 1 @@ -607,7 +607,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `c` char(10) character set utf8 collate utf8_bin default NULL, UNIQUE KEY `a` USING BTREE (`c`(1)) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 insert into t1 values ('a'),('b'),('c'),('d'),('e'),('f'); insert into t1 values ('aa'); ERROR 23000: Duplicate entry 'aa' for key 1 @@ -809,8 +809,8 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` char(5) character set utf8 NOT NULL default '', - `b` char(15) character set utf8 NOT NULL default '' + `a` varchar(5) character set utf8 NOT NULL default '', + `b` varchar(15) character set utf8 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; drop table t1; @@ -1004,3 +1004,22 @@ hex(a) 5B E880BD drop table t1; +CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8; +INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa'); +SELECT id FROM t1; +id +xxx +aa +yyy +aa +SELECT DISTINCT id FROM t1; +id +xxx +aa +yyy +SELECT DISTINCT id FROM t1 ORDER BY id; +id +aa +xxx +yyy +DROP TABLE t1; diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 2db014c4a52..74ab1e35534 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -79,6 +79,11 @@ concat('%d-%m-%Y',' ','%H:%i:%s.%f')); str_to_date(concat('15-01-2001',' 2:59:58.999'), concat('%d-%m-%Y',' ','%H:%i:%s.%f')) 2001-01-15 02:59:58.999000 +select STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T'); +STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T') +NULL +Warnings: +Error 1411 Incorrect time value: '22.30.61' for function str_to_time create table t1 (date char(30), format char(30) not null); insert into t1 values ('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'), @@ -335,6 +340,22 @@ Tuesday 52 2001 %W %V %Y NULL Tuesday 52 2001 %W %u %x NULL 7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL +Warnings: +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_time +Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_time +Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_time +Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_time +Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_time +Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_time +Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_time select date,format,concat(str_to_date(date, format),'') as con from t1; date format con 2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL @@ -353,6 +374,22 @@ Tuesday 52 2001 %W %V %Y NULL Tuesday 52 2001 %W %u %x NULL 7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL +Warnings: +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_time +Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_time +Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_time +Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_time +Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_time +Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_time +Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_time +Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_time +Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_time truncate table t1; insert into t1 values ('10:20:10AM', '%h:%i:%s'), @@ -391,11 +428,13 @@ NULL select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')); str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')) NULL +Warnings: +Error 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_time explain extended select makedate(1997,1), addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM"),cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME), maketime(23,11,12),microsecond("1997-12-31 23:59:59.000001"); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select makedate(1997,1) AS `makedate(1997,1)`,addtime(_latin1'31.12.97 11.59.59.999999 PM',_latin1'31.12.97 11.59.59.999999 PM') AS `addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002")`,subtime(_latin1'31.12.97 11.59.59.999999 PM',_latin1'31.12.97 11.59.59.999999 PM') AS `subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002")`,timediff(_latin1'01.01.97 11:59:59.000001 PM',_latin1'31.12.95 11:59:59.000002 PM') AS `timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM")`,cast(str_to_date(_latin1'15-01-2001 12:59:59',_latin1'%d-%m-%Y %H:%i:%S') as time) AS `cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME)`,maketime(23,11,12) AS `maketime(23,11,12)`,microsecond(_latin1'1997-12-31 23:59:59.000001') AS `microsecond("1997-12-31 23:59:59.000001")` +Note 1003 select makedate(1997,1) AS `makedate(1997,1)`,addtime(_latin1'31.12.97 11.59.59.999999 PM',_latin1'1 1.1.1.000002') AS `addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002")`,subtime(_latin1'31.12.97 11.59.59.999999 PM',_latin1'1 1.1.1.000002') AS `subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002")`,timediff(_latin1'01.01.97 11:59:59.000001 PM',_latin1'31.12.95 11:59:59.000002 PM') AS `timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM")`,cast(str_to_date(_latin1'15-01-2001 12:59:59',_latin1'%d-%m-%Y %H:%i:%S') as time) AS `cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME)`,maketime(23,11,12) AS `maketime(23,11,12)`,microsecond(_latin1'1997-12-31 23:59:59.000001') AS `microsecond("1997-12-31 23:59:59.000001")` create table t1 (d date); insert into t1 values ('2004-07-14'),('2005-07-14'); select date_format(d,"%d") from t1 order by 1; diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result new file mode 100644 index 00000000000..7db20c2b096 --- /dev/null +++ b/mysql-test/r/default.result @@ -0,0 +1,138 @@ +drop table if exists t1,t2,t3,t4,t5,t6; +drop database if exists mysqltest; +CREATE TABLE t1 (a varchar(30) binary NOT NULL DEFAULT ' ', +b varchar(1) binary NOT NULL DEFAULT ' ', +c varchar(4) binary NOT NULL DEFAULT '0000', +d tinyblob NULL, +e tinyblob NULL, +f tinyblob NULL, +g tinyblob NULL, +h tinyblob NULL, +i tinyblob NULL, +j tinyblob NULL, +k tinyblob NULL, +l tinyblob NULL, +m tinyblob NULL, +n tinyblob NULL, +o tinyblob NULL, +p tinyblob NULL, +q varchar(30) binary NOT NULL DEFAULT ' ', +r varchar(30) binary NOT NULL DEFAULT ' ', +s tinyblob NULL, +t varchar(4) binary NOT NULL DEFAULT ' ', +u varchar(1) binary NOT NULL DEFAULT ' ', +v varchar(30) binary NOT NULL DEFAULT ' ', +w varchar(30) binary NOT NULL DEFAULT ' ', +x tinyblob NULL, +y varchar(5) binary NOT NULL DEFAULT ' ', +z varchar(20) binary NOT NULL DEFAULT ' ', +a1 varchar(30) binary NOT NULL DEFAULT ' ', +b1 tinyblob NULL) +ENGINE=InnoDB DEFAULT CHARACTER SET = latin1 COLLATE latin1_bin; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(30) collate latin1_bin NOT NULL default ' ', + `b` varchar(1) collate latin1_bin NOT NULL default ' ', + `c` varchar(4) collate latin1_bin NOT NULL default '0000', + `d` tinyblob, + `e` tinyblob, + `f` tinyblob, + `g` tinyblob, + `h` tinyblob, + `i` tinyblob, + `j` tinyblob, + `k` tinyblob, + `l` tinyblob, + `m` tinyblob, + `n` tinyblob, + `o` tinyblob, + `p` tinyblob, + `q` varchar(30) collate latin1_bin NOT NULL default ' ', + `r` varchar(30) collate latin1_bin NOT NULL default ' ', + `s` tinyblob, + `t` varchar(4) collate latin1_bin NOT NULL default ' ', + `u` varchar(1) collate latin1_bin NOT NULL default ' ', + `v` varchar(30) collate latin1_bin NOT NULL default ' ', + `w` varchar(30) collate latin1_bin NOT NULL default ' ', + `x` tinyblob, + `y` varchar(5) collate latin1_bin NOT NULL default ' ', + `z` varchar(20) collate latin1_bin NOT NULL default ' ', + `a1` varchar(30) collate latin1_bin NOT NULL default ' ', + `b1` tinyblob +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin +INSERT into t1 (b) values ('1'); +SHOW WARNINGS; +Level Code Message +SELECT * from t1; +a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1 + 1 0000 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +CREATE TABLE t2 (a varchar(30) binary NOT NULL DEFAULT ' ', +b varchar(1) binary NOT NULL DEFAULT ' ', +c varchar(4) binary NOT NULL DEFAULT '0000', +d tinyblob NULL, +e tinyblob NULL, +f tinyblob NULL, +g tinyblob NULL, +h tinyblob NULL, +i tinyblob NULL, +j tinyblob NULL, +k tinyblob NULL, +l tinyblob NULL, +m tinyblob NULL, +n tinyblob NULL, +o tinyblob NULL, +p tinyblob NULL, +q varchar(30) binary NOT NULL DEFAULT ' ', +r varchar(30) binary NOT NULL DEFAULT ' ', +s tinyblob NULL, +t varchar(4) binary NOT NULL DEFAULT ' ', +u varchar(1) binary NOT NULL DEFAULT ' ', +v varchar(30) binary NOT NULL DEFAULT ' ', +w varchar(30) binary NOT NULL DEFAULT ' ', +x tinyblob NULL, +y varchar(5) binary NOT NULL DEFAULT ' ', +z varchar(20) binary NOT NULL DEFAULT ' ', +a1 varchar(30) binary NOT NULL DEFAULT ' ', +b1 tinyblob NULL) +ENGINE=MyISAM DEFAULT CHARACTER SET = latin1 COLLATE latin1_bin; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` varchar(30) collate latin1_bin NOT NULL default ' ', + `b` varchar(1) collate latin1_bin NOT NULL default ' ', + `c` varchar(4) collate latin1_bin NOT NULL default '0000', + `d` tinyblob, + `e` tinyblob, + `f` tinyblob, + `g` tinyblob, + `h` tinyblob, + `i` tinyblob, + `j` tinyblob, + `k` tinyblob, + `l` tinyblob, + `m` tinyblob, + `n` tinyblob, + `o` tinyblob, + `p` tinyblob, + `q` varchar(30) collate latin1_bin NOT NULL default ' ', + `r` varchar(30) collate latin1_bin NOT NULL default ' ', + `s` tinyblob, + `t` varchar(4) collate latin1_bin NOT NULL default ' ', + `u` varchar(1) collate latin1_bin NOT NULL default ' ', + `v` varchar(30) collate latin1_bin NOT NULL default ' ', + `w` varchar(30) collate latin1_bin NOT NULL default ' ', + `x` tinyblob, + `y` varchar(5) collate latin1_bin NOT NULL default ' ', + `z` varchar(20) collate latin1_bin NOT NULL default ' ', + `a1` varchar(30) collate latin1_bin NOT NULL default ' ', + `b1` tinyblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin +INSERT into t2 (b) values ('1'); +SHOW WARNINGS; +Level Code Message +SELECT * from t2; +a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1 + 1 0000 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +drop table t1; +drop table t2; diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result index ceb511a7891..f8ae61b03fb 100644 --- a/mysql-test/r/delayed.result +++ b/mysql-test/r/delayed.result @@ -22,6 +22,9 @@ insert delayed into t1 values (null,"c"); insert delayed into t1 values (3,"d"),(null,"e"); insert delayed into t1 values (3,"this will give an","error"); ERROR 21S01: Column count doesn't match value count at row 1 +show status like 'not_flushed_delayed_rows'; +Variable_name Value +Not_flushed_delayed_rows 0 select * from t1; a b 1 b @@ -29,3 +32,10 @@ a b 3 d 4 e drop table t1; +create table t1 (a int not null primary key); +insert into t1 values (1); +insert delayed into t1 values (1); +select * from t1; +a +1 +drop table t1; diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index 411cd52b4ca..ddfeeac77b5 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -1,4 +1,4 @@ -drop table if exists t1,t11,t12,t2; +drop table if exists t1,t2,t3,t11,t12; CREATE TABLE t1 (a tinyint(3), b tinyint(5)); INSERT INTO t1 VALUES (1,1); INSERT LOW_PRIORITY INTO t1 VALUES (1,2); @@ -172,3 +172,23 @@ a 0 2 DROP TABLE t1; +CREATE TABLE t1 (a int not null,b int not null); +CREATE TABLE t2 (a int not null, b int not null, primary key (a,b)); +CREATE TABLE t3 (a int not null, b int not null, primary key (a,b)); +insert into t1 values (1,1),(2,1),(1,3); +insert into t2 values (1,1),(2,2),(3,3); +insert into t3 values (1,1),(2,1),(1,3); +select * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; +a b a b a b +1 1 1 1 1 1 +2 1 2 2 2 1 +1 3 1 1 1 3 +explain select * from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 index PRIMARY PRIMARY 8 NULL 3 Using where; Using index +1 SIMPLE t3 index PRIMARY PRIMARY 8 NULL 3 Using where; Using index +delete t2.*,t3.* from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b; +select * from t3; +a b +drop table t1,t2,t3; diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index b4d9a921178..7c9d88acf90 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -111,7 +111,7 @@ a b 1 a 2 b 3 c -explain select * from (select * from t1,t2 where t1.a=t2.a) t1; +explain select * from (select t1.*, t2.a as t2a from t1,t2 where t1.a=t2.a) t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> system NULL NULL NULL NULL 1 2 DERIVED t2 system NULL NULL NULL NULL 1 @@ -149,8 +149,8 @@ SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b; (SELECT * FROM (SELECT 1 as a) as a ) 1 select * from (select 1 as a) b left join (select 2 as a) c using(a); -a a -1 NULL +a +1 SELECT * FROM (SELECT 1 UNION SELECT a) b; ERROR 42S22: Unknown column 'a' in 'field list' SELECT 1 as a FROM (SELECT a UNION SELECT 1) b; @@ -318,11 +318,11 @@ create table t2 (a int, b int, primary key (a)); insert into t2 values (1,7),(2,7); explain select a from t2 where a>1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +1 SIMPLE t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index explain select a from (select a from t2 where a>1) tt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> system NULL NULL NULL NULL 1 -2 DERIVED t2 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +2 DERIVED t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index drop table t2; CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`)); insert into t1 values (128, 'rozn', 2, now(), 10),(128, 'rozn', 1, now(), 10); @@ -339,6 +339,11 @@ select distinct sum(b) from (select a,b from t1) y group by a; sum(b) 4 drop table t1; +CREATE TABLE t1 (a char(10), b char(10)); +INSERT INTO t1 VALUES ('root','localhost'), ('root','%'); +SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c; +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t1; create table t1(a int); create table t2(a int); create table t3(a int); @@ -358,3 +363,8 @@ a 3 3 drop table t1, t2, t3; +create table t1 (a int); +create table t2 (a int); +select * from (select * from t1,t2) foo; +ERROR 42S21: Duplicate column name 'a' +drop table t1,t2; diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 8932285b5d0..fa52b5c8330 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -212,7 +212,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL PRIMARY 4 NULL 4 Using index explain SELECT distinct a from t3 order by a desc limit 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index NULL a 5 NULL 204 Using index +1 SIMPLE t3 index NULL a 5 NULL 10 Using index explain SELECT distinct a,b from t3 order by a+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort @@ -388,8 +388,8 @@ SELECT DISTINCTROW email, shipcode FROM t1, t2 WHERE t1.infoID=t2.infoID; email shipcode test1@testdomain.com Z001 test2@testdomain.com Z001 -test3@testdomain.com Z001 test2@testdomain.com R002 +test3@testdomain.com Z001 SELECT DISTINCTROW email FROM t1 ORDER BY dateentered DESC; email test1@testdomain.com @@ -457,12 +457,20 @@ drop table t1,t2; CREATE TABLE t1 ( html varchar(5) default NULL, rin int(11) default '0', -out int(11) default '0' +rout int(11) default '0' ) ENGINE=MyISAM; INSERT INTO t1 VALUES ('1',1,0); -SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; +SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; html prod -1 0.00 +1 0.0000 +drop table t1; +create table t1 (id int, dsc varchar(50)); +insert into t1 values (1, "line number one"), (2, "line number two"), (3, "line number three"); +select distinct id, IFNULL(dsc, '-') from t1; +id IFNULL(dsc, '-') +1 line number one +2 line number two +3 line number three drop table t1; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1),(2),(3),(4),(5); @@ -504,3 +512,11 @@ a 2 b 2 2 4 3 2 5 DROP TABLE t1,t2; +create table t1 (id int, dsc varchar(50)); +insert into t1 values (1, "line number one"), (2, "line number two"), (3, "line number three"); +select distinct id, IFNULL(dsc, '-') from t1; +id IFNULL(dsc, '-') +1 line number one +2 line number two +3 line number three +drop table t1; diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index b07cf16aa64..979e5d48871 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -46,6 +46,7 @@ unlock tables; create database mysqltest; show databases; Database +information_schema mysql mysqltest test @@ -56,6 +57,7 @@ unlock tables; drop database mysqltest; show databases; Database +information_schema mysql test drop database mysqltest; diff --git a/mysql-test/r/drop_temp_table.result b/mysql-test/r/drop_temp_table.result index 5f1f142cde5..26b8511661a 100644 --- a/mysql-test/r/drop_temp_table.result +++ b/mysql-test/r/drop_temp_table.result @@ -11,12 +11,11 @@ select get_lock("a",10); get_lock("a",10) 1 show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # create database `drop-temp+table-test` master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int) master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int) master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int) master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1` -master-bin.000001 # Query 1 # use `drop-temp+table-test`; DO RELEASE_LOCK("a") drop database `drop-temp+table-test`; diff --git a/mysql-test/r/endspace.result b/mysql-test/r/endspace.result index 96210a0e16d..0e68418a80f 100644 --- a/mysql-test/r/endspace.result +++ b/mysql-test/r/endspace.result @@ -43,7 +43,7 @@ teststring teststring explain select * from t1 order by text1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL key1 32 NULL 3 Using index +1 SIMPLE t1 index NULL key1 34 NULL 3 Using index alter table t1 modify text1 char(32) binary not null; check table t1; Table Op Msg_type Msg_text @@ -99,15 +99,15 @@ concat('|', text1, '|') explain select concat('|', text1, '|') from t1 where text1='teststring '; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range key1 key1 22 NULL 2 Using where -select * from t1 where text1 like 'teststring_%'; -text1 -teststring -teststring -select * from t1 where text1='teststring' or text1 like 'teststring_%'; -text1 -teststring -teststring -teststring +select concat('|', text1, '|') from t1 where text1 like 'teststring_%'; +concat('|', text1, '|') +|teststring | +|teststring | +select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%'; +concat('|', text1, '|') +|teststring | +|teststring| +|teststring | select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring\t'; concat('|', text1, '|') |teststring| @@ -121,14 +121,14 @@ concat('|', text1, '|') drop table t1; create table t1 (text1 varchar(32) not NULL, KEY key1 (text1)) pack_keys=0; insert into t1 values ('teststring'), ('nothing'), ('teststring\t'); -select * from t1 where text1='teststring' or text1 like 'teststring_%'; -text1 -teststring -teststring -select * from t1 where text1='teststring' or text1 >= 'teststring\t'; -text1 -teststring -teststring +select concat('|', text1, '|') from t1 where text1='teststring' or text1 like 'teststring_%'; +concat('|', text1, '|') +|teststring | +|teststring| +select concat('|', text1, '|') from t1 where text1='teststring' or text1 >= 'teststring\t'; +concat('|', text1, '|') +|teststring | +|teststring| drop table t1; create table t1 (text1 varchar(32) not NULL, KEY key1 using BTREE (text1)) engine=heap; insert into t1 values ('teststring'), ('nothing'), ('teststring\t'); @@ -151,7 +151,7 @@ teststring teststring explain select * from t1 order by text1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL key1 32 NULL 3 +1 SIMPLE t1 index NULL key1 34 NULL 3 alter table t1 modify text1 char(32) binary not null; select * from t1 order by text1; text1 @@ -178,7 +178,7 @@ teststring teststring explain select * from t1 order by text1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL key1 32 NULL 3 Using index +1 SIMPLE t1 index NULL key1 34 NULL 3 Using index alter table t1 modify text1 char(32) binary not null; select * from t1 order by text1; text1 @@ -200,13 +200,13 @@ teststring teststring select text1, length(text1) from t1 where text1='teststring' or text1 like 'teststring_%'; text1 length(text1) -teststring 10 teststring 11 +teststring 10 teststring 11 select text1, length(text1) from t1 where text1='teststring' or text1 >= 'teststring\t'; text1 length(text1) -teststring 10 teststring 11 +teststring 10 teststring 11 select concat('|', text1, '|') from t1 order by text1; concat('|', text1, '|') diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index d0011c8deb6..0c84f24a2e4 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -9,9 +9,9 @@ create table t1 (a int); select count(test.t1.b) from t1; ERROR 42S22: Unknown column 'test.t1.b' in 'field list' select count(not_existing_database.t1) from t1; -ERROR 42S02: Unknown table 'not_existing_database' in field list +ERROR 42S22: Unknown column 'not_existing_database.t1' in 'field list' select count(not_existing_database.t1.a) from t1; -ERROR 42S02: Unknown table 'not_existing_database.t1' in field list +ERROR 42S22: Unknown column 'not_existing_database.t1.a' in 'field list' select count(not_existing_database.t1.a) from not_existing_database.t1; Got one of the listed errors select 1 from t1 order by 2; @@ -23,3 +23,8 @@ ERROR 42S22: Unknown column 't1.b' in 'order clause' select count(*),b from t1; ERROR 42S22: Unknown column 'b' in 'field list' drop table t1; +create table t1 (a int(256)); +ERROR 42000: Display width out of range for column 'a' (max = 255) +set sql_mode='traditional'; +create table t1 (a varchar(66000)); +ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result new file mode 100644 index 00000000000..7692991c112 --- /dev/null +++ b/mysql-test/r/federated.result @@ -0,0 +1,1463 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +stop slave; +DROP DATABASE IF EXISTS federated; +CREATE DATABASE federated; +DROP DATABASE IF EXISTS federated; +CREATE DATABASE federated; +DROP TABLE IF EXISTS federated.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:@/too/many/items/federated/t1'; +ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1:@/too/many/items/federated/t1' is not in the correct format +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1'; +ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1' is not in the correct format +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t3'; +ERROR HY000: Can't create federated table. Foreign data src error : ': 1146 : Table 'federated.t3' doesn't exist' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://user:pass@127.0.0.1:SLAVE_PORT/federated/t1'; +ERROR HY000: Unable to connect to foreign data source - database ' database federated username user hostname 127.0.0.1'! +DROP TABLE IF EXISTS federated.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); +INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); +SELECT * FROM federated.t1; +id name +1 foo +2 fee +DELETE FROM federated.t1; +DROP TABLE federated.t1; +DROP TABLE IF EXISTS federated.t2; +Warnings: +Note 1051 Unknown table 't2' +CREATE TABLE federated.t2 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t2 (id, name) VALUES (1, 'foo'); +INSERT INTO federated.t2 (id, name) VALUES (2, 'fee'); +SELECT * FROM federated.t2; +id name +1 foo +2 fee +DROP TABLE federated.t2; +DROP TABLE IF EXISTS federated.t1; +DROP TABLE IF EXISTS federated.`t1%`; +Warnings: +Note 1051 Unknown table 't1%' +CREATE TABLE federated.`t1%` ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1%'; +INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); +INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); +SELECT * FROM federated.t1; +id name +1 foo +2 fee +DELETE FROM federated.t1; +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.`t1%` ( +`id` int(20) NOT NULL, +`name` varchar(32) NOT NULL default '' + ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1%'; +INSERT INTO federated.`t1%` (id, name) VALUES (1, 'foo'); +INSERT INTO federated.`t1%` (id, name) VALUES (2, 'fee'); +SELECT * FROM federated.`t1%`; +id name +1 foo +2 fee +DELETE FROM federated.`t1%`; +DROP TABLE IF EXISTS federated.`t1%`; +DROP TABLE IF EXISTS federated.`t1%`; +DROP TABLE IF EXISTS federated.t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32) NOT NULL default '', +`other` int(20) NOT NULL default '0', +`created` datetime default '2004-04-04 04:04:04', +PRIMARY KEY (`id`)) +DEFAULT CHARSET=latin1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32) NOT NULL default '', +`other` int(20) NOT NULL default '0', +`created` datetime default '2004-04-04 04:04:04', +PRIMARY KEY (`id`)) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111); +INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222); +INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333); +INSERT INTO federated.t1 (name, other) VALUES ('Fourth Name', 44444); +INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555); +INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666); +INSERT INTO federated.t1 (name, other) VALUES ('Seventh Name', 77777); +INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888); +INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999); +INSERT INTO federated.t1 (name, other) VALUES ('Tenth Name', 101010); +SELECT * FROM federated.t1; +id name other created +1 First Name 11111 2004-04-04 04:04:04 +2 Second Name 22222 2004-04-04 04:04:04 +3 Third Name 33333 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +8 Eigth Name 88888 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +10 Tenth Name 101010 2004-04-04 04:04:04 +SELECT * FROM federated.t1 WHERE id = 5; +id name other created +5 Fifth Name 55555 2004-04-04 04:04:04 +SELECT * FROM federated.t1 WHERE name = 'Sixth Name'; +id name other created +6 Sixth Name 66666 2004-04-04 04:04:04 +SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name'; +id name other created +6 Sixth Name 66666 2004-04-04 04:04:04 +SELECT * FROM federated.t1 WHERE name = 'Sixth Name' AND other = 44444; +id name other created +SELECT * FROM federated.t1 WHERE name like '%th%'; +id name other created +3 Third Name 33333 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +8 Eigth Name 88888 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +10 Tenth Name 101010 2004-04-04 04:04:04 +UPDATE federated.t1 SET name = '3rd name' WHERE id = 3; +SELECT * FROM federated.t1 WHERE name = '3rd name'; +id name other created +3 3rd name 33333 2004-04-04 04:04:04 +UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name'; +SELECT * FROM federated.t1 WHERE name = 'Third name'; +id name other created +3 Third name 33333 2004-04-04 04:04:04 +SELECT * FROM federated.t1 ORDER BY id DESC; +id name other created +10 Tenth Name 101010 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +8 Eigth Name 88888 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +3 Third name 33333 2004-04-04 04:04:04 +2 Second Name 22222 2004-04-04 04:04:04 +1 First Name 11111 2004-04-04 04:04:04 +SELECT * FROM federated.t1 ORDER BY name; +id name other created +8 Eigth Name 88888 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +1 First Name 11111 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +2 Second Name 22222 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +10 Tenth Name 101010 2004-04-04 04:04:04 +3 Third name 33333 2004-04-04 04:04:04 +SELECT * FROM federated.t1 ORDER BY name DESC; +id name other created +3 Third name 33333 2004-04-04 04:04:04 +10 Tenth Name 101010 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +2 Second Name 22222 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +1 First Name 11111 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +8 Eigth Name 88888 2004-04-04 04:04:04 +SELECT * FROM federated.t1 ORDER BY name ASC; +id name other created +8 Eigth Name 88888 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +1 First Name 11111 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +2 Second Name 22222 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +10 Tenth Name 101010 2004-04-04 04:04:04 +3 Third name 33333 2004-04-04 04:04:04 +SELECT * FROM federated.t1 GROUP BY other; +id name other created +1 First Name 11111 2004-04-04 04:04:04 +2 Second Name 22222 2004-04-04 04:04:04 +3 Third name 33333 2004-04-04 04:04:04 +4 Fourth Name 44444 2004-04-04 04:04:04 +5 Fifth Name 55555 2004-04-04 04:04:04 +6 Sixth Name 66666 2004-04-04 04:04:04 +7 Seventh Name 77777 2004-04-04 04:04:04 +8 Eigth Name 88888 2004-04-04 04:04:04 +9 Ninth Name 99999 2004-04-04 04:04:04 +10 Tenth Name 101010 2004-04-04 04:04:04 +DELETE FROM federated.t1 WHERE id = 5; +SELECT * FROM federated.t1 WHERE id = 5; +id name other created +DELETE FROM federated.t1; +SELECT * FROM federated.t1 WHERE id = 5; +id name other created +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32) NOT NULL default '', +`other` int(20) NOT NULL default '0', +`created` datetime NOT NULL, +PRIMARY KEY (`id`), +key name(`name`), +key other(`other`), +key created(`created`)) +DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32) NOT NULL default '', +`other` int(20) NOT NULL default '0', +`created` datetime NOT NULL, +PRIMARY KEY (`id`), +key name(`name`), +key other(`other`), +key created(`created`)) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (name, other, created) +VALUES ('First Name', 11111, '2004-01-01 01:01:01'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Second Name', 22222, '2004-01-23 02:43:00'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Third Name', 33333, '2004-02-14 02:14:00'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Fourth Name', 44444, '2003-04-05 00:00:00'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Fifth Name', 55555, '2001-02-02 02:02:02'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Sixth Name', 66666, '2005-06-06 15:30:00'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Seventh Name', 77777, '2003-12-12 18:32:00'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Eigth Name', 88888, '2005-03-12 11:00:00'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Ninth Name', 99999, '2005-03-12 11:00:01'); +INSERT INTO federated.t1 (name, other, created) +VALUES ('Tenth Name', 101010, '2005-03-12 12:00:01'); +SELECT * FROM federated.t1; +id name other created +1 First Name 11111 2004-01-01 01:01:01 +2 Second Name 22222 2004-01-23 02:43:00 +3 Third Name 33333 2004-02-14 02:14:00 +4 Fourth Name 44444 2003-04-05 00:00:00 +5 Fifth Name 55555 2001-02-02 02:02:02 +6 Sixth Name 66666 2005-06-06 15:30:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +8 Eigth Name 88888 2005-03-12 11:00:00 +9 Ninth Name 99999 2005-03-12 11:00:01 +10 Tenth Name 101010 2005-03-12 12:00:01 +SELECT * FROM federated.t1 WHERE id = 5; +id name other created +5 Fifth Name 55555 2001-02-02 02:02:02 +SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name'; +id name other created +6 Sixth Name 66666 2005-06-06 15:30:00 +SELECT * FROM federated.t1 WHERE other = 44444; +id name other created +4 Fourth Name 44444 2003-04-05 00:00:00 +SELECT * FROM federated.t1 WHERE name like '%th%'; +id name other created +3 Third Name 33333 2004-02-14 02:14:00 +4 Fourth Name 44444 2003-04-05 00:00:00 +5 Fifth Name 55555 2001-02-02 02:02:02 +6 Sixth Name 66666 2005-06-06 15:30:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +8 Eigth Name 88888 2005-03-12 11:00:00 +9 Ninth Name 99999 2005-03-12 11:00:01 +10 Tenth Name 101010 2005-03-12 12:00:01 +UPDATE federated.t1 SET name = '3rd name' WHERE id = 3; +SELECT * FROM federated.t1 WHERE name = '3rd name'; +id name other created +3 3rd name 33333 2004-02-14 02:14:00 +UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name'; +SELECT * FROM federated.t1 WHERE name = 'Third name'; +id name other created +3 Third name 33333 2004-02-14 02:14:00 +SELECT * FROM federated.t1 ORDER BY id DESC; +id name other created +10 Tenth Name 101010 2005-03-12 12:00:01 +9 Ninth Name 99999 2005-03-12 11:00:01 +8 Eigth Name 88888 2005-03-12 11:00:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +6 Sixth Name 66666 2005-06-06 15:30:00 +5 Fifth Name 55555 2001-02-02 02:02:02 +4 Fourth Name 44444 2003-04-05 00:00:00 +3 Third name 33333 2004-02-14 02:14:00 +2 Second Name 22222 2004-01-23 02:43:00 +1 First Name 11111 2004-01-01 01:01:01 +SELECT * FROM federated.t1 ORDER BY name; +id name other created +8 Eigth Name 88888 2005-03-12 11:00:00 +5 Fifth Name 55555 2001-02-02 02:02:02 +1 First Name 11111 2004-01-01 01:01:01 +4 Fourth Name 44444 2003-04-05 00:00:00 +9 Ninth Name 99999 2005-03-12 11:00:01 +2 Second Name 22222 2004-01-23 02:43:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +6 Sixth Name 66666 2005-06-06 15:30:00 +10 Tenth Name 101010 2005-03-12 12:00:01 +3 Third name 33333 2004-02-14 02:14:00 +SELECT * FROM federated.t1 ORDER BY name DESC; +id name other created +3 Third name 33333 2004-02-14 02:14:00 +10 Tenth Name 101010 2005-03-12 12:00:01 +6 Sixth Name 66666 2005-06-06 15:30:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +2 Second Name 22222 2004-01-23 02:43:00 +9 Ninth Name 99999 2005-03-12 11:00:01 +4 Fourth Name 44444 2003-04-05 00:00:00 +1 First Name 11111 2004-01-01 01:01:01 +5 Fifth Name 55555 2001-02-02 02:02:02 +8 Eigth Name 88888 2005-03-12 11:00:00 +SELECT * FROM federated.t1 ORDER BY name ASC; +id name other created +8 Eigth Name 88888 2005-03-12 11:00:00 +5 Fifth Name 55555 2001-02-02 02:02:02 +1 First Name 11111 2004-01-01 01:01:01 +4 Fourth Name 44444 2003-04-05 00:00:00 +9 Ninth Name 99999 2005-03-12 11:00:01 +2 Second Name 22222 2004-01-23 02:43:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +6 Sixth Name 66666 2005-06-06 15:30:00 +10 Tenth Name 101010 2005-03-12 12:00:01 +3 Third name 33333 2004-02-14 02:14:00 +SELECT * FROM federated.t1 GROUP BY other; +id name other created +1 First Name 11111 2004-01-01 01:01:01 +2 Second Name 22222 2004-01-23 02:43:00 +3 Third name 33333 2004-02-14 02:14:00 +4 Fourth Name 44444 2003-04-05 00:00:00 +5 Fifth Name 55555 2001-02-02 02:02:02 +6 Sixth Name 66666 2005-06-06 15:30:00 +7 Seventh Name 77777 2003-12-12 18:32:00 +8 Eigth Name 88888 2005-03-12 11:00:00 +9 Ninth Name 99999 2005-03-12 11:00:01 +10 Tenth Name 101010 2005-03-12 12:00:01 +DELETE FROM federated.t1 WHERE id = 5; +SELECT * FROM federated.t1 WHERE id = 5; +id name other created +DELETE FROM federated.t1; +SELECT * FROM federated.t1 WHERE id = 5; +id name other created +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32), +`other` varchar(20), +PRIMARY KEY (`id`) ); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32), +`other` varchar(20), +PRIMARY KEY (`id`) ) +ENGINE="FEDERATED" + DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111); +INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL); +INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333); +INSERT INTO federated.t1 (name, other) VALUES (NULL, NULL); +INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555); +INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666); +INSERT INTO federated.t1 (name) VALUES ('Seventh Name'); +INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888); +INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999); +INSERT INTO federated.t1 (other) VALUES ('fee fie foe fum'); +SELECT * FROM federated.t1 WHERE other IS NULL; +id name other +2 Second Name NULL +4 NULL NULL +7 Seventh Name NULL +SELECT * FROM federated.t1 WHERE name IS NULL; +id name other +4 NULL NULL +10 NULL fee fie foe fum +SELECT * FROM federated.t1 WHERE name IS NULL and other IS NULL; +id name other +4 NULL NULL +SELECT * FROM federated.t1 WHERE name IS NULL or other IS NULL; +id name other +2 Second Name NULL +4 NULL NULL +7 Seventh Name NULL +10 NULL fee fie foe fum +UPDATE federated.t1 +SET name = 'Fourth Name', other = 'four four four' +WHERE name IS NULL AND other IS NULL; +UPDATE federated.t1 SET other = 'two two two two' WHERE name = 'Second Name'; +UPDATE federated.t1 SET other = 'seven seven' WHERE name like 'Sev%'; +UPDATE federated.t1 SET name = 'Tenth Name' WHERE other like 'fee fie%'; +SELECT * FROM federated.t1 WHERE name IS NULL OR other IS NULL ; +id name other +SELECT * FROM federated.t1; +id name other +1 First Name 11111 +2 Second Name two two two two +3 Third Name 33333 +4 Fourth Name four four four +5 Fifth Name 55555 +6 Sixth Name 66666 +7 Seventh Name seven seven +8 Eigth Name 88888 +9 Ninth Name 99999 +10 Tenth Name fee fie foe fum +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32) NOT NULL DEFAULT '', +`other` varchar(20) NOT NULL DEFAULT '', +PRIMARY KEY (`id`), +KEY nameoth (name, other) ); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`name` varchar(32) NOT NULL DEFAULT '', +`other` varchar(20) NOT NULL DEFAULT '', +PRIMARY KEY (`id`), +KEY nameoth (name, other)) +ENGINE="FEDERATED" DEFAULT +CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111'); +INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222'); +INSERT INTO federated.t1 (name, other) VALUES ('Third Name', '3333'); +SELECT * FROM federated.t1 WHERE name = 'Second Name'; +id name other +2 Second Name 2222 +SELECT * FROM federated.t1 WHERE other = '2222'; +id name other +2 Second Name 2222 +SELECT * FROM federated.t1 WHERE name = 'Third Name'; +id name other +3 Third Name 3333 +SELECT * FROM federated.t1 WHERE name = 'Third Name' AND other = '3333'; +id name other +3 Third Name 3333 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int NOT NULL auto_increment, +`name` char(32) NOT NULL DEFAULT '', +`bincol` binary(4) NOT NULL, +`floatval` decimal(5,2) NOT NULL DEFAULT 0.0, +`other` int NOT NULL DEFAULT 0, +PRIMARY KEY (id), +KEY nameoth(name, other), +KEY bincol(bincol), +KEY floatval(floatval)); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int NOT NULL auto_increment, +`name` char(32) NOT NULL DEFAULT '', +`bincol` binary(4) NOT NULL, +`floatval` decimal(5,2) NOT NULL DEFAULT 0.0, +`other` int NOT NULL DEFAULT 0, +PRIMARY KEY (id), +KEY nameoth(name,other), +KEY bincol(bincol), +KEY floatval(floatval)) +ENGINE="FEDERATED" + DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (name, bincol, floatval, other) +VALUES ('first', 0x65, 11.11, 1111); +INSERT INTO federated.t1 (name, bincol, floatval, other) +VALUES ('second', 0x66, 22.22, 2222); +INSERT INTO federated.t1 (name, bincol, floatval, other) +VALUES ('third', 'g', 22.22, 2222); +SELECT * FROM federated.t1; +id name bincol floatval other +1 first e 11.11 1111 +2 second f 22.22 2222 +3 third g 22.22 2222 +SELECT * FROM federated.t1 WHERE name = 'second'; +id name bincol floatval other +2 second f 22.22 2222 +SELECT * FROM federated.t1 WHERE bincol= 'f'; +id name bincol floatval other +2 second f 22.22 2222 +SELECT * FROM federated.t1 WHERE bincol= 0x66; +id name bincol floatval other +2 second f 22.22 2222 +SELECT * FROM federated.t1 WHERE bincol= 0x67; +id name bincol floatval other +3 third g 22.22 2222 +SELECT * FROM federated.t1 WHERE bincol= 'g'; +id name bincol floatval other +3 third g 22.22 2222 +SELECT * FROM federated.t1 WHERE floatval=11.11; +id name bincol floatval other +1 first e 11.11 1111 +SELECT * FROM federated.t1 WHERE name='third'; +id name bincol floatval other +3 third g 22.22 2222 +SELECT * FROM federated.t1 WHERE other=2222; +id name bincol floatval other +2 second f 22.22 2222 +3 third g 22.22 2222 +SELECT * FROM federated.t1 WHERE name='third' and other=2222; +id name bincol floatval other +3 third g 22.22 2222 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int NOT NULL auto_increment, +`col1` int(10) NOT NULL DEFAULT 0, +`col2` varchar(64) NOT NULL DEFAULT '', +`col3` int(20) NOT NULL, +`col4` int(40) NOT NULL, +primary key (`id`, `col1`, `col2`, `col3`, `col4`), +key col1(col1), +key col2(col2), +key col3(col3), +key col4(col4)); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int NOT NULL auto_increment, +`col1` int(10) NOT NULL DEFAULT 0, +`col2` varchar(64) NOT NULL DEFAULT '', +`col3` int(20) NOT NULL, +`col4` int(40) NOT NULL, +primary key (`id`, `col1`, `col2`, `col3`, `col4`), +key col1(col1), +key col2(col2), +key col3(col3), +key col4(col4)) +ENGINE="FEDERATED" + COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (1, 'one One', 11, 1111); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (2, 'Two two', 22, 2222); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (3, 'three Three', 33, 33333); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (4, 'fourfourfour', 444, 4444444); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (5, 'five 5 five five 5', 5, 55555); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (6, 'six six Sixsix', 6666, 6); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (7, 'seven Sevenseven', 77777, 7777); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (8, 'eight eight eight', 88888, 88); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (9, 'nine Nine', 999999, 999999); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES (10, 'Tenth ten TEN', 1010101, 1010); +SELECT * FROM federated.t1 WHERE col2 = 'two two'; +id col1 col2 col3 col4 +2 2 Two two 22 2222 +SELECT * FROM federated.t1 WHERE col2 = 'two Two'; +id col1 col2 col3 col4 +2 2 Two two 22 2222 +SELECT * FROM federated.t1 WHERE id = 3; +id col1 col2 col3 col4 +3 3 three Three 33 33333 +SELECT * FROM federated.t1 WHERE id = 3 AND col1 = 3; +id col1 col2 col3 col4 +3 3 three Three 33 33333 +SELECT * FROM federated.t1 WHERE id = 4 AND col1 = 4 AND col2 = 'Two two'; +id col1 col2 col3 col4 +SELECT * FROM federated.t1 WHERE id = 4 AND col1 = 4 AND col2 = 'fourfourfour'; +id col1 col2 col3 col4 +4 4 fourfourfour 444 4444444 +SELECT * FROM federated.t1 WHERE id = 5 AND col2 = 'five 5 five five 5' +AND col3 = 5; +id col1 col2 col3 col4 +5 5 five 5 five five 5 5 55555 +SELECT * FROM federated.t1 WHERE id = 5 AND col2 = 'five 5 five five 5' +AND col3 = 5 +AND col4 = 55555; +id col1 col2 col3 col4 +5 5 five 5 five five 5 5 55555 +SELECT * FROM federated.t1 WHERE id = 5 +AND col2 = 'Two two' AND col3 = 22 +AND col4 = 33; +id col1 col2 col3 col4 +SELECT * FROM federated.t1 WHERE id = 5 +AND col2 = 'five 5 five five 5' AND col3 = 5 +AND col4 = 55555; +id col1 col2 col3 col4 +5 5 five 5 five five 5 5 55555 +SELECT * FROM federated.t1 WHERE (id = 5 AND col2 = 'five 5 five five 5') +OR (col2 = 'three Three' AND col3 = 33); +id col1 col2 col3 col4 +5 5 five 5 five five 5 5 55555 +3 3 three Three 33 33333 +SELECT * FROM federated.t1 WHERE (id = 5 AND col2 = 'Two two') +OR (col2 = 444 AND col3 = 4444444); +id col1 col2 col3 col4 +SELECT * FROM federated.t1 WHERE id = 1 +OR col1 = 10 +OR col2 = 'Two two' +OR col3 = 33 +OR col4 = 4444444; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +4 4 fourfourfour 444 4444444 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE id > 5; +id col1 col2 col3 col4 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +8 8 eight eight eight 88888 88 +9 9 nine Nine 999999 999999 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE id >= 5; +id col1 col2 col3 col4 +5 5 five 5 five five 5 5 55555 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +8 8 eight eight eight 88888 88 +9 9 nine Nine 999999 999999 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE id < 5; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +4 4 fourfourfour 444 4444444 +SELECT * FROM federated.t1 WHERE id <= 5; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +4 4 fourfourfour 444 4444444 +5 5 five 5 five five 5 5 55555 +SELECT * FROM federated.t1 WHERE id != 5; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +4 4 fourfourfour 444 4444444 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +8 8 eight eight eight 88888 88 +9 9 nine Nine 999999 999999 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE id > 3 AND id < 7; +id col1 col2 col3 col4 +4 4 fourfourfour 444 4444444 +5 5 five 5 five five 5 5 55555 +6 6 six six Sixsix 6666 6 +SELECT * FROM federated.t1 WHERE id > 3 AND id <= 7; +id col1 col2 col3 col4 +4 4 fourfourfour 444 4444444 +5 5 five 5 five five 5 5 55555 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +SELECT * FROM federated.t1 WHERE id >= 3 AND id <= 7; +id col1 col2 col3 col4 +3 3 three Three 33 33333 +4 4 fourfourfour 444 4444444 +5 5 five 5 five five 5 5 55555 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +SELECT * FROM federated.t1 WHERE id < 3 AND id <= 7; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +SELECT * FROM federated.t1 WHERE id < 3 AND id > 7; +id col1 col2 col3 col4 +SELECT * FROM federated.t1 WHERE id < 3 OR id > 7; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +8 8 eight eight eight 88888 88 +9 9 nine Nine 999999 999999 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE col2 = 'three Three'; +id col1 col2 col3 col4 +3 3 three Three 33 33333 +SELECT * FROM federated.t1 WHERE col2 > 'one'; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE col2 LIKE 's%'; +id col1 col2 col3 col4 +7 7 seven Sevenseven 77777 7777 +6 6 six six Sixsix 6666 6 +SELECT * FROM federated.t1 WHERE col2 LIKE 'si%'; +id col1 col2 col3 col4 +6 6 six six Sixsix 6666 6 +SELECT * FROM federated.t1 WHERE col2 LIKE 'se%'; +id col1 col2 col3 col4 +7 7 seven Sevenseven 77777 7777 +SELECT * FROM federated.t1 WHERE col2 NOT LIKE 'e%'; +id col1 col2 col3 col4 +1 1 one One 11 1111 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +4 4 fourfourfour 444 4444444 +5 5 five 5 five five 5 5 55555 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +9 9 nine Nine 999999 999999 +10 10 Tenth ten TEN 1010101 1010 +SELECT * FROM federated.t1 WHERE col2 <> 'one One'; +id col1 col2 col3 col4 +4 4 fourfourfour 444 4444444 +5 5 five 5 five five 5 5 55555 +8 8 eight eight eight 88888 88 +9 9 nine Nine 999999 999999 +2 2 Two two 22 2222 +3 3 three Three 33 33333 +6 6 six six Sixsix 6666 6 +7 7 seven Sevenseven 77777 7777 +10 10 Tenth ten TEN 1010101 1010 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`col1` varchar(8) NOT NULL DEFAULT '', +`col2` varchar(128) NOT NULL DEFAULT '', +`col3` varchar(20) NOT NULL DEFAULT '', +`col4` varchar(40) NOT NULL DEFAULT '', +primary key (`col1`, `col2`, `col3`, `col4`), +key 3key(`col2`,`col3`,`col4`), +key 2key (`col3`,`col4`), +key col4(col4)); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`col1` varchar(8) NOT NULL DEFAULT '', +`col2` varchar(128) NOT NULL DEFAULT '', +`col3` varchar(20) NOT NULL DEFAULT '', +`col4` varchar(40) NOT NULL DEFAULT '', +primary key (`col1`, `col2`, `col3`, `col4`), +key 3key(`col2`,`col3`,`col4`), +key 2key (`col3`,`col4`), +key col4(col4)) +ENGINE="FEDERATED" + COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('aaaa', 'aaaaaaaaaaaaaaaaaaa', 'ababababab', 'acacacacacacacac'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('bbbb', 'bbbbbbbbbbbbbbbbbbb', 'bababababa', 'bcbcbcbcbcbcbcbc'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('cccc', 'ccccccccccccccccccc', 'cacacacaca', 'cbcbcbcbcbcbcbcb'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('dddd', 'ddddddddddddddddddd', 'dadadadada', 'dcdcdcdcdcdcdcdc'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('eeee', 'eeeeeeeeeeeeeeeeeee', 'eaeaeaeaea', 'ecececececececec'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('ffff', 'fffffffffffffffffff', 'fafafafafa', 'fcfcfcfcfcfcfcfc'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('gggg', 'ggggggggggggggggggg', 'gagagagaga', 'gcgcgcgcgcgcgcgc'); +INSERT INTO federated.t1 (col1, col2, col3, col4) +VALUES ('hhhh', 'hhhhhhhhhhhhhhhhhhh', 'hahahahaha', 'hchchchchchchchc'); +SELECT * FROM federated.t1 WHERE col1 = 'cccc'; +col1 col2 col3 col4 +cccc ccccccccccccccccccc cacacacaca cbcbcbcbcbcbcbcb +SELECT * FROM federated.t1 WHERE col2 = 'eeeeeeeeeeeeeeeeeee'; +col1 col2 col3 col4 +eeee eeeeeeeeeeeeeeeeeee eaeaeaeaea ecececececececec +SELECT * FROM federated.t1 WHERE col3 = 'bababababa'; +col1 col2 col3 col4 +bbbb bbbbbbbbbbbbbbbbbbb bababababa bcbcbcbcbcbcbcbc +SELECT * FROM federated.t1 WHERE col1 = 'gggg' AND col2 = 'ggggggggggggggggggg'; +col1 col2 col3 col4 +gggg ggggggggggggggggggg gagagagaga gcgcgcgcgcgcgcgc +SELECT * FROM federated.t1 WHERE col1 = 'gggg' AND col3 = 'gagagagaga'; +col1 col2 col3 col4 +gggg ggggggggggggggggggg gagagagaga gcgcgcgcgcgcgcgc +SELECT * FROM federated.t1 WHERE col1 = 'ffff' AND col4 = 'fcfcfcfcfcfcfcfc'; +col1 col2 col3 col4 +ffff fffffffffffffffffff fafafafafa fcfcfcfcfcfcfcfc +SELECT * FROM federated.t1 WHERE col1 > 'bbbb'; +col1 col2 col3 col4 +cccc ccccccccccccccccccc cacacacaca cbcbcbcbcbcbcbcb +dddd ddddddddddddddddddd dadadadada dcdcdcdcdcdcdcdc +eeee eeeeeeeeeeeeeeeeeee eaeaeaeaea ecececececececec +ffff fffffffffffffffffff fafafafafa fcfcfcfcfcfcfcfc +gggg ggggggggggggggggggg gagagagaga gcgcgcgcgcgcgcgc +hhhh hhhhhhhhhhhhhhhhhhh hahahahaha hchchchchchchchc +SELECT * FROM federated.t1 WHERE col1 >= 'bbbb'; +col1 col2 col3 col4 +bbbb bbbbbbbbbbbbbbbbbbb bababababa bcbcbcbcbcbcbcbc +cccc ccccccccccccccccccc cacacacaca cbcbcbcbcbcbcbcb +dddd ddddddddddddddddddd dadadadada dcdcdcdcdcdcdcdc +eeee eeeeeeeeeeeeeeeeeee eaeaeaeaea ecececececececec +ffff fffffffffffffffffff fafafafafa fcfcfcfcfcfcfcfc +gggg ggggggggggggggggggg gagagagaga gcgcgcgcgcgcgcgc +hhhh hhhhhhhhhhhhhhhhhhh hahahahaha hchchchchchchchc +SELECT * FROM federated.t1 WHERE col1 < 'bbbb'; +col1 col2 col3 col4 +aaaa aaaaaaaaaaaaaaaaaaa ababababab acacacacacacacac +SELECT * FROM federated.t1 WHERE col1 <= 'bbbb'; +col1 col2 col3 col4 +aaaa aaaaaaaaaaaaaaaaaaa ababababab acacacacacacacac +bbbb bbbbbbbbbbbbbbbbbbb bababababa bcbcbcbcbcbcbcbc +SELECT * FROM federated.t1 WHERE col1 <> 'bbbb'; +col1 col2 col3 col4 +aaaa aaaaaaaaaaaaaaaaaaa ababababab acacacacacacacac +cccc ccccccccccccccccccc cacacacaca cbcbcbcbcbcbcbcb +dddd ddddddddddddddddddd dadadadada dcdcdcdcdcdcdcdc +eeee eeeeeeeeeeeeeeeeeee eaeaeaeaea ecececececececec +ffff fffffffffffffffffff fafafafafa fcfcfcfcfcfcfcfc +gggg ggggggggggggggggggg gagagagaga gcgcgcgcgcgcgcgc +hhhh hhhhhhhhhhhhhhhhhhh hahahahaha hchchchchchchchc +SELECT * FROM federated.t1 WHERE col1 LIKE 'b%'; +col1 col2 col3 col4 +bbbb bbbbbbbbbbbbbbbbbbb bababababa bcbcbcbcbcbcbcbc +SELECT * FROM federated.t1 WHERE col4 LIKE '%b%'; +col1 col2 col3 col4 +bbbb bbbbbbbbbbbbbbbbbbb bababababa bcbcbcbcbcbcbcbc +cccc ccccccccccccccccccc cacacacaca cbcbcbcbcbcbcbcb +SELECT * FROM federated.t1 WHERE col1 NOT LIKE 'c%'; +col1 col2 col3 col4 +aaaa aaaaaaaaaaaaaaaaaaa ababababab acacacacacacacac +bbbb bbbbbbbbbbbbbbbbbbb bababababa bcbcbcbcbcbcbcbc +dddd ddddddddddddddddddd dadadadada dcdcdcdcdcdcdcdc +eeee eeeeeeeeeeeeeeeeeee eaeaeaeaea ecececececececec +ffff fffffffffffffffffff fafafafafa fcfcfcfcfcfcfcfc +gggg ggggggggggggggggggg gagagagaga gcgcgcgcgcgcgcgc +hhhh hhhhhhhhhhhhhhhhhhh hahahahaha hchchchchchchchc +SELECT * FROM federated.t1 WHERE col4 NOT LIKE '%c%'; +col1 col2 col3 col4 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`col1` varchar(8) NOT NULL DEFAULT '', +`col2` int(8) NOT NULL DEFAULT 0, +`col3` varchar(8) NOT NULL DEFAULT '', +primary key (`col1`, `col2`, `col3`)); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`col1` varchar(8) NOT NULL DEFAULT '', +`col2` varchar(8) NOT NULL DEFAULT '', +`col3` varchar(8) NOT NULL DEFAULT '', +primary key (`col1`, `col2`, `col3`)) +ENGINE="FEDERATED" + DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 VALUES ('a00', '110', 'cc0'); +INSERT INTO federated.t1 VALUES ('aaa', '111', 'ccc'); +INSERT INTO federated.t1 VALUES ('bbb', '222', 'yyy'); +INSERT INTO federated.t1 VALUES ('ccc', '111', 'zzz'); +INSERT INTO federated.t1 VALUES ('ccd', '112', 'zzzz'); +SELECT col3 FROM federated.t1 WHERE ( +(col1 = 'aaa' AND col2 >= '111') OR col1 > 'aaa') AND +(col1 < 'ccc' OR ( col1 = 'ccc' AND col2 <= '111')); +col3 +ccc +yyy +zzz +SELECT col3 FROM federated.t1 WHERE ( +(col1 = 'aaa' AND col2 >= '111') OR col1 > 'aaa') AND +(col1 < 'ccc' OR ( col1 = 'ccc' AND col2 <= '111')); +col3 +ccc +yyy +zzz +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int, +`name` varchar(32), +`floatval` float, +`other` int) +DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int, +`name` varchar(32), +`floatval` float, +`other` int) +ENGINE="FEDERATED" +DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL); +INSERT INTO federated.t1 values (); +INSERT INTO federated.t1 (id) VALUES (1); +INSERT INTO federated.t1 (name, floatval, other) +VALUES ('foo', 33.33333332, NULL); +INSERT INTO federated.t1 (name, floatval, other) +VALUES (0, 00.3333, NULL); +SELECT * FROM federated.t1; +id name floatval other +NULL NULL NULL NULL +NULL NULL NULL NULL +1 NULL NULL NULL +NULL foo 33.3333 NULL +NULL 0 0.3333 NULL +SELECT count(*) FROM federated.t1 +WHERE id IS NULL +AND name IS NULL +AND floatval IS NULL +AND other IS NULL; +count(*) +2 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`blurb_id` int NOT NULL DEFAULT 0, +`blurb` text default '', +PRIMARY KEY (blurb_id)) +DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`blurb_id` int NOT NULL DEFAULT 0, +`blurb` text default '', +PRIMARY KEY (blurb_id)) +ENGINE="FEDERATED" + DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values."); +INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE."); +INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. "); +INSERT INTO federated.t1 VALUES(4, "Die Übersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest für jemanden, der seine Zielsprache ernst nimmt:"); +SELECT * FROM federated.t1; +blurb_id blurb +1 MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values. +2 All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE. +3 A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. +4 Die Übersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest für jemanden, der seine Zielsprache ernst nimmt: +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`a` int NOT NULL, +`b` int NOT NULL, +`c` int NOT NULL, +PRIMARY KEY (a),key(b)); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`a` int NOT NULL, +`b` int NOT NULL, +`c` int NOT NULL, +PRIMARY KEY (a), +KEY (b)) +ENGINE="FEDERATED" + DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 +int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 +int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, +i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 +int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, +i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 +int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, +i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 +int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, +i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 +int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, +i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 +int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 +int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 +int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 +int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 +int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 +int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 +int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 +int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 +int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 +int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 +int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 +int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 +int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 +int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 +int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 +int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 +int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 +int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 +int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 +int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 +int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 +int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 +int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 +int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 +int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 +int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 +int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 +int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 +int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 +int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 +int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 +int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 +int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 +int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 +int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 +int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 +int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 +int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 +int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 +int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 +int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 +int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 +int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 +int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 +int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 +int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 +int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 +int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 +int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 +int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 +int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 +int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 +int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 +int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 +int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 +int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 +int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 +int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 +int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 +int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 +int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 +int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 +int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 +int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 +int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 +int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 +int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 +int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 +int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 +int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 +int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 +int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 +int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 +int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 +int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 +int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 +int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 +int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 +int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 +int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 +int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 +int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 +int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 +int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 +int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 +int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 +int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 +int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 +int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 +int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 +int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 +int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 +int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 +int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 +int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 +int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 +int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 +int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 +int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 +int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 +int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 +int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 +int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 +int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 +int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 +int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 +int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 +int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 +int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 +int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 +int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 +int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 +int, i999 int, i1000 int, b varchar(256)) row_format=dynamic; +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 +(i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 +int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, +i17 int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, +i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 +int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, +i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 +int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, +i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 +int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, +i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 +int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, +i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 +int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 +int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 +int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 +int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 +int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 +int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 +int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 +int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 +int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 +int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 +int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 +int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 +int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 +int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 +int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 +int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 +int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 +int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 +int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 +int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 +int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 +int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 +int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 +int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 +int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 +int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 +int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 +int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 +int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 +int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 +int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 +int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 +int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 +int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 +int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 +int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 +int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 +int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 +int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 +int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 +int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 +int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 +int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 +int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 +int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 +int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 +int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 +int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 +int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 +int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 +int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 +int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 +int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 +int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 +int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 +int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 +int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 +int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 +int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 +int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 +int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 +int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 +int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 +int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 +int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 +int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 +int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 +int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 +int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 +int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 +int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 +int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 +int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 +int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 +int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 +int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 +int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 +int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 +int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 +int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 +int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 +int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 +int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 +int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 +int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 +int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 +int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 +int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 +int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 +int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 +int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 +int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 +int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 +int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 +int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 +int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 +int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 +int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 +int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 +int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 +int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 +int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 +int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 +int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 +int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 +int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 +int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 +int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 +int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 +int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 +int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 +int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 +int, i999 int, i1000 int, b varchar(256)) +row_format=dynamic +ENGINE="FEDERATED" +DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 +values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG"); +UPDATE federated.t1 SET b=repeat('a',256); +UPDATE federated.t1 SET i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0; +SELECT * FROM federated.t1 WHERE i9=0 and i10=0; +i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b +0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +UPDATE federated.t1 SET i50=20; +SELECT * FROM federated.t1; +i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b +0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +DELETE FROM federated.t1 WHERE i51=20; +SELECT * FROM federated.t1; +i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b +0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +DELETE FROM federated.t1 WHERE i50=20; +SELECT * FROM federated.t1; +i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', PRIMARY KEY(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +id int NOT NULL auto_increment, +code char(20) NOT NULL, +fileguts blob NOT NULL, +creation_date datetime, +entered_time datetime default '2004-04-04 04:04:04', +PRIMARY KEY(id), +index(code), +index(fileguts(10))) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03'); +INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04'); +INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04'); +SELECT * FROM federated.t1; +id code fileguts creation_date entered_time +1 ASDFWERQWETWETAWETA *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2003-03-03 03:03:03 2004-04-04 04:04:04 +2 DEUEUEUEUEUEUEUEUEU *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2004-04-04 04:04:04 2004-04-04 04:04:04 +3 DEUEUEUEUEUEUEUEUEU jimbob 2004-04-04 04:04:04 2004-04-04 04:04:04 +SELECT * FROM federated.t1 WHERE fileguts = 'jimbob'; +id code fileguts creation_date entered_time +3 DEUEUEUEUEUEUEUEUEU jimbob 2004-04-04 04:04:04 2004-04-04 04:04:04 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 (`a` BLOB); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`a` BLOB) +ENGINE="FEDERATED" +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 VALUES (0x00); +INSERT INTO federated.t1 VALUES (0x0001); +INSERT INTO federated.t1 VALUES (0x0100); +SELECT HEX(a) FROM federated.t1; +HEX(a) +00 +0001 +0100 +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`country_id` int(20) NOT NULL DEFAULT 0, +`name` varchar(32), +`other` varchar(20), +PRIMARY KEY (`id`), +key (country_id)); +DROP TABLE IF EXISTS federated.countries; +Warnings: +Note 1051 Unknown table 'countries' +CREATE TABLE federated.countries ( +`id` int(20) NOT NULL auto_increment, +`country` varchar(32), +PRIMARY KEY (id)); +INSERT INTO federated.countries (country) VALUES ('India'); +INSERT INTO federated.countries (country) VALUES ('Germany'); +INSERT INTO federated.countries (country) VALUES ('Italy'); +INSERT INTO federated.countries (country) VALUES ('Finland'); +INSERT INTO federated.countries (country) VALUES ('Ukraine'); +DROP TABLE IF EXISTS federated.t1; +CREATE TABLE federated.t1 ( +`id` int(20) NOT NULL auto_increment, +`country_id` int(20) NOT NULL DEFAULT 0, +`name` varchar(32), +`other` varchar(20), +PRIMARY KEY (`id`), +KEY (country_id) ) +ENGINE="FEDERATED" DEFAULT CHARSET=latin1 +COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; +INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111); +INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222); +INSERT INTO federated.t1 (name, country_id, other) VALUES ('Marizio', 3, 33333); +INSERT INTO federated.t1 (name, country_id, other) VALUES ('Monty', 4, 33333); +INSERT INTO federated.t1 (name, country_id, other) VALUES ('Sanja', 5, 33333); +SELECT federated.t1.name AS name, federated.t1.country_id AS country_id, +federated.t1.other AS other, federated.countries.country AS country +FROM federated.t1, federated.countries WHERE +federated.t1.country_id = federated.countries.id; +name country_id other country +Kumar 1 11111 India +Lenz 2 22222 Germany +Marizio 3 33333 Italy +Monty 4 33333 Finland +Sanja 5 33333 Ukraine +SELECT federated.t1.name AS name, federated.t1.country_id AS country_id, +federated.t1.other AS other, federated.countries.country AS country +FROM federated.t1 INNER JOIN federated.countries ON +federated.t1.country_id = federated.countries.id; +name country_id other country +Kumar 1 11111 India +Lenz 2 22222 Germany +Marizio 3 33333 Italy +Monty 4 33333 Finland +Sanja 5 33333 Ukraine +SELECT federated.t1.name AS name, federated.t1.country_id AS country_id, +federated.t1.other AS other, federated.countries.country AS country +FROM federated.t1 INNER JOIN federated.countries ON +federated.t1.country_id = federated.countries.id +WHERE federated.t1.name = 'Monty'; +name country_id other country +Monty 4 33333 Finland +SELECT federated.t1.*, federated.countries.country +FROM federated.t1 LEFT JOIN federated.countries +ON federated.t1.country_id = federated.countries.id +ORDER BY federated.countries.id; +id country_id name other country +1 1 Kumar 11111 India +2 2 Lenz 22222 Germany +3 3 Marizio 33333 Italy +4 4 Monty 33333 Finland +5 5 Sanja 33333 Ukraine +SELECT federated.t1.*, federated.countries.country +FROM federated.t1 LEFT JOIN federated.countries +ON federated.t1.country_id = federated.countries.id +ORDER BY federated.countries.country; +id country_id name other country +4 4 Monty 33333 Finland +2 2 Lenz 22222 Germany +1 1 Kumar 11111 India +3 3 Marizio 33333 Italy +5 5 Sanja 33333 Ukraine +SELECT federated.t1.*, federated.countries.country +FROM federated.t1 RIGHT JOIN federated.countries +ON federated.t1.country_id = federated.countries.id +ORDER BY federated.t1.country_id; +id country_id name other country +1 1 Kumar 11111 India +2 2 Lenz 22222 Germany +3 3 Marizio 33333 Italy +4 4 Monty 33333 Finland +5 5 Sanja 33333 Ukraine +DROP TABLE federated.countries; +OPTIMIZE TABLE federated.t1; +Table Op Msg_type Msg_text +federated.t1 optimize status OK +REPAIR TABLE federated.t1; +Table Op Msg_type Msg_text +federated.t1 repair status OK +REPAIR TABLE federated.t1 QUICK; +Table Op Msg_type Msg_text +federated.t1 repair status OK +REPAIR TABLE federated.t1 EXTENDED; +Table Op Msg_type Msg_text +federated.t1 repair status OK +REPAIR TABLE federated.t1 USE_FRM; +Table Op Msg_type Msg_text +federated.t1 repair status OK +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; +DROP TABLE IF EXISTS federated.t1; +DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result index 384bdc1214b..16c308e3450 100644 --- a/mysql-test/r/flush.result +++ b/mysql-test/r/flush.result @@ -8,7 +8,7 @@ n 3 flush tables with read lock; drop table t2; -ERROR HY000: Table 't2' was locked with a READ lock and can't be updated +ERROR HY000: Can't execute the query because you have a conflicting read lock drop table t2; unlock tables; create database mysqltest; diff --git a/mysql-test/r/flush_block_commit.result b/mysql-test/r/flush_block_commit.result index 2e9f1920937..2f6aca7e24a 100644 --- a/mysql-test/r/flush_block_commit.result +++ b/mysql-test/r/flush_block_commit.result @@ -37,3 +37,18 @@ show create database test; Database Create Database test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ drop table t1; +create table t1 (a int) engine=innodb; +reset master; +set autocommit=0; +insert t1 values (1); +flush tables with read lock; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 + commit; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 +unlock tables; +drop table t1; +set autocommit=1; diff --git a/mysql-test/r/flush_read_lock_kill.result b/mysql-test/r/flush_read_lock_kill.result new file mode 100644 index 00000000000..dfdcf51457a --- /dev/null +++ b/mysql-test/r/flush_read_lock_kill.result @@ -0,0 +1,9 @@ +drop table if exists t1; +create table t1 (kill_id int); +insert into t1 values(connection_id()); + flush tables with read lock; +select ((@id := kill_id) - kill_id) from t1; +((@id := kill_id) - kill_id) +0 +kill connection @id; +drop table t1; diff --git a/mysql-test/r/flush_table.result b/mysql-test/r/flush_table.result index 2ef4ab5b52b..db54d2e53ef 100644 --- a/mysql-test/r/flush_table.result +++ b/mysql-test/r/flush_table.result @@ -101,3 +101,6 @@ table_id Record-02 handler t1 close; drop table t1; +FLUSH TABLES WITH READ LOCK ; +FLUSH TABLES WITH READ LOCK ; +UNLOCK TABLES; diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 8fa2df2e756..ea0ffe9d7dd 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -17,7 +17,7 @@ explain extended select * from t1 where MATCH(a,b) AGAINST ("collections"); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 fulltext a a 0 1 Using where Warnings: -Note 1003 select test.t1.a AS `a`,test.t1.b AS `b` from test.t1 where (match test.t1.a,test.t1.b against (_latin1'collections')) +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'collections')) select * from t1 where MATCH(a,b) AGAINST ("indexes"); a b Full-text indexes are called collections @@ -78,7 +78,7 @@ explain extended select * from t1 where MATCH(a,b) AGAINST("support -collections id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 fulltext a a 0 1 Using where Warnings: -Note 1003 select test.t1.a AS `a`,test.t1.b AS `b` from test.t1 where (match test.t1.a,test.t1.b against (_latin1'support -collections' in boolean mode)) +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (match `test`.`t1`.`a`,`test`.`t1`.`b` against (_latin1'support -collections' in boolean mode)) select * from t1 where MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE); a b MySQL has now support for full-text search @@ -130,6 +130,9 @@ a b select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE); a b MySQL has now support for full-text search +select * from t1 where MATCH a,b AGAINST ('"now support"' IN BOOLEAN MODE); +a b +MySQL has now support for full-text search select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE); a b MySQL has now support for full-text search @@ -151,8 +154,6 @@ a b select * from t1 where MATCH a,b AGAINST ('+collections -supp* -foobar*' IN BOOLEAN MODE); a b Full-text indexes are called collections -select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE); -a b select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE); a b Full-text search in MySQL implements vector space model @@ -220,14 +221,14 @@ select t1.id FROM t2 as ttxt,t1,t1 as ticket2 WHERE ticket2.id = ttxt.ticket AND t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); id -select t1.id FROM t2 as ttxt,t1 INNER JOIN t1 as ticket2 ON -ticket2.id = ttxt.ticket -WHERE t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); +select ticket2.id FROM t2 as ttxt,t2 INNER JOIN t1 as ticket2 ON +ticket2.id = t2.ticket +WHERE ticket2.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); id INSERT INTO t1 VALUES (3,3); -select t1.id FROM t2 as ttxt,t1 -INNER JOIN t1 as ticket2 ON ticket2.id = ttxt.ticket -WHERE t1.id = ticket2.ticket and +select ticket2.id FROM t2 as ttxt,t2 +INNER JOIN t1 as ticket2 ON ticket2.id = t2.ticket +WHERE ticket2.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); id 3 @@ -336,8 +337,8 @@ insert into t2 values (1, 1, 'xxfoo'); insert into t2 values (2, 1, 'xxbar'); insert into t2 values (3, 1, 'xxbuz'); select * from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode); -t1_id name t2_id t1_id name -1 data1 1 1 xxfoo +t1_id name t2_id name +1 data1 1 xxfoo select * from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode); t2_id t1_id name drop table t1,t2; diff --git a/mysql-test/r/fulltext_order_by.result b/mysql-test/r/fulltext_order_by.result index 0b77153248e..bc466b5aba7 100644 --- a/mysql-test/r/fulltext_order_by.result +++ b/mysql-test/r/fulltext_order_by.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20), @@ -126,7 +126,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42S02: Unknown table 'b' in order clause +ERROR 42S22: Unknown column 'b.betreff' in 'order clause' select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -142,7 +142,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42S02: Unknown table 'b' in order clause +ERROR 42S22: Unknown column 'b.betreff' in 'order clause' select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result index cf6fbf2da4f..0bd53b32dd7 100644 --- a/mysql-test/r/func_concat.result +++ b/mysql-test/r/func_concat.result @@ -63,4 +63,8 @@ a0 select 'a' union select concat('a', -0.0); a a -good +a0.0 +select 'a' union select concat('a', -0.0000); +a +a +a0.0000 diff --git a/mysql-test/r/func_date_add.result b/mysql-test/r/func_date_add.result index f4091ff4c0e..841d13a6ea6 100644 --- a/mysql-test/r/func_date_add.result +++ b/mysql-test/r/func_date_add.result @@ -4,7 +4,7 @@ visitor_id int(10) unsigned DEFAULT '0' NOT NULL, group_id int(10) unsigned DEFAULT '0' NOT NULL, hits int(10) unsigned DEFAULT '0' NOT NULL, sessions int(10) unsigned DEFAULT '0' NOT NULL, -ts timestamp(14), +ts timestamp, PRIMARY KEY (visitor_id,group_id) )/*! engine=MyISAM */; INSERT INTO t1 VALUES (465931136,7,2,2,20000318160952); @@ -45,3 +45,29 @@ visitor_id mts 465931136 2000-03-18 16:09:53 1092858576 2000-03-19 01:34:45 drop table t1; +set sql_mode='traditional'; +create table t1 (d date); +insert into t1 (d) select date_sub('2000-01-01', INTERVAL 2001 YEAR); +ERROR 22008: Datetime function: datetime field overflow +insert into t1 (d) select date_add('2000-01-01',interval 8000 year); +ERROR 22008: Datetime function: datetime field overflow +insert into t1 values (date_add(NULL, INTERVAL 1 DAY)); +insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY)); +set sql_mode=''; +insert into t1 (d) select date_sub('2000-01-01', INTERVAL 2001 YEAR); +Warnings: +Warning 1441 Datetime function: datetime field overflow +insert into t1 (d) select date_add('2000-01-01',interval 8000 year); +Warnings: +Warning 1441 Datetime function: datetime field overflow +insert into t1 values (date_add(NULL, INTERVAL 1 DAY)); +insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY)); +select * from t1; +d +NULL +NULL +NULL +NULL +NULL +NULL +drop table t1; diff --git a/mysql-test/r/func_default.result b/mysql-test/r/func_default.result index 2993d79a870..5742ddd102b 100644 --- a/mysql-test/r/func_default.result +++ b/mysql-test/r/func_default.result @@ -8,7 +8,7 @@ explain extended select default(str), default(strnull), default(intg), default(r id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Warnings: -Note 1003 select default(test.t1.str) AS `default(str)`,default(test.t1.strnull) AS `default(strnull)`,default(test.t1.intg) AS `default(intg)`,default(test.t1.rel) AS `default(rel)` from test.t1 +Note 1003 select default(`test`.`t1`.`str`) AS `default(str)`,default(`test`.`t1`.`strnull`) AS `default(strnull)`,default(`test`.`t1`.`intg`) AS `default(intg)`,default(`test`.`t1`.`rel`) AS `default(rel)` from `test`.`t1` select * from t1 where str <> default(str); str strnull intg rel 0 0 @@ -16,3 +16,8 @@ explain select * from t1 where str <> default(str); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 drop table t1; +CREATE TABLE t1 (id int(11), s varchar(20)); +INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); +SELECT s, 32 AS mi FROM t1 GROUP BY s HAVING DEFAULT(mi) IS NULL; +ERROR HY000: Field 'mi' doesn't have a default value +DROP TABLE t1; diff --git a/mysql-test/r/func_equal.result b/mysql-test/r/func_equal.result index 352b76f2744..fe5e5b1b371 100644 --- a/mysql-test/r/func_equal.result +++ b/mysql-test/r/func_equal.result @@ -1,7 +1,7 @@ drop table if exists t1,t2; -select 0<=>0,0.0<=>0.0,"A"<=>"A",NULL<=>NULL; -0<=>0 0.0<=>0.0 "A"<=>"A" NULL<=>NULL -1 1 1 1 +select 0<=>0,0.0<=>0.0,0E0=0E0,"A"<=>"A",NULL<=>NULL; +0<=>0 0.0<=>0.0 0E0=0E0 "A"<=>"A" NULL<=>NULL +1 1 1 1 1 select 1<=>0,0<=>NULL,NULL<=>0; 1<=>0 0<=>NULL NULL<=>0 0 0 0 @@ -11,6 +11,12 @@ select 1.0<=>0.0,0.0<=>NULL,NULL<=>0.0; select "A"<=>"B","A"<=>NULL,NULL<=>"A"; "A"<=>"B" "A"<=>NULL NULL<=>"A" 0 0 0 +select 0<=>0.0, 0.0<=>0E0, 0E0<=>"0", 10.0<=>1E1, 10<=>10.0, 10<=>1E1; +0<=>0.0 0.0<=>0E0 0E0<=>"0" 10.0<=>1E1 10<=>10.0 10<=>1E1 +1 1 1 1 1 1 +select 1.0<=>0E1,10<=>NULL,NULL<=>0.0, NULL<=>0E0; +1.0<=>0E1 10<=>NULL NULL<=>0.0 NULL<=>0E0 +0 0 0 0 create table t1 (id int, value int); create table t2 (id int, value int); insert into t1 values (1,null); diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 9faee3cbc01..184bd07b066 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -18,7 +18,7 @@ explain extended select grp,group_concat(c) from t1 group by grp; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort Warnings: -Note 1003 select test.t1.grp AS `grp`,group_concat(test.t1.c separator ',') AS `group_concat(c)` from test.t1 group by test.t1.grp +Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(`test`.`t1`.`c` separator ',') AS `group_concat(c)` from `test`.`t1` group by `test`.`t1`.`grp` select grp,group_concat(a,c) from t1 group by grp; grp group_concat(a,c) 1 1a @@ -93,7 +93,7 @@ explain extended select grp,group_concat(distinct c order by c desc) from t1 gro id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort Warnings: -Note 1003 select test.t1.grp AS `grp`,group_concat(distinct test.t1.c order by test.t1.c separator ',') AS `group_concat(distinct c order by c desc)` from test.t1 group by test.t1.grp +Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(distinct `test`.`t1`.`c` order by `test`.`t1`.`c` separator ',') AS `group_concat(distinct c order by c desc)` from `test`.`t1` group by `test`.`t1`.`grp` select grp,group_concat(c order by c separator ",") from t1 group by grp; grp group_concat(c order by c separator ",") 1 a @@ -113,7 +113,7 @@ explain extended select grp,group_concat(distinct c order by c separator ",") fr id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using filesort Warnings: -Note 1003 select test.t1.grp AS `grp`,group_concat(distinct test.t1.c order by test.t1.c separator ',') AS `group_concat(distinct c order by c separator ",")` from test.t1 group by test.t1.grp +Note 1003 select `test`.`t1`.`grp` AS `grp`,group_concat(distinct `test`.`t1`.`c` order by `test`.`t1`.`c` separator ',') AS `group_concat(distinct c order by c separator ",")` from `test`.`t1` group by `test`.`t1`.`grp` select grp,group_concat(distinct c order by c desc separator ",") from t1 group by grp; grp group_concat(distinct c order by c desc separator ",") 1 a @@ -166,7 +166,7 @@ set group_concat_max_len = 1024; select group_concat(sum(a)) from t1 group by grp; ERROR HY000: Invalid use of group function select grp,group_concat(c order by 2) from t1 group by grp; -ERROR 42S22: Unknown column '2' in 'group statement' +ERROR 42S22: Unknown column '2' in 'order clause' drop table t1; create table t1 ( URL_ID int(11), URL varchar(80)); create table t2 ( REQ_ID int(11), URL_ID int(11)); @@ -458,7 +458,7 @@ create table t2 select group_concat(a) as a from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` longtext character set cp1250 + `a` varchar(400) character set cp1250 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select collation(group_concat(a,_koi8r'test')) from t1; collation(group_concat(a,_koi8r'test')) @@ -517,6 +517,13 @@ a group_concat(distinct b order by b) 2 3,7 NULL 1,2,3,4,7 drop table t1; +create table t1 (a char(3), b char(20), primary key (a, b)); +insert into t1 values ('ABW', 'Dutch'), ('ABW', 'English'); +select group_concat(a) from t1 group by b; +group_concat(a) +ABW +ABW +drop table t1; CREATE TABLE t1 ( aID smallint(5) unsigned NOT NULL auto_increment, sometitle varchar(255) NOT NULL default '', diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 2fb18ca92c7..1542794798a 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1,4 +1,9 @@ drop table if exists t1,t2; +set @sav_dpi= @@div_precision_increment; +set div_precision_increment= 5; +show variables like 'div_precision_increment'; +Variable_name Value +div_precision_increment 5 create table t1 (grp int, a bigint unsigned, c char(10) not null); insert into t1 values (1,1,"a"); insert into t1 values (2,2,"b"); @@ -44,13 +49,13 @@ count(distinct a) count(distinct grp) 6 3 select sum(all a),count(all a),avg(all a),std(all a),variance(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1; sum(all a) count(all a) avg(all a) std(all a) variance(all a) bit_or(all a) bit_and(all a) min(all a) max(all a) min(all c) max(all c) -21 6 3.5000 1.7078 2.9167 7 0 1 6 E +21 6 3.50000 1.70783 2.91667 7 0 1 6 E select grp, sum(a),count(a),avg(a),std(a),variance(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp; grp sum(a) count(a) avg(a) std(a) variance(a) bit_or(a) bit_and(a) min(a) max(a) min(c) max(c) NULL NULL 0 NULL NULL NULL 0 18446744073709551615 NULL NULL -1 1 1 1.0000 0.0000 0.0000 1 1 1 1 a a -2 5 2 2.5000 0.5000 0.2500 3 2 2 3 b c -3 15 3 5.0000 0.8165 0.6667 7 4 4 6 C E +1 1 1 1.00000 0.00000 0.00000 1 1 1 1 a a +2 5 2 2.50000 0.50000 0.25000 3 2 2 3 b c +3 15 3 5.00000 0.81650 0.66667 7 4 4 6 C E select grp, sum(a)+count(a)+avg(a)+std(a)+variance(a)+bit_or(a)+bit_and(a)+min(a)+max(a)+min(c)+max(c) as sum from t1 group by grp; grp sum NULL NULL @@ -74,12 +79,12 @@ CREATE TABLE t2 (id int(11),name char(20)); INSERT INTO t2 VALUES (1,'Set One'),(2,'Set Two'); select id, avg(value1), std(value1), variance(value1) from t1 group by id; id avg(value1) std(value1) variance(value1) -1 1.000000 0.816497 0.666667 -2 11.000000 0.816497 0.666667 +1 1.0000000 0.816497 0.666667 +2 11.0000000 0.816497 0.666667 select name, avg(value1), std(value1), variance(value1) from t1, t2 where t1.id = t2.id group by t1.id; name avg(value1) std(value1) variance(value1) -Set One 1.000000 0.816497 0.666667 -Set Two 11.000000 0.816497 0.666667 +Set One 1.0000000 0.816497 0.666667 +Set Two 11.0000000 0.816497 0.666667 drop table t1,t2; create table t1 (id int not null); create table t2 (id int not null,rating int null); @@ -87,9 +92,29 @@ insert into t1 values(1),(2),(3); insert into t2 values(1, 3),(2, NULL),(2, NULL),(3, 2),(3, NULL); select t1.id, avg(rating) from t1 left join t2 on ( t1.id = t2.id ) group by t1.id; id avg(rating) -1 3.0000 +1 3.00000 2 NULL -3 2.0000 +3 2.00000 +select sql_small_result t2.id, avg(rating) from t2 group by t2.id; +id avg(rating) +1 3.00000 +2 NULL +3 2.00000 +select sql_big_result t2.id, avg(rating) from t2 group by t2.id; +id avg(rating) +1 3.00000 +2 NULL +3 2.00000 +select sql_small_result t2.id, avg(rating+0.0e0) from t2 group by t2.id; +id avg(rating+0.0e0) +1 3 +2 NULL +3 2 +select sql_big_result t2.id, avg(rating+0.0e0) from t2 group by t2.id; +id avg(rating+0.0e0) +1 3 +2 NULL +3 2 drop table t1,t2; create table t1 (a smallint(6) primary key, c char(10), b text); INSERT INTO t1 VALUES (1,'1','1'); @@ -183,12 +208,12 @@ insert into t2 values('BBB', 20, 1.0); select t1.a1, t1.a2, t2.a1, t2.a2 from t1,t2; a1 a2 a1 a2 10 aaa AAA 10 -10 NULL AAA 10 -10 bbb AAA 10 -20 zzz AAA 10 10 aaa BBB 20 +10 NULL AAA 10 10 NULL BBB 20 +10 bbb AAA 10 10 bbb BBB 20 +20 zzz AAA 10 20 zzz BBB 20 select max(t1.a1), max(t2.a1) from t1, t2 where t2.a2=9; max(t1.a1) max(t2.a1) @@ -245,27 +270,27 @@ insert into t1 values (2,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 -2 1 1 1.0000 0.0000 1 1 1 1 +2 1 1 1.00000 0.00000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 -2 1 1 1.0000 0.0000 1 1 1 1 +2 1 1 1.00000 0.00000 1 1 1 1 insert into t1 values (3,1); select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) 1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 -2 1 1 1.0000 0.0000 1 1 1 1 -3 1 1 1.0000 0.0000 1 1 1 1 +2 1 1 1.00000 0.00000 1 1 1 1 +3 1 1 1.00000 0.00000 1 1 1 1 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b), bit_xor(b) from t1 group by a; a count(b) sum(b) avg(b) std(b) min(b) max(b) bit_and(b) bit_or(b) bit_xor(b) 1 0 NULL NULL NULL NULL NULL 18446744073709551615 0 0 -2 1 1 1.0000 0.0000 1 1 1 1 1 -3 1 1 1.0000 0.0000 1 1 1 1 1 +2 1 1 1.00000 0.00000 1 1 1 1 1 +3 1 1 1.00000 0.00000 1 1 1 1 1 explain extended select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b), bit_xor(b) from t1 group by a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using filesort Warnings: -Note 1003 select sql_big_result test.t1.a AS `a`,count(test.t1.b) AS `count(b)`,sum(test.t1.b) AS `sum(b)`,avg(test.t1.b) AS `avg(b)`,std(test.t1.b) AS `std(b)`,min(test.t1.b) AS `min(b)`,max(test.t1.b) AS `max(b)`,bit_and(test.t1.b) AS `bit_and(b)`,bit_or(test.t1.b) AS `bit_or(b)`,bit_xor(test.t1.b) AS `bit_xor(b)` from test.t1 group by test.t1.a +Note 1003 select sql_big_result `test`.`t1`.`a` AS `a`,count(`test`.`t1`.`b`) AS `count(b)`,sum(`test`.`t1`.`b`) AS `sum(b)`,avg(`test`.`t1`.`b`) AS `avg(b)`,std(`test`.`t1`.`b`) AS `std(b)`,min(`test`.`t1`.`b`) AS `min(b)`,max(`test`.`t1`.`b`) AS `max(b)`,bit_and(`test`.`t1`.`b`) AS `bit_and(b)`,bit_or(`test`.`t1`.`b`) AS `bit_or(b)`,bit_xor(`test`.`t1`.`b`) AS `bit_xor(b)` from `test`.`t1` group by `test`.`t1`.`a` drop table t1; create table t1 (col int); insert into t1 values (-1), (-2), (-3); @@ -315,12 +340,14 @@ insert into t1 values('GTM',3,'DAL',0.070,date'1977-09-23'); insert into t1 values('SSJ',null,'CHI',null,date'1974-03-19'); insert into t1 values('KKK',3,'ATL',null,null); insert into t1 values('XXX',null,'MIN',null,null); +insert into t1 values('WWW',1,'LED',null,null); insert into t2 values('TKF','Seattle','WA','AME'); insert into t2 values('LCC','Los Angeles','CA','TWU'); insert into t2 values('DEN','Denver','CO','BDL'); insert into t2 values('SDC','San Diego','CA','TWU'); insert into t2 values('NOL','New Orleans','LA','GTM'); insert into t2 values('LAK','Los Angeles','CA','TWU'); +insert into t2 values('AAA','AAA','AA','AME'); select * from t1; a1 a2 a3 a4 a5 AME 0 SEA 0.1 1942-02-19 @@ -337,6 +364,7 @@ GTM 3 DAL 0.07 1977-09-23 SSJ NULL CHI NULL 1974-03-19 KKK 3 ATL NULL NULL XXX NULL MIN NULL NULL +WWW 1 LED NULL NULL select * from t2; a1 a2 a3 a4 TKF Seattle WA AME @@ -345,6 +373,7 @@ DEN Denver CO BDL SDC San Diego CA TWU NOL New Orleans LA GTM LAK Los Angeles CA TWU +AAA AAA AA AME explain select min(a1) from t1; id select_type table type possible_keys key key_len ref rows Extra @@ -474,7 +503,7 @@ CHI Los Angeles explain select max(a3) from t1 where a2 is null and a2 = 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE select max(a3) from t1 where a2 is null and a2 = 2; max(a3) NULL @@ -572,15 +601,15 @@ AME AME explain select min(a1) from t1 where a1 > 'KKK' or a1 < 'XXX'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 0 NULL 15 Using where; Using index +1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index explain select min(a1) from t1 where a1 != 'KKK'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 3 NULL 14 Using where; Using index +1 SIMPLE t1 index PRIMARY PRIMARY 3 NULL 15 Using where; Using index explain select max(a3) from t1 where a2 < 2 and a3 < 'SEA'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range k1 k1 3 NULL 5 Using where; Using index +1 SIMPLE t1 range k1 k1 3 NULL 6 Using where; Using index explain select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA'; id select_type table type possible_keys key key_len ref rows Extra @@ -589,40 +618,40 @@ id select_type table type possible_keys key key_len ref rows Extra explain select min(a4 - 0.01) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 12 NULL 14 Using index +1 SIMPLE t1 index NULL k2 12 NULL 15 Using index explain select max(a4 + 0.01) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 12 NULL 14 Using index +1 SIMPLE t1 index NULL k2 12 NULL 15 Using index explain select min(a3) from t1 where (a2 +1 ) is null; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k1 7 NULL 14 Using where; Using index +1 SIMPLE t1 index NULL k1 7 NULL 15 Using where; Using index explain select min(a3) from t1 where (a2 + 1) = 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k1 7 NULL 14 Using where; Using index +1 SIMPLE t1 index NULL k1 7 NULL 15 Using where; Using index explain select min(a3) from t1 where 2 = (a2 + 1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k1 7 NULL 14 Using where; Using index +1 SIMPLE t1 index NULL k1 7 NULL 15 Using where; Using index explain select min(a2) from t1 where a2 < 2 * a2 - 8; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k1 7 NULL 14 Using where; Using index +1 SIMPLE t1 index NULL k1 7 NULL 15 Using where; Using index explain select min(a1) from t1 where a1 between a3 and 'KKK'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 14 Using where +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 15 Using where explain select min(a4) from t1 where (a4 + 0.01) between 0.07 and 0.08; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL k2 12 NULL 14 Using where; Using index +1 SIMPLE t1 index NULL k2 12 NULL 15 Using where; Using index explain select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index -1 SIMPLE t1 index NULL PRIMARY 3 NULL 14 Using index +1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index drop table t1, t2; create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB; insert into t1 values (1, 3); @@ -645,6 +674,11 @@ select charset(max(a)), coercibility(max(a)), charset(min(a)), coercibility(min(a)) from t1; charset(max(a)) coercibility(max(a)) charset(min(a)) coercibility(min(a)) latin2 2 latin2 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(1) character set latin2 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 select max(a),min(a) from t1; show create table t2; Table Create Table @@ -652,6 +686,13 @@ t2 CREATE TABLE `t2` ( `max(a)` char(1) character set latin2 default NULL, `min(a)` char(1) character set latin2 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t2; +create table t2 select concat(a) from t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `concat(a)` varchar(1) character set latin2 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t1; create table t1 (a int); insert into t1 values (1); @@ -752,7 +793,7 @@ drop table t2; create table t2 select f2 from (select now() f2 from t1) a; show columns from t2; Field Type Null Key Default Extra -f2 datetime 0000-00-00 00:00:00 +f2 datetime NO 0000-00-00 00:00:00 drop table t2, t1; CREATE TABLE t1( id int PRIMARY KEY, @@ -780,3 +821,135 @@ SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6; MAX(id) NULL DROP TABLE t1; +create table t2 (ff double); +insert into t2 values (2.2); +select cast(sum(distinct ff) as decimal(5,2)) from t2; +cast(sum(distinct ff) as decimal(5,2)) +2.20 +select cast(sum(distinct ff) as signed) from t2; +cast(sum(distinct ff) as signed) +2 +select cast(variance(ff) as decimal(10,3)) from t2; +cast(variance(ff) as decimal(10,3)) +0.000 +select cast(min(ff) as decimal(5,2)) from t2; +cast(min(ff) as decimal(5,2)) +2.20 +create table t1 (df decimal(5,1)); +insert into t1 values(1.1); +insert into t1 values(2.2); +select cast(sum(distinct df) as signed) from t1; +cast(sum(distinct df) as signed) +3 +select cast(min(df) as signed) from t1; +cast(min(df) as signed) +0 +select 1e8 * sum(distinct df) from t1; +1e8 * sum(distinct df) +330000000 +select 1e8 * min(df) from t1; +1e8 * min(df) +110000000 +create table t3 (ifl int); +insert into t3 values(1), (2); +select cast(min(ifl) as decimal(5,2)) from t3; +cast(min(ifl) as decimal(5,2)) +1.00 +drop table t1, t2, t3; +CREATE TABLE t1 (id int(11),value1 float(10,2)); +INSERT INTO t1 VALUES (1,0.00),(1,1.00), (1,2.00), (2,10.00), (2,11.00), (2,12.00), (2,13.00); +select id, stddev_pop(value1), var_pop(value1), stddev_samp(value1), var_samp(value1) from t1 group by id; +id stddev_pop(value1) var_pop(value1) stddev_samp(value1) var_samp(value1) +1 0.816497 0.666667 1.000000 1.000000 +2 1.118034 1.250000 1.290994 1.666667 +DROP TABLE t1; +CREATE TABLE t1 (col1 decimal(16,12)); +INSERT INTO t1 VALUES (-5.00000000001),(-5.00000000002),(-5.00000000003),(-5.00000000000),(-5.00000000001),(-5.00000000002); +insert into t1 select * from t1; +select col1,count(col1),sum(col1),avg(col1) from t1 group by col1; +col1 count(col1) sum(col1) avg(col1) +-5.000000000030 2 -10.000000000060 -5.00000000003000000 +-5.000000000020 4 -20.000000000080 -5.00000000002000000 +-5.000000000010 4 -20.000000000040 -5.00000000001000000 +-5.000000000000 2 -10.000000000000 -5.00000000000000000 +DROP TABLE t1; +create table t1 (col1 decimal(16,12)); +insert into t1 values (-5.00000000001); +insert into t1 values (-5.00000000001); +select col1,sum(col1),max(col1),min(col1) from t1 group by col1; +col1 sum(col1) max(col1) min(col1) +-5.000000000010 -10.000000000020 -5.000000000010 -5.000000000010 +delete from t1; +insert into t1 values (5.00000000001); +insert into t1 values (5.00000000001); +select col1,sum(col1),max(col1),min(col1) from t1 group by col1; +col1 sum(col1) max(col1) min(col1) +5.000000000010 10.000000000020 5.000000000010 5.000000000010 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(400)); +INSERT INTO t1 (a) VALUES ("A"), ("a"), ("a "), ("a "), +("B"), ("b"), ("b "), ("b "); +SELECT COUNT(DISTINCT a) FROM t1; +COUNT(DISTINCT a) +2 +DROP TABLE t1; +CREATE TABLE t1 (a int, b int, c int); +INSERT INTO t1 (a, b, c) VALUES +(1,1,1), (1,1,2), (1,1,3), +(1,2,1), (1,2,2), (1,2,3), +(1,3,1), (1,3,2), (1,3,3), +(2,1,1), (2,1,2), (2,1,3), +(2,2,1), (2,2,2), (2,2,3), +(2,3,1), (2,3,2), (2,3,3), +(3,1,1), (3,1,2), (3,1,3), +(3,2,1), (3,2,2), (3,2,3), +(3,3,1), (3,3,2), (3,3,3); +SELECT b/c as v, a FROM t1 ORDER BY v; +v a +0.33333 3 +0.33333 1 +0.33333 2 +0.50000 1 +0.50000 2 +0.50000 3 +0.66667 2 +0.66667 1 +0.66667 3 +1.00000 3 +1.00000 2 +1.00000 3 +1.00000 1 +1.00000 2 +1.00000 3 +1.00000 2 +1.00000 1 +1.00000 1 +1.50000 3 +1.50000 2 +1.50000 1 +2.00000 1 +2.00000 3 +2.00000 2 +3.00000 3 +3.00000 2 +3.00000 1 +SELECT b/c as v, SUM(a) FROM t1 GROUP BY v; +v SUM(a) +0.33333 6 +0.50000 6 +0.66667 6 +1.00000 18 +1.50000 6 +2.00000 6 +3.00000 6 +SELECT SUM(a) FROM t1 GROUP BY b/c; +SUM(a) +6 +6 +6 +18 +6 +6 +6 +DROP TABLE t1; +set div_precision_increment= @sav_dpi; diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 2c8f19f1754..aee23b38ca5 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -43,22 +43,27 @@ explain extended select if(u=1,st,binary st) s from t1 where st like "%a%" order id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where; Using filesort Warnings: -Note 1003 select if((test.t1.u = 1),test.t1.st,cast(test.t1.st as char charset binary)) AS `s` from test.t1 where (test.t1.st like _latin1'%a%') order by if((test.t1.u = 1),test.t1.st,cast(test.t1.st as char charset binary)) -select nullif(u=0, 'test') from t1; -nullif(u=0, 'test') +Note 1003 select if((`test`.`t1`.`u` = 1),`test`.`t1`.`st`,cast(`test`.`t1`.`st` as char charset binary)) AS `s` from `test`.`t1` where (`test`.`t1`.`st` like _latin1'%a%') order by if((`test`.`t1`.`u` = 1),`test`.`t1`.`st`,cast(`test`.`t1`.`st` as char charset binary)) +select nullif(u, 1) from t1; +nullif(u, 1) NULL NULL NULL NULL NULL -1 -1 -explain extended select nullif(u=0, 'test') from t1; +0 +0 +explain extended select nullif(u, 1) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Warnings: -Note 1003 select nullif((test.t1.u = 0),_latin1'test') AS `nullif(u=0, 'test')` from test.t1 +Note 1003 select nullif(`test`.`t1`.`u`,1) AS `nullif(u, 1)` from `test`.`t1` drop table t1; +select nullif(1,'test'); +nullif(1,'test') +1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'test' select NULLIF(NULL,NULL), NULLIF(NULL,1), NULLIF(NULL,1.0), NULLIF(NULL,"test"); NULLIF(NULL,NULL) NULLIF(NULL,1) NULLIF(NULL,1.0) NULLIF(NULL,"test") NULL NULL NULL NULL @@ -86,6 +91,23 @@ drop table t1; SELECT NULLIF(5,5) IS NULL, NULLIF(5,5) IS NOT NULL; NULLIF(5,5) IS NULL NULLIF(5,5) IS NOT NULL 1 0 +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`date` int(10) default NULL, +`text` varchar(32) NOT NULL +); +INSERT INTO t1 VALUES (1,1110000000,'Day 1'),(2,1111000000,'Day 2'),(3,1112000000,'Day 3'); +SELECT id, IF(date IS NULL, '-', FROM_UNIXTIME(date, '%d-%m-%Y')) AS date_ord, text FROM t1 ORDER BY date_ord ASC; +id date_ord text +1 05-03-2005 Day 1 +2 16-03-2005 Day 2 +3 28-03-2005 Day 3 +SELECT id, IF(date IS NULL, '-', FROM_UNIXTIME(date, '%d-%m-%Y')) AS date_ord, text FROM t1 ORDER BY date_ord DESC; +id date_ord text +3 28-03-2005 Day 3 +2 16-03-2005 Day 2 +1 05-03-2005 Day 1 +DROP TABLE t1; CREATE TABLE t1 (a CHAR(10)); INSERT INTO t1 VALUES ('aaa'), (NULL), (''), ('bbb'); SELECT a, NULLIF(a,'') FROM t1; diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 516d0a28a21..b0c0178328e 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -119,7 +119,7 @@ c char(1) character set latin1 collate latin1_danish_ci insert into t1 values ('A','B','C'); insert into t1 values ('a','c','c'); select * from t1 where a in (b); -ERROR HY000: Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation ' IN ' +ERROR HY000: Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '=' select * from t1 where a in (b,c); ERROR HY000: Illegal mix of collations (latin1_general_ci,IMPLICIT), (latin1_swedish_ci,IMPLICIT), (latin1_danish_ci,IMPLICIT) for operation ' IN ' select * from t1 where 'a' in (a,b,c); @@ -146,7 +146,7 @@ explain extended select * from t1 where 'a' in (a,b,c collate latin1_bin); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where Warnings: -Note 1003 select test.t1.a AS `a`,test.t1.b AS `b`,test.t1.c AS `c` from test.t1 where (_latin1'a' in (test.t1.a,test.t1.b,(test.t1.c collate _latin1'latin1_bin'))) +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (_latin1'a' in (`test`.`t1`.`a`,`test`.`t1`.`b`,(`test`.`t1`.`c` collate latin1_bin))) drop table t1; set names utf8; create table t1 (a char(10) character set utf8 not null); @@ -193,3 +193,26 @@ select * from t1 where a in (NULL, 'aa'); a aa drop table t1; +CREATE TABLE t1 (a int PRIMARY KEY); +INSERT INTO t1 VALUES (44), (45), (46); +SELECT * FROM t1 WHERE a IN (45); +a +45 +SELECT * FROM t1 WHERE a NOT IN (0, 45); +a +44 +46 +SELECT * FROM t1 WHERE a NOT IN (45); +a +44 +46 +CREATE VIEW v1 AS SELECT * FROM t1 WHERE a NOT IN (45); +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` <> 45) +SELECT * FROM v1; +a +44 +46 +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index a58432cb06e..ac8e5eda8e8 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -3,10 +3,10 @@ create table t1 (a varchar(10), key(a)); insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); explain select * from t1 where a like 'abc%'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 11 NULL 1 Using where; Using index +1 SIMPLE t1 index a a 13 NULL 5 Using where; Using index explain select * from t1 where a like concat('abc','%'); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 11 NULL 1 Using where; Using index +1 SIMPLE t1 index a a 13 NULL 5 Using where; Using index select * from t1 where a like "abc%"; a abc diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 80b15d1d3c8..0149911e36b 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -120,6 +120,9 @@ ASIN(0.8+0.2) SELECT ASIN(1.2-0.2); ASIN(1.2-0.2) 1.5707963267949 +select format(4.55, 1), format(4.551, 1); +format(4.55, 1) format(4.551, 1) +4.6 4.6 explain extended select degrees(pi()),radians(360); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -127,11 +130,33 @@ Warnings: Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)` select rand(rand); ERROR 42S22: Unknown column 'rand' in 'field list' +create table t1 (col1 int, col2 decimal(60,30)); +insert into t1 values(1,1234567890.12345); +select format(col2,7) from t1; +format(col2,7) +1,234,567,890.1234500 +select format(col2,8) from t1; +format(col2,8) +1,234,567,890.12345000 +insert into t1 values(7,1234567890123456.12345); +select format(col2,6) from t1 where col1=7; +format(col2,6) +1,234,567,890,123,456.123450 +drop table t1; +select round(150, 2); +round(150, 2) +150.00 +select ceil(0.09); +ceil(0.09) +1 +select ceil(0.000000000000000009); +ceil(0.000000000000000009) +1 create table t1 select round(1, 6); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `round(1, 6)` double(7,6) NOT NULL default '0.000000' + `round(1, 6)` decimal(7,6) NOT NULL default '0.000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from t1; round(1, 6) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 2d464c891bf..36666fc827d 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -25,6 +25,8 @@ length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8''))) select length(format('nan', 2)) > 0; length(format('nan', 2)) > 0 1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'nan' select concat("$",format(2500,2)); concat("$",format(2500,2)) $2,500.00 @@ -49,3 +51,46 @@ select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) ); a 2004-01-06 12:34:00 drop table t1; +create table t1 as select uuid(), length(uuid()); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `uuid()` varchar(36) character set utf8 NOT NULL default '', + `length(uuid())` int(10) NOT NULL default '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a timestamp default '2005-05-05 01:01:01', +b timestamp default '2005-05-05 01:01:01'); +insert into t1 set a = now(); +select sleep(3); +sleep(3) +0 +update t1 set b = now(); +select timediff(b, a) >= '00:00:03' from t1; +timediff(b, a) >= '00:00:03' +1 +drop table t1; +set global query_cache_size=1355776; +create table t1 (a int); +insert into t1 values (1),(1),(1); +create table t2 (a datetime default null, b datetime default null); +insert into t2 set a = now(); +select a from t1 where sleep(1); +a +update t2 set b = now() where b is null; +insert into t2 set a = now(); +select a from t1 where sleep(a); +a +update t2 set b = now() where b is null; +insert into t2 set a = now(); +select a from t1 where sleep(1); +a +update t2 set b = now() where b is null; +select timediff(b, a) >= '00:00:03' from t2; +timediff(b, a) >= '00:00:03' +1 +1 +1 +drop table t2; +drop table t1; +set global query_cache_size=default; diff --git a/mysql-test/r/func_op.result b/mysql-test/r/func_op.result index 6cd975b0911..61b29e9380d 100644 --- a/mysql-test/r/func_op.result +++ b/mysql-test/r/func_op.result @@ -1,6 +1,6 @@ select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2; 1+1 1-1 1+1*2 8/5 8%5 mod(8,5) mod(8,5)|0 -(1+1)*-2 -2 0 3 1.60 3 3 3 4 +2 0 3 1.6000 3 3 3 4 explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result index 8228d6982d3..787463c6aa3 100644 --- a/mysql-test/r/func_regexp.result +++ b/mysql-test/r/func_regexp.result @@ -40,7 +40,7 @@ explain extended select * from t1 where xxx regexp('is a test of some long text id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Warnings: -Note 1003 select test.t1.xxx AS `xxx` from test.t1 where (test.t1.xxx regexp _latin1'is a test of some long text to') +Note 1003 select `test`.`t1`.`xxx` AS `xxx` from `test`.`t1` where (`test`.`t1`.`xxx` regexp _latin1'is a test of some long text to') select * from t1 where xxx regexp('is a test of some long text to '); xxx this is a test of some long text to see what happens diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result index 68c3baa7bde..f209866d953 100644 --- a/mysql-test/r/func_sapdb.result +++ b/mysql-test/r/func_sapdb.result @@ -56,15 +56,25 @@ subdate("1997-12-31 23:59:59.000001", 10) select datediff("1997-12-31 23:59:59.000001","1997-12-30"); datediff("1997-12-31 23:59:59.000001","1997-12-30") 1 +select datediff("1997-11-30 23:59:59.000001","1997-12-31"); +datediff("1997-11-30 23:59:59.000001","1997-12-31") +-31 +SET @@SQL_MODE="ALLOW_INVALID_DATES"; select datediff("1997-11-31 23:59:59.000001","1997-12-31"); datediff("1997-11-31 23:59:59.000001","1997-12-31") -30 -select datediff("1997-11-31 23:59:59.000001",null); -datediff("1997-11-31 23:59:59.000001",null) +SET @@SQL_MODE=""; +select datediff("1997-11-31 23:59:59.000001","1997-12-31"); +datediff("1997-11-31 23:59:59.000001","1997-12-31") +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '1997-11-31 23:59:59.000001' +select datediff("1997-11-30 23:59:59.000001",null); +datediff("1997-11-30 23:59:59.000001",null) NULL -select weekofyear("1997-11-31 23:59:59.000001"); -weekofyear("1997-11-31 23:59:59.000001") -49 +select weekofyear("1997-11-30 23:59:59.000001"); +weekofyear("1997-11-30 23:59:59.000001") +48 select makedate(1997,1); makedate(1997,1) 1997-01-01 @@ -167,12 +177,12 @@ date("1997-12-31 23:59:59.000001") as f8, time("1997-12-31 23:59:59.000001") as f9; describe t1; Field Type Null Key Default Extra -f1 date 0000-00-00 +f1 date NO 0000-00-00 f2 datetime YES NULL f3 time YES NULL -f4 time 00:00:00 -f5 time 00:00:00 -f6 time 00:00:00 +f4 time NO 00:00:00 +f5 time NO 00:00:00 +f6 time NO 00:00:00 f7 datetime YES NULL f8 date YES NULL f9 time YES NULL @@ -199,16 +209,17 @@ ttt qqq NULL NULL NULL NULL 2001-01-01 02:02:02 26:02:02 -SELECT TIMEDIFF(t1,t4) As ttt, TIMEDIFF(t2, t3) As qqq from test; -ttt qqq --744:00:00 NULL -26305:01:02 22:58:58 --26305:01:02 -22:58:58 -NULL 26:02:02 -00:00:00 -26:02:02 -NULL NULL -NULL NULL -00:00:00 -24:00:00 +SELECT TIMEDIFF(t1, t4) As ttt, TIMEDIFF(t2, t3) As qqq, +TIMEDIFF(t3, t2) As eee, TIMEDIFF(t2, t4) As rrr from test; +ttt qqq eee rrr +-744:00:00 NULL NULL NULL +26305:01:02 22:58:58 -22:58:58 NULL +-26305:01:02 -22:58:58 22:58:58 NULL +NULL 26:02:02 -26:02:02 NULL +00:00:00 -26:02:02 26:02:02 NULL +NULL NULL NULL NULL +NULL NULL NULL NULL +00:00:00 -24:00:00 24:00:00 NULL drop table t1, test; select addtime("-01:01:01.01", "-23:59:59.1") as a; a diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result index ca6e0a8c319..aa71cee0752 100644 --- a/mysql-test/r/func_set.result +++ b/mysql-test/r/func_set.result @@ -30,6 +30,12 @@ Y-N-N-Y-N Y,N,N,Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N, select elt(2,1),field(NULL,"a","b","c"); elt(2,1) field(NULL,"a","b","c") NULL 0 +select field("b","a",NULL),field(1,0,NULL)+0,field(1.0,0.0,NULL)+0.0,field(1.0e1,0.0e1,NULL)+0.0e1; +field("b","a",NULL) field(1,0,NULL)+0 field(1.0,0.0,NULL)+0.0 field(1.0e1,0.0e1,NULL)+0.0e1 +0 0 0.0 0 +select field(NULL,"a",NULL),field(NULL,0,NULL)+0,field(NULL,0.0,NULL)+0.0,field(NULL,0.0e1,NULL)+0.0e1; +field(NULL,"a",NULL) field(NULL,0,NULL)+0 field(NULL,0.0,NULL)+0.0 field(NULL,0.0e1,NULL)+0.0e1 +0 0 0.0 0 select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c"); find_in_set("","a,b,c") find_in_set("","a,b,c,") find_in_set("",",a,b,c") 0 4 1 diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index ae6578795f6..c7e69ae1d31 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1,t2; set names latin1; select 'hello',"'hello'",'""hello""','''h''e''l''l''o''',"hel""lo",'hel\'lo'; hello 'hello' ""hello"" 'h'e'l'l'o' hel"lo hel'lo @@ -165,6 +165,9 @@ the king of the select concat(':',ltrim(' left '),':',rtrim(' right '),':'); concat(':',ltrim(' left '),':',rtrim(' right '),':') :left : right: +select concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':'); +concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':') +:left : right: select concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':'); concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':') :left: right: @@ -350,6 +353,8 @@ Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - t select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("sql" in ("mysql")); position("0" in "baaa" in (1)) position("0" in "1" in (1,2,3)) position("sql" in ("mysql")) 1 0 3 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'baaa' select position(("1" in (1,2,3)) in "01"); position(("1" in (1,2,3)) in "01") 2 @@ -376,7 +381,7 @@ category int(10) unsigned default NULL, program int(10) unsigned default NULL, bugdesc text, created datetime default NULL, -modified timestamp(14) NOT NULL, +modified timestamp NOT NULL, bugstatus int(10) unsigned default NULL, submitter int(10) unsigned default NULL ) ENGINE=MyISAM; @@ -507,9 +512,9 @@ select FIELD(_latin2'b','A','B'); ERROR HY000: Illegal mix of collations (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'field' select FIELD('b',_latin2'A','B'); ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE), (latin2_general_ci,COERCIBLE), (latin1_swedish_ci,COERCIBLE) for operation 'field' -select FIELD('b',_latin2'A','B',1); -FIELD('b',_latin2'A','B',1) -1 +select FIELD('1',_latin2'3','2',1); +FIELD('1',_latin2'3','2',1) +3 select POSITION(_latin1'B' IN _latin1'abcd'); POSITION(_latin1'B' IN _latin1'abcd') 2 @@ -534,9 +539,9 @@ select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2); SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2) abcdabc select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); -ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'substr_index' +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (latin2_general_ci,COERCIBLE) for operation 'substring_index' select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_general_ci,_latin1'd' COLLATE latin1_bin,2); -ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'substr_index' +ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'substring_index' select _latin1'B' between _latin1'a' and _latin1'c'; _latin1'B' between _latin1'a' and _latin1'c' 1 @@ -711,37 +716,37 @@ Warning 1265 Data truncated for column 'format(130,10)' at row 1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `bin(130)` char(64) NOT NULL default '', - `oct(130)` char(64) NOT NULL default '', - `conv(130,16,10)` char(64) NOT NULL default '', - `hex(130)` char(6) NOT NULL default '', - `char(130)` char(1) NOT NULL default '', - `format(130,10)` char(4) NOT NULL default '', - `left(_latin2'a',1)` char(1) character set latin2 NOT NULL default '', - `right(_latin2'a',1)` char(1) character set latin2 NOT NULL default '', - `lcase(_latin2'a')` char(1) character set latin2 NOT NULL default '', - `ucase(_latin2'a')` char(1) character set latin2 NOT NULL default '', - `substring(_latin2'a',1,1)` char(1) character set latin2 NOT NULL default '', - `concat(_latin2'a',_latin2'b')` char(2) character set latin2 NOT NULL default '', - `lpad(_latin2'a',4,_latin2'b')` char(4) character set latin2 NOT NULL default '', - `rpad(_latin2'a',4,_latin2'b')` char(4) character set latin2 NOT NULL default '', - `concat_ws(_latin2'a',_latin2'b')` char(1) character set latin2 NOT NULL default '', - `make_set(255,_latin2'a',_latin2'b',_latin2'c')` char(5) character set latin2 NOT NULL default '', - `export_set(255,_latin2'y',_latin2'n',_latin2' ')` char(127) character set latin2 NOT NULL default '', - `trim(_latin2' a ')` char(3) character set latin2 NOT NULL default '', - `ltrim(_latin2' a ')` char(3) character set latin2 NOT NULL default '', - `rtrim(_latin2' a ')` char(3) character set latin2 NOT NULL default '', - `trim(LEADING _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '', - `trim(TRAILING _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '', - `trim(BOTH _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '', - `repeat(_latin2'a',10)` char(10) character set latin2 NOT NULL default '', - `reverse(_latin2'ab')` char(2) character set latin2 NOT NULL default '', - `quote(_latin2'ab')` char(6) character set latin2 NOT NULL default '', - `soundex(_latin2'ab')` char(4) character set latin2 NOT NULL default '', - `substring(_latin2'ab',1)` char(2) character set latin2 NOT NULL default '', - `insert(_latin2'abcd',2,3,_latin2'ef')` char(6) character set latin2 NOT NULL default '', - `replace(_latin2'abcd',_latin2'b',_latin2'B')` char(4) character set latin2 NOT NULL default '', - `encode('abcd','ab')` binary(4) NOT NULL default '' + `bin(130)` varchar(64) NOT NULL default '', + `oct(130)` varchar(64) NOT NULL default '', + `conv(130,16,10)` varchar(64) NOT NULL default '', + `hex(130)` varchar(6) NOT NULL default '', + `char(130)` varchar(1) NOT NULL default '', + `format(130,10)` varchar(4) NOT NULL default '', + `left(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '', + `right(_latin2'a',1)` varchar(1) character set latin2 NOT NULL default '', + `lcase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '', + `ucase(_latin2'a')` varchar(1) character set latin2 NOT NULL default '', + `substring(_latin2'a',1,1)` varchar(1) character set latin2 NOT NULL default '', + `concat(_latin2'a',_latin2'b')` varchar(2) character set latin2 NOT NULL default '', + `lpad(_latin2'a',4,_latin2'b')` varchar(4) character set latin2 NOT NULL default '', + `rpad(_latin2'a',4,_latin2'b')` varchar(4) character set latin2 NOT NULL default '', + `concat_ws(_latin2'a',_latin2'b')` varchar(1) character set latin2 NOT NULL default '', + `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) character set latin2 NOT NULL default '', + `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) character set latin2 NOT NULL default '', + `trim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '', + `ltrim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '', + `rtrim(_latin2' a ')` varchar(3) character set latin2 NOT NULL default '', + `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '', + `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '', + `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) character set latin2 NOT NULL default '', + `repeat(_latin2'a',10)` varchar(10) character set latin2 NOT NULL default '', + `reverse(_latin2'ab')` varchar(2) character set latin2 NOT NULL default '', + `quote(_latin2'ab')` varchar(6) character set latin2 NOT NULL default '', + `soundex(_latin2'ab')` varchar(4) character set latin2 NOT NULL default '', + `substring(_latin2'ab',1)` varchar(2) character set latin2 NOT NULL default '', + `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) character set latin2 NOT NULL default '', + `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) character set latin2 NOT NULL default '', + `encode('abcd','ab')` varbinary(4) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a char character set latin2); @@ -806,7 +811,7 @@ explain extended select md5('hello'), sha('abc'), sha1('abc'), soundex(''), 'moo id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select md5(_latin1'hello') AS `md5('hello')`,sha(_latin1'abc') AS `sha('abc')`,sha(_latin1'abc') AS `sha1('abc')`,soundex(_latin1'') AS `soundex('')`,(soundex(_latin1'mood') = soundex(_latin1'mud')) AS `'mood' sounds like 'mud'`,aes_decrypt(aes_encrypt(_latin1'abc',_latin1'1'),_latin1'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`,concat(_latin1'*',repeat(_latin1' ',5),_latin1'*') AS `concat('*',space(5),'*')`,reverse(_latin1'abc') AS `reverse('abc')`,rpad(_latin1'a',4,_latin1'1') AS `rpad('a',4,'1')`,lpad(_latin1'a',4,_latin1'1') AS `lpad('a',4,'1')`,concat_ws(_latin1',',_latin1'',NULL,_latin1'a') AS `concat_ws(',','',NULL,'a')`,make_set(255,_latin2'a',_latin2'b',_latin2'c') AS `make_set(255,_latin2'a',_latin2'b',_latin2'c')`,elt(2,1) AS `elt(2,1)`,locate(_latin1'a',_latin1'b',2) AS `locate("a","b",2)`,format(130,10) AS `format(130,10)`,char(0) AS `char(0)`,conv(130,16,10) AS `conv(130,16,10)`,hex(130) AS `hex(130)`,cast(_latin1'HE' as char charset binary) AS `binary 'HE'`,export_set(255,_latin2'y',_latin2'n',_latin2' ') AS `export_set(255,_latin2'y',_latin2'n',_latin2' ')`,field((_latin1'b' collate _latin1'latin1_bin'),_latin1'A',_latin1'B') AS `FIELD('b' COLLATE latin1_bin,'A','B')`,find_in_set(_latin1'B',_latin1'a,b,c,d') AS `FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')`,collation(conv(130,16,10)) AS `collation(conv(130,16,10))`,coercibility(conv(130,16,10)) AS `coercibility(conv(130,16,10))`,length(_latin1'\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,concat(_latin1'monty',_latin1' was here ',_latin1'again') AS `concat('monty',' was here ','again')`,length(_latin1'hello') AS `length('hello')`,char(ascii(_latin1'h')) AS `char(ascii('h'))`,ord(_latin1'h') AS `ord('h')`,quote((1 / 0)) AS `quote(1/0)`,crc32(_latin1'123') AS `crc32("123")`,replace(_latin1'aaaa',_latin1'a',_latin1'b') AS `replace('aaaa','a','b')`,insert(_latin1'txs',2,1,_latin1'hi') AS `insert('txs',2,1,'hi')`,left(_latin2'a',1) AS `left(_latin2'a',1)`,right(_latin2'a',1) AS `right(_latin2'a',1)`,lcase(_latin2'a') AS `lcase(_latin2'a')`,ucase(_latin2'a') AS `ucase(_latin2'a')`,substr(_latin1'abcdefg',3,2) AS `SUBSTR('abcdefg',3,2)`,substr_index(_latin1'1abcd;2abcd;3abcd;4abcd',_latin1';',2) AS `substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)`,trim(_latin2' a ') AS `trim(_latin2' a ')`,ltrim(_latin2' a ') AS `ltrim(_latin2' a ')`,rtrim(_latin2' a ') AS `rtrim(_latin2' a ')`,decode(encode(repeat(_latin1'a',100000))) AS `decode(encode(repeat("a",100000),"monty"),"monty")` +Note 1003 select md5(_latin1'hello') AS `md5('hello')`,sha(_latin1'abc') AS `sha('abc')`,sha(_latin1'abc') AS `sha1('abc')`,soundex(_latin1'') AS `soundex('')`,(soundex(_latin1'mood') = soundex(_latin1'mud')) AS `'mood' sounds like 'mud'`,aes_decrypt(aes_encrypt(_latin1'abc',_latin1'1'),_latin1'1') AS `aes_decrypt(aes_encrypt('abc','1'),'1')`,concat(_latin1'*',repeat(_latin1' ',5),_latin1'*') AS `concat('*',space(5),'*')`,reverse(_latin1'abc') AS `reverse('abc')`,rpad(_latin1'a',4,_latin1'1') AS `rpad('a',4,'1')`,lpad(_latin1'a',4,_latin1'1') AS `lpad('a',4,'1')`,concat_ws(_latin1',',_latin1'',NULL,_latin1'a') AS `concat_ws(',','',NULL,'a')`,make_set(255,_latin2'a',_latin2'b',_latin2'c') AS `make_set(255,_latin2'a',_latin2'b',_latin2'c')`,elt(2,1) AS `elt(2,1)`,locate(_latin1'a',_latin1'b',2) AS `locate("a","b",2)`,format(130,10) AS `format(130,10)`,char(0) AS `char(0)`,conv(130,16,10) AS `conv(130,16,10)`,hex(130) AS `hex(130)`,cast(_latin1'HE' as char charset binary) AS `binary 'HE'`,export_set(255,_latin2'y',_latin2'n',_latin2' ') AS `export_set(255,_latin2'y',_latin2'n',_latin2' ')`,field((_latin1'b' collate latin1_bin),_latin1'A',_latin1'B') AS `FIELD('b' COLLATE latin1_bin,'A','B')`,find_in_set(_latin1'B',_latin1'a,b,c,d') AS `FIND_IN_SET(_latin1'B',_latin1'a,b,c,d')`,collation(conv(130,16,10)) AS `collation(conv(130,16,10))`,coercibility(conv(130,16,10)) AS `coercibility(conv(130,16,10))`,length(_latin1'\n \r\0\\_\\%\\') AS `length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,bit_length(_latin1'\n \r\0\\_\\%\\') AS `bit_length('\n\t\r\b\0\_\%\\')`,concat(_latin1'monty',_latin1' was here ',_latin1'again') AS `concat('monty',' was here ','again')`,length(_latin1'hello') AS `length('hello')`,char(ascii(_latin1'h')) AS `char(ascii('h'))`,ord(_latin1'h') AS `ord('h')`,quote((1 / 0)) AS `quote(1/0)`,crc32(_latin1'123') AS `crc32("123")`,replace(_latin1'aaaa',_latin1'a',_latin1'b') AS `replace('aaaa','a','b')`,insert(_latin1'txs',2,1,_latin1'hi') AS `insert('txs',2,1,'hi')`,left(_latin2'a',1) AS `left(_latin2'a',1)`,right(_latin2'a',1) AS `right(_latin2'a',1)`,lcase(_latin2'a') AS `lcase(_latin2'a')`,ucase(_latin2'a') AS `ucase(_latin2'a')`,substr(_latin1'abcdefg',3,2) AS `SUBSTR('abcdefg',3,2)`,substring_index(_latin1'1abcd;2abcd;3abcd;4abcd',_latin1';',2) AS `substring_index("1abcd;2abcd;3abcd;4abcd", ';', 2)`,trim(_latin2' a ') AS `trim(_latin2' a ')`,ltrim(_latin2' a ') AS `ltrim(_latin2' a ')`,rtrim(_latin2' a ') AS `rtrim(_latin2' a ')`,decode(encode(repeat(_latin1'a',100000))) AS `decode(encode(repeat("a",100000),"monty"),"monty")` SELECT lpad(12345, 5, "#"); lpad(12345, 5, "#") 12345 @@ -826,16 +831,16 @@ drop table t1, t2; create table t1 (c1 INT, c2 INT UNSIGNED); insert into t1 values ('21474836461','21474836461'); Warnings: -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 insert into t1 values ('-21474836461','-21474836461'); Warnings: -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 show warnings; Level Code Message -Warning 1265 Data truncated for column 'c1' at row 1 -Warning 1265 Data truncated for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 select * from t1; c1 c2 2147483647 4294967295 @@ -856,6 +861,12 @@ NULL select trim('xyz' from null) as "must_be_null"; must_be_null NULL +select trim(leading NULL from 'kate') as "must_be_null"; +must_be_null +NULL +select trim(trailing NULL from 'xyz') as "must_be_null"; +must_be_null +NULL CREATE TABLE t1 ( id int(11) NOT NULL auto_increment, a bigint(20) unsigned default NULL, diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index d49da90fa28..1c1c6dff21e 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -46,8 +46,8 @@ create table t1 (version char(40)) select database(), user(), version() as 'vers show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `database()` char(34) character set utf8 default NULL, - `user()` char(77) character set utf8 NOT NULL default '', + `database()` varchar(34) character set utf8 default NULL, + `user()` varchar(77) character set utf8 NOT NULL default '', `version` char(40) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -61,8 +61,8 @@ create table t1 select charset(_utf8'a'), collation(_utf8'a'); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `charset(_utf8'a')` char(64) character set utf8 NOT NULL default '', - `collation(_utf8'a')` char(64) character set utf8 NOT NULL default '' + `charset(_utf8'a')` varchar(64) character set utf8 NOT NULL default '', + `collation(_utf8'a')` varchar(64) character set utf8 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select TRUE,FALSE,NULL; diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 8a28312b348..32883921e70 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -77,9 +77,9 @@ select * from t1 where 1 xor 1; a explain extended select * from t1 where 1 xor 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: -Note 1003 select test.t1.a AS `a` from test.t1 where (1 xor 1) +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` select - a from t1; - a -1 @@ -87,7 +87,7 @@ explain extended select - a from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Warnings: -Note 1003 select -(test.t1.a) AS `- a` from test.t1 +Note 1003 select -(`test`.`t1`.`a`) AS `- a` from `test`.`t1` drop table t1; select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 @@ -108,7 +108,7 @@ explain extended select _koi8r'a' = _koi8r'A' COLLATE koi8r_general_ci; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select (_koi8r'a' = (_koi8r'A' collate _latin1'koi8r_general_ci')) AS `_koi8r'a' = _koi8r'A' COLLATE koi8r_general_ci` +Note 1003 select (_koi8r'a' = (_koi8r'A' collate koi8r_general_ci)) AS `_koi8r'a' = _koi8r'A' COLLATE koi8r_general_ci` select _koi8r'a' = _koi8r'A' COLLATE koi8r_bin; _koi8r'a' = _koi8r'A' COLLATE koi8r_bin 0 @@ -183,3 +183,13 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3 2 2 -2 -2 +create table t1 (a int, b int); +insert into t1 values (1,2), (2,3), (3,4), (4,5); +select * from t1 where a not between 1 and 2; +a b +3 4 +4 5 +select * from t1 where a not between 1 and 2 and b not between 3 and 4; +a b +4 5 +drop table t1; diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index fc872285acb..87aa4b98d81 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -247,9 +247,13 @@ date_add("1997-12-31 23:59:59",INTERVAL -100000 DAY) select date_add("1997-12-31 23:59:59",INTERVAL 100000 MONTH); date_add("1997-12-31 23:59:59",INTERVAL 100000 MONTH) NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow select date_add("1997-12-31 23:59:59",INTERVAL -100000 YEAR); date_add("1997-12-31 23:59:59",INTERVAL -100000 YEAR) NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" MINUTE_SECOND); date_add("1997-12-31 23:59:59",INTERVAL "10000:1" MINUTE_SECOND) 1998-01-07 22:40:00 @@ -301,9 +305,13 @@ NULL select date_add("9999-12-31 23:59:59",INTERVAL 1 SECOND); date_add("9999-12-31 23:59:59",INTERVAL 1 SECOND) NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow select date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND); date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND) NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '0000-00-00 00:00:00' select date_add('1998-01-30',Interval 1 month); date_add('1998-01-30',Interval 1 month) 1998-02-28 @@ -373,15 +381,23 @@ SELECT "1900-01-01 00:00:00" + INTERVAL 1<<20 HOUR; SELECT "1900-01-01 00:00:00" + INTERVAL 1<<38 SECOND; "1900-01-01 00:00:00" + INTERVAL 1<<38 SECOND NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow SELECT "1900-01-01 00:00:00" + INTERVAL 1<<33 MINUTE; "1900-01-01 00:00:00" + INTERVAL 1<<33 MINUTE NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow SELECT "1900-01-01 00:00:00" + INTERVAL 1<<30 HOUR; "1900-01-01 00:00:00" + INTERVAL 1<<30 HOUR NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow SELECT "1900-01-01 00:00:00" + INTERVAL "1000000000:214748364700" MINUTE_SECOND; "1900-01-01 00:00:00" + INTERVAL "1000000000:214748364700" MINUTE_SECOND NULL +Warnings: +Warning 1441 Datetime function: datetime field overflow create table t1 (ctime varchar(20)); insert into t1 values ('2001-01-12 12:23:40'); select ctime, hour(ctime) from t1; @@ -424,6 +440,9 @@ insert into t1 values ("0000-00-00", "0000-00-00", "0000-00-00", "0000-00-00"); select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear(c) from t1; dayofyear("0000-00-00") dayofyear(d) dayofyear(dt) dayofyear(t) dayofyear(c) NULL NULL NULL NULL NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '0000-00-00' +Warning 1292 Truncated incorrect datetime value: '0000-00-00' select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1; dayofmonth("0000-00-00") dayofmonth(d) dayofmonth(dt) dayofmonth(t) dayofmonth(c) 0 0 0 0 0 @@ -436,22 +455,31 @@ quarter("0000-00-00") quarter(d) quarter(dt) quarter(t) quarter(c) select week("0000-00-00"),week(d),week(dt),week(t),week(c) from t1; week("0000-00-00") week(d) week(dt) week(t) week(c) NULL NULL NULL NULL NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '0000-00-00' +Warning 1292 Truncated incorrect datetime value: '0000-00-00' select year("0000-00-00"),year(d),year(dt),year(t),year(c) from t1; year("0000-00-00") year(d) year(dt) year(t) year(c) 0 0 0 0 0 select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) from t1; yearweek("0000-00-00") yearweek(d) yearweek(dt) yearweek(t) yearweek(c) NULL NULL NULL NULL NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '0000-00-00' +Warning 1292 Truncated incorrect datetime value: '0000-00-00' select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t1; to_days("0000-00-00") to_days(d) to_days(dt) to_days(t) to_days(c) NULL NULL NULL NULL NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '0000-00-00' +Warning 1292 Truncated incorrect datetime value: '0000-00-00' select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1; extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c) 0 0 0 0 0 drop table t1; CREATE TABLE t1 ( start datetime default NULL); INSERT INTO t1 VALUES ('2002-10-21 00:00:00'),('2002-10-28 00:00:00'),('2002-11-04 00:00:00'); -CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL); +CREATE TABLE t2 ( ctime1 timestamp NOT NULL, ctime2 timestamp NOT NULL); INSERT INTO t2 VALUES (20021029165106,20021105164731); CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL); INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31"); @@ -539,11 +567,68 @@ date_add(date,INTERVAL "1 1:1" DAY_MINUTE) select date_add(date,INTERVAL "1 1:1:1" DAY_SECOND) from t1; date_add(date,INTERVAL "1 1:1:1" DAY_SECOND) 2003-01-03 01:01:01 +select date_add(date,INTERVAL "1" WEEK) from t1; +date_add(date,INTERVAL "1" WEEK) +2003-01-09 00:00:00 +select date_add(date,INTERVAL "1" QUARTER) from t1; +date_add(date,INTERVAL "1" QUARTER) +2003-04-02 +select timestampadd(MINUTE, 1, date) from t1; +timestampadd(MINUTE, 1, date) +2003-01-02 00:01:00 +select timestampadd(WEEK, 1, date) from t1; +timestampadd(WEEK, 1, date) +2003-01-09 00:00:00 +select timestampadd(SQL_TSI_SECOND, 1, date) from t1; +timestampadd(SQL_TSI_SECOND, 1, date) +2003-01-02 00:00:01 +select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1; +timestampadd(SQL_TSI_FRAC_SECOND, 1, date) +2003-01-02 00:00:00.000001 +select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a; +a +3 +select timestampdiff(YEAR, '2002-05-01', '2001-01-01') as a; +a +-1 +select timestampdiff(QUARTER, '2002-05-01', '2001-01-01') as a; +a +-5 +select timestampdiff(MONTH, '2000-03-28', '2000-02-29') as a; +a +0 +select timestampdiff(MONTH, '1991-03-28', '2000-02-29') as a; +a +107 +select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a; +a +12 +select timestampdiff(SQL_TSI_HOUR, '2001-02-01', '2001-05-01') as a; +a +2136 +select timestampdiff(SQL_TSI_DAY, '2001-02-01', '2001-05-01') as a; +a +89 +select timestampdiff(SQL_TSI_MINUTE, '2001-02-01 12:59:59', '2001-05-01 12:58:59') as a; +a +128159 +select timestampdiff(SQL_TSI_SECOND, '2001-02-01 12:59:59', '2001-05-01 12:58:58') as a; +a +7689539 +select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a; +a +7689538999999 +select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, +timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, +timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, +timestampdiff(SQL_TSI_DAY, '2000-02-01', '2000-03-01') as a4; +a1 a2 a3 a4 +28 28 29 29 select date_add(time,INTERVAL 1 SECOND) from t1; date_add(time,INTERVAL 1 SECOND) NULL Warnings: -Warning 1264 Data truncated; out of range for column 'time' at row 1 +Warning 1264 Out of range value adjusted for column 'time' at row 1 drop table t1; select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2, last_day('2003-03-32') as f3, last_day('2003-04-01') as f4, @@ -557,7 +642,7 @@ create table t1 select last_day('2000-02-05') as a, from_days(to_days("960101")) as b; describe t1; Field Type Null Key Default Extra -a date 0000-00-00 +a date NO 0000-00-00 b date YES NULL select * from t1; a b @@ -611,6 +696,12 @@ SELECT count(*) FROM t1 WHERE d>FROM_DAYS(TO_DAYS(@TMP)) AND d<=FROM_DAYS(TO_DAY count(*) 3 DROP TABLE t1; +explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1, +timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used +Warnings: +Note 1003 select timestampdiff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2` select last_day('2005-00-00'); last_day('2005-00-00') NULL @@ -626,3 +717,46 @@ last_day('2005-01-00') NULL Warnings: Warning 1292 Truncated incorrect datetime value: '2005-01-00' +select time_format('100:00:00', '%H %k %h %I %l'); +time_format('100:00:00', '%H %k %h %I %l') +100 100 04 04 4 +create table t1 (a timestamp default '2005-05-05 01:01:01', +b timestamp default '2005-05-05 01:01:01'); +create function t_slow_sysdate() returns timestamp +begin +do sleep(2); +return sysdate(); +end; +// +insert into t1 set a = sysdate(), b = t_slow_sysdate();// +create trigger t_before before insert on t1 +for each row begin +set new.b = t_slow_sysdate(); +end +// +insert into t1 set a = sysdate(); +select a != b from t1; +a != b +1 +1 +drop trigger t_before; +drop function t_slow_sysdate; +drop table t1; +create table t1 (a datetime, i int, b datetime); +insert into t1 select sysdate(), sleep(1), sysdate() from dual; +select a != b from t1; +a != b +1 +drop table t1; +create procedure t_sysdate() +begin +select sysdate() into @a; +do sleep(2); +select sysdate() into @b; +select @a != @b; +end; +// +call t_sysdate(); +@a != @b +1 +drop procedure t_sysdate; diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 5283ef4d889..0f95778ea75 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -8,7 +8,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `fid` int(11) NOT NULL auto_increment, - `g` geometry NOT NULL default '', + `g` geometry NOT NULL, PRIMARY KEY (`fid`), SPATIAL KEY `g` (`g`(32)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -167,7 +167,7 @@ count(*) 150 EXPLAIN SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range g g 32 NULL 7 Using where +1 SIMPLE t1 range g g 32 NULL 8 Using where SELECT fid, AsText(g) FROM t1 WHERE Within(g, GeomFromText('Polygon((140 140,160 140,160 160,140 160,140 140))')); fid AsText(g) 1 LINESTRING(150 150,150 150) @@ -291,7 +291,7 @@ SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( `fid` int(11) NOT NULL auto_increment, - `g` geometry NOT NULL default '', + `g` geometry NOT NULL, PRIMARY KEY (`fid`), SPATIAL KEY `g` (`g`(32)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -758,7 +758,6 @@ SPATIAL KEY(g) INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)')); drop table t1; CREATE TABLE t1 ( -geoobjid INT NOT NULL, line LINESTRING NOT NULL, kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po', name VARCHAR(32), @@ -802,7 +801,7 @@ CREATE TABLE t1 (st varchar(100)); INSERT INTO t1 VALUES ("Fake string"); CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)); INSERT INTO t2 SELECT GeomFromText(st) FROM t1; -ERROR HY000: Unknown error +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`(32))) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 (geometry) VALUES diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index c51b07f09d6..dfe375fd694 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -9,35 +9,35 @@ CREATE TABLE gis_geometrycollection (fid INTEGER NOT NULL PRIMARY KEY, g GEOMET CREATE TABLE gis_geometry (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRY); SHOW FIELDS FROM gis_point; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g point YES NULL SHOW FIELDS FROM gis_line; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g linestring YES NULL SHOW FIELDS FROM gis_polygon; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g polygon YES NULL SHOW FIELDS FROM gis_multi_point; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g multipoint YES NULL SHOW FIELDS FROM gis_multi_line; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g multilinestring YES NULL SHOW FIELDS FROM gis_multi_polygon; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g multipolygon YES NULL SHOW FIELDS FROM gis_geometrycollection; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g geometrycollection YES NULL SHOW FIELDS FROM gis_geometry; Field Type Null Key Default Extra -fid int(11) PRI 0 +fid int(11) NO PRI g geometry YES NULL INSERT INTO gis_point VALUES (101, PointFromText('POINT(10 10)')), @@ -228,7 +228,7 @@ explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelo id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 Warnings: -Note 1003 select dimension(test.gis_geometry.g) AS `Dimension(g)`,geometrytype(test.gis_geometry.g) AS `GeometryType(g)`,isempty(test.gis_geometry.g) AS `IsEmpty(g)`,astext(envelope(test.gis_geometry.g)) AS `AsText(Envelope(g))` from test.gis_geometry +Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry` SELECT fid, X(g) FROM gis_point; fid X(g) 101 10 @@ -245,7 +245,7 @@ explain extended select X(g),Y(g) FROM gis_point; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 Warnings: -Note 1003 select x(test.gis_point.g) AS `X(g)`,y(test.gis_point.g) AS `Y(g)` from test.gis_point +Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point` SELECT fid, AsText(StartPoint(g)) FROM gis_line; fid AsText(StartPoint(g)) 105 POINT(0 0) @@ -280,7 +280,7 @@ explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),Num id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select astext(startpoint(test.gis_line.g)) AS `AsText(StartPoint(g))`,astext(endpoint(test.gis_line.g)) AS `AsText(EndPoint(g))`,glength(test.gis_line.g) AS `GLength(g)`,numpoints(test.gis_line.g) AS `NumPoints(g)`,astext(pointn(test.gis_line.g,2)) AS `AsText(PointN(g, 2))`,isclosed(test.gis_line.g) AS `IsClosed(g)` from test.gis_line +Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line` SELECT fid, AsText(Centroid(g)) FROM gis_polygon; fid AsText(Centroid(g)) 108 POINT(15 15) @@ -310,7 +310,7 @@ explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumI id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select astext(centroid(test.gis_polygon.g)) AS `AsText(Centroid(g))`,area(test.gis_polygon.g) AS `Area(g)`,astext(exteriorring(test.gis_polygon.g)) AS `AsText(ExteriorRing(g))`,numinteriorrings(test.gis_polygon.g) AS `NumInteriorRings(g)`,astext(interiorringn(test.gis_polygon.g,1)) AS `AsText(InteriorRingN(g, 1))` from test.gis_polygon +Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon` SELECT fid, IsClosed(g) FROM gis_multi_line; fid IsClosed(g) 114 0 @@ -349,7 +349,7 @@ explain extended SELECT fid, NumGeometries(g) from gis_multi_point; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select test.gis_multi_point.fid AS `fid`,numgeometries(test.gis_multi_point.g) AS `NumGeometries(g)` from test.gis_multi_point +Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point` SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; fid AsText(GeometryN(g, 2)) 111 POINT(10 10) @@ -377,7 +377,7 @@ explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select test.gis_multi_point.fid AS `fid`,astext(geometryn(test.gis_multi_point.g,2)) AS `AsText(GeometryN(g, 2))` from test.gis_multi_point +Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point` SELECT g1.fid as first, g2.fid as second, Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, @@ -397,7 +397,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE g1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 Warnings: -Note 1003 select test.g1.fid AS `first`,test.g2.fid AS `second`,within(test.g1.g,test.g2.g) AS `w`,contains(test.g1.g,test.g2.g) AS `c`,overlaps(test.g1.g,test.g2.g) AS `o`,equals(test.g1.g,test.g2.g) AS `e`,disjoint(test.g1.g,test.g2.g) AS `d`,touches(test.g1.g,test.g2.g) AS `t`,intersects(test.g1.g,test.g2.g) AS `i`,crosses(test.g1.g,test.g2.g) AS `r` from test.gis_geometrycollection g1 join test.gis_geometrycollection g2 order by test.g1.fid,test.g2.fid +Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE t1 ( gp point, @@ -430,7 +430,7 @@ mln multilinestring YES NULL mpg multipolygon YES NULL gc geometrycollection YES NULL gm geometry YES NULL -fid int(11) 0 +fid int(11) NO DROP TABLE t1; SELECT AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)')))); AsText(GeometryFromWKB(AsWKB(GeometryFromText('POINT(1 4)')))) @@ -461,9 +461,9 @@ Note 1003 select issimple(multipoint(point(3,6),point(4,10))) AS `issimple(Multi create table t1 (a geometry not null); insert into t1 values (GeomFromText('Point(1 2)')); insert into t1 values ('Garbage'); -ERROR HY000: Unknown error +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert IGNORE into t1 values ('Garbage'); -ERROR HY000: Unknown error +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field alter table t1 add spatial index(a); drop table t1; create table t1(a geometry not null, spatial index(a)); @@ -655,3 +655,18 @@ t1 where object_id=85984; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) 85984 MULTIPOLYGON 0 POINT(-114.87787186923 36.33101763469) drop table t1; +create table t1 (fl geometry); +insert into t1 values (1); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 values (1.11); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 values ("qwerty"); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +insert into t1 values (pointfromtext('point(1,1)')); +ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field +drop table t1; +create table t1 (s1 geometry not null,s2 char(100)); +create trigger t1_bu before update on t1 for each row set new.s1 = null; +insert into t1 values (null,null); +ERROR 23000: Column 's1' cannot be null +drop table t1; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index a50293752ec..14393be1cc8 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1,4 +1,5 @@ drop table if exists t1; +drop database if exists mysqltest; SET NAMES binary; delete from mysql.user where user='mysqltest_1'; delete from mysql.db where user='mysqltest_1'; @@ -10,8 +11,8 @@ GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3 GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' grant delete on mysqltest.* to mysqltest_1@localhost; select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' @@ -41,15 +42,15 @@ delete from mysql.user where user='mysqltest_1'; flush privileges; grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 10; select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 10 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30; select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 10 20 30 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 @@ -84,7 +85,7 @@ revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION revoke all privileges on mysqltest.* from mysqltest_1@localhost; delete from mysql.user where user='mysqltest_1'; flush privileges; @@ -157,6 +158,10 @@ select 1; 1 1 insert into mysql.user (host, user) values ('localhost', 'test11'); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value insert into mysql.db (host, db, user, select_priv) values ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); alter table mysql.db order by db asc; @@ -240,17 +245,19 @@ grant select on test.* to drop_user3@localhost; grant select on *.* to drop_user4@localhost; drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; -ERROR HY000: Can't drop one or more of the requested users revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; +ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; +ERROR HY000: Operation DROP USER failed for 'drop_user1'@'localhost','drop_user2'@'localhost','drop_user3'@'localhost','drop_user4'@'localhost' drop table t1; grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest@localhost; +grant select, update, insert on test.* to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' +GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' drop user mysqltest_1@localhost; SET NAMES koi8r; CREATE DATABASE ÂÄ; @@ -274,6 +281,7 @@ Grants for ÀÚÅÒ@localhost GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁ FROM ÀÚÅÒ@localhost; +DROP USER ÀÚÅÒ@localhost; DROP DATABASE ÂÄ; SET NAMES latin1; USE test; @@ -351,10 +359,10 @@ GRANT USAGE ON *.* TO 'grant_user'@'localhost' GRANT INSERT (a, d, c, b) ON `test`.`t1` TO 'grant_user'@'localhost' select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv; Host Db User Table_name Column_name Column_priv -localhost test grant_user t1 c Insert localhost test grant_user t1 b Insert -localhost test grant_user t1 a Insert localhost test grant_user t1 d Insert +localhost test grant_user t1 a Insert +localhost test grant_user t1 c Insert revoke ALL PRIVILEGES on t1 from grant_user@localhost; show grants for grant_user@localhost; Grants for grant_user@localhost @@ -377,15 +385,17 @@ show grants for mysqltest_3@localhost; Grants for mysqltest_3@localhost GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' GRANT SELECT (b) ON `mysqltest_1`.`t2` TO 'mysqltest_3'@'localhost' -GRANT SELECT (c) ON `mysqltest_2`.`t1` TO 'mysqltest_3'@'localhost' GRANT UPDATE (a) ON `mysqltest_1`.`t1` TO 'mysqltest_3'@'localhost' GRANT UPDATE (d) ON `mysqltest_2`.`t2` TO 'mysqltest_3'@'localhost' +GRANT SELECT (c) ON `mysqltest_2`.`t1` TO 'mysqltest_3'@'localhost' update mysqltest_1.t1, mysqltest_1.t2 set q=10 where b=1; ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'q' in table 't1' -update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1; +update mysqltest_1.t2, mysqltest_2.t2 set d=20 where d=1; ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'd' in table 't2' +update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1; +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1' update mysqltest_2.t1, mysqltest_1.t2 set c=20 where b=1; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' update mysqltest_2.t1, mysqltest_2.t2 set d=10 where s=2; ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 's' in table 't1' update mysqltest_1.t1, mysqltest_2.t2 set a=10,d=10; @@ -406,14 +416,14 @@ flush privileges; use mysqltest_1; update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600; update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'a' in table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' use mysqltest_2; update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200; -ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest_1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' update mysqltest_2.t1, mysqltest_1.t2 set c=100,b=200; -ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest_1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't2' update mysqltest_1.t1, mysqltest_2.t2 set a=100,d=200; -ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest_1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2; a q b r 10 2 1 2 @@ -427,6 +437,35 @@ delete from mysql.columns_priv where user="mysqltest_3"; flush privileges; drop database mysqltest_1; drop database mysqltest_2; +SHOW PRIVILEGES; +Privilege Context Comment +Alter Tables To alter the table +Alter routine Functions,Procedures To alter or drop stored functions/procedures +Create Databases,Tables,Indexes To create new databases and tables +Create routine Functions,Procedures To use CREATE FUNCTION/PROCEDURE +Create temporary tables Databases To use CREATE TEMPORARY TABLE +Create view Tables To create new views +Create user Server Admin To create new users +Delete Tables To delete existing rows +Drop Databases,Tables To drop databases, tables, and views +Execute Functions,Procedures To execute stored routines +File File access on server To read and write files on the server +Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess +Index Tables To create or drop indexes +Insert Tables To insert data into tables +Lock tables Databases To use LOCK TABLES (together with SELECT privilege) +Process Server Admin To view the plain text of currently executing queries +References Databases,Tables To have references on tables +Reload Server Admin To reload or refresh tables, logs and privileges +Replication client Server Admin To ask where the slave or master servers are +Replication slave Server Admin To read binary log events from the master +Select Tables To retrieve rows from table +Show databases Server Admin To see all databases with SHOW DATABASES +Show view Tables To see views with SHOW CREATE VIEW +Shutdown Server Admin To shut down the server +Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. +Update Tables To update existing rows +Usage Server Admin No privileges - allow connect only create database mysqltest; create table mysqltest.t1 (a int,b int,c int); grant all on mysqltest.t1 to mysqltest_1@localhost; @@ -435,6 +474,118 @@ ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; +CREATE USER dummy@localhost; +CREATE DATABASE mysqltest; +CREATE TABLE mysqltest.dummytable (dummyfield INT); +CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable; +GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost; +GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost; +SHOW GRANTS FOR dummy@localhost; +Grants for dummy@localhost +GRANT USAGE ON *.* TO 'dummy'@'localhost' +GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' +GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +use INFORMATION_SCHEMA; +SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY +PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE += '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; +TABLE_SCHEMA TABLE_NAME PRIVILEGES +mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, UPDATE +mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, UPDATE +FLUSH PRIVILEGES; +SHOW GRANTS FOR dummy@localhost; +Grants for dummy@localhost +GRANT USAGE ON *.* TO 'dummy'@'localhost' +GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' +GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY +PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE += '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; +TABLE_SCHEMA TABLE_NAME PRIVILEGES +mysqltest dummytable ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, UPDATE +mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, REFERENCES, SELECT, SHOW VIEW, UPDATE +SHOW FIELDS FROM mysql.tables_priv; +Field Type Null Key Default Extra +Host char(60) NO PRI +Db char(64) NO PRI +User char(16) NO PRI +Table_name char(64) NO PRI +Grantor char(77) NO MUL +Timestamp timestamp YES CURRENT_TIMESTAMP +Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') NO +Column_priv set('Select','Insert','Update','References') NO +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost; +DROP USER dummy@localhost; +DROP DATABASE mysqltest; +CREATE USER dummy@localhost; +CREATE DATABASE mysqltest; +CREATE TABLE mysqltest.dummytable (dummyfield INT); +CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable; +GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost; +GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost; +SHOW GRANTS FOR dummy@localhost; +Grants for dummy@localhost +GRANT USAGE ON *.* TO 'dummy'@'localhost' +GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' +GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +use INFORMATION_SCHEMA; +SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY +PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE += '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; +TABLE_SCHEMA TABLE_NAME PRIVILEGES +mysqltest dummytable CREATE VIEW +mysqltest dummyview CREATE VIEW +FLUSH PRIVILEGES; +SHOW GRANTS FOR dummy@localhost; +Grants for dummy@localhost +GRANT USAGE ON *.* TO 'dummy'@'localhost' +GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' +GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY +PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE += '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; +TABLE_SCHEMA TABLE_NAME PRIVILEGES +mysqltest dummytable CREATE VIEW +mysqltest dummyview CREATE VIEW +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost; +DROP USER dummy@localhost; +DROP DATABASE mysqltest; +CREATE USER dummy@localhost; +CREATE DATABASE mysqltest; +CREATE TABLE mysqltest.dummytable (dummyfield INT); +CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable; +GRANT SHOW VIEW ON mysqltest.dummytable TO dummy@localhost; +GRANT SHOW VIEW ON mysqltest.dummyview TO dummy@localhost; +SHOW GRANTS FOR dummy@localhost; +Grants for dummy@localhost +GRANT USAGE ON *.* TO 'dummy'@'localhost' +GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' +GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +use INFORMATION_SCHEMA; +SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY +PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE += '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; +TABLE_SCHEMA TABLE_NAME PRIVILEGES +mysqltest dummytable SHOW VIEW +mysqltest dummyview SHOW VIEW +FLUSH PRIVILEGES; +SHOW GRANTS FOR dummy@localhost; +Grants for dummy@localhost +GRANT USAGE ON *.* TO 'dummy'@'localhost' +GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' +GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY +PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE += '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; +TABLE_SCHEMA TABLE_NAME PRIVILEGES +mysqltest dummytable SHOW VIEW +mysqltest dummyview SHOW VIEW +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost; +DROP USER dummy@localhost; +DROP DATABASE mysqltest; use mysql; insert into tables_priv values ('','test_db','mysqltest_1','test_table','test_grantor',CURRENT_TIMESTAMP,'Select','Select'); flush privileges; @@ -442,4 +593,4 @@ delete from tables_priv where host = '' and user = 'mysqltest_1'; flush privileges; set @user123="non-existent"; select * from mysql.db where user=@user123; -Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv +Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 8bd39b0225e..7ac10de1f7c 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -6,16 +6,42 @@ delete from mysql.db where user like 'mysqltest\_%'; delete from mysql.tables_priv where user like 'mysqltest\_%'; delete from mysql.columns_priv where user like 'mysqltest\_%'; flush privileges; +grant all privileges on `my\_1`.* to mysqltest_1@localhost with grant option; +grant create user on *.* to mysqltest_1@localhost; +create user mysqltest_2@localhost; +grant select on `my\_1`.* to mysqltest_2@localhost; +grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass'; +ERROR 42000: You must have privileges to update tables in the mysql database to be able to change passwords for others +grant update on mysql.* to mysqltest_1@localhost; +grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass'; +grant select on `my\_1`.* to mysqltest_3@localhost; +grant insert on mysql.* to mysqltest_1@localhost; +grant select on `my\_1`.* to mysqltest_3@localhost; +grant select on `my\_1`.* to mysqltest_4@localhost identified by 'pass'; +delete from mysql.user where user like 'mysqltest\_%'; +delete from mysql.db where user like 'mysqltest\_%'; +delete from mysql.tables_priv where user like 'mysqltest\_%'; +delete from mysql.columns_priv where user like 'mysqltest\_%'; +flush privileges; grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option; +grant create user on *.* to mysqltest_1@localhost; select current_user(); current_user() mysqltest_1@localhost grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'my_%' +set @@sql_mode='NO_AUTO_CREATE_USER'; +select @@sql_mode; +@@sql_mode +NO_AUTO_CREATE_USER +grant select on `my\_1`.* to mysqltest_4@localhost with grant option; +ERROR 42000: Can't find any matching row in the user table +grant select on `my\_1`.* to mysqltest_4@localhost identified by 'mypass' +with grant option; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT CREATE USER ON *.* TO 'mysqltest_1'@'localhost' GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION show grants for mysqltest_2@localhost; Grants for mysqltest_2@localhost @@ -33,6 +59,7 @@ current_user() mysqltest_1@localhost show databases; Database +information_schema mysqltest_1 test grant all privileges on `mysqltest_1`.* to mysqltest_1@localhost with grant option; @@ -56,9 +83,9 @@ GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT, INSERT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' insert into t1 values (1, 'I can''t change it!'); update t1 set data='I can change it!' where id = 1; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1' insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!'; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1' select * from t1; id data 1 I can't change it! @@ -80,6 +107,169 @@ delete from mysql.columns_priv where user like 'mysqltest\_%'; flush privileges; drop database mysqltest; use test; +set sql_mode='maxdb'; +drop table if exists t1, t2; +create table t1(c1 int); +create table t2(c1 int, c2 int); +create user 'mysqltest_1'; +create user 'mysqltest_1'; +ERROR HY000: Operation CREATE USER failed for 'mysqltest_1'@'%' +create user 'mysqltest_2' identified by 'Mysqltest-2'; +create user 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff'; +grant select on *.* to 'mysqltest_2'; +grant insert on test.* to 'mysqltest_2'; +grant update on test.t1 to 'mysqltest_2'; +grant update (c2) on test.t2 to 'mysqltest_2'; +select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +host user password +% mysqltest_1 +% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 +% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff +select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; +host db user +% test mysqltest_2 +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; +host db user table_name +% test mysqltest_2 t1 +% test mysqltest_2 t2 +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +host db user table_name column_name +% test mysqltest_2 t2 c2 +show grants for 'mysqltest_1'; +Grants for mysqltest_1@% +GRANT USAGE ON *.* TO 'mysqltest_1'@'%' +show grants for 'mysqltest_2'; +Grants for mysqltest_2@% +GRANT SELECT ON *.* TO 'mysqltest_2'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' +GRANT INSERT ON "test".* TO 'mysqltest_2'@'%' +GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_2'@'%' +GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%' +drop user 'mysqltest_1'; +select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +host user password +% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 +% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff +select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; +host db user +% test mysqltest_2 +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; +host db user table_name +% test mysqltest_2 t1 +% test mysqltest_2 t2 +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +host db user table_name column_name +% test mysqltest_2 t2 c2 +show grants for 'mysqltest_1'; +ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' +rename user 'mysqltest_2' to 'mysqltest_1'; +select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +host user password +% mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 +% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff +select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; +host db user +% test mysqltest_1 +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; +host db user table_name +% test mysqltest_1 t1 +% test mysqltest_1 t2 +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +host db user table_name column_name +% test mysqltest_1 t2 c2 +show grants for 'mysqltest_1'; +Grants for mysqltest_1@% +GRANT SELECT ON *.* TO 'mysqltest_1'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' +GRANT INSERT ON "test".* TO 'mysqltest_1'@'%' +GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%' +GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%' +drop user 'mysqltest_1', 'mysqltest_3'; +drop user 'mysqltest_1'; +ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%' +drop table t1, t2; +insert into mysql.db set user='mysqltest_1', db='%', host='%'; +flush privileges; +show grants for 'mysqltest_1'; +ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' +revoke all privileges, grant option from 'mysqltest_1'; +ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users +drop user 'mysqltest_1'; +select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user; +host db user +insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1'; +flush privileges; +show grants for 'mysqltest_1'; +ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' +drop user 'mysqltest_1'; +select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name; +host db user table_name +insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1'; +flush privileges; +show grants for 'mysqltest_1'; +ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' +drop user 'mysqltest_1'; +select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name; +host db user table_name column_name +create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; +drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; +create user 'mysqltest_1', 'mysqltest_2' identified by 'Mysqltest-2', 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff'; +rename user 'mysqltest_1' to 'mysqltest_1a', 'mysqltest_2' TO 'mysqltest_2a', 'mysqltest_3' TO 'mysqltest_3a'; +drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; +ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%','mysqltest_2'@'%','mysqltest_3'@'%' +drop user 'mysqltest_1a', 'mysqltest_2a', 'mysqltest_3a'; +create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; +create user 'mysqltest_1a', 'mysqltest_2', 'mysqltest_3a'; +ERROR HY000: Operation CREATE USER failed for 'mysqltest_2'@'%' +rename user 'mysqltest_1a' to 'mysqltest_1b', 'mysqltest_2a' TO 'mysqltest_2b', 'mysqltest_3a' TO 'mysqltest_3b'; +ERROR HY000: Operation RENAME USER failed for 'mysqltest_2a'@'%' +drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; +drop user 'mysqltest_1b', 'mysqltest_2b', 'mysqltest_3b'; +ERROR HY000: Operation DROP USER failed for 'mysqltest_2b'@'%' +create user 'mysqltest_2' identified by 'Mysqltest-2'; +drop user 'mysqltest_2' identified by 'Mysqltest-2'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 'Mysqltest-2'' at line 1 +create user '%@b'@'b'; +show grants for '%@b'@'b'; +Grants for %@b@b +GRANT USAGE ON *.* TO '%@b'@'b' +grant select on mysql.* to '%@b'@'b'; +show grants for '%@b'@'b'; +Grants for %@b@b +GRANT USAGE ON *.* TO '%@b'@'b' +GRANT SELECT ON "mysql".* TO '%@b'@'b' +rename user '%@b'@'b' to '%@a'@'a'; +show grants for '%@b'@'b'; +ERROR 42000: There is no such grant defined for user '%@b' on host 'b' +show grants for '%@a'@'a'; +Grants for %@a@a +GRANT USAGE ON *.* TO '%@a'@'a' +GRANT SELECT ON "mysql".* TO '%@a'@'a' +drop user '%@a'@'a'; +create user mysqltest_2@localhost; +grant create user on *.* to mysqltest_2@localhost; +select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user' +create user mysqltest_A@'%'; +rename user mysqltest_A@'%' to mysqltest_B@'%'; +drop user mysqltest_B@'%'; +drop user mysqltest_2@localhost; +create user mysqltest_3@localhost; +grant INSERT,DELETE,UPDATE on mysql.* to mysqltest_3@localhost; +show grants; +Grants for mysqltest_3@localhost +GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' +GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost' +select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user' +insert into mysql.user set host='%', user='mysqltest_B'; +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value +create user mysqltest_A@'%'; +rename user mysqltest_B@'%' to mysqltest_C@'%'; +drop user mysqltest_C@'%'; +drop user mysqltest_3@localhost; +set @@sql_mode=''; create database mysqltest_1; create table mysqltest_1.t1 (i int); insert into mysqltest_1.t1 values (1),(2),(3); diff --git a/mysql-test/r/grant3.result b/mysql-test/r/grant3.result new file mode 100644 index 00000000000..6193c4fd49d --- /dev/null +++ b/mysql-test/r/grant3.result @@ -0,0 +1,18 @@ +SET NAMES binary; +drop table if exists t1; +delete from mysql.user where user like 'mysqltest\_%'; +delete from mysql.db where user like 'mysqltest\_%'; +delete from mysql.tables_priv where user like 'mysqltest\_%'; +delete from mysql.columns_priv where user like 'mysqltest\_%'; +flush privileges; +create user mysqltest_1@localhost; +grant create user on *.* to mysqltest_1@localhost; +grant select on `my\_1`.* to mysqltest_1@localhost with grant option; +grant select on `my\_1`.* to mysqltest_2@localhost; +ERROR 42000: You are not allowed to create a user with GRANT +create user mysqltest_2@localhost; +delete from mysql.user where user like 'mysqltest\_%'; +delete from mysql.db where user like 'mysqltest\_%'; +delete from mysql.tables_priv where user like 'mysqltest\_%'; +delete from mysql.columns_priv where user like 'mysqltest\_%'; +flush privileges; diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index 2c6840d77d0..925a5918c1b 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -60,7 +60,7 @@ Variable_name Value Qcache_hits 0 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 0 +Qcache_not_cached 5 select "user1"; user1 user1 @@ -72,7 +72,7 @@ Variable_name Value Qcache_hits 0 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 1 +Qcache_not_cached 9 select * from t1; a b c 1 1 1 @@ -85,7 +85,7 @@ Variable_name Value Qcache_hits 1 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 1 +Qcache_not_cached 12 select a from t1 ; a 1 @@ -98,7 +98,7 @@ Variable_name Value Qcache_hits 2 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 1 +Qcache_not_cached 15 select c from t1; c 1 @@ -111,7 +111,7 @@ Variable_name Value Qcache_hits 3 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 1 +Qcache_not_cached 18 show grants for current_user(); Grants for @localhost GRANT USAGE ON *.* TO ''@'localhost' @@ -144,7 +144,7 @@ Variable_name Value Qcache_hits 7 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 2 +Qcache_not_cached 22 select "user3"; user3 user3 @@ -168,7 +168,7 @@ Variable_name Value Qcache_hits 7 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 7 +Qcache_not_cached 30 select "user4"; user4 user4 @@ -198,7 +198,7 @@ Variable_name Value Qcache_hits 8 show status like "Qcache_not_cached"; Variable_name Value -Qcache_not_cached 8 +Qcache_not_cached 34 set names binary; delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3"); diff --git a/mysql-test/r/greedy_optimizer.result b/mysql-test/r/greedy_optimizer.result new file mode 100644 index 00000000000..1da49fbedb0 --- /dev/null +++ b/mysql-test/r/greedy_optimizer.result @@ -0,0 +1,657 @@ +drop table if exists t1,t2,t3,t4,t5,t6,t7; +create table t1 ( +c11 integer,c12 integer,c13 integer,c14 integer,c15 integer,c16 integer, +primary key (c11) +); +create table t2 ( +c21 integer,c22 integer,c23 integer,c24 integer,c25 integer,c26 integer +); +create table t3 ( +c31 integer,c32 integer,c33 integer,c34 integer,c35 integer,c36 integer, +primary key (c31) +); +create table t4 ( +c41 integer,c42 integer,c43 integer,c44 integer,c45 integer,c46 integer +); +create table t5 ( +c51 integer,c52 integer,c53 integer,c54 integer,c55 integer,c56 integer, +primary key (c51) +); +create table t6 ( +c61 integer,c62 integer,c63 integer,c64 integer,c65 integer,c66 integer +); +create table t7 ( +c71 integer,c72 integer,c73 integer,c74 integer,c75 integer,c76 integer, +primary key (c71) +); +insert into t1 values (1,2,3,4,5,6); +insert into t1 values (2,2,3,4,5,6); +insert into t1 values (3,2,3,4,5,6); +insert into t2 values (1,2,3,4,5,6); +insert into t2 values (2,2,3,4,5,6); +insert into t2 values (3,2,3,4,5,6); +insert into t2 values (4,2,3,4,5,6); +insert into t2 values (5,2,3,4,5,6); +insert into t2 values (6,2,3,4,5,6); +insert into t3 values (1,2,3,4,5,6); +insert into t3 values (2,2,3,4,5,6); +insert into t3 values (3,2,3,4,5,6); +insert into t3 values (4,2,3,4,5,6); +insert into t3 values (5,2,3,4,5,6); +insert into t3 values (6,2,3,4,5,6); +insert into t3 values (7,2,3,4,5,6); +insert into t3 values (8,2,3,4,5,6); +insert into t3 values (9,2,3,4,5,6); +insert into t4 values (1,2,3,4,5,6); +insert into t4 values (2,2,3,4,5,6); +insert into t4 values (3,2,3,4,5,6); +insert into t4 values (4,2,3,4,5,6); +insert into t4 values (5,2,3,4,5,6); +insert into t4 values (6,2,3,4,5,6); +insert into t4 values (7,2,3,4,5,6); +insert into t4 values (8,2,3,4,5,6); +insert into t4 values (9,2,3,4,5,6); +insert into t4 values (10,2,3,4,5,6); +insert into t4 values (11,2,3,4,5,6); +insert into t4 values (12,2,3,4,5,6); +insert into t5 values (1,2,3,4,5,6); +insert into t5 values (2,2,3,4,5,6); +insert into t5 values (3,2,3,4,5,6); +insert into t5 values (4,2,3,4,5,6); +insert into t5 values (5,2,3,4,5,6); +insert into t5 values (6,2,3,4,5,6); +insert into t5 values (7,2,3,4,5,6); +insert into t5 values (8,2,3,4,5,6); +insert into t5 values (9,2,3,4,5,6); +insert into t5 values (10,2,3,4,5,6); +insert into t5 values (11,2,3,4,5,6); +insert into t5 values (12,2,3,4,5,6); +insert into t5 values (13,2,3,4,5,6); +insert into t5 values (14,2,3,4,5,6); +insert into t5 values (15,2,3,4,5,6); +insert into t6 values (1,2,3,4,5,6); +insert into t6 values (2,2,3,4,5,6); +insert into t6 values (3,2,3,4,5,6); +insert into t6 values (4,2,3,4,5,6); +insert into t6 values (5,2,3,4,5,6); +insert into t6 values (6,2,3,4,5,6); +insert into t6 values (7,2,3,4,5,6); +insert into t6 values (8,2,3,4,5,6); +insert into t6 values (9,2,3,4,5,6); +insert into t6 values (10,2,3,4,5,6); +insert into t6 values (11,2,3,4,5,6); +insert into t6 values (12,2,3,4,5,6); +insert into t6 values (13,2,3,4,5,6); +insert into t6 values (14,2,3,4,5,6); +insert into t6 values (15,2,3,4,5,6); +insert into t6 values (16,2,3,4,5,6); +insert into t6 values (17,2,3,4,5,6); +insert into t6 values (18,2,3,4,5,6); +insert into t7 values (1,2,3,4,5,6); +insert into t7 values (2,2,3,4,5,6); +insert into t7 values (3,2,3,4,5,6); +insert into t7 values (4,2,3,4,5,6); +insert into t7 values (5,2,3,4,5,6); +insert into t7 values (6,2,3,4,5,6); +insert into t7 values (7,2,3,4,5,6); +insert into t7 values (8,2,3,4,5,6); +insert into t7 values (9,2,3,4,5,6); +insert into t7 values (10,2,3,4,5,6); +insert into t7 values (11,2,3,4,5,6); +insert into t7 values (12,2,3,4,5,6); +insert into t7 values (13,2,3,4,5,6); +insert into t7 values (14,2,3,4,5,6); +insert into t7 values (15,2,3,4,5,6); +insert into t7 values (16,2,3,4,5,6); +insert into t7 values (17,2,3,4,5,6); +insert into t7 values (18,2,3,4,5,6); +insert into t7 values (19,2,3,4,5,6); +insert into t7 values (20,2,3,4,5,6); +insert into t7 values (21,2,3,4,5,6); +select @@optimizer_search_depth; +@@optimizer_search_depth +62 +select @@optimizer_prune_level; +@@optimizer_prune_level +1 +set optimizer_search_depth=63; +select @@optimizer_search_depth; +@@optimizer_search_depth +63 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +set optimizer_prune_level=0; +select @@optimizer_prune_level; +@@optimizer_prune_level +0 +set optimizer_search_depth=0; +select @@optimizer_search_depth; +@@optimizer_search_depth +0 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +set optimizer_search_depth=1; +select @@optimizer_search_depth; +@@optimizer_search_depth +1 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +set optimizer_search_depth=62; +select @@optimizer_search_depth; +@@optimizer_search_depth +62 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 274.418727 +set optimizer_prune_level=1; +select @@optimizer_prune_level; +@@optimizer_prune_level +1 +set optimizer_search_depth=0; +select @@optimizer_search_depth; +@@optimizer_search_depth +0 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +set optimizer_search_depth=1; +select @@optimizer_search_depth; +@@optimizer_search_depth +1 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +set optimizer_search_depth=62; +select @@optimizer_search_depth; +@@optimizer_search_depth +62 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 821.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where +show status like 'Last_query_cost'; +Variable_name Value +Last_query_cost 794.837037 +drop table t1,t2,t3,t4,t5,t6,t7; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 8287a042d60..f4cf5217fa7 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -117,7 +117,7 @@ bug_file_loc text, bug_severity enum('blocker','critical','major','normal','minor','trivial','enhancement') DEFAULT 'blocker' NOT NULL, bug_status enum('','NEW','ASSIGNED','REOPENED','RESOLVED','VERIFIED','CLOSED') DEFAULT 'NEW' NOT NULL, creation_ts datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, -delta_ts timestamp(14), +delta_ts timestamp, short_desc mediumtext, long_desc mediumtext, op_sys enum('All','Windows 3.1','Windows 95','Windows 98','Windows NT','Windows 2000','Linux','other') DEFAULT 'All' NOT NULL, @@ -288,7 +288,7 @@ explain extended select sql_big_result spid,sum(userid) from t1 group by spid de id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using filesort Warnings: -Note 1003 select sql_big_result test.t1.spID AS `spid`,sum(test.t1.userID) AS `sum(userid)` from test.t1 group by test.t1.spID desc +Note 1003 select sql_big_result `test`.`t1`.`spID` AS `spid`,sum(`test`.`t1`.`userID`) AS `sum(userid)` from `test`.`t1` group by `test`.`t1`.`spID` desc explain select sql_big_result spid,sum(userid) from t1 group by spid desc order by null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 8 Using filesort @@ -440,12 +440,12 @@ create table t2 (user_id integer not null, date date); insert into t2 values (1, '2002-06-09'),(2, '2002-06-09'),(1, '2002-06-09'),(3, '2002-06-09'),(4, '2002-06-09'),(4, '2002-06-09'); select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender; gender dist_count percentage -F 3 60.00 -M 1 20.00 +F 3 60.0000 +M 1 20.0000 select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender order by percentage; gender dist_count percentage -M 1 20.00 -F 3 60.00 +M 1 20.0000 +F 3 60.0000 drop table t1,t2; CREATE TABLE t1 (ID1 int, ID2 int, ID int NOT NULL AUTO_INCREMENT,PRIMARY KEY(ID )); @@ -696,7 +696,7 @@ from t1 x3, t1 x4, t1 C, t1 D where x3.a < 3 and x4.a < 4 and D.a < 4; delete from t2 where a = 2 and b = 'val-2' order by a,b,c,d limit 30; explain select c from t2 where a = 2 and b = 'val-2' group by c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref PRIMARY,a PRIMARY 400 const,const 6 Using where +1 SIMPLE t2 ref PRIMARY,a PRIMARY 402 const,const 6 Using where select c from t2 where a = 2 and b = 'val-2' group by c; c val-74 @@ -745,18 +745,12 @@ CREATE TABLE t1 (id varchar(20) NOT NULL); INSERT INTO t1 VALUES ('trans1'), ('trans2'); CREATE TABLE t2 (id varchar(20) NOT NULL, err_comment blob NOT NULL); INSERT INTO t2 VALUES ('trans1', 'a problem'); -SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS err_comment -FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY err_comment; -COUNT(DISTINCT(t1.id)) err_comment +SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS comment +FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY comment; +COUNT(DISTINCT(t1.id)) comment 1 NULL 1 a problem DROP TABLE t1, t2; -CREATE TABLE t1 (n int); -INSERT INTO t1 VALUES (1); -SELECT n+1 AS n FROM t1 GROUP BY n; -n -2 -DROP TABLE t1; create table t1 (f1 date); insert into t1 values('2005-06-06'); insert into t1 values('2005-06-06'); @@ -764,3 +758,32 @@ select date(left(f1+0,8)) from t1 group by 1; date(left(f1+0,8)) 2005-06-06 drop table t1; +CREATE TABLE t1 (n int); +INSERT INTO t1 VALUES (1); +SELECT n+1 AS n FROM t1 GROUP BY n; +n +2 +Warnings: +Warning 1052 Column 'n' in group statement is ambiguous +DROP TABLE t1; +create table t1 (c1 char(3), c2 char(3)); +create table t2 (c3 char(3), c4 char(3)); +insert into t1 values ('aaa', 'bb1'), ('aaa', 'bb2'); +insert into t2 values ('aaa', 'bb1'), ('aaa', 'bb2'); +select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 +group by c2; +c2 +aaa +aaa +Warnings: +Warning 1052 Column 'c2' in group statement is ambiguous +show warnings; +Level Code Message +Warning 1052 Column 'c2' in group statement is ambiguous +select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 +group by t1.c1; +c2 +aaa +show warnings; +Level Code Message +drop table t1, t2; diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result new file mode 100644 index 00000000000..13eb2690e86 --- /dev/null +++ b/mysql-test/r/group_min_max.result @@ -0,0 +1,1990 @@ +drop table if exists t1; +create table t1 ( +a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' ' +); +insert into t1 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'), +('d','a','a','a411','xy1'),('d','a','a','b411','xy2'),('d','a','a','c411','xy3'),('d','a','a','d411','xy4'), +('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'), +('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'), +('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4'), +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'), +('d','a','a','a411','xy1'),('d','a','a','b411','xy2'),('d','a','a','c411','xy3'),('d','a','a','d411','xy4'), +('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'), +('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'), +('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4'); +create index idx_t1_0 on t1 (a1); +create index idx_t1_1 on t1 (a1,a2,b,c); +create index idx_t1_2 on t1 (a1,a2,b); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Table is already up to date +drop table if exists t2; +create table t2 ( +a1 char(64), a2 char(64) not null, b char(16), c char(16), d char(16), dummy char(64) default ' ' +); +insert into t2 select * from t1; +insert into t2 (a1, a2, b, c, d) values +('a','a',NULL,'a777','xyz'),('a','a',NULL,'a888','xyz'),('a','a',NULL,'a999','xyz'), +('a','a','a',NULL,'xyz'), +('a','a','b',NULL,'xyz'), +('a','b','a',NULL,'xyz'), +('c','a',NULL,'c777','xyz'),('c','a',NULL,'c888','xyz'),('c','a',NULL,'c999','xyz'), +('d','b','b',NULL,'xyz'), +('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'), +('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'), +('a','a',NULL,'a777','xyz'),('a','a',NULL,'a888','xyz'),('a','a',NULL,'a999','xyz'), +('a','a','a',NULL,'xyz'), +('a','a','b',NULL,'xyz'), +('a','b','a',NULL,'xyz'), +('c','a',NULL,'c777','xyz'),('c','a',NULL,'c888','xyz'),('c','a',NULL,'c999','xyz'), +('d','b','b',NULL,'xyz'), +('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'),('e','a','a',NULL,'xyz'), +('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'),('e','a','b',NULL,'xyz'); +create index idx_t2_0 on t2 (a1); +create index idx_t2_1 on t2 (a1,a2,b,c); +create index idx_t2_2 on t2 (a1,a2,b); +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status Table is already up to date +drop table if exists t3; +create table t3 ( +a1 char(1), a2 char(1), b char(1), c char(4) not null, d char(3), dummy char(1) default ' ' +); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +insert into t3 (a1, a2, b, c, d) values +('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'), +('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'), +('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'), +('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'), +('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'), +('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'), +('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'), +('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'), +('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'), +('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'), +('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'), +('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'); +create index idx_t3_0 on t3 (a1); +create index idx_t3_1 on t3 (a1,a2,b,c); +create index idx_t3_2 on t3 (a1,a2,b); +analyze table t3; +Table Op Msg_type Msg_text +test.t3 analyze status Table is already up to date +explain select a1, min(a2) from t1 group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by +explain select a1, max(a2) from t1 group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 65 NULL 5 Using index for group-by +explain select a1, min(a2), max(a2) from t1 group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by +explain select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +explain select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +explain select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 # NULL # Using index for group-by +explain select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by +explain select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +explain select min(a2) from t1 group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using index for group-by +explain select a2, min(c), max(c) from t1 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +select a1, min(a2) from t1 group by a1; +a1 min(a2) +a a +b a +c a +d a +select a1, max(a2) from t1 group by a1; +a1 max(a2) +a b +b b +c b +d b +select a1, min(a2), max(a2) from t1 group by a1; +a1 min(a2) max(a2) +a a b +b a b +c a b +d a b +select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a a111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b; +a1 a2 b max(c) min(c) +a a a d111 a111 +a a b h112 e112 +a b a l121 i121 +a b b p122 m122 +b a a d211 a211 +b a b h212 e212 +b b a l221 i221 +b b b p222 m222 +c a a d311 a311 +c a b h312 e312 +c b a l321 i321 +c b b p322 m322 +d a a d411 a411 +d a b h412 e412 +d b a l421 i421 +d b b p422 m422 +select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b; +a1 a2 b max(c) min(c) +a a NULL a999 a777 +a a a d111 a111 +a a b h112 e112 +a b a l121 i121 +a b b p122 m122 +b a a d211 a211 +b a b h212 e212 +b b a l221 i221 +b b b p222 m222 +c a NULL c999 c777 +c a a d311 a311 +c a b h312 e312 +c b a l321 i321 +c b b p322 m322 +d a a d411 a411 +d a b h412 e412 +d b a l421 i421 +d b b p422 m422 +e a a NULL NULL +e a b NULL NULL +select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1; +min(a2) a1 max(a2) min(a2) a1 +a a b a a +a b b a b +a c b a c +a d b a d +select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b; +a1 b min(c) a1 max(c) b a2 max(c) max(c) +a a a111 a d111 a a d111 d111 +a b e112 a h112 b a h112 h112 +a a i121 a l121 a b l121 l121 +a b m122 a p122 b b p122 p122 +b a a211 b d211 a a d211 d211 +b b e212 b h212 b a h212 h212 +b a i221 b l221 a b l221 l221 +b b m222 b p222 b b p222 p222 +c a a311 c d311 a a d311 d311 +c b e312 c h312 b a h312 h312 +c a i321 c l321 a b l321 l321 +c b m322 c p322 b b p322 p322 +d a a411 d d411 a a d411 d411 +d b e412 d h412 b a h412 h412 +d a i421 d l421 a b l421 l421 +d b m422 d p422 b b p422 p422 +select min(a2) from t1 group by a1; +min(a2) +a +a +a +a +select a2, min(c), max(c) from t1 group by a1,a2,b; +a2 min(c) max(c) +a a111 d111 +a e112 h112 +b i121 l121 +b m122 p122 +a a211 d211 +a e212 h212 +b i221 l221 +b m222 p222 +a a311 d311 +a e312 h312 +b i321 l321 +b m322 p322 +a a411 d411 +a e412 h412 +b i421 l421 +b m422 p422 +explain select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select a1,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1, max(c) from t1 where a1 in ('a','b','d') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where a1 >= 'c' or a2 < 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1, max(c) from t2 where a1 in ('a','b','d') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a a111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b; +a1 a2 b min(c) max(c) +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a l121 +a b b p122 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +a1 max(c) +a d111 +a h112 +a l121 +a p122 +c d311 +c h312 +c l321 +c p322 +d d411 +d h412 +d l421 +d p422 +select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a a111 d111 +a a b e112 h112 +b a a a211 d211 +b a b e212 h212 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +a1 a2 b max(c) +b a a d211 +b a b h212 +b b a l221 +b b b p222 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +a1 a2 b min(c) max(c) +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +a1 a2 b max(c) +a b a l121 +a b b p122 +b b a l221 +b b b p222 +c b a l321 +c b b p322 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +a1 a2 b min(c) max(c) +a b a i121 l121 +a b b m122 p122 +b b a i221 l221 +b b b m222 p222 +c b a i321 l321 +c b b m322 p322 +d b a i421 l421 +d b b m422 p422 +select a1,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b; +a1 min(c) max(c) +b a211 d211 +b e212 h212 +b i221 l221 +b m222 p222 +c a311 d311 +c e312 h312 +c i321 l321 +c m322 p322 +d a411 d411 +d e412 h412 +d i421 l421 +d m422 p422 +select a1, max(c) from t1 where a1 in ('a','b','d') group by a1,a2,b; +a1 max(c) +a d111 +a h112 +a l121 +a p122 +b d211 +b h212 +b l221 +b p222 +d d411 +d h412 +d l421 +d p422 +select a1,a2,b, max(c) from t2 where a1 < 'd' group by a1,a2,b; +a1 a2 b max(c) +a a NULL a999 +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a NULL c999 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +select a1,a2,b,min(c),max(c) from t2 where a1 < 'd' group by a1,a2,b; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +a a a a111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a NULL c777 c999 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +select a1,a2,b,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b; +a1 a2 b min(c) max(c) +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a NULL c777 c999 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +e a a NULL NULL +e a b NULL NULL +select a1,a2,b, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +a1 a2 b max(c) +a a NULL a999 +a a a d111 +a a b h112 +a b a l121 +a b b p122 +c a NULL c999 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +e a a NULL +e a b NULL +select a1, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; +a1 max(c) +a a999 +a d111 +a h112 +a l121 +a p122 +c c999 +c d311 +c h312 +c l321 +c p322 +d d411 +d h412 +d l421 +d p422 +e NULL +e NULL +select a1,a2,b,min(c),max(c) from t2 where a1 >= 'c' or a2 < 'b' group by a1,a2,b; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +a a a a111 d111 +a a b e112 h112 +b a a a211 d211 +b a b e212 h212 +c a NULL c777 c999 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +e a a NULL NULL +e a b NULL NULL +select a1,a2,b, max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +a1 a2 b max(c) +b a a d211 +b a b h212 +b b a l221 +b b b p222 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; +a1 a2 b min(c) max(c) +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +a1 a2 b max(c) +a b a l121 +a b b p122 +b b a l221 +b b b p222 +c b a l321 +c b b p322 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; +a1 a2 b min(c) max(c) +a b a i121 l121 +a b b m122 p122 +b b a i221 l221 +b b b m222 p222 +c b a i321 l321 +c b b m322 p322 +d b a i421 l421 +d b b m422 p422 +select a1,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b; +a1 min(c) max(c) +b a211 d211 +b e212 h212 +b i221 l221 +b m222 p222 +c c777 c999 +c a311 d311 +c e312 h312 +c i321 l321 +c m322 p322 +d a411 d411 +d e412 h412 +d i421 l421 +d m422 p422 +e NULL NULL +e NULL NULL +select a1, max(c) from t2 where a1 in ('a','b','d') group by a1,a2,b; +a1 max(c) +a a999 +a d111 +a h112 +a l121 +a p122 +b d211 +b h212 +b l221 +b p222 +d d411 +d h412 +d l421 +d p422 +explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 5 Using where; Using index for group-by +explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 5 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by +explain select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using where; Using index for group-by +explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by +explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by +explain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range NULL idx_t3_1 6 NULL 4 Using where; Using index for group-by +explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range NULL idx_t3_1 6 NULL 4 Using where; Using index for group-by +select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1; +a1 a2 b max(c) min(c) +a a b h112 e112 +b a b h212 e212 +c a b h312 e312 +d a b h412 e412 +select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1; +a1 max(c) min(c) +a h112 e112 +b h212 e212 +c h312 e312 +d h412 e412 +select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2; +a1 a2 b max(c) +a a b h112 +a b b p122 +b a b h212 +b b b p222 +c a b h312 +c b b p322 +d a b h412 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2; +a1 a2 b min(c) max(c) +a a b e112 h112 +a b b m122 p122 +b a b e212 h212 +b b b m222 p222 +c a b e312 h312 +c b b m322 p322 +d a b e412 h412 +d b b m422 p422 +select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2; +a1 a2 max(c) +a a h112 +a b p122 +b a h212 +b b p222 +c a h312 +c b p322 +d a h412 +d b p422 +select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1; +a1 a2 b max(c) min(c) +a a b h112 e112 +b a b h212 e212 +c a b h312 e312 +d a b h412 e412 +e a b NULL NULL +select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1; +a1 max(c) min(c) +a h112 e112 +b h212 e212 +c h312 e312 +d h412 e412 +e NULL NULL +select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2; +a1 a2 b max(c) +a a b h112 +a b b p122 +b a b h212 +b b b p222 +c a b h312 +c b b p322 +d a b h412 +d b b p422 +e a b NULL +select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2; +a1 a2 b min(c) max(c) +a a b e112 h112 +a b b m122 p122 +b a b e212 h212 +b b b m222 p222 +c a b e312 h312 +c b b m322 p322 +d a b e412 h412 +d b b m422 p422 +e a b NULL NULL +select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2; +a1 a2 max(c) +a a h112 +a b p122 +b a h212 +b b p222 +c a h312 +c b p322 +d a h412 +d b p422 +e a NULL +select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1; +a1 a2 b max(c) min(c) +a a b h112 e112 +b a b h212 e212 +c a b h312 e312 +select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1; +a1 max(c) min(c) +a h112 e112 +b h212 e212 +c h312 e312 +explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 5 Using where; Using index for group-by +explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL 5 Using where; Using index for group-by +explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by +select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1; +a1 a2 b min(c) +a a NULL a777 +c a NULL c777 +select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1; +a1 a2 b max(c) +a a NULL a999 +c a NULL c999 +select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2; +a1 a2 b min(c) +a a NULL a777 +c a NULL c777 +select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2; +a1 a2 b max(c) +a a NULL a999 +c a NULL c999 +select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +c a NULL c777 c999 +select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +c a NULL c777 c999 +explain select a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (c > 'f123') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c > 'f123') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (c < 'a0') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (c < 'k321') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c < 'k321') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b, max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c > 'b111') and (c <= 'g112') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +select a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a b111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a b211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a a b311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a b411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b; +a1 a2 b max(c) +a a b h112 +a b a l121 +a b b p122 +b a b h212 +b b a l221 +b b b p222 +c a b h312 +c b a l321 +c b b p322 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a b g112 h112 +a b a i121 l121 +a b b m122 p122 +b a b f212 h212 +b b a i221 l221 +b b b m222 p222 +c a b f312 h312 +c b a i321 l321 +c b b m322 p322 +d a b f412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b; +a1 a2 b max(c) +select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b; +a1 a2 b min(c) max(c) +select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a k121 +b a a d211 +b a b h212 +b b a k221 +c a a d311 +c a b h312 +c b a j321 +d a a d411 +d a b h412 +d b a j421 +select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a a111 d111 +a a b e112 h112 +a b a i121 k121 +b a a a211 d211 +b a b e212 h212 +b b a i221 k221 +c a a a311 d311 +c a b e312 h312 +c b a i321 j321 +d a a a411 d411 +d a b e412 h412 +d b a i421 j421 +select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a b111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a b211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a a b311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a b411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a a111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a c111 d111 +a a b e112 g112 +b a a b211 d211 +b a b e212 f212 +c a a b311 d311 +c a b e312 f312 +d a a b411 d411 +d a b e412 f412 +select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a a111 c111 +b a a a211 c211 +c a a a311 c311 +d a a a411 c411 +d a b g412 g412 +d b a k421 k421 +select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a c111 d111 +a a b e112 h112 +b a a b211 d211 +b a b e212 h212 +c a a b311 d311 +c a b e312 h312 +d a a b411 d411 +d a b e412 h412 +select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a b111 d111 +a a b e112 h112 +b a a b211 d211 +b a b e212 h212 +c a a b311 d311 +c a b e312 h312 +d a a b411 d411 +d a b e412 h412 +select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a NULL c999 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a b111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a b211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a NULL c777 c999 +c a a b311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a b411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t2 where (c > 'f123') group by a1,a2,b; +a1 a2 b max(c) +a a b h112 +a b a l121 +a b b p122 +b a b h212 +b b a l221 +b b b p222 +c a b h312 +c b a l321 +c b b p322 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t2 where (c > 'f123') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a b g112 h112 +a b a i121 l121 +a b b m122 p122 +b a b f212 h212 +b b a i221 l221 +b b b m222 p222 +c a b f312 h312 +c b a i321 l321 +c b b m322 p322 +d a b f412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t2 where (c < 'a0') group by a1,a2,b; +a1 a2 b max(c) +select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') group by a1,a2,b; +a1 a2 b min(c) max(c) +select a1,a2,b, max(c) from t2 where (c < 'k321') group by a1,a2,b; +a1 a2 b max(c) +a a NULL a999 +a a a d111 +a a b h112 +a b a k121 +b a a d211 +b a b h212 +b b a k221 +c a NULL c999 +c a a d311 +c a b h312 +c b a j321 +d a a d411 +d a b h412 +d b a j421 +select a1,a2,b,min(c),max(c) from t2 where (c < 'k321') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +a a a a111 d111 +a a b e112 h112 +a b a i121 k121 +b a a a211 d211 +b a b e212 h212 +b b a i221 k221 +c a NULL c777 c999 +c a a a311 d311 +c a b e312 h312 +c b a i321 j321 +d a a a411 d411 +d a b e412 h412 +d b a i421 j421 +select a1,a2,b, max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +a1 a2 b max(c) +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a NULL c999 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a b111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a b211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a NULL c777 c999 +c a a b311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a b411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b, max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +a1 a2 b max(c) +a a NULL a999 +a a a d111 +a a b h112 +a b a l121 +a b b p122 +b a a d211 +b a b h212 +b b a l221 +b b b p222 +c a NULL c999 +c a a d311 +c a b h312 +c b a l321 +c b b p322 +d a a d411 +d a b h412 +d b a l421 +d b b p422 +select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +a a a a111 d111 +a a b e112 h112 +a b a i121 l121 +a b b m122 p122 +b a a a211 d211 +b a b e212 h212 +b b a i221 l221 +b b b m222 p222 +c a NULL c777 c999 +c a a a311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a a411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b,min(c),max(c) from t2 where (c > 'b111') and (c <= 'g112') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a c111 d111 +a a b e112 g112 +b a a b211 d211 +b a b e212 f212 +c a NULL c777 c999 +c a a b311 d311 +c a b e312 f312 +d a a b411 d411 +d a b e412 f412 +select a1,a2,b,min(c),max(c) from t2 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a NULL a777 a999 +a a a a111 c111 +b a a a211 c211 +c a a a311 c311 +d a a a411 c411 +d a b g412 g412 +d b a k421 k421 +select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a c111 d111 +a a b e112 h112 +b a a b211 d211 +b a b e212 h212 +c a NULL c777 c999 +c a a b311 d311 +c a b e312 h312 +d a a b411 d411 +d a b e412 h412 +explain select a1,a2,b,min(c),max(c) from t1 +where exists ( select * from t2 where t2.c = t1.c ) +group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index +2 DEPENDENT SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +explain select a1,a2,b,min(c),max(c) from t1 +where exists ( select * from t2 where t2.c > 'b1' ) +group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 14 Using where; Using index for group-by +explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 14 Using where; Using index for group-by +explain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c),max(c) from t2 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +explain select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by +select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a b e112 h112 +b a b e212 h212 +c a b e312 h312 +c b b m322 p322 +d a b e412 h412 +d b b m422 p422 +select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a c111 d111 +a a b e112 h112 +b a a b211 d211 +b a b e212 h212 +c a a b311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a b411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; +a1 a2 b min(c) max(c) +a b a i121 l121 +b b a i221 l221 +c b a i321 l321 +d b a i421 l421 +select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b; +a1 a2 b min(c) +b b a k221 +c b a k321 +d b a k421 +select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b; +a1 a2 b min(c) +b b a k221 +c b a k321 +d b a k421 +select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +a1 a2 b min(c) +select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b; +a1 a2 b min(c) +select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a b e112 h112 +b a b e212 h212 +c a b e312 h312 +c b b m322 p322 +d a b e412 h412 +d b b m422 p422 +e a b NULL NULL +select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b; +a1 a2 b min(c) max(c) +a a a c111 d111 +a a b e112 h112 +b a a b211 d211 +b a b e212 h212 +c a NULL c777 c999 +c a a b311 d311 +c a b e312 h312 +c b a i321 l321 +c b b m322 p322 +d a a b411 d411 +d a b e412 h412 +d b a i421 l421 +d b b m422 p422 +select a1,a2,b,min(c),max(c) from t2 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; +a1 a2 b min(c) max(c) +a b a i121 l121 +b b a i221 l221 +c b a i321 l321 +d b a i421 l421 +select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b; +a1 a2 b min(c) +b b a k221 +c b a k321 +d b a k421 +select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b; +a1 a2 b min(c) +b b a k221 +c b a k321 +d b a k421 +select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +a1 a2 b min(c) +explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by +explain select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using index +explain select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +a1 a2 b +a a b +b a b +c a b +c b b +d a b +d b b +select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +a1 a2 b +a b a +b b a +c b a +d b a +select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +a1 a2 b c +a b a i121 +select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +a1 a2 b +select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; +a1 a2 b +a a b +b a b +c a b +c b b +d a b +d b b +e a b +select a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +a1 a2 b +a b a +b b a +c b a +d b a +select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +a1 a2 b c +a b a i121 +select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +a1 a2 b +explain select distinct a1,a2,b from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index +explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select distinct b from t1 where (a2 >= 'b') and (b = 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index +explain select distinct a1,a2,b from t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-by +explain select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by +explain select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select distinct b from t2 where (a2 >= 'b') and (b = 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_2 146 NULL 164 Using where; Using index +select distinct a1,a2,b from t1; +a1 a2 b +a a a +a a b +a b a +a b b +b a a +b a b +b b a +b b b +c a a +c a b +c b a +c b b +d a a +d a b +d b a +d b b +select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a'); +a1 a2 b +a b a +b b a +c b a +d b a +select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); +a1 a2 b c +a b a i121 +select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); +a1 a2 b +select distinct b from t1 where (a2 >= 'b') and (b = 'a'); +b +a +select distinct a1,a2,b from t2; +a1 a2 b +a a NULL +a a a +a a b +a b a +a b b +b a a +b a b +b b a +b b b +c a NULL +c a a +c a b +c b a +c b b +d a a +d a b +d b a +d b b +e a a +e a b +select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a'); +a1 a2 b +a b a +b b a +c b a +d b a +select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); +a1 a2 b c +a b a i121 +select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); +a1 a2 b +select distinct b from t2 where (a2 >= 'b') and (b = 'a'); +b +a +select distinct t_00.a1 +from t1 t_00 +where exists ( select * from t2 where a1 = t_00.a1 ); +a1 +a +b +c +d +select distinct a1,a1 from t1; +a1 a1 +a a +b b +c c +d d +select distinct a2,a1,a2,a1 from t1; +a2 a1 a2 a1 +a a a a +b a b a +a b a b +b b b b +a c a c +b c b c +a d a d +b d b d +select distinct t1.a1,t2.a1 from t1,t2; +a1 a1 +a a +b a +c a +d a +a b +b b +c b +d b +a c +b c +c c +d c +a d +b d +c d +d d +a e +b e +c e +d e +explain select distinct a1,a2,b from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using index for group-by +explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by +explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 163 NULL 17 Using where; Using index for group-by +explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 14 Using where; Using index for group-by +explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 17 Using where; Using index for group-by; Using temporary; Using filesort +explain select distinct a1,a2,b from t2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using index for group-by +explain select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by +explain select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL # Using where; Using index +explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 146 NULL # Using where; Using index for group-by +explain select distinct b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by; Using temporary; Using filesort +select distinct a1,a2,b from t1; +a1 a2 b +a a a +a a b +a b a +a b b +b a a +b a b +b b a +b b b +c a a +c a b +c b a +c b b +d a a +d a b +d b a +d b b +select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +a1 a2 b +a b a +b b a +c b a +d b a +select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +a1 a2 b c +a b a i121 +select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +a1 a2 b +select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +b +a +select distinct a1,a2,b from t2; +a1 a2 b +a a NULL +a a a +a a b +a b a +a b b +b a a +b a b +b b a +b b b +c a NULL +c a a +c a b +c b a +c b b +d a a +d a b +d b a +d b b +e a a +e a b +select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +a1 a2 b +a b a +b b a +c b a +d b a +select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; +a1 a2 b c +a b a i121 +select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; +a1 a2 b +select distinct b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; +b +a +explain select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index +explain select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using where; Using index +explain select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 Using where; Using index +explain select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using where; Using index +explain select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 Using where; Using index +select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); +count(distinct a1,a2,b) +4 +select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); +count(distinct a1,a2,b,c) +1 +select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); +count(distinct a1,a2,b) +0 +select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); +count(distinct b) +1 +select ord(a1) + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); +ord(a1) + count(distinct a1,a2,b) +104 +explain select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select concat(a1,min(c)),b from t1 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select concat(a1,min(c)),b,max(c) from t1 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select concat(a1,a2),b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by +explain select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 147 NULL 9 Using index for group-by +select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b; +a1 a2 b concat(min(c), max(c)) +a a a a111d111 +a a b e112h112 +a b a i121l121 +a b b m122p122 +b a a a211d211 +b a b e212h212 +b b a i221l221 +b b b m222p222 +c a a a311d311 +c a b e312h312 +c b a i321l321 +c b b m322p322 +select concat(a1,min(c)),b from t1 where a1 < 'd' group by a1,a2,b; +concat(a1,min(c)) b +aa111 a +ae112 b +ai121 a +am122 b +ba211 a +be212 b +bi221 a +bm222 b +ca311 a +ce312 b +ci321 a +cm322 b +select concat(a1,min(c)),b,max(c) from t1 where a1 < 'd' group by a1,a2,b; +concat(a1,min(c)) b max(c) +aa111 a d111 +ae112 b h112 +ai121 a l121 +am122 b p122 +ba211 a d211 +be212 b h212 +bi221 a l221 +bm222 b p222 +ca311 a d311 +ce312 b h312 +ci321 a l321 +cm322 b p322 +select concat(a1,a2),b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b; +concat(a1,a2) b min(c) max(c) +aa a a111 d111 +aa b e112 h112 +ab a i121 l121 +ab b m122 p122 +ba a a211 d211 +ba b e212 h212 +bb a i221 l221 +bb b m222 p222 +ca a a311 d311 +ca b e312 h312 +cb a i321 l321 +cb b m322 p322 +select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2; +concat(ord(min(b)),ord(max(b))) min(b) max(b) +9798 a b +9798 a b +9798 a b +9798 a b +9798 a b +9798 a b +9798 a b +9798 a b +explain select a1,a2,b,d,min(c),max(c) from t1 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using temporary; Using filesort +explain select a1,a2,b,d from t1 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using temporary; Using filesort +explain select a1,a2,min(b),max(b) from t1 +where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 76 Using where; Using index +explain select a1,a2,b,min(c),max(c) from t1 +where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 Using where; Using temporary; Using filesort +explain select a1,a2,b,c from t1 +where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b,c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL idx_t1_0,idx_t1_1,idx_t1_2 NULL NULL NULL 128 Using where; Using temporary; Using filesort +explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b < 'b') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +explain select a1,a2,b from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 130 NULL 76 Using where; Using index +explain select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1; +a1 a2 min(b) c +a a a a111 +explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b = 'a') group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +explain select a1,a2,b,min(c),max(c) from t2 +where (c > 'a000') and (c <= 'd999') and (c like '_8__') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index +explain select a1, a2, b, c, min(d), max(d) from t1 group by a1,a2,b,c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using temporary; Using filesort +explain select a1,a2,count(a2) from t1 group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL idx_t1_1 163 NULL 128 Using index +explain select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 128 Using where; Using index +explain select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 128 Using where; Using index +explain select a1 from t1 where a2 = 'b' group by a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using where; Using index for group-by +select a1 from t1 where a2 = 'b' group by a1; +a1 +a +b +c +d +explain select distinct a1 from t1 where a2 = 'b'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL idx_t1_1 130 NULL 5 Using where; Using index for group-by +select distinct a1 from t1 where a2 = 'b'; +a1 +a +b +c +d +drop table t1; +drop table t2; +drop table t3; +create table t1 ( +a varchar(30), b varchar(30), primary key(a), key(b) +) engine=innodb; +select distinct a from t1; +a +drop table t1; +create table t1(a int, key(a)) engine=innodb; +insert into t1 values(1); +select a, count(a) from t1 group by a with rollup; +a count(a) +1 1 +NULL 1 +drop table t1; diff --git a/mysql-test/r/have_eucjpms.require b/mysql-test/r/have_eucjpms.require new file mode 100644 index 00000000000..f35621b2c1a --- /dev/null +++ b/mysql-test/r/have_eucjpms.require @@ -0,0 +1,2 @@ +Collation Charset Id Default Compiled Sortlen +eucjpms_japanese_ci eucjpms 97 Yes Yes 1 diff --git a/mysql-test/r/have_federated_db.require b/mysql-test/r/have_federated_db.require new file mode 100644 index 00000000000..f4c521a8f35 --- /dev/null +++ b/mysql-test/r/have_federated_db.require @@ -0,0 +1,2 @@ +Variable_name Value +have_federated_engine YES diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index 218276406b1..35a1358dd0c 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; create table t1 (a int); select count(a) as b from t1 where a=0 having b > 0; b @@ -12,7 +12,7 @@ explain extended select count(a) as b from t1 where a=0 having b >=0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables Warnings: -Note 1003 select count(test.t1.a) AS `b` from test.t1 where (test.t1.a = 0) having (count(test.t1.a) >= 0) +Note 1003 select count(`test`.`t1`.`a`) AS `b` from `test`.`t1` where (`test`.`t1`.`a` = 0) having (count(`test`.`t1`.`a`) >= 0) drop table t1; CREATE TABLE t1 ( raw_id int(10) NOT NULL default '0', @@ -128,3 +128,204 @@ id description c 1 test 0 2 test2 0 drop table t1,t2,t3; +create table t1 (col1 int, col2 varchar(5), col_t1 int); +create table t2 (col1 int, col2 varchar(5), col_t2 int); +create table t3 (col1 int, col2 varchar(5), col_t3 int); +insert into t1 values(10,'hello',10); +insert into t1 values(20,'hello',20); +insert into t1 values(30,'hello',30); +insert into t1 values(10,'bye',10); +insert into t1 values(10,'sam',10); +insert into t1 values(10,'bob',10); +insert into t2 select * from t1; +insert into t3 select * from t1; +select count(*) from t1 group by col1 having col1 = 10; +count(*) +4 +select count(*) as count_col1 from t1 group by col1 having col1 = 10; +count_col1 +4 +select count(*) as count_col1 from t1 as tmp1 group by col1 having col1 = 10; +count_col1 +4 +select count(*) from t1 group by col2 having col2 = 'hello'; +count(*) +3 +select count(*) from t1 group by col2 having col1 = 10; +ERROR 42S22: Unknown column 'col1' in 'having clause' +select col1 as count_col1 from t1 as tmp1 group by col1 having col1 = 10; +count_col1 +10 +select col1 as count_col1 from t1 as tmp1 group by col1 having count_col1 = 10; +count_col1 +10 +select col1 as count_col1 from t1 as tmp1 group by count_col1 having col1 = 10; +count_col1 +10 +select col1 as count_col1 from t1 as tmp1 group by count_col1 having count_col1 = 10; +count_col1 +10 +select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col1 = 10; +count_col1 col2 +10 bob +10 bye +10 hello +10 sam +select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having count_col1 = 10; +count_col1 col2 +10 bob +10 bye +10 hello +10 sam +select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col2 = 'hello'; +count_col1 col2 +10 hello +20 hello +30 hello +select col1 as count_col1,col2 as group_col2 from t1 as tmp1 group by col1,col2 having group_col2 = 'hello'; +count_col1 group_col2 +10 hello +20 hello +30 hello +select sum(col1) as co12 from t1 group by col2 having col2 10; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1 +select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10; +co2 cc +40 4 +select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10; +ERROR 42S22: Unknown column 't1.col1' in 'having clause' +select t1.col1 from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 having t2.col1 <= 10); +col1 +10 +20 +30 +10 +10 +10 +select t1.col1 from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 +having t2.col1 <= +(select min(t3.col1) from t3)); +col1 +10 +20 +30 +10 +10 +10 +select t1.col1 from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 having t1.col1 <= 10); +col1 +10 +10 +10 +10 +select t1.col1 as tmp_col from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 having tmp_col <= 10); +tmp_col +10 +10 +10 +10 +select t1.col1 from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 having col_t1 <= 10); +col1 +10 +10 +10 +10 +select sum(col1) from t1 +group by col_t1 +having (select col_t1 from t2 where col_t1 = col_t2 order by col_t2 limit 1); +sum(col1) +40 +20 +30 +select t1.col1 from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 having col_t1 <= 10) +having col_t1 <= 20; +ERROR 42S22: Unknown column 'col_t1' in 'having clause' +select t1.col1 from t1 +where t1.col2 in +(select t2.col2 from t2 +group by t2.col1, t2.col2 having col_t1 <= 10) +group by col_t1 +having col_t1 <= 20; +col1 +10 +select col_t1, sum(col1) from t1 +group by col_t1 +having col_t1 > 10 and +exists (select sum(t2.col1) from t2 +group by t2.col2 having t2.col2 > 'b'); +col_t1 sum(col1) +20 20 +30 30 +select sum(col1) from t1 +group by col_t1 +having col_t1 in (select sum(t2.col1) from t2 +group by t2.col2, t2.col1 having t2.col1 = t1.col1); +ERROR 42S22: Unknown column 't1.col1' in 'having clause' +select sum(col1) from t1 +group by col_t1 +having col_t1 in (select sum(t2.col1) from t2 +group by t2.col2, t2.col1 having t2.col1 = col_t1); +sum(col1) +40 +20 +30 +select t1.col1, t2.col1 from t1, t2 where t1.col1 = t2.col1 +group by t1.col1, t2.col1 having col1 = 2; +ERROR 23000: Column 'col1' in having clause is ambiguous +select t1.col1*10+t2.col1 from t1,t2 where t1.col1=t2.col1 +group by t1.col1, t2.col1 having col1 = 2; +ERROR 23000: Column 'col1' in having clause is ambiguous +drop table t1, t2, t3; +create table t1 (s1 int); +insert into t1 values (1),(2),(3); +select count(*) from t1 group by s1 having s1 is null; +count(*) +select s1*0 as s1 from t1 group by s1 having s1 <> 0; +s1 +0 +0 +0 +Warnings: +Warning 1052 Column 's1' in group statement is ambiguous +Warning 1052 Column 's1' in having clause is ambiguous +select s1*0 from t1 group by s1 having s1 = 0; +s1*0 +select s1 from t1 group by 1 having 1 = 0; +s1 +select count(s1) from t1 group by s1 having count(1+1)=2; +count(s1) +select count(s1) from t1 group by s1 having s1*0=0; +count(s1) +1 +1 +1 +select * from t1 a, t1 b group by a.s1 having s1 is null; +ERROR 23000: Column 's1' in having clause is ambiguous +drop table t1; +create table t1 (s1 char character set latin1 collate latin1_german1_ci); +insert into t1 values ('ÃŒ'),('y'); +Warnings: +Warning 1265 Data truncated for column 's1' at row 1 +select s1,count(s1) from t1 +group by s1 collate latin1_swedish_ci having s1 = 'y'; +s1 count(s1) +y 1 +drop table t1; diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 53dec294ef8..969cb06e9fe 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1,t2,t3; create table t1 (a int not null,b int not null, primary key (a)) engine=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100; insert into t1 values(1,1),(2,2),(3,3),(4,4); delete from t1 where a=1 or a=0; @@ -40,7 +40,7 @@ a b 4 4 drop table t1; create table t1 (a int not null) engine=heap; -insert into t1 values (869751),(736494),(226312),(802616); +insert into t1 values (869751),(736494),(226312),(802616),(728912); select * from t1 where a > 736494; a 869751 @@ -169,7 +169,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where explain select * from t1 where btn="a" and new_col="a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 2 Using where +1 SIMPLE t1 ref btn btn 11 const,const 1 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -249,16 +249,425 @@ a 3 2 drop table t1; +set storage_engine=HEAP; +create table t1 (v varchar(10), c char(10), t varchar(50)); +insert into t1 values('+ ', '+ ', '+ '); +set @a=repeat(' ',20); +insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); +Warnings: +Note 1265 Data truncated for column 'v' at row 1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+ *+*+ * +*+ *+*+ * +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` varchar(50) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` varchar(50) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +create table t3 select * from t1; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` varchar(50) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 modify c varchar(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` varchar(10) default NULL, + `t` varchar(50) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 modify v char(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` varchar(50) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 modify t varchar(10); +Warnings: +Warning 1265 Data truncated for column 't' at row 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` varchar(10) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+*+*+ * +*+*+*+ * +drop table t1,t2,t3; +create table t1 (v varchar(10), c char(10), t varchar(50), key(v), key(c), key(t(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` varchar(50) default NULL, + KEY `v` (`v`), + KEY `c` (`c`), + KEY `t` (`t`(10)) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +270 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1))); +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where c='a'; +count(*) +10 +select count(*) from t1 where t='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where c='a '; +count(*) +10 +select count(*) from t1 where t='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where c like 'a%'; +count(*) +11 +select count(*) from t1 where t like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const 10 Using where +explain select count(*) from t1 where c='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 11 const 10 Using where +explain select count(*) from t1 where t='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref t t 13 const 10 Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL v NULL NULL NULL 271 Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL v NULL NULL NULL 271 Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL v NULL NULL NULL 271 Using where +alter table t1 add unique(v); +ERROR 23000: Duplicate entry '{ ' for key 1 +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); +qq +*a*a*a* +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const 10 Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result trim(v),count(t) from t1 group by v limit 10; +trim(v) count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result trim(v),count(c) from t1 group by v limit 10; +trim(v) count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(*) from t1 group by c limit 10; +c count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(*) from t1 group by t limit 10; +t count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result trim(t),count(t) from t1 group by t limit 10; +trim(t) count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +drop table t1; +create table t1 (a char(10), unique (a)); +insert into t1 values ('a'); +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a' for key 1 +alter table t1 modify a varchar(10); +insert into t1 values ('a '),('a '),('a '),('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +update t1 set a='a ' where a like 'a '; +update t1 set a='a ' where a like 'a '; +drop table t1; +create table t1 (v varchar(10), c char(10), t varchar(50), key using btree (v), key using btree (c), key using btree (t(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` varchar(50) default NULL, + KEY `v` USING BTREE (`v`), + KEY `c` USING BTREE (`c`), + KEY `t` USING BTREE (`t`(10)) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +270 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1))); +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where c='a'; +count(*) +10 +select count(*) from t1 where t='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where c='a '; +count(*) +10 +select count(*) from t1 where t='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where +explain select count(*) from t1 where c='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 11 const # Using where +explain select count(*) from t1 where t='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref t t 13 const # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where +alter table t1 add unique(v); +ERROR 23000: Duplicate entry '{ ' for key 1 +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); +qq +*a*a*a* +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where +drop table t1; +create table t1 (a char(10), unique using btree (a)) engine=heap; +insert into t1 values ('a'); +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a' for key 1 +alter table t1 modify a varchar(10); +insert into t1 values ('a '),('a '),('a '),('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +update t1 set a='a ' where a like 'a '; +update t1 set a='a ' where a like 'a '; +drop table t1; +create table t1 (v varchar(10), c char(10), t varchar(50), key(v(5)), key(c(5)), key(t(5))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` varchar(50) default NULL, + KEY `v` (`v`(5)), + KEY `c` (`c`(5)), + KEY `t` (`t`(5)) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65530), key(v(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(65530) default NULL, + KEY `v` (`v`(10)) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +insert into t1 values(repeat('a',65530)); +select length(v) from t1 where v=repeat('a',65530); +length(v) +65530 +drop table t1; +set storage_engine=MyISAM; create table t1 (a bigint unsigned auto_increment primary key, b int, key (b, a)) engine=heap; -insert t1 (b) values (1); -insert t1 (b) values (1); -insert t1 (b) values (1); -insert t1 (b) values (1); -insert t1 (b) values (1); -insert t1 (b) values (1); -insert t1 (b) values (1); -insert t1 (b) values (1); +insert t1 (b) values (1),(1),(1),(1),(1),(1),(1),(1); select * from t1; a b 1 1 @@ -272,14 +681,7 @@ a b drop table t1; create table t1 (a int not null, b int not null auto_increment, primary key(a, b), key(b)) engine=heap; -insert t1 (a) values (1); -insert t1 (a) values (1); -insert t1 (a) values (1); -insert t1 (a) values (1); -insert t1 (a) values (1); -insert t1 (a) values (1); -insert t1 (a) values (1); -insert t1 (a) values (1); +insert t1 (a) values (1),(1),(1),(1),(1),(1),(1),(1); select * from t1; a b 1 1 @@ -291,8 +693,18 @@ a b 1 7 1 8 drop table t1; +create table t1 (a int not null, b int not null auto_increment, +primary key(a, b)) engine=heap; +ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key create table t1 (c char(255), primary key(c(90))); insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); insert into t1 values ("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"); -ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1 +ERROR 23000: Duplicate entry 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl' for key 1 drop table t1; +create table t1 (c char(10)) engine=memory; +create table t2 (c varchar(10)) engine=memory; +show table status like 't_'; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL +drop table t1, t2; diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result index 5c60c97d674..374d2c63632 100644 --- a/mysql-test/r/heap_btree.result +++ b/mysql-test/r/heap_btree.result @@ -40,7 +40,7 @@ a b 4 4 drop table t1; create table t1 (a int not null) engine=heap; -insert into t1 values (869751),(736494),(226312),(802616); +insert into t1 values (869751),(736494),(226312),(802616),(728912); select * from t1 where a > 736494; a 869751 @@ -73,7 +73,7 @@ engine=heap; insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6); explain select * from t1 where x=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref x x 4 const 1 Using where +1 SIMPLE t1 ref x x 4 const 1 select * from t1 where x=1; x y 1 1 @@ -134,7 +134,7 @@ a b 1 1 explain select * from tx where b=x; id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref b b x const x Using where +x SIMPLE tx ref b b x const x drop table t1; create table t1 (id int unsigned not null, primary key using BTREE (id)) engine=HEAP; insert into t1 values(1); diff --git a/mysql-test/r/heap_hash.result b/mysql-test/r/heap_hash.result index e5098ab8c87..d8d89b786b5 100644 --- a/mysql-test/r/heap_hash.result +++ b/mysql-test/r/heap_hash.result @@ -40,7 +40,7 @@ a b 4 4 drop table t1; create table t1 (a int not null) engine=heap; -insert into t1 values (869751),(736494),(226312),(802616); +insert into t1 values (869751),(736494),(226312),(802616),(728912); select * from t1 where a > 736494; a 869751 @@ -169,7 +169,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL btn NULL NULL NULL 11 Using where explain select * from t1 where btn="a" and new_col="a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 2 Using where +1 SIMPLE t1 ref btn btn 11 const,const 1 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -291,28 +291,28 @@ insert into t1 (name) values ('Matt'), ('Lilu'), ('Corbin'), ('Carly'), insert into t2 select * from t1; explain select * from t1 where name='matt'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where +1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where explain select * from t2 where name='matt'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 const 1 Using where +1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where explain select * from t1 where name='Lilu'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where +1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where explain select * from t2 where name='Lilu'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 const 1 Using where +1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where explain select * from t1 where name='Phil'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where +1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where explain select * from t2 where name='Phil'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 const 1 Using where +1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where explain select * from t1 where name='Lilu'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 20 const 1 Using where +1 SIMPLE t1 ref heap_idx,btree_idx heap_idx 22 const 1 Using where explain select * from t2 where name='Lilu'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 20 const 1 Using where +1 SIMPLE t2 ref btree_idx,heap_idx btree_idx 22 const 1 Using where insert into t1 (name) select name from t2; insert into t1 (name) select name from t2; insert into t1 (name) select name from t2; @@ -325,7 +325,7 @@ count(*) 7 explain select * from t1 ignore index (btree_idx) where name='matt'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where +1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 id NULL 91 NULL NULL HASH @@ -353,8 +353,8 @@ t3 1 a 1 a NULL NULL NULL NULL HASH t3 1 a 2 b NULL 13 NULL NULL HASH explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where -1 SIMPLE t3 ref a a 40 func,const 7 Using where +1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where +1 SIMPLE t3 ref a a 44 const,const 7 Using where drop table t1, t2, t3; create temporary table t1 ( a int, index (a) ) engine=memory; insert into t1 values (1),(2),(3),(4),(5); diff --git a/mysql-test/r/help.result b/mysql-test/r/help.result index edf7d0e91cb..85ca832828d 100644 --- a/mysql-test/r/help.result +++ b/mysql-test/r/help.result @@ -1,32 +1,48 @@ insert into mysql.help_category(help_category_id,name)values(1,'impossible_category_1'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @category1_id:= 1; @category1_id:= 1 1 insert into mysql.help_category(help_category_id,name)values(2,'impossible_category_2'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @category2_id:= 2; @category2_id:= 2 2 insert into mysql.help_category(help_category_id,name,parent_category_id)values(3,'impossible_category_3',@category2_id); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @category3_id:= 3; @category3_id:= 3 3 insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(1,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @topic1_id:= 1; @topic1_id:= 1 1 insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(2,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @topic2_id:= 2; @topic2_id:= 2 2 insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(3,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @topic3_id:= 3; @topic3_id:= 3 3 insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(4,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @topic4_id:= 4; @topic4_id:= 4 4 insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(5,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); +Warnings: +Warning 1364 Field 'url' doesn't have a default value select @topic5_id:= 5; @topic5_id:= 5 5 diff --git a/mysql-test/r/index_merge.result b/mysql-test/r/index_merge.result new file mode 100644 index 00000000000..d039d5a04c9 --- /dev/null +++ b/mysql-test/r/index_merge.result @@ -0,0 +1,386 @@ +drop table if exists t0, t1, t2, t3, t4; +create table t0 +( +key1 int not null, +INDEX i1(key1) +); +alter table t0 add key2 int not null, add index i2(key2); +alter table t0 add key3 int not null, add index i3(key3); +alter table t0 add key4 int not null, add index i4(key4); +alter table t0 add key5 int not null, add index i5(key5); +alter table t0 add key6 int not null, add index i6(key6); +alter table t0 add key7 int not null, add index i7(key7); +alter table t0 add key8 int not null, add index i8(key8); +update t0 set key2=key1,key3=key1,key4=key1,key5=key1,key6=key1,key7=key1,key8=1024-key1; +analyze table t0; +Table Op Msg_type Msg_text +test.t0 analyze status OK +explain select * from t0 where key1 < 3 or key1 > 1020; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 range i1 i1 4 NULL 78 Using where +explain +select * from t0 where key1 < 3 or key2 > 1020; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 45 Using sort_union(i1,i2); Using where +select * from t0 where key1 < 3 or key2 > 1020; +key1 key2 key3 key4 key5 key6 key7 key8 +1 1 1 1 1 1 1 1023 +2 2 2 2 2 2 2 1022 +1021 1021 1021 1021 1021 1021 1021 3 +1022 1022 1022 1022 1022 1022 1022 2 +1023 1023 1023 1023 1023 1023 1023 1 +1024 1024 1024 1024 1024 1024 1024 0 +explain select * from t0 where key1 < 3 or key2 <4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where +explain +select * from t0 where (key1 > 30 and key1<35) or (key2 >32 and key2 < 40); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 11 Using sort_union(i1,i2); Using where +select * from t0 where (key1 > 30 and key1<35) or (key2 >32 and key2 < 40); +key1 key2 key3 key4 key5 key6 key7 key8 +31 31 31 31 31 31 31 993 +32 32 32 32 32 32 32 992 +33 33 33 33 33 33 33 991 +34 34 34 34 34 34 34 990 +35 35 35 35 35 35 35 989 +36 36 36 36 36 36 36 988 +37 37 37 37 37 37 37 987 +38 38 38 38 38 38 38 986 +39 39 39 39 39 39 39 985 +explain select * from t0 ignore index (i2) where key1 < 3 or key2 <4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1 NULL NULL NULL 1024 Using where +explain select * from t0 where (key1 < 3 or key2 <4) and key3 = 50; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ref i1,i2,i3 i3 4 const 1 Using where +explain select * from t0 use index (i1,i2) where (key1 < 3 or key2 <4) and key3 = 50; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where +explain select * from t0 where (key1 > 1 or key2 > 2); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where +explain select * from t0 force index (i1,i2) where (key1 > 1 or key2 > 2); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 1024 Using sort_union(i1,i2); Using where +explain +select * from t0 where key1<3 or key2<3 or (key1>5 and key1<8) or +(key1>10 and key1<12) or (key2>100 and key2<110); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 17 Using sort_union(i1,i2); Using where +explain select * from t0 where key2 = 45 or key1 <=> null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 range i1,i2 i2 4 NULL 1 Using where +explain select * from t0 where key2 = 45 or key1 is not null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where +explain select * from t0 where key2 = 45 or key1 is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ref i2 i2 4 const 1 +explain select * from t0 where key2=10 or key3=3 or key4 <=> null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i2,i3,i4 i2,i3 4,4 NULL 2 Using union(i2,i3); Using where +explain select * from t0 where key2=10 or key3=3 or key4 is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i2,i3 i2,i3 4,4 NULL 2 Using union(i2,i3); Using where +explain select key1 from t0 where (key1 <=> null) or (key2 < 5) or +(key3=10) or (key4 <=> null); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i4 i2,i3 4,4 NULL 6 Using sort_union(i2,i3); Using where +explain select key1 from t0 where (key1 <=> null) or (key1 < 5) or +(key3=10) or (key4 <=> null); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i3,i4 i1,i3 4,4 NULL 6 Using sort_union(i1,i3); Using where +explain select * from t0 where +(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 5 or key6 < 5); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where +explain +select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 9 Using sort_union(i1,i2); Using where +select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4); +key1 key2 key3 key4 key5 key6 key7 key8 +1 1 1 1 1 1 1 1023 +2 2 2 2 2 2 2 1022 +3 3 3 3 3 3 3 1021 +4 4 4 4 4 4 4 1020 +5 5 5 5 5 5 5 1019 +explain select * from t0 where +(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 2 or key6 < 2); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where +explain select * from t0 where +(key1 < 3 or key2 < 3) and (key3 < 100); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 range i1,i2,i3 i3 4 NULL 95 Using where +explain select * from t0 where +(key1 < 3 or key2 < 3) and (key3 < 1000); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2,i3 NULL NULL NULL 1024 Using where +explain select * from t0 where +((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4)) +or +key2 > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2,i3 NULL NULL NULL 1024 Using where +explain select * from t0 where +((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4)) +or +key1 < 7; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where +select * from t0 where +((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4)) +or +key1 < 7; +key1 key2 key3 key4 key5 key6 key7 key8 +1 1 1 1 1 1 1 1023 +2 2 2 2 2 2 2 1022 +3 3 3 3 3 3 3 1021 +4 4 4 4 4 4 4 1020 +5 5 5 5 5 5 5 1019 +6 6 6 6 6 6 6 1018 +explain select * from t0 where +((key1 < 4 or key2 < 4) and (key3 <5 or key5 < 4)) +or +((key5 < 5 or key6 < 6) and (key7 <7 or key8 < 4)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i1,i2,i5,i6 4,4,4,4 NULL 19 Using sort_union(i1,i2,i5,i6); Using where +explain select * from t0 where +((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +((key7 <7 or key8 < 4) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i3,i5,i7,i8 4,4,4,4 NULL 20 Using sort_union(i3,i5,i7,i8); Using where +explain select * from t0 where +((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +((key3 <7 or key5 < 2) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 4,4 NULL 11 Using sort_union(i3,i5); Using where +explain select * from t0 where +((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +(((key3 <7 and key7 < 6) or key5 < 2) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7 i3,i5 4,4 NULL 11 Using sort_union(i3,i5); Using where +explain select * from t0 where +((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2,i3,i5,i6 NULL NULL NULL 1024 Using where +explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where +((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 0,4 NULL 1024 Using sort_union(i3,i5); Using where +select * from t0 where key1 < 5 or key8 < 4 order by key1; +key1 key2 key3 key4 key5 key6 key7 key8 +1 1 1 1 1 1 1 1023 +2 2 2 2 2 2 2 1022 +3 3 3 3 3 3 3 1021 +4 4 4 4 4 4 4 1020 +1021 1021 1021 1021 1021 1021 1021 3 +1022 1022 1022 1022 1022 1022 1022 2 +1023 1023 1023 1023 1023 1023 1023 1 +1024 1024 1024 1024 1024 1024 1024 0 +explain +select * from t0 where key1 < 5 or key8 < 4 order by key1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i8 i1,i8 4,4 NULL 9 Using sort_union(i1,i8); Using where; Using filesort +create table t2 like t0; +insert into t2 select * from t0; +alter table t2 add index i1_3(key1, key3); +alter table t2 add index i2_3(key2, key3); +alter table t2 drop index i1; +alter table t2 drop index i2; +alter table t2 add index i321(key3, key2, key1); +explain select key3 from t2 where key1 = 100 or key2 = 100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index_merge i1_3,i2_3 i1_3,i2_3 4,4 NULL 2 Using sort_union(i1_3,i2_3); Using where +explain select key3 from t2 where key1 <100 or key2 < 100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index i1_3,i2_3 i321 12 NULL 1024 Using where; Using index +explain select key7 from t2 where key1 <100 or key2 < 100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL i1_3,i2_3 NULL NULL NULL 1024 Using where +create table t4 ( +key1a int not null, +key1b int not null, +key2 int not null, +key2_1 int not null, +key2_2 int not null, +key3 int not null, +index i1a (key1a, key1b), +index i1b (key1b, key1a), +index i2_1(key2, key2_1), +index i2_2(key2, key2_1) +); +insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0; +select * from t4 where key1a = 3 or key1b = 4; +key1a key1b key2 key2_1 key2_2 key3 +3 3 0 3 3 3 +4 4 0 4 4 4 +explain select * from t4 where key1a = 3 or key1b = 4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 index_merge i1a,i1b i1a,i1b 4,4 NULL 2 Using sort_union(i1a,i1b); Using where +explain select * from t4 where key2 = 1 and (key2_1 = 1 or key3 = 5); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 10 Using where +explain select * from t4 where key2 = 1 and (key2_1 = 1 or key2_2 = 5); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 10 Using where +explain select * from t4 where key2_1 = 1 or key2_2 = 5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL NULL NULL NULL NULL 1024 Using where +create table t1 like t0; +insert into t1 select * from t0; +explain select * from t0 left join t1 on (t0.key1=t1.key1) +where t0.key1=3 or t0.key2=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +1 SIMPLE t1 ref i1 i1 4 test.t0.key1 1 +select * from t0 left join t1 on (t0.key1=t1.key1) +where t0.key1=3 or t0.key2=4; +key1 key2 key3 key4 key5 key6 key7 key8 key1 key2 key3 key4 key5 key6 key7 key8 +3 3 3 3 3 3 3 1021 3 3 3 3 3 3 3 1021 +4 4 4 4 4 4 4 1020 4 4 4 4 4 4 4 1020 +explain +select * from t0,t1 where (t0.key1=t1.key1) and ( t0.key1=3 or t0.key2=4); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +1 SIMPLE t1 ref i1 i1 4 test.t0.key1 1 +explain +select * from t0,t1 where (t0.key1=t1.key1) and +(t0.key1=3 or t0.key2=4) and t1.key1<200; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where +1 SIMPLE t1 ref i1 i1 4 test.t0.key1 1 +explain +select * from t0,t1 where (t0.key1=t1.key1) and +(t0.key1=3 or t0.key2<4) and t1.key1=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ref i1,i2 i1 4 const 1 Using where +1 SIMPLE t1 ref i1 i1 4 const 1 +explain select * from t0,t1 where t0.key1 = 5 and +(t1.key1 = t0.key1 or t1.key8 = t0.key1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ref i1 i1 4 const 1 +1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where +explain select * from t0,t1 where t0.key1 < 3 and +(t1.key1 = t0.key1 or t1.key8 = t0.key1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 range i1 i1 4 NULL 3 Using where +1 SIMPLE t1 ALL i1,i8 NULL NULL NULL 1024 Range checked for each record (index map: 0x81) +explain select * from t1 where key1=3 or key2=4 +union select * from t1 where key1<4 or key3=5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +2 UNION t1 index_merge i1,i3 i1,i3 4,4 NULL 5 Using sort_union(i1,i3); Using where +NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL +explain select * from (select * from t1 where key1 = 3 or key2 =3) as Z where key8 >5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 1 +2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +create table t3 like t0; +insert into t3 select * from t0; +alter table t3 add key9 int not null, add index i9(key9); +alter table t3 add keyA int not null, add index iA(keyA); +alter table t3 add keyB int not null, add index iB(keyB); +alter table t3 add keyC int not null, add index iC(keyC); +update t3 set key9=key1,keyA=key1,keyB=key1,keyC=key1; +explain select * from t3 where +key1=1 or key2=2 or key3=3 or key4=4 or +key5=5 or key6=6 or key7=7 or key8=8 or +key9=9 or keyA=10 or keyB=11 or keyC=12; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 index_merge i1,i2,i3,i4,i5,i6,i7,i8,i9,iA,iB,iC i1,i2,i3,i4,i5,i6,i7,i8,i9,iA,iB,iC 4,4,4,4,4,4,4,4,4,4,4,4 NULL 12 Using union(i1,i2,i3,i4,i5,i6,i7,i8,i9,iA,iB,iC); Using where +select * from t3 where +key1=1 or key2=2 or key3=3 or key4=4 or +key5=5 or key6=6 or key7=7 or key8=8 or +key9=9 or keyA=10 or keyB=11 or keyC=12; +key1 key2 key3 key4 key5 key6 key7 key8 key9 keyA keyB keyC +1 1 1 1 1 1 1 1023 1 1 1 1 +2 2 2 2 2 2 2 1022 2 2 2 2 +3 3 3 3 3 3 3 1021 3 3 3 3 +4 4 4 4 4 4 4 1020 4 4 4 4 +5 5 5 5 5 5 5 1019 5 5 5 5 +6 6 6 6 6 6 6 1018 6 6 6 6 +7 7 7 7 7 7 7 1017 7 7 7 7 +9 9 9 9 9 9 9 1015 9 9 9 9 +10 10 10 10 10 10 10 1014 10 10 10 10 +11 11 11 11 11 11 11 1013 11 11 11 11 +12 12 12 12 12 12 12 1012 12 12 12 12 +1016 1016 1016 1016 1016 1016 1016 8 1016 1016 1016 1016 +explain select * from t0 where key1 < 3 or key2 < 4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where +select * from t0 where key1 < 3 or key2 < 4; +key1 key2 key3 key4 key5 key6 key7 key8 +1 1 1 1 1 1 1 1023 +2 2 2 2 2 2 2 1022 +3 3 3 3 3 3 3 1021 +update t0 set key8=123 where key1 < 3 or key2 < 4; +select * from t0 where key1 < 3 or key2 < 4; +key1 key2 key3 key4 key5 key6 key7 key8 +1 1 1 1 1 1 1 123 +2 2 2 2 2 2 2 123 +3 3 3 3 3 3 3 123 +delete from t0 where key1 < 3 or key2 < 4; +select * from t0 where key1 < 3 or key2 < 4; +key1 key2 key3 key4 key5 key6 key7 key8 +select count(*) from t0; +count(*) +1021 +drop table t4; +create table t4 (a int); +insert into t4 values (1),(4),(3); +set @save_join_buffer_size=@@join_buffer_size; +set join_buffer_size= 4000; +explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +from t0 as A force index(i1,i2), t0 as B force index (i1,i2) +where (A.key1 < 500000 or A.key2 < 3) +and (B.key1 < 500000 or B.key2 < 3); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where +1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where +select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +from t0 as A force index(i1,i2), t0 as B force index (i1,i2) +where (A.key1 < 500000 or A.key2 < 3) +and (B.key1 < 500000 or B.key2 < 3); +max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +10240 +update t0 set key1=1; +explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +from t0 as A force index(i1,i2), t0 as B force index (i1,i2) +where (A.key1 = 1 or A.key2 = 1) +and (B.key1 = 1 or B.key2 = 1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where +1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where +select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +from t0 as A force index(i1,i2), t0 as B force index (i1,i2) +where (A.key1 = 1 or A.key2 = 1) +and (B.key1 = 1 or B.key2 = 1); +max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +8194 +alter table t0 add filler1 char(200), add filler2 char(200), add filler3 char(200); +update t0 set key2=1, key3=1, key4=1, key5=1,key6=1,key7=1 where key7 < 500; +explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +from t0 as A, t0 as B +where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) +and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where +1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where +select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +from t0 as A, t0 as B +where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) +and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1); +max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) +8186 +set join_buffer_size= @save_join_buffer_size; +drop table t0, t1, t2, t3, t4; diff --git a/mysql-test/r/index_merge_bdb.result b/mysql-test/r/index_merge_bdb.result new file mode 100644 index 00000000000..3113bf95d3a --- /dev/null +++ b/mysql-test/r/index_merge_bdb.result @@ -0,0 +1,136 @@ +drop table if exists t1; +create table t1 ( +pk int primary key, +key1 int, +key2 int, +filler char(200), +filler2 char(200), +index(key1), +index(key2) +) engine=bdb; +select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); +pk key1 key2 filler filler2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +9 9 9 filler-data filler-data-2 +10 10 10 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +5 5 5 filler-data filler-data-2 +6 6 6 filler-data filler-data-2 +7 7 7 filler-data filler-data-2 +8 8 8 filler-data filler-data-2 +set @maxv=1000; +select * from t1 where +(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10) +or key1=18 or key1=60; +pk key1 key2 filler filler2 +18 18 18 filler-data filler-data-2 +60 60 60 filler-data filler-data-2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +select * from t1 where +(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10) +or key1 < 3 or key1 > @maxv-11; +pk key1 key2 filler filler2 +990 990 990 filler-data filler-data-2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +select * from t1 where +(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10) +or +(key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10); +pk key1 key2 filler filler2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +select * from t1 where +(pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) +or +(key1 < 5) or (key1 > @maxv-10); +pk key1 key2 filler filler2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +drop table t1; diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result new file mode 100644 index 00000000000..662fffe1ba1 --- /dev/null +++ b/mysql-test/r/index_merge_innodb.result @@ -0,0 +1,136 @@ +drop table if exists t1,t2; +create table t1 +( +key1 int not null, +key2 int not null, +INDEX i1(key1), +INDEX i2(key2) +) engine=innodb; +explain select * from t1 where key1 < 5 or key2 > 197; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where +select * from t1 where key1 < 5 or key2 > 197; +key1 key2 +0 200 +1 199 +2 198 +3 197 +4 196 +explain select * from t1 where key1 < 3 or key2 > 195; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where +select * from t1 where key1 < 3 or key2 > 195; +key1 key2 +0 200 +1 199 +2 198 +3 197 +4 196 +alter table t1 add str1 char (255) not null, +add zeroval int not null default 0, +add str2 char (255) not null, +add str3 char (255) not null; +update t1 set str1='aaa', str2='bbb', str3=concat(key2, '-', key1 div 2, '_' ,if(key1 mod 2 = 0, 'a', 'A')); +alter table t1 add primary key (str1, zeroval, str2, str3); +explain select * from t1 where key1 < 5 or key2 > 197; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where +select * from t1 where key1 < 5 or key2 > 197; +key1 key2 str1 zeroval str2 str3 +4 196 aaa 0 bbb 196-2_a +3 197 aaa 0 bbb 197-1_A +2 198 aaa 0 bbb 198-1_a +1 199 aaa 0 bbb 199-0_A +0 200 aaa 0 bbb 200-0_a +explain select * from t1 where key1 < 3 or key2 > 195; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where +select * from t1 where key1 < 3 or key2 > 195; +key1 key2 str1 zeroval str2 str3 +4 196 aaa 0 bbb 196-2_a +3 197 aaa 0 bbb 197-1_A +2 198 aaa 0 bbb 198-1_a +1 199 aaa 0 bbb 199-0_A +0 200 aaa 0 bbb 200-0_a +drop table t1; +create table t1 ( +pk integer not null auto_increment primary key, +key1 integer, +key2 integer not null, +filler char (200), +index (key1), +index (key2) +) engine=innodb; +show warnings; +Level Code Message +explain select pk from t1 where key1 = 1 and key2 = 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,4 NULL 1 Using intersect(key1,key2); Using where; Using index +select pk from t1 where key2 = 1 and key1 = 1; +pk +26 +27 +select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1; +pk +26 +27 +drop table t1; +create table t1 ( +pk int primary key auto_increment, +key1a int, +key2a int, +key1b int, +key2b int, +dummy1 int, +dummy2 int, +dummy3 int, +dummy4 int, +key3a int, +key3b int, +filler1 char (200), +index i1(key1a, key1b), +index i2(key2a, key2b), +index i3(key3a, key3b) +) engine=innodb; +create table t2 (a int); +insert into t2 values (0),(1),(2),(3),(4),(NULL); +insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b) +select A.a, B.a, C.a, D.a, C.a, D.a from t2 A,t2 B,t2 C, t2 D; +insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b) +select key1a, key1b, key2a, key2b, key3a, key3b from t1; +insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b) +select key1a, key1b, key2a, key2b, key3a, key3b from t1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +select count(*) from t1; +count(*) +5184 +explain select count(*) from t1 where +key1a = 2 and key1b is null and key2a = 2 and key2b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 3 Using intersect(i1,i2); Using where; Using index +select count(*) from t1 where +key1a = 2 and key1b is null and key2a = 2 and key2b is null; +count(*) +4 +explain select count(*) from t1 where +key1a = 2 and key1b is null and key3a = 2 and key3b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 3 Using intersect(i1,i3); Using where; Using index +select count(*) from t1 where +key1a = 2 and key1b is null and key3a = 2 and key3b is null; +count(*) +4 +drop table t1,t2; +create table t1 ( +id1 int, +id2 date , +index idx2 (id1,id2), +index idx1 (id2) +) engine = innodb; +insert into t1 values(1,'20040101'), (2,'20040102'); +select * from t1 where id1 = 1 and id2= '20040101'; +id1 id2 +1 2004-01-01 +drop table t1; diff --git a/mysql-test/r/index_merge_innodb2.result b/mysql-test/r/index_merge_innodb2.result new file mode 100644 index 00000000000..91dd989fe90 --- /dev/null +++ b/mysql-test/r/index_merge_innodb2.result @@ -0,0 +1,136 @@ +drop table if exists t1; +create table t1 ( +pk int primary key, +key1 int, +key2 int, +filler char(200), +filler2 char(200), +index(key1), +index(key2) +) engine=innodb; +select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); +pk key1 key2 filler filler2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +9 9 9 filler-data filler-data-2 +10 10 10 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +5 5 5 filler-data filler-data-2 +6 6 6 filler-data filler-data-2 +7 7 7 filler-data filler-data-2 +8 8 8 filler-data filler-data-2 +set @maxv=1000; +select * from t1 where +(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10) +or key1=18 or key1=60; +pk key1 key2 filler filler2 +18 18 18 filler-data filler-data-2 +60 60 60 filler-data filler-data-2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +select * from t1 where +(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10) +or key1 < 3 or key1 > @maxv-11; +pk key1 key2 filler filler2 +990 990 990 filler-data filler-data-2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +select * from t1 where +(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10) +or +(key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10); +pk key1 key2 filler filler2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +select * from t1 where +(pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) +or +(key1 < 5) or (key1 > @maxv-10); +pk key1 key2 filler filler2 +1 1 1 filler-data filler-data-2 +2 2 2 filler-data filler-data-2 +3 3 3 filler-data filler-data-2 +4 4 4 filler-data filler-data-2 +991 991 991 filler-data filler-data-2 +992 992 992 filler-data filler-data-2 +993 993 993 filler-data filler-data-2 +994 994 994 filler-data filler-data-2 +995 995 995 filler-data filler-data-2 +996 996 996 filler-data filler-data-2 +997 997 997 filler-data filler-data-2 +998 998 998 filler-data filler-data-2 +999 999 999 filler-data filler-data-2 +1000 1000 1000 filler-data filler-data-2 +11 11 11 filler-data filler-data-2 +12 12 12 filler-data filler-data-2 +13 13 13 filler-data filler-data-2 +14 14 14 filler-data filler-data-2 +50 50 50 filler-data filler-data-2 +51 51 51 filler-data filler-data-2 +52 52 52 filler-data filler-data-2 +53 53 53 filler-data filler-data-2 +54 54 54 filler-data filler-data-2 +drop table t1; diff --git a/mysql-test/r/index_merge_ror.result b/mysql-test/r/index_merge_ror.result new file mode 100644 index 00000000000..69cd11d1dbf --- /dev/null +++ b/mysql-test/r/index_merge_ror.result @@ -0,0 +1,196 @@ +drop table if exists t0,t1,t2; +select count(*) from t1; +count(*) +64801 +explain select key1,key2 from t1 where key1=100 and key2=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 58 Using intersect(key1,key2); Using where; Using index +select key1,key2 from t1 where key1=100 and key2=100; +key1 key2 +100 100 +explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where +select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +key1 key2 key3 key4 filler1 +100 100 100 100 key1-key2-key3-key4 +insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, -1, -1, 'key1-key2'); +insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 100, 100, 'key4-key3'); +explain select key1,key2,filler1 from t1 where key1=100 and key2=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 58 Using intersect(key1,key2); Using where +select key1,key2,filler1 from t1 where key1=100 and key2=100; +key1 key2 filler1 +100 100 key1-key2-key3-key4 +100 100 key1-key2 +explain select key1,key2 from t1 where key1=100 and key2=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 58 Using intersect(key1,key2); Using where; Using index +select key1,key2 from t1 where key1=100 and key2=100; +key1 key2 +100 100 +100 100 +explain select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where +select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +key1 key2 key3 key4 +100 100 100 100 +100 100 -1 -1 +-1 -1 100 100 +explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where +select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +key1 key2 key3 key4 filler1 +100 100 100 100 key1-key2-key3-key4 +100 100 -1 -1 key1-key2 +-1 -1 100 100 key4-key3 +explain select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3 key1,key2,key3 5,5,5 NULL 2 Using intersect(key1,key2,key3); Using where; Using index +select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100; +key1 key2 key3 +100 100 100 +insert into t1 (key1,key2,key3,key4,filler1) values (101,101,101,101, 'key1234-101'); +explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=101; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3 key1,key2,key3 5,5,5 NULL 83 Using union(intersect(key1,key2),key3); Using where +select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=101; +key1 key2 key3 key4 filler1 +100 100 100 100 key1-key2-key3-key4 +100 100 -1 -1 key1-key2 +101 101 101 101 key1234-101 +select key1,key2, filler1 from t1 where key1=100 and key2=100; +key1 key2 filler1 +100 100 key1-key2-key3-key4 +100 100 key1-key2 +update t1 set filler1='to be deleted' where key1=100 and key2=100; +update t1 set key1=200,key2=200 where key1=100 and key2=100; +delete from t1 where key1=200 and key2=200; +select key1,key2,filler1 from t1 where key2=100 and key2=200; +key1 key2 filler1 +explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 152 Using union(intersect(key1,key2),intersect(key3,key4)); Using where +select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +key1 key2 key3 key4 filler1 +-1 -1 100 100 key4-key3 +delete from t1 where key3=100 and key4=100; +explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 152 Using union(intersect(key1,key2),intersect(key3,key4)); Using where +select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100; +key1 key2 key3 key4 filler1 +explain select key1,key2 from t1 where key1=100 and key2=100; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 57 Using intersect(key1,key2); Using where; Using index +select key1,key2 from t1 where key1=100 and key2=100; +key1 key2 +insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-1'); +insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-2'); +insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-3'); +explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 136 Using union(key3,intersect(key1,key2),key4); Using where +select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200; +key1 key2 key3 key4 filler1 +100 100 200 200 key1-key2-key3-key4-3 +100 100 200 200 key1-key2-key3-key4-2 +100 100 200 200 key1-key2-key3-key4-1 +insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, -1, 200,'key4'); +explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 146 Using union(key3,intersect(key1,key2),key4); Using where +select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200; +key1 key2 key3 key4 filler1 +100 100 200 200 key1-key2-key3-key4-3 +100 100 200 200 key1-key2-key3-key4-2 +100 100 200 200 key1-key2-key3-key4-1 +-1 -1 -1 200 key4 +insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 200, -1,'key3'); +explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 156 Using union(key3,intersect(key1,key2),key4); Using where +select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200; +key1 key2 key3 key4 filler1 +100 100 200 200 key1-key2-key3-key4-3 +100 100 200 200 key1-key2-key3-key4-2 +100 100 200 200 key1-key2-key3-key4-1 +-1 -1 -1 200 key4 +-1 -1 200 -1 key3 +explain select * from t1 where st_a=1 and st_b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b st_a,st_b 4,4 NULL 2637 Using intersect(st_a,st_b); Using where +explain select st_a,st_b from t1 where st_a=1 and st_b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b st_a,st_b 4,4 NULL 2637 Using intersect(st_a,st_b); Using where; Using index +explain select st_a from t1 ignore index (st_a) where st_a=1 and st_b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,stb_swt1a_2b,stb_swt1b,st_b st_b 4 const 15093 Using where +explain select * from t1 where st_a=1 and swt1a=1 and swt2a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a sta_swt21a 12 const,const,const 971 +explain select * from t1 where st_b=1 and swt1b=1 and swt2b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref stb_swt1a_2b,stb_swt1b,st_b stb_swt1a_2b 8 const,const 3879 Using where +explain select * from t1 where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt12a,stb_swt1a_2b 12,12 NULL 44 Using intersect(sta_swt12a,stb_swt1a_2b); Using where +explain select * from t1 ignore index (sta_swt21a, stb_swt1a_2b) +where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,st_a,stb_swt1b,st_b sta_swt12a,stb_swt1b 12,8 NULL 44 Using intersect(sta_swt12a,stb_swt1b); Using where +explain select * from t1 ignore index (sta_swt21a, sta_swt12a, stb_swt1a_2b) +where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt1a,sta_swt2a,st_a,stb_swt1b,st_b sta_swt1a,sta_swt2a,stb_swt1b 8,8,8 NULL 43 Using intersect(sta_swt1a,sta_swt2a,stb_swt1b); Using where +explain select * from t1 ignore index (sta_swt21a, sta_swt12a, stb_swt1a_2b, stb_swt1b) +where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt1a,sta_swt2a,st_a,st_b sta_swt1a,sta_swt2a,st_b 8,8,4 NULL 168 Using intersect(sta_swt1a,sta_swt2a,st_b); Using where +explain select * from t1 +where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt12a,stb_swt1a_2b 12,12 NULL 44 Using intersect(sta_swt12a,stb_swt1a_2b); Using where +explain select * from t1 +where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt1a,stb_swt1b 8,8 NULL 174 Using intersect(sta_swt1a,stb_swt1b); Using where +explain select st_a from t1 +where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt1a,stb_swt1b 8,8 NULL 174 Using intersect(sta_swt1a,stb_swt1b); Using where; Using index +explain select st_a from t1 +where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt1a,stb_swt1b 8,8 NULL 174 Using intersect(sta_swt1a,stb_swt1b); Using where; Using index +drop table t0,t1; +create table t2 ( +a char(10), +b char(10), +filler1 char(255), +filler2 char(255), +key(a(5)), +key(b(5)) +); +select count(a) from t2 where a='BBBBBBBB'; +count(a) +4 +select count(a) from t2 where b='BBBBBBBB'; +count(a) +4 +expla_or_bin select count(a_or_b) from t2 where a_or_b='AAAAAAAA' a_or_bnd a_or_b='AAAAAAAA'; +id select_type ta_or_ba_or_ble type possia_or_ble_keys key key_len ref rows Extra_or_b +1 SIMPLE t2 ref a_or_b,a_or_b a_or_b 6 const 4 Using where +select count(a) from t2 where a='AAAAAAAA' and b='AAAAAAAA'; +count(a) +4 +select count(a) from t2 ignore index(a,b) where a='AAAAAAAA' and b='AAAAAAAA'; +count(a) +4 +insert into t2 values ('ab', 'ab', 'uh', 'oh'); +explain select a from t2 where a='ab'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ref a a 6 const 1 Using where +drop table t2; diff --git a/mysql-test/r/index_merge_ror_cpk.result b/mysql-test/r/index_merge_ror_cpk.result new file mode 100644 index 00000000000..79bb1297abf --- /dev/null +++ b/mysql-test/r/index_merge_ror_cpk.result @@ -0,0 +1,120 @@ +drop table if exists t1; +create table t1 +( +pk1 int not null, +pk2 int not null, +key1 int not null, +key2 int not null, +pktail1ok int not null, +pktail2ok int not null, +pktail3bad int not null, +pktail4bad int not null, +pktail5bad int not null, +pk2copy int not null, +badkey int not null, +filler1 char (200), +filler2 char (200), +key (key1), +key (key2), +/* keys with tails from CPK members */ +key (pktail1ok, pk1), +key (pktail2ok, pk1, pk2), +key (pktail3bad, pk2, pk1), +key (pktail4bad, pk1, pk2copy), +key (pktail5bad, pk1, pk2, pk2copy), +primary key (pk1, pk2) +) engine=innodb; +explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 9 Using where +select * from t1 where pk1 = 1 and pk2 < 80 and key1=0; +pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2 +1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2 +1 11 0 0 0 0 0 0 0 11 0 filler-data-11 filler2 +1 12 0 0 0 0 0 0 0 12 0 filler-data-12 filler2 +1 13 0 0 0 0 0 0 0 13 0 filler-data-13 filler2 +1 14 0 0 0 0 0 0 0 14 0 filler-data-14 filler2 +1 15 0 0 0 0 0 0 0 15 0 filler-data-15 filler2 +1 16 0 0 0 0 0 0 0 16 0 filler-data-16 filler2 +1 17 0 0 0 0 0 0 0 17 0 filler-data-17 filler2 +1 18 0 0 0 0 0 0 0 18 0 filler-data-18 filler2 +1 19 0 0 0 0 0 0 0 19 0 filler-data-19 filler2 +explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index +select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1; +pk1 pk2 +95 50 +95 51 +95 52 +95 53 +95 54 +95 55 +95 56 +95 57 +95 58 +95 59 +explain select * from t1 where badkey=1 and key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref key1 key1 4 const 100 Using where +explain select * from t1 where pk1 < 7500 and key1 = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where +explain select * from t1 where pktail1ok=1 and key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where +explain select * from t1 where pktail2ok=1 and key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,pktail2ok key1,pktail2ok 4,4 NULL 1 Using intersect(key1,pktail2ok); Using where +select ' The following is actually a deficiency, it uses sort_union currently:' as 'note:'; +note: + The following is actually a deficiency, it uses sort_union currently: +explain select * from t1 where (pktail2ok=1 and pk1< 50000) or key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL 199 Using sort_union(pktail2ok,key1); Using where +explain select * from t1 where pktail3bad=1 and key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref key1,pktail3bad key1 4 const 100 Using where +explain select * from t1 where pktail4bad=1 and key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref key1,pktail4bad key1 4 const 100 Using where +explain select * from t1 where pktail5bad=1 and key1=10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref key1,pktail5bad key1 4 const 100 Using where +explain select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index +select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10; +pk1 pk2 key1 key2 +95 50 10 10 +95 51 10 10 +95 52 10 10 +95 53 10 10 +95 54 10 10 +95 55 10 10 +95 56 10 10 +95 57 10 10 +95 58 10 10 +95 59 10 10 +drop table t1; +create table t1 +( +RUNID varchar(22), +SUBMITNR varchar(5), +ORDERNR char(1) , +PROGRAMM varchar(8), +TESTID varchar(4), +UCCHECK char(1), +ETEXT varchar(80), +ETEXT_TYPE char(1), +INFO char(1), +SEVERITY tinyint(3), +TADIRFLAG char(1), +PRIMARY KEY (RUNID,SUBMITNR,ORDERNR,PROGRAMM,TESTID,UCCHECK), +KEY `TVERM~KEY` (PROGRAMM,TESTID,UCCHECK) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +update t1 set `ETEXT` = '', `ETEXT_TYPE`='', `INFO`='', `SEVERITY`='', `TADIRFLAG`='' +WHERE +`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND +`TESTID`='' AND `UCCHECK`=''; +drop table t1; diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result new file mode 100644 index 00000000000..20b2f12f0a8 --- /dev/null +++ b/mysql-test/r/information_schema.result @@ -0,0 +1,981 @@ +DROP TABLE IF EXISTS t0,t1,t2,t3,t5; +show variables where variable_name like "skip_show_database"; +Variable_name Value +skip_show_database OFF +grant select, update, execute on test.* to mysqltest_2@localhost; +grant select, update on test.* to mysqltest_1@localhost; +create user mysqltest_3@localhost; +create user mysqltest_3; +select * from information_schema.SCHEMATA where schema_name > 'm'; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL mysql latin1 latin1_swedish_ci NULL +NULL test latin1 latin1_swedish_ci NULL +select schema_name from information_schema.schemata; +schema_name +information_schema +mysql +test +show databases like 't%'; +Database (t%) +test +show databases; +Database +information_schema +mysql +test +show databases where `database` = 't%'; +Database +create database mysqltest; +create table mysqltest.t1(a int, b VARCHAR(30), KEY string_data (b)); +create table test.t2(a int); +create table t3(a int, KEY a_data (a)); +create table mysqltest.t4(a int); +create table t5 (id int auto_increment primary key); +insert into t5 values (10); +create view v1 (c) as select table_name from information_schema.TABLES; +select * from v1; +c +CHARACTER_SETS +COLLATIONS +COLLATION_CHARACTER_SET_APPLICABILITY +COLUMNS +COLUMN_PRIVILEGES +KEY_COLUMN_USAGE +ROUTINES +SCHEMATA +SCHEMA_PRIVILEGES +STATISTICS +TABLES +TABLE_CONSTRAINTS +TABLE_PRIVILEGES +TRIGGERS +VIEWS +USER_PRIVILEGES +columns_priv +db +func +help_category +help_keyword +help_relation +help_topic +host +proc +procs_priv +tables_priv +time_zone +time_zone_leap_second +time_zone_name +time_zone_transition +time_zone_transition_type +user +t1 +t4 +t2 +t3 +t5 +v1 +select c,table_name from v1 +inner join information_schema.TABLES v2 on (v1.c=v2.table_name) +where v1.c like "t%"; +c table_name +TABLES TABLES +TABLE_CONSTRAINTS TABLE_CONSTRAINTS +TABLE_PRIVILEGES TABLE_PRIVILEGES +TRIGGERS TRIGGERS +tables_priv tables_priv +time_zone time_zone +time_zone_leap_second time_zone_leap_second +time_zone_name time_zone_name +time_zone_transition time_zone_transition +time_zone_transition_type time_zone_transition_type +t1 t1 +t4 t4 +t2 t2 +t3 t3 +t5 t5 +select c,table_name from v1 +left join information_schema.TABLES v2 on (v1.c=v2.table_name) +where v1.c like "t%"; +c table_name +TABLES TABLES +TABLE_CONSTRAINTS TABLE_CONSTRAINTS +TABLE_PRIVILEGES TABLE_PRIVILEGES +TRIGGERS TRIGGERS +tables_priv tables_priv +time_zone time_zone +time_zone_leap_second time_zone_leap_second +time_zone_name time_zone_name +time_zone_transition time_zone_transition +time_zone_transition_type time_zone_transition_type +t1 t1 +t4 t4 +t2 t2 +t3 t3 +t5 t5 +select c, v2.table_name from v1 +right join information_schema.TABLES v2 on (v1.c=v2.table_name) +where v1.c like "t%"; +c table_name +TABLES TABLES +TABLE_CONSTRAINTS TABLE_CONSTRAINTS +TABLE_PRIVILEGES TABLE_PRIVILEGES +TRIGGERS TRIGGERS +tables_priv tables_priv +time_zone time_zone +time_zone_leap_second time_zone_leap_second +time_zone_name time_zone_name +time_zone_transition time_zone_transition +time_zone_transition_type time_zone_transition_type +t1 t1 +t4 t4 +t2 t2 +t3 t3 +t5 t5 +select table_name from information_schema.TABLES +where table_schema = "mysqltest" and table_name like "t%"; +table_name +t1 +t4 +select * from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest"; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL mysqltest t1 1 mysqltest string_data 1 b A NULL NULL NULL YES BTREE +show keys from t3 where Key_name = "a_data"; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t3 1 a_data 1 a A NULL NULL NULL YES BTREE +show tables like 't%'; +Tables_in_test (t%) +t2 +t3 +t5 +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t2 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL +t3 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL +t5 MyISAM 10 Fixed 1 7 7 # 2048 0 11 # # NULL latin1_swedish_ci NULL +v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +show full columns from t3 like "a%"; +Field Type Collation Null Key Default Extra Privileges Comment +a int(11) NULL YES MUL NULL select,insert,update,references +show full columns from mysql.db like "Insert%"; +Field Type Collation Null Key Default Extra Privileges Comment +Insert_priv enum('N','Y') utf8_general_ci NO N select,insert,update,references +show full columns from v1; +Field Type Collation Null Key Default Extra Privileges Comment +c varchar(64) utf8_general_ci NO select,insert,update,references +select * from information_schema.COLUMNS where table_name="t1" +and column_name= "a"; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL mysqltest t1 a 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +show columns from mysqltest.t1 where field like "%a%"; +Field Type Null Key Default Extra +a int(11) YES NULL +create view mysqltest.v1 (c) as select a from mysqltest.t1; +grant select (a) on mysqltest.t1 to mysqltest_2@localhost; +grant select on mysqltest.v1 to mysqltest_3; +select table_name, column_name, privileges from information_schema.columns +where table_schema = 'mysqltest' and table_name = 't1'; +table_name column_name privileges +t1 a select +show columns from mysqltest.t1; +Field Type Null Key Default Extra +a int(11) YES NULL +b varchar(30) YES MUL NULL +select table_name, column_name, privileges from information_schema.columns +where table_schema = 'mysqltest' and table_name = 'v1'; +table_name column_name privileges +v1 c select +drop view v1, mysqltest.v1; +drop tables mysqltest.t4, mysqltest.t1, t2, t3, t5; +drop database mysqltest; +select * from information_schema.CHARACTER_SETS +where CHARACTER_SET_NAME like 'latin1%'; +CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +latin1 latin1_swedish_ci cp1252 West European 1 +SHOW CHARACTER SET LIKE 'latin1%'; +Charset Description Default collation Maxlen +latin1 cp1252 West European latin1_swedish_ci 1 +SHOW CHARACTER SET WHERE charset like 'latin1%'; +Charset Description Default collation Maxlen +latin1 cp1252 West European latin1_swedish_ci 1 +select * from information_schema.COLLATIONS +where COLLATION_NAME like 'latin1%'; +COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN +latin1_german1_ci latin1 5 0 +latin1_swedish_ci latin1 8 Yes Yes 1 +latin1_danish_ci latin1 15 0 +latin1_german2_ci latin1 31 Yes 2 +latin1_bin latin1 47 Yes 1 +latin1_general_ci latin1 48 0 +latin1_general_cs latin1 49 0 +latin1_spanish_ci latin1 94 0 +SHOW COLLATION LIKE 'latin1%'; +Collation Charset Id Default Compiled Sortlen +latin1_german1_ci latin1 5 0 +latin1_swedish_ci latin1 8 Yes Yes 1 +latin1_danish_ci latin1 15 0 +latin1_german2_ci latin1 31 Yes 2 +latin1_bin latin1 47 Yes 1 +latin1_general_ci latin1 48 0 +latin1_general_cs latin1 49 0 +latin1_spanish_ci latin1 94 0 +SHOW COLLATION WHERE collation like 'latin1%'; +Collation Charset Id Default Compiled Sortlen +latin1_german1_ci latin1 5 0 +latin1_swedish_ci latin1 8 Yes Yes 1 +latin1_danish_ci latin1 15 0 +latin1_german2_ci latin1 31 Yes 2 +latin1_bin latin1 47 Yes 1 +latin1_general_ci latin1 48 0 +latin1_general_cs latin1 49 0 +latin1_spanish_ci latin1 94 0 +select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY +where COLLATION_NAME like 'latin1%'; +COLLATION_NAME CHARACTER_SET_NAME +latin1_german1_ci latin1 +latin1_swedish_ci latin1 +latin1_danish_ci latin1 +latin1_german2_ci latin1 +latin1_bin latin1 +latin1_general_ci latin1 +latin1_general_cs latin1 +latin1_spanish_ci latin1 +drop procedure if exists sel2; +drop function if exists sub1; +drop function if exists sub2; +create function sub1(i int) returns int +return i+1; +create procedure sel2() +begin +select * from t1; +select * from t2; +end| +select parameter_style, sql_data_access, dtd_identifier +from information_schema.routines; +parameter_style sql_data_access dtd_identifier +SQL CONTAINS SQL NULL +SQL CONTAINS SQL int(11) +show procedure status; +Db Name Type Definer Modified Created Security_type Comment +test sel2 PROCEDURE root@localhost # # DEFINER +show function status; +Db Name Type Definer Modified Created Security_type Comment +test sub1 FUNCTION root@localhost # # DEFINER +select a.ROUTINE_NAME from information_schema.ROUTINES a, +information_schema.SCHEMATA b where +a.ROUTINE_SCHEMA = b.SCHEMA_NAME; +ROUTINE_NAME +sel2 +sub1 +explain select a.ROUTINE_NAME from information_schema.ROUTINES a, +information_schema.SCHEMATA b where +a.ROUTINE_SCHEMA = b.SCHEMA_NAME; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE # ALL NULL NULL NULL NULL 2 +1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where +select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a, +mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1; +ROUTINE_NAME name +sel2 sel2 +sub1 sub1 +select count(*) from information_schema.ROUTINES; +count(*) +2 +select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; +ROUTINE_NAME ROUTINE_DEFINITION +show create function sub1; +ERROR 42000: FUNCTION sub1 does not exist +select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; +ROUTINE_NAME ROUTINE_DEFINITION +sel2 +sub1 +grant all privileges on test.* to mysqltest_1@localhost; +select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; +ROUTINE_NAME ROUTINE_DEFINITION +sel2 +sub1 +create function sub2(i int) returns int +return i+1; +select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; +ROUTINE_NAME ROUTINE_DEFINITION +sel2 +sub1 +sub2 return i+1 +show create procedure sel2; +Procedure sql_mode Create Procedure +sel2 +show create function sub1; +Function sql_mode Create Function +sub1 +show create function sub2; +Function sql_mode Create Function +sub2 CREATE FUNCTION `sub2`(i int) RETURNS int(11) +return i+1 +show function status like "sub2"; +Db Name Type Definer Modified Created Security_type Comment +test sub2 FUNCTION mysqltest_1@localhost # # DEFINER +drop function sub2; +show create procedure sel2; +Procedure sql_mode Create Procedure +sel2 CREATE PROCEDURE `sel2`() +begin +select * from t1; +select * from t2; +end +create view v0 (c) as select schema_name from information_schema.schemata; +select * from v0; +c +information_schema +mysql +test +explain select * from v0; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY # ALL NULL NULL NULL NULL 2 +create view v1 (c) as select table_name from information_schema.tables +where table_name="v1"; +select * from v1; +c +v1 +create view v2 (c) as select column_name from information_schema.columns +where table_name="v2"; +select * from v2; +c +c +create view v3 (c) as select CHARACTER_SET_NAME from information_schema.character_sets +where CHARACTER_SET_NAME like "latin1%"; +select * from v3; +c +latin1 +create view v4 (c) as select COLLATION_NAME from information_schema.collations +where COLLATION_NAME like "latin1%"; +select * from v4; +c +latin1_german1_ci +latin1_swedish_ci +latin1_danish_ci +latin1_german2_ci +latin1_bin +latin1_general_ci +latin1_general_cs +latin1_spanish_ci +show keys from v4; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +select * from information_schema.views where TABLE_NAME like "v%"; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE +NULL test v0 select sql_no_cache `schemata`.`SCHEMA_NAME` AS `c` from `information_schema`.`schemata` NONE NO +NULL test v1 select sql_no_cache `tables`.`TABLE_NAME` AS `c` from `information_schema`.`tables` where (`tables`.`TABLE_NAME` = _utf8'v1') NONE NO +NULL test v2 select sql_no_cache `columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns` where (`columns`.`TABLE_NAME` = _utf8'v2') NONE NO +NULL test v3 select sql_no_cache `character_sets`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`character_sets` where (`character_sets`.`CHARACTER_SET_NAME` like _utf8'latin1%') NONE NO +NULL test v4 select sql_no_cache `collations`.`COLLATION_NAME` AS `c` from `information_schema`.`collations` where (`collations`.`COLLATION_NAME` like _utf8'latin1%') NONE NO +drop view v0, v1, v2, v3, v4; +create table t1 (a int); +grant select,update,insert on t1 to mysqltest_1@localhost; +grant select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; +grant all on test.* to mysqltest_1@localhost with grant option; +select * from information_schema.USER_PRIVILEGES where grantee like '%mysqltest_1%'; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'mysqltest_1'@'localhost' NULL USAGE NO +select * from information_schema.SCHEMA_PRIVILEGES where grantee like '%mysqltest_1%'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'mysqltest_1'@'localhost' NULL test SELECT YES +'mysqltest_1'@'localhost' NULL test INSERT YES +'mysqltest_1'@'localhost' NULL test UPDATE YES +'mysqltest_1'@'localhost' NULL test DELETE YES +'mysqltest_1'@'localhost' NULL test CREATE YES +'mysqltest_1'@'localhost' NULL test DROP YES +'mysqltest_1'@'localhost' NULL test REFERENCES YES +'mysqltest_1'@'localhost' NULL test INDEX YES +'mysqltest_1'@'localhost' NULL test ALTER YES +'mysqltest_1'@'localhost' NULL test CREATE TEMPORARY TABLES YES +'mysqltest_1'@'localhost' NULL test LOCK TABLES YES +'mysqltest_1'@'localhost' NULL test EXECUTE YES +'mysqltest_1'@'localhost' NULL test CREATE VIEW YES +'mysqltest_1'@'localhost' NULL test SHOW VIEW YES +'mysqltest_1'@'localhost' NULL test CREATE ROUTINE YES +'mysqltest_1'@'localhost' NULL test ALTER ROUTINE YES +select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'mysqltest_1'@'localhost' NULL test t1 SELECT NO +'mysqltest_1'@'localhost' NULL test t1 INSERT NO +'mysqltest_1'@'localhost' NULL test t1 UPDATE NO +select * from information_schema.COLUMN_PRIVILEGES where grantee like '%mysqltest_1%'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'mysqltest_1'@'localhost' NULL test t1 a SELECT NO +'mysqltest_1'@'localhost' NULL test t1 a INSERT NO +'mysqltest_1'@'localhost' NULL test t1 a UPDATE NO +'mysqltest_1'@'localhost' NULL test t1 a REFERENCES NO +delete from mysql.user where user like 'mysqltest%'; +delete from mysql.db where user like 'mysqltest%'; +delete from mysql.tables_priv where user like 'mysqltest%'; +delete from mysql.columns_priv where user like 'mysqltest%'; +flush privileges; +drop table t1; +create table t1 (a int null, primary key(a)); +alter table t1 add constraint constraint_1 unique (a); +alter table t1 add constraint unique key_1(a); +alter table t1 add constraint constraint_2 unique key_2(a); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + PRIMARY KEY (`a`), + UNIQUE KEY `constraint_1` (`a`), + UNIQUE KEY `key_1` (`a`), + UNIQUE KEY `key_2` (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from information_schema.TABLE_CONSTRAINTS where +TABLE_SCHEMA= "test"; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL test PRIMARY test t1 PRIMARY KEY +NULL test constraint_1 test t1 UNIQUE +NULL test key_1 test t1 UNIQUE +NULL test key_2 test t1 UNIQUE +select * from information_schema.KEY_COLUMN_USAGE where +TABLE_SCHEMA= "test"; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL test PRIMARY NULL test t1 a 1 NULL NULL NULL NULL +NULL test constraint_1 NULL test t1 a 1 NULL NULL NULL NULL +NULL test key_1 NULL test t1 a 1 NULL NULL NULL NULL +NULL test key_2 NULL test t1 a 1 NULL NULL NULL NULL +select table_name from information_schema.TABLES where table_schema like "test%"; +table_name +t1 +select table_name,column_name from information_schema.COLUMNS where table_schema like "test%"; +table_name column_name +t1 a +select ROUTINE_NAME from information_schema.ROUTINES; +ROUTINE_NAME +sel2 +sub1 +delete from mysql.user where user='mysqltest_1'; +drop table t1; +drop procedure sel2; +drop function sub1; +create table t1(a int); +create view v1 (c) as select a from t1 with check option; +create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION; +create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION; +select * from information_schema.views; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE +NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES +NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES +NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES +grant select (a) on test.t1 to joe@localhost with grant option; +select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'joe'@'localhost' NULL test t1 a SELECT YES +select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +drop view v1, v2, v3; +drop table t1; +delete from mysql.user where user='joe'; +delete from mysql.db where user='joe'; +delete from mysql.tables_priv where user='joe'; +delete from mysql.columns_priv where user='joe'; +flush privileges; +create table t1 (a int not null auto_increment,b int, primary key (a)); +insert into t1 values (1,1),(NULL,3),(NULL,4); +select AUTO_INCREMENT from information_schema.tables where table_name = 't1'; +AUTO_INCREMENT +4 +drop table t1; +create table t1 (s1 int); +insert into t1 values (0),(9),(0); +select s1 from t1 where s1 in (select version from +information_schema.tables) union select version from +information_schema.tables; +s1 +0 +10 +drop table t1; +SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; +Table Create Table +CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( + `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', + `DESCRIPTION` varchar(60) NOT NULL default '', + `MAXLEN` bigint(3) NOT NULL default '0' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +set names latin2; +SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; +Table Create Table +CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( + `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', + `DESCRIPTION` varchar(60) NOT NULL default '', + `MAXLEN` bigint(3) NOT NULL default '0' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +set names latin1; +create table t1 select * from information_schema.CHARACTER_SETS +where CHARACTER_SET_NAME like "latin1"; +select * from t1; +CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +latin1 latin1_swedish_ci cp1252 West European 1 +alter table t1 default character set utf8; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', + `DESCRIPTION` varchar(60) NOT NULL default '', + `MAXLEN` bigint(3) NOT NULL default '0' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +drop table t1; +create view v1 as select * from information_schema.TABLES; +drop view v1; +create table t1(a NUMERIC(5,3), b NUMERIC(5,1), c float(5,2), +d NUMERIC(6,4), e float, f DECIMAL(6,3), g int(11), h DOUBLE(10,3), +i DOUBLE); +select COLUMN_NAME,COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH, +CHARACTER_OCTET_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE +from information_schema.columns where table_name= 't1'; +COLUMN_NAME COLUMN_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE +a decimal(5,3) NULL NULL 5 3 +b decimal(5,1) NULL NULL 5 1 +c float(5,2) NULL NULL 5 2 +d decimal(6,4) NULL NULL 6 4 +e float NULL NULL 12 NULL +f decimal(6,3) NULL NULL 6 3 +g int(11) NULL NULL 10 0 +h double(10,3) NULL NULL 10 3 +i double NULL NULL 22 NULL +drop table t1; +create table t115 as select table_name, column_name, column_type +from information_schema.columns where table_name = 'proc'; +select * from t115; +table_name column_name column_type +proc db char(64) +proc name char(64) +proc type enum('FUNCTION','PROCEDURE') +proc specific_name char(64) +proc language enum('SQL') +proc sql_data_access enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') +proc is_deterministic enum('YES','NO') +proc security_type enum('INVOKER','DEFINER') +proc param_list blob +proc returns char(64) +proc body longblob +proc definer char(77) +proc created timestamp +proc modified timestamp +proc sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') +proc comment char(64) +drop table t115; +create procedure p108 () begin declare c cursor for select data_type +from information_schema.columns; open c; open c; end;// +call p108()// +ERROR 24000: Cursor is already open +drop procedure p108; +create view v1 as select A1.table_name from information_schema.TABLES A1 +where table_name= "user"; +select * from v1; +table_name +user +drop view v1; +create view vo as select 'a' union select 'a'; +show index from vo; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +select * from information_schema.TABLE_CONSTRAINTS where +TABLE_NAME= "vo"; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +select * from information_schema.KEY_COLUMN_USAGE where +TABLE_NAME= "vo"; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +drop view vo; +select TABLE_NAME,TABLE_TYPE,ENGINE +from information_schema.tables +where table_schema='information_schema' limit 2; +TABLE_NAME TABLE_TYPE ENGINE +CHARACTER_SETS SYSTEM VIEW MEMORY +COLLATIONS SYSTEM VIEW MEMORY +show tables from information_schema like "T%"; +Tables_in_information_schema (T%) +TABLES +TABLE_CONSTRAINTS +TABLE_PRIVILEGES +TRIGGERS +create database information_schema; +ERROR HY000: Can't create database 'information_schema'; database exists +use information_schema; +show full tables like "T%"; +Tables_in_information_schema (T%) Table_type +TABLES SYSTEM VIEW +TABLE_CONSTRAINTS SYSTEM VIEW +TABLE_PRIVILEGES SYSTEM VIEW +TRIGGERS SYSTEM VIEW +create table t1(a int); +ERROR 42S02: Unknown table 't1' in information_schema +use test; +show tables; +Tables_in_test +use information_schema; +show tables like "T%"; +Tables_in_information_schema (T%) +TABLES +TABLE_CONSTRAINTS +TABLE_PRIVILEGES +TRIGGERS +select table_name from tables where table_name='user'; +table_name +user +select column_name, privileges from columns +where table_name='user' and column_name like '%o%'; +column_name privileges +Host select,insert,update,references +Password select,insert,update,references +Drop_priv select,insert,update,references +Reload_priv select,insert,update,references +Shutdown_priv select,insert,update,references +Process_priv select,insert,update,references +Show_db_priv select,insert,update,references +Lock_tables_priv select,insert,update,references +Show_view_priv select,insert,update,references +Create_routine_priv select,insert,update,references +Alter_routine_priv select,insert,update,references +max_questions select,insert,update,references +max_connections select,insert,update,references +max_user_connections select,insert,update,references +use test; +create function sub1(i int) returns int +return i+1; +create table t1(f1 int); +create view t2 (c) as select f1 from t1; +create view t3 (c) as select sub1(1); +create table t4(f1 int, KEY f1_key (f1)); +drop table t1; +drop function sub1; +select table_name from information_schema.views +where table_schema='test'; +table_name +Warnings: +Warning 1356 View 'test.t2' references invalid table(s) or column(s) or function(s) +Warning 1356 View 'test.t3' references invalid table(s) or column(s) or function(s) +select table_name from information_schema.views +where table_schema='test'; +table_name +Warnings: +Warning 1356 View 'test.t2' references invalid table(s) or column(s) or function(s) +Warning 1356 View 'test.t3' references invalid table(s) or column(s) or function(s) +select column_name from information_schema.columns +where table_schema='test'; +column_name +f1 +Warnings: +Warning 1356 View 'test.t2' references invalid table(s) or column(s) or function(s) +Warning 1356 View 'test.t3' references invalid table(s) or column(s) or function(s) +select index_name from information_schema.statistics where table_schema='test'; +index_name +f1_key +select constraint_name from information_schema.table_constraints +where table_schema='test'; +constraint_name +drop view t2; +drop view t3; +drop table t4; +select * from information_schema.table_names; +ERROR 42S02: Unknown table 'table_names' in information_schema +select column_type from information_schema.columns +where table_schema="information_schema" and table_name="COLUMNS" and +(column_name="character_set_name" or column_name="collation_name"); +column_type +varchar(64) +varchar(64) +select TABLE_ROWS from information_schema.tables where +table_schema="information_schema" and table_name="COLUMNS"; +TABLE_ROWS +NULL +select table_type from information_schema.tables +where table_schema="mysql" and table_name="user"; +table_type +BASE TABLE +show open tables where `table` like "user"; +Database Table In_use Name_locked +mysql user 0 0 +show status where variable_name like "%database%"; +Variable_name Value +Com_show_databases 3 +show variables where variable_name like "skip_show_databas"; +Variable_name Value +show global status like "Threads_running"; +Variable_name Value +Threads_running # +create table t1(f1 int); +create table t2(f2 int); +create view v1 as select * from t1, t2; +set @got_val= (select count(*) from information_schema.columns); +drop view v1; +drop table t1, t2; +CREATE TABLE t_crashme ( f1 BIGINT); +CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1; +CREATE VIEW a2 AS SELECT t_CRASHME FROM a1; +count(*) +101 +drop view a2, a1; +drop table t_crashme; +select table_schema,table_name, column_name from +information_schema.columns +where data_type = 'longtext'; +table_schema table_name column_name +information_schema COLUMNS COLUMN_TYPE +information_schema ROUTINES ROUTINE_DEFINITION +information_schema ROUTINES SQL_MODE +information_schema TRIGGERS ACTION_CONDITION +information_schema TRIGGERS ACTION_STATEMENT +information_schema TRIGGERS SQL_MODE +information_schema VIEWS VIEW_DEFINITION +select table_name, column_name, data_type from information_schema.columns +where data_type = 'datetime'; +table_name column_name data_type +ROUTINES CREATED datetime +ROUTINES LAST_ALTERED datetime +TABLES CREATE_TIME datetime +TABLES UPDATE_TIME datetime +TABLES CHECK_TIME datetime +TRIGGERS CREATED datetime +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A +WHERE NOT EXISTS +(SELECT * FROM INFORMATION_SCHEMA.COLUMNS B +WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA +AND A.TABLE_NAME = B.TABLE_NAME); +COUNT(*) +0 +create table t1 +( x_bigint BIGINT, +x_integer INTEGER, +x_smallint SMALLINT, +x_decimal DECIMAL(5,3), +x_numeric NUMERIC(5,3), +x_real REAL, +x_float FLOAT, +x_double_precision DOUBLE PRECISION ); +SELECT COLUMN_NAME, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH +FROM INFORMATION_SCHEMA.COLUMNS +WHERE TABLE_NAME= 't1'; +COLUMN_NAME CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH +x_bigint NULL NULL +x_integer NULL NULL +x_smallint NULL NULL +x_decimal NULL NULL +x_numeric NULL NULL +x_real NULL NULL +x_float NULL NULL +x_double_precision NULL NULL +drop table t1; +grant select on test.* to mysqltest_4@localhost; +SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS +where COLUMN_NAME='TABLE_NAME'; +TABLE_NAME COLUMN_NAME PRIVILEGES +COLUMNS TABLE_NAME select +COLUMN_PRIVILEGES TABLE_NAME select +KEY_COLUMN_USAGE TABLE_NAME select +STATISTICS TABLE_NAME select +TABLES TABLE_NAME select +TABLE_CONSTRAINTS TABLE_NAME select +TABLE_PRIVILEGES TABLE_NAME select +VIEWS TABLE_NAME select +delete from mysql.user where user='mysqltest_4'; +delete from mysql.db where user='mysqltest_4'; +flush privileges; +SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA; +table_schema count(*) +information_schema 16 +mysql 17 +create table t1 (i int, j int); +create trigger trg1 before insert on t1 for each row +begin +if new.j > 10 then +set new.j := 10; +end if; +end| +create trigger trg2 before update on t1 for each row +begin +if old.i % 2 = 0 then +set new.j := -1; +end if; +end| +create trigger trg3 after update on t1 for each row +begin +if new.j = -1 then +set @fired:= "Yes"; +end if; +end| +show triggers; +Trigger Event Table Statement Timing Created sql_mode +trg1 INSERT t1 +begin +if new.j > 10 then +set new.j := 10; +end if; +end BEFORE NULL +trg2 UPDATE t1 +begin +if old.i % 2 = 0 then +set new.j := -1; +end if; +end BEFORE NULL +trg3 UPDATE t1 +begin +if new.j = -1 then +set @fired:= "Yes"; +end if; +end AFTER NULL +select * from information_schema.triggers; +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE +NULL test trg1 INSERT NULL test t1 0 NULL +begin +if new.j > 10 then +set new.j := 10; +end if; +end ROW BEFORE NULL NULL OLD NEW NULL +NULL test trg2 UPDATE NULL test t1 0 NULL +begin +if old.i % 2 = 0 then +set new.j := -1; +end if; +end ROW BEFORE NULL NULL OLD NEW NULL +NULL test trg3 UPDATE NULL test t1 0 NULL +begin +if new.j = -1 then +set @fired:= "Yes"; +end if; +end ROW AFTER NULL NULL OLD NEW NULL +drop trigger trg1; +drop trigger trg2; +drop trigger trg3; +drop table t1; +create database mysqltest; +create table mysqltest.t1 (f1 int, f2 int); +create table mysqltest.t2 (f1 int); +grant select (f1) on mysqltest.t1 to user1@localhost; +grant select on mysqltest.t2 to user2@localhost; +grant select on mysqltest.* to user3@localhost; +grant select on *.* to user4@localhost; +select * from information_schema.column_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO +select * from information_schema.table_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +select * from information_schema.schema_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +select * from information_schema.user_privileges; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'user1'@'localhost' NULL USAGE NO +show grants; +Grants for user1@localhost +GRANT USAGE ON *.* TO 'user1'@'localhost' +GRANT SELECT (f1) ON `mysqltest`.`t1` TO 'user1'@'localhost' +select * from information_schema.column_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +select * from information_schema.table_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'user2'@'localhost' NULL mysqltest t2 SELECT NO +select * from information_schema.schema_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +select * from information_schema.user_privileges; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'user2'@'localhost' NULL USAGE NO +show grants; +Grants for user2@localhost +GRANT USAGE ON *.* TO 'user2'@'localhost' +GRANT SELECT ON `mysqltest`.`t2` TO 'user2'@'localhost' +select * from information_schema.column_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +select * from information_schema.table_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +select * from information_schema.schema_privileges; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'user3'@'localhost' NULL mysqltest SELECT NO +select * from information_schema.user_privileges; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'user3'@'localhost' NULL USAGE NO +show grants; +Grants for user3@localhost +GRANT USAGE ON *.* TO 'user3'@'localhost' +GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost' +select * from information_schema.column_privileges where grantee like '%user%'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'user1'@'localhost' NULL mysqltest t1 f1 SELECT NO +select * from information_schema.table_privileges where grantee like '%user%'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'user2'@'localhost' NULL mysqltest t2 SELECT NO +select * from information_schema.schema_privileges where grantee like '%user%'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'user3'@'localhost' NULL mysqltest SELECT NO +select * from information_schema.user_privileges where grantee like '%user%'; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'user1'@'localhost' NULL USAGE NO +'user2'@'localhost' NULL USAGE NO +'user3'@'localhost' NULL USAGE NO +'user4'@'localhost' NULL SELECT NO +show grants; +Grants for user4@localhost +GRANT SELECT ON *.* TO 'user4'@'localhost' +drop user user1@localhost, user2@localhost, user3@localhost, user4@localhost; +use test; +drop database mysqltest; +drop procedure if exists p1; +drop procedure if exists p2; +create procedure p1 () modifies sql data set @a = 5; +create procedure p2 () set @a = 5; +select sql_data_access from information_schema.routines +where specific_name like 'p%'; +sql_data_access +MODIFIES SQL DATA +CONTAINS SQL +drop procedure p1; +drop procedure p2; +show create database information_schema; +Database Create Database +information_schema CREATE DATABASE `information_schema` /*!40100 DEFAULT CHARACTER SET utf8 */ +create table t1(f1 LONGBLOB, f2 LONGTEXT); +select column_name,data_type,CHARACTER_OCTET_LENGTH, +CHARACTER_MAXIMUM_LENGTH +from information_schema.columns +where table_name='t1'; +column_name data_type CHARACTER_OCTET_LENGTH CHARACTER_MAXIMUM_LENGTH +f1 longblob 4294967295 4294967295 +f2 longtext 4294967295 4294967295 +drop table t1; +create table t1(f1 tinyint, f2 SMALLINT, f3 mediumint, f4 int, +f5 BIGINT, f6 BIT, f7 bit(64)); +select column_name, NUMERIC_PRECISION, NUMERIC_SCALE +from information_schema.columns +where table_name='t1'; +column_name NUMERIC_PRECISION NUMERIC_SCALE +f1 3 0 +f2 5 0 +f3 7 0 +f4 10 0 +f5 19 0 +f6 1 NULL +f7 64 NULL +drop table t1; +create table t1 (f1 integer); +create trigger tr1 after insert on t1 for each row set @test_var=42; +use information_schema; +select trigger_schema, trigger_name from triggers where +trigger_name='tr1'; +trigger_schema trigger_name +test tr1 +use test; +drop table t1; +create table t1 (a int not null, b int); +use information_schema; +select column_name, column_default from columns +where table_schema='test' and table_name='t1'; +column_name column_default +a NULL +b NULL +use test; +show columns from t1; +Field Type Null Key Default Extra +a int(11) NO +b int(11) YES NULL +drop table t1; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (b int); +SHOW TABLE STATUS FROM test +WHERE name IN ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES +WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE'); +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL +t2 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result new file mode 100644 index 00000000000..d3ff310b812 --- /dev/null +++ b/mysql-test/r/information_schema_db.result @@ -0,0 +1,30 @@ +use INFORMATION_SCHEMA; +show tables; +Tables_in_information_schema +CHARACTER_SETS +COLLATIONS +COLLATION_CHARACTER_SET_APPLICABILITY +COLUMNS +COLUMN_PRIVILEGES +KEY_COLUMN_USAGE +ROUTINES +SCHEMATA +SCHEMA_PRIVILEGES +STATISTICS +TABLES +TABLE_CONSTRAINTS +TABLE_PRIVILEGES +TRIGGERS +VIEWS +USER_PRIVILEGES +show tables from INFORMATION_SCHEMA like 'T%'; +Tables_in_information_schema (T%) +TABLES +TABLE_CONSTRAINTS +TABLE_PRIVILEGES +TRIGGERS +create database `inf%`; +use `inf%`; +show tables; +Tables_in_inf% +drop database `inf%`; diff --git a/mysql-test/r/information_schema_inno.result b/mysql-test/r/information_schema_inno.result new file mode 100644 index 00000000000..9dd92baf62f --- /dev/null +++ b/mysql-test/r/information_schema_inno.result @@ -0,0 +1,27 @@ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB; +CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id, id), +FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE, +FOREIGN KEY (t1_id) REFERENCES t1(id) ON UPDATE CASCADE) ENGINE=INNODB; +CREATE TABLE t3 (id INT PRIMARY KEY, t2_id INT, INDEX par_ind (t2_id), +FOREIGN KEY (id, t2_id) REFERENCES t2(t1_id, id) ON DELETE CASCADE) ENGINE=INNODB; +select * from information_schema.TABLE_CONSTRAINTS where +TABLE_SCHEMA= "test"; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL test PRIMARY test t1 PRIMARY KEY +NULL test PRIMARY test t2 PRIMARY KEY +NULL test t2_ibfk_1 test t2 FOREIGN KEY +NULL test t2_ibfk_2 test t2 FOREIGN KEY +NULL test PRIMARY test t3 PRIMARY KEY +NULL test t3_ibfk_1 test t3 FOREIGN KEY +select * from information_schema.KEY_COLUMN_USAGE where +TABLE_SCHEMA= "test"; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL test PRIMARY NULL test t1 id 1 NULL NULL NULL NULL +NULL test PRIMARY NULL test t2 id 1 NULL NULL NULL NULL +NULL test t2_ibfk_1 NULL test t2 t1_id 1 1 test t1 id +NULL test t2_ibfk_2 NULL test t2 t1_id 1 1 test t1 id +NULL test PRIMARY NULL test t3 id 1 NULL NULL NULL NULL +NULL test t3_ibfk_1 NULL test t3 id 1 1 test t2 t1_id +NULL test t3_ibfk_1 NULL test t3 t2_id 2 2 test t2 id +drop table t3, t2, t1; diff --git a/mysql-test/r/init_connect.result b/mysql-test/r/init_connect.result index db1e72dfca9..eeae422edc4 100644 --- a/mysql-test/r/init_connect.result +++ b/mysql-test/r/init_connect.result @@ -12,7 +12,7 @@ set GLOBAL init_connect=DEFAULT; select @a; @a NULL -set global init_connect="create table t1(a char(10));\ +set global init_connect="drop table if exists t1; create table t1(a char(10));\ insert into t1 values ('\0');insert into t1 values('abc')"; select hex(a) from t1; hex(a) diff --git a/mysql-test/r/innodb-big.result b/mysql-test/r/innodb-big.result new file mode 100644 index 00000000000..19204b7cc65 --- /dev/null +++ b/mysql-test/r/innodb-big.result @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS t1, t2, t3, t4; +CREATE TABLE t1 (id INTEGER) ENGINE=MYISAM; +CREATE TABLE t2 (id INTEGER primary key) ENGINE=INNODB; +CREATE TABLE t3 (a char(32) primary key,id INTEGER) ENGINE=INNODB; +CREATE TABLE t4 (a char(32) primary key,id INTEGER) ENGINE=MYISAM; +INSERT INTO t1 (id) VALUES (1); +INSERT INTO t1 SELECT id+1 FROM t1; +INSERT INTO t1 SELECT id+2 FROM t1; +INSERT INTO t1 SELECT id+4 FROM t1; +INSERT INTO t1 SELECT id+8 FROM t1; +INSERT INTO t1 SELECT id+16 FROM t1; +INSERT INTO t1 SELECT id+32 FROM t1; +INSERT INTO t1 SELECT id+64 FROM t1; +INSERT INTO t1 SELECT id+128 FROM t1; +INSERT INTO t1 SELECT id+256 FROM t1; +INSERT INTO t1 SELECT id+512 FROM t1; +INSERT INTO t1 SELECT id+1024 FROM t1; +INSERT INTO t1 SELECT id+2048 FROM t1; +INSERT INTO t1 SELECT id+4096 FROM t1; +INSERT INTO t1 SELECT id+8192 FROM t1; +INSERT INTO t1 SELECT id+16384 FROM t1; +INSERT INTO t1 SELECT id+32768 FROM t1; +INSERT INTO t1 SELECT id+65536 FROM t1; +INSERT INTO t1 SELECT id+131072 FROM t1; +INSERT INTO t1 SELECT id+262144 FROM t1; +INSERT INTO t1 SELECT id+524288 FROM t1; +INSERT INTO t1 SELECT id+1048576 FROM t1; +INSERT INTO t2 SELECT * FROM t1; +INSERT INTO t3 SELECT concat(id),id from t2 ORDER BY -id; +INSERT INTO t4 SELECT * from t3 ORDER BY concat(a); +select sum(id) from t3; +sum(id) +2199024304128 +drop table t1,t2,t3,t4; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 9caa5817a4b..4b62e63c49b 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -141,13 +141,13 @@ id parent_id level 1015 102 2 explain select level from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const # Using where; Using index +1 SIMPLE t1 ref level level 1 const # Using index explain select level,id from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const # Using where; Using index +1 SIMPLE t1 ref level level 1 const # Using index explain select level,id,parent_id from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const # Using where +1 SIMPLE t1 ref level level 1 const # select level,id from t1 where level=1; level id 1 1002 @@ -249,6 +249,40 @@ n 4 5 6 +set autocommit=0; +begin; +savepoint `my_savepoint`; +insert into t1 values (7); +savepoint `savept2`; +insert into t1 values (3); +select n from t1; +n +3 +4 +5 +6 +7 +savepoint savept3; +rollback to savepoint savept2; +rollback to savepoint savept3; +ERROR 42000: SAVEPOINT savept3 does not exist +rollback to savepoint savept2; +release savepoint `my_savepoint`; +select n from t1; +n +4 +5 +6 +7 +rollback to savepoint `my_savepoint`; +ERROR 42000: SAVEPOINT my_savepoint does not exist +rollback to savepoint savept2; +ERROR 42000: SAVEPOINT savept2 does not exist +insert into t1 values (8); +savepoint sv; +commit; +savepoint sv; +set autocommit=1; rollback; drop table t1; create table t1 (n int not null primary key) engine=innodb; @@ -609,7 +643,7 @@ id parent_id level 1016 102 2 explain select level from t1 where level=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref level level 1 const # Using where; Using index +1 SIMPLE t1 ref level level 1 const # Using index select level,id from t1 where level=1; level id 1 1004 @@ -721,6 +755,11 @@ a 1 2 3 +select a from t1 natural join t1 as t2 where b >= @a order by a; +a +1 +2 +3 update t1 set a=5 where a=1; select a from t1; a @@ -870,7 +909,7 @@ insert into mysqltest.t3 values(1); commit; drop database mysqltest; show tables from mysqltest; -Got one of the listed errors +ERROR 42000: Unknown database 'mysqltest' set autocommit=0; create table t1 (a int not null) engine= innodb; insert into t1 values(1),(2); @@ -931,16 +970,16 @@ drop table t1; create table t1 (t int not null default 1, key (t)) engine=innodb; desc t1; Field Type Null Key Default Extra -t int(11) MUL 1 +t int(11) NO MUL 1 drop table t1; CREATE TABLE t1 ( number bigint(20) NOT NULL default '0', cname char(15) NOT NULL default '', carrier_id smallint(6) NOT NULL default '0', privacy tinyint(4) NOT NULL default '0', -last_mod_date timestamp(14) NOT NULL, +last_mod_date timestamp NOT NULL, last_mod_id smallint(6) NOT NULL default '0', -last_app_date timestamp(14) NOT NULL, +last_app_date timestamp NOT NULL, last_app_id smallint(6) default '-1', version smallint(6) NOT NULL default '0', assigned_scps int(11) default '0', @@ -957,9 +996,9 @@ number bigint(20) NOT NULL default '0', cname char(15) NOT NULL default '', carrier_id smallint(6) NOT NULL default '0', privacy tinyint(4) NOT NULL default '0', -last_mod_date timestamp(14) NOT NULL, +last_mod_date timestamp NOT NULL, last_mod_id smallint(6) NOT NULL default '0', -last_app_date timestamp(14) NOT NULL, +last_app_date timestamp NOT NULL, last_app_id smallint(6) default '-1', version smallint(6) NOT NULL default '0', assigned_scps int(11) default '0', @@ -1326,8 +1365,8 @@ truncate table t1; insert into t1 (a) values (NULL),(NULL); SELECT * from t1; a -3 -4 +1 +2 drop table t1; CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB; CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB; @@ -1343,7 +1382,7 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id; -ERROR 42S02: Unknown table 't1' in where clause +ERROR 42S22: Unknown column 't1.id' in 'where clause' drop table t3,t2,t1; create table t1( id int primary key, @@ -1376,7 +1415,7 @@ CREATE TABLE t1 ( `id` int(10) unsigned NOT NULL auto_increment, `id_object` int(10) unsigned default '0', `id_version` int(10) unsigned NOT NULL default '1', -label varchar(100) NOT NULL default '', +`label` varchar(100) NOT NULL default '', `description` text, PRIMARY KEY (`id`), KEY `id_object` (`id_object`), @@ -1390,8 +1429,8 @@ PRIMARY KEY (`id`), KEY `id_version` (`id_version`) ) ENGINE=InnoDB; INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9"); -SELECT t2.id, t1.label FROM t2 INNER JOIN -(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl +SELECT t2.id, t1.`label` FROM t2 INNER JOIN +(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object); id label 3382 Test @@ -1409,22 +1448,28 @@ insert t2 select * from t1; insert t3 select * from t1; checksum table t1, t2, t3, t4 quick; Table Checksum -test.t1 968604391 +test.t1 2948697075 test.t2 NULL test.t3 NULL test.t4 NULL +Warnings: +Error 1146 Table 'test.t4' doesn't exist checksum table t1, t2, t3, t4; Table Checksum -test.t1 968604391 -test.t2 968604391 -test.t3 968604391 +test.t1 2948697075 +test.t2 3835700799 +test.t3 3835700799 test.t4 NULL +Warnings: +Error 1146 Table 'test.t4' doesn't exist checksum table t1, t2, t3, t4 extended; Table Checksum -test.t1 968604391 -test.t2 968604391 -test.t3 968604391 +test.t1 3092701434 +test.t2 3835700799 +test.t3 3835700799 test.t4 NULL +Warnings: +Error 1146 Table 'test.t4' doesn't exist drop table t1,t2,t3; create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb; insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); @@ -1448,14 +1493,14 @@ create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) ref show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `id` int(11) NOT NULL default '0', - `id2` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, + `id2` int(11) NOT NULL, UNIQUE KEY `id` (`id`,`id2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, KEY `t1_id_fk` (`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1463,7 +1508,7 @@ create index id on t2 (id); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, KEY `id` (`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1471,7 +1516,7 @@ create index id2 on t2 (id); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, KEY `id` (`id`), KEY `id2` (`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) @@ -1482,7 +1527,7 @@ Got one of the listed errors show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, KEY `id` (`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1491,8 +1536,8 @@ create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', - `id2` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, + `id2` int(11) NOT NULL, KEY `t1_id_fk` (`id`,`id2`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1500,8 +1545,8 @@ create unique index id on t2 (id,id2); show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', - `id2` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, + `id2` int(11) NOT NULL, UNIQUE KEY `id` (`id`,`id2`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1510,8 +1555,8 @@ create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),cons show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', - `id2` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, + `id2` int(11) NOT NULL, UNIQUE KEY `id` (`id`,`id2`), KEY `t1_id_fk` (`id2`,`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`) @@ -1521,8 +1566,8 @@ create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), con show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', - `id2` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, + `id2` int(11) NOT NULL, UNIQUE KEY `id` (`id`,`id2`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1531,8 +1576,8 @@ create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),cons show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `id` int(11) NOT NULL default '0', - `id2` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, + `id2` int(11) NOT NULL, UNIQUE KEY `id` (`id`,`id2`), KEY `t1_id_fk` (`id2`,`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`) @@ -1543,7 +1588,7 @@ show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `id` int(11) NOT NULL auto_increment, - `id2` int(11) NOT NULL default '0', + `id2` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `id` (`id`,`id2`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) @@ -1554,7 +1599,7 @@ show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `id` int(11) NOT NULL auto_increment, - `id2` int(11) NOT NULL default '0', + `id2` int(11) NOT NULL, KEY `t1_id_fk` (`id`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 @@ -1563,14 +1608,14 @@ show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `id` int(11) NOT NULL auto_increment, - `id2` int(11) NOT NULL default '0', + `id2` int(11) NOT NULL, KEY `id_test` (`id`), KEY `id_test2` (`id`,`id2`), CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2; create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; -ERROR HY000: Can't create table './test/t2.frm' (errno: 150) +ERROR HY000: Can't create table './test/t2' (errno: 150) create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb; show create table t2; Table Create Table @@ -1597,14 +1642,14 @@ t2 CREATE TABLE `t2` ( drop table t2, t1; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 25 +Binlog_cache_use 155 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 0 create table t1 (a int) engine=innodb; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 26 +Binlog_cache_use 156 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -1613,7 +1658,7 @@ delete from t1; commit; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 27 +Binlog_cache_use 157 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -1658,3 +1703,788 @@ a_id b_list 3 NULL DROP TABLE t2; DROP TABLE t1; +create table t1 (x bigint unsigned not null primary key) engine=innodb; +insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1); +select * from t1; +x +18446744073709551600 +18446744073709551601 +select count(*) from t1 where x>0; +count(*) +2 +select count(*) from t1 where x=0; +count(*) +0 +select count(*) from t1 where x<0; +count(*) +0 +select count(*) from t1 where x < -16; +count(*) +0 +select count(*) from t1 where x = -16; +count(*) +0 +explain select count(*) from t1 where x > -16; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using where; Using index +select count(*) from t1 where x > -16; +count(*) +2 +select * from t1 where x > -16; +x +18446744073709551600 +18446744073709551601 +select count(*) from t1 where x = 18446744073709551601; +count(*) +1 +drop table t1; +show status like "Innodb_buffer_pool_pages_total"; +Variable_name Value +Innodb_buffer_pool_pages_total 512 +show status like "Innodb_page_size"; +Variable_name Value +Innodb_page_size 16384 +show status like "Innodb_rows_deleted"; +Variable_name Value +Innodb_rows_deleted 2070 +show status like "Innodb_rows_inserted"; +Variable_name Value +Innodb_rows_inserted 31718 +show status like "Innodb_rows_updated"; +Variable_name Value +Innodb_rows_updated 29530 +show status like "Innodb_row_lock_waits"; +Variable_name Value +Innodb_row_lock_waits 0 +show status like "Innodb_row_lock_current_waits"; +Variable_name Value +Innodb_row_lock_current_waits 0 +show status like "Innodb_row_lock_time"; +Variable_name Value +Innodb_row_lock_time 0 +show status like "Innodb_row_lock_time_max"; +Variable_name Value +Innodb_row_lock_time_max 0 +show status like "Innodb_row_lock_time_avg"; +Variable_name Value +Innodb_row_lock_time_avg 0 +show variables like "innodb_sync_spin_loops"; +Variable_name Value +innodb_sync_spin_loops 20 +set global innodb_sync_spin_loops=1000; +show variables like "innodb_sync_spin_loops"; +Variable_name Value +innodb_sync_spin_loops 1000 +set global innodb_sync_spin_loops=0; +show variables like "innodb_sync_spin_loops"; +Variable_name Value +innodb_sync_spin_loops 0 +set global innodb_sync_spin_loops=20; +show variables like "innodb_sync_spin_loops"; +Variable_name Value +innodb_sync_spin_loops 20 +show variables like "innodb_thread_concurrency"; +Variable_name Value +innodb_thread_concurrency 20 +set global innodb_thread_concurrency=1000; +show variables like "innodb_thread_concurrency"; +Variable_name Value +innodb_thread_concurrency 1000 +set global innodb_thread_concurrency=0; +show variables like "innodb_thread_concurrency"; +Variable_name Value +innodb_thread_concurrency 1 +set global innodb_thread_concurrency=16; +show variables like "innodb_thread_concurrency"; +Variable_name Value +innodb_thread_concurrency 16 +show variables like "innodb_concurrency_tickets"; +Variable_name Value +innodb_concurrency_tickets 500 +set global innodb_concurrency_tickets=1000; +show variables like "innodb_concurrency_tickets"; +Variable_name Value +innodb_concurrency_tickets 1000 +set global innodb_concurrency_tickets=0; +show variables like "innodb_concurrency_tickets"; +Variable_name Value +innodb_concurrency_tickets 1 +set global innodb_concurrency_tickets=500; +show variables like "innodb_concurrency_tickets"; +Variable_name Value +innodb_concurrency_tickets 500 +show variables like "innodb_thread_sleep_delay"; +Variable_name Value +innodb_thread_sleep_delay 10000 +set global innodb_thread_sleep_delay=100000; +show variables like "innodb_thread_sleep_delay"; +Variable_name Value +innodb_thread_sleep_delay 100000 +set global innodb_thread_sleep_delay=0; +show variables like "innodb_thread_sleep_delay"; +Variable_name Value +innodb_thread_sleep_delay 0 +set global innodb_thread_sleep_delay=10000; +show variables like "innodb_thread_sleep_delay"; +Variable_name Value +innodb_thread_sleep_delay 10000 +set storage_engine=INNODB; +drop table if exists t1,t2,t3; +--- Testing varchar --- +--- Testing varchar --- +create table t1 (v varchar(10), c char(10), t text); +insert into t1 values('+ ', '+ ', '+ '); +set @a=repeat(' ',20); +insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); +Warnings: +Note 1265 Data truncated for column 'v' at row 1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+ *+*+ * +*+ *+*+ * +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +create table t3 select * from t1; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t1 modify c varchar(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` varchar(10) default NULL, + `t` text +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t1 modify v char(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` text +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t1 modify t varchar(10); +Warnings: +Note 1265 Data truncated for column 't' at row 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` varchar(10) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+*+*+ * +*+*+*+ * +drop table t1,t2,t3; +create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `v` (`v`), + KEY `c` (`c`), + KEY `t` (`t`(10)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +270 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1))); +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where c='a'; +count(*) +10 +select count(*) from t1 where t='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where c='a '; +count(*) +10 +select count(*) from t1 where t='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where c like 'a%'; +count(*) +11 +select count(*) from t1 where t like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where; Using index +explain select count(*) from t1 where c='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 11 const # Using where; Using index +explain select count(*) from t1 where t='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range t t 13 NULL # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +alter table t1 add unique(v); +ERROR 23000: Duplicate entry '{ ' for key 1 +alter table t1 add key(v); +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; +qq +*a*a*a* +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v,v_2 # 13 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(*) from t1 group by c limit 10; +c count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(*) from t1 group by t limit 10; +t count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where; Using index +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 drop key v, add key v (v(30)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`(30)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(600), drop key v, add key v (v); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(600) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +drop table t1; +create table t1 (a char(10), unique (a)); +insert into t1 values ('a '); +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a' for key 1 +alter table t1 modify a varchar(10); +insert into t1 values ('a '),('a '),('a '),('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +update t1 set a='a ' where a like 'a%'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='abc ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a %'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +drop table t1; +create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `v` (`v`(5)), + KEY `c` (`c`(5)), + KEY `t` (`t`(5)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v char(10) character set utf8); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) character set utf8 default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(10), c char(10)) row_format=fixed; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED +insert into t1 values('a','a'),('a ','a '); +select concat('*',v,'*',c,'*') from t1; +concat('*',v,'*',c,'*') +*a*a* +*a *a* +drop table t1; +create table t1 (v varchar(65530), key(v(10))); +insert into t1 values(repeat('a',65530)); +select length(v) from t1 where v=repeat('a',65530); +length(v) +65530 +drop table t1; +create table t1(a int, b varchar(12), key ba(b, a)); +insert into t1 values (1, 'A'), (20, NULL); +explain select * from t1 where a=20 and b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref ba ba 20 const,const 1 Using where; Using index +select * from t1 where a=20 and b is null; +a b +20 NULL +drop table t1; +create table t1 (v varchar(65530), key(v)); +ERROR HY000: Can't create table './test/t1' (errno: 139) +create table t1 (v varchar(65536)); +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65530) character set utf8); +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext character set utf8 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; +set storage_engine=MyISAM; +create table t1 (v varchar(16384)) engine=innodb; +drop table t1; +create table t1 (a char(1), b char(1), key(a, b)) engine=innodb; +insert into t1 values ('8', '6'), ('4', '7'); +select min(a) from t1; +min(a) +4 +select min(b) from t1 where a='8'; +min(b) +6 +drop table t1; +CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY (`a`),UNIQUE KEY `b` (`b`)) ENGINE=innodb; +insert into t1 (b) values (1); +replace into t1 (b) values (2), (1), (3); +select * from t1; +a b +3 1 +2 2 +4 3 +truncate table t1; +insert into t1 (b) values (1); +replace into t1 (b) values (2); +replace into t1 (b) values (1); +replace into t1 (b) values (3); +select * from t1; +a b +3 1 +2 2 +4 3 +drop table t1; +create table t1 (rowid int not null auto_increment, val int not null,primary +key (rowid), unique(val)) engine=innodb; +replace into t1 (val) values ('1'),('2'); +replace into t1 (val) values ('1'),('2'); +insert into t1 (val) values ('1'),('2'); +ERROR 23000: Duplicate entry '1' for key 2 +select * from t1; +rowid val +3 1 +4 2 +drop table t1; +create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB; +insert into t1 (val) values (1); +update t1 set a=2 where a=1; +insert into t1 (val) values (1); +ERROR 23000: Duplicate entry '2' for key 1 +select * from t1; +a val +2 1 +drop table t1; +CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB; +INSERT INTO t1 (GRADE) VALUES (151),(252),(343); +SELECT GRADE FROM t1 WHERE GRADE > 160 AND GRADE < 300; +GRADE +252 +SELECT GRADE FROM t1 WHERE GRADE= 151; +GRADE +151 +DROP TABLE t1; +create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb; +create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb; +insert into t2 values ('aa','cc'); +insert into t1 values ('aa','bb'),('aa','cc'); +delete t1 from t1,t2 where f1=f3 and f4='cc'; +select * from t1; +f1 f2 +drop table t1,t2; diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 71b10699fa9..f788576f824 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; create table t1 (a int not null); insert into t1 values (1); insert into t1 values (a+2); @@ -63,7 +63,7 @@ insert into t1 values(NULL); ERROR 23000: Column 'id' cannot be null insert into t1 values (1), (NULL), (2); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id' at row 2 select * from t1; id 1 @@ -157,20 +157,20 @@ f_float_3_1_u 0.0 set @value= "1e+1111111111a"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1265 Data truncated for column 'f_double' at row 1 -Warning 1265 Data truncated for column 'f_float' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float' at row 1 -Warning 1265 Data truncated for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 -Warning 1265 Data truncated for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 -Warning 1265 Data truncated for column 'f_double_u' at row 1 -Warning 1265 Data truncated for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 4 original_value 1e+1111111111a @@ -185,21 +185,21 @@ f_float_3_1_u 99.9 set @value= "-1e+1111111111a"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1265 Data truncated for column 'f_double' at row 1 -Warning 1265 Data truncated for column 'f_float' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float' at row 1 -Warning 1265 Data truncated for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 -Warning 1265 Data truncated for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 -Warning 1265 Data truncated for column 'f_double_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 -Warning 1265 Data truncated for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 5 original_value -1e+1111111111a @@ -212,57 +212,20 @@ f_float_u 0 f_double_15_1_u 0.0 f_float_3_1_u 0.0 set @value= 1e+1111111111; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); -Warnings: -Warning 1264 Data truncated; out of range for column 'f_float' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 -select * from t1 where number =last_insert_id(); -number 6 -original_value 1.7976931348623e+308 -f_double 1.79769313486232e+308 -f_float 3.40282e+38 -f_double_7_2 99999.99 -f_float_4_3 9.999 -f_double_u 1.79769313486232e+308 -f_float_u 3.40282e+38 -f_double_15_1_u 99999999999999.9 -f_float_3_1_u 99.9 +ERROR 22007: Illegal double '1e+1111111111' value found during parsing set @value= -1e+1111111111; -insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); -Warnings: -Warning 1264 Data truncated; out of range for column 'f_float' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 -select * from t1 where number =last_insert_id(); -number 7 -original_value -1.7976931348623e+308 -f_double -1.79769313486232e+308 -f_float -3.40282e+38 -f_double_7_2 -99999.99 -f_float_4_3 -9.999 -f_double_u 0 -f_float_u 0 -f_double_15_1_u 0.0 -f_float_3_1_u 0.0 +ERROR 22007: Illegal double '1e+1111111111' value found during parsing set @value= 1e+111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated; out of range for column 'f_float' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); -number 8 +number 6 original_value 1e+111 f_double 1e+111 f_float 3.40282e+38 @@ -275,15 +238,15 @@ f_float_3_1_u 99.9 set @value= -1e+111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated; out of range for column 'f_float' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); -number 9 +number 7 original_value -1e+111 f_double -1e+111 f_float -3.40282e+38 @@ -296,7 +259,7 @@ f_float_3_1_u 0.0 set @value= 1; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); select * from t1 where number =last_insert_id(); -number 10 +number 8 original_value 1 f_double 1 f_float 1 @@ -309,12 +272,12 @@ f_float_3_1_u 1.0 set @value= -1; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1 +Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); -number 11 +number 9 original_value -1 f_double -1 f_float -1 @@ -325,3 +288,14 @@ f_float_u 0 f_double_15_1_u 0.0 f_float_3_1_u 0.0 drop table t1; +create table t1(id1 int not null auto_increment primary key, t char(12)); +create table t2(id2 int not null, t char(12)); +create table t3(id3 int not null, t char(12), index(id3)); +select count(*) from t2; +count(*) +500 +insert into t2 select t1.* from t1, t2 t, t3 where t1.id1 = t.id2 and t.id2 = t3.id3; +select count(*) from t2; +count(*) +25500 +drop table t1,t2,t3; diff --git a/mysql-test/r/insert_select-binlog.result b/mysql-test/r/insert_select-binlog.result index bca28059787..76f460b1de2 100644 --- a/mysql-test/r/insert_select-binlog.result +++ b/mysql-test/r/insert_select-binlog.result @@ -6,9 +6,9 @@ reset master; insert into t1 select * from t2; ERROR 23000: Duplicate entry '2' for key 1 show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; insert into t1 select * from t2 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 192 use `test`; insert into t1 select * from t2 select * from t1; a 1 @@ -20,6 +20,6 @@ reset master; create table t2(unique(a)) select a from t1; ERROR 23000: Duplicate entry '1' for key 1 show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 drop table t1; diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 2ac73fe7662..17f65d96abc 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -606,8 +606,8 @@ NULL 2 100 create table t2(No int not null, Field int not null, Count int not null); insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 1 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'No' at row 2 select * from t2; No Field Count 0 1 100 @@ -664,7 +664,7 @@ insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= a + insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b; ERROR 23000: Column 'a' in field list is ambiguous insert into t1 select t2.a from t2 on duplicate key update t2.a= a + t2.b; -ERROR 42S02: Unknown table 't2' in field list +ERROR 42S22: Unknown column 't2.a' in 'field list' insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b; -ERROR 42S02: Unknown table 't2' in field list +ERROR 42S22: Unknown column 't2.b' in 'field list' drop table t1,t2,t3; diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result index 9e674cc4aae..dbe5d600a95 100644 --- a/mysql-test/r/insert_update.result +++ b/mysql-test/r/insert_update.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (a INT, b INT, c INT, UNIQUE (A), UNIQUE(B)); INSERT t1 VALUES (1,2,10), (3,4,20); INSERT t1 VALUES (5,6,30) ON DUPLICATE KEY UPDATE c=c+100; @@ -60,12 +60,12 @@ explain extended SELECT *, VALUES(a) FROM t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Warnings: -Note 1003 select test.t1.a AS `a`,test.t1.b AS `b`,test.t1.c AS `c`,values(test.t1.a) AS `VALUES(a)` from test.t1 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,values(`test`.`t1`.`a`) AS `VALUES(a)` from `test`.`t1` explain extended select * from t1 where values(a); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: -Note 1003 select test.t1.a AS `a`,test.t1.b AS `b`,test.t1.c AS `c` from test.t1 +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` DROP TABLE t1; create table t1(a int primary key, b int); insert into t1 values(1,1),(2,2),(3,3),(4,4),(5,5); diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result index 52eb2d73ed5..cb308a1c71d 100644 --- a/mysql-test/r/isam.result +++ b/mysql-test/r/isam.result @@ -65,14 +65,14 @@ test.t2 check error Table 't2' was not locked with LOCK TABLES test.t1 check status OK show columns from t1; Field Type Null Key Default Extra -a int(11) PRI 0 -b int(11) MUL 0 -c int(11) 0 +a int(11) PRI +b int(11) MUL +c int(11) show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment -a int(11) NULL PRI 0 select,insert,update,references -b int(11) NULL MUL 0 select,insert,update,references -c int(11) NULL 0 select,insert,update,references +a int(11) NULL PRI select,insert,update,references +b int(11) NULL MUL select,insert,update,references +c int(11) NULL select,insert,update,references show index from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 a A 4 NULL NULL BTREE diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index dc763472b0e..c887dc9d6a7 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -10,21 +10,21 @@ SELECT * FROM t1 INNER JOIN t2; S1 S1 1 2 SELECT * from t1 JOIN t2 USING (S1); -S1 S1 +S1 SELECT * FROM t1 INNER JOIN t2 USING (S1); -S1 S1 +S1 SELECT * from t1 CROSS JOIN t2; S1 S1 1 2 SELECT * from t1 LEFT JOIN t2 USING(S1); -S1 S1 -1 NULL +S1 +1 SELECT * from t1 LEFT JOIN t2 ON(t2.S1=2); S1 S1 1 2 SELECT * from t1 RIGHT JOIN t2 USING(S1); -S1 S1 -NULL 2 +S1 +2 SELECT * from t1 RIGHT JOIN t2 ON(t1.S1=1); S1 S1 1 2 @@ -127,6 +127,12 @@ a 2 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); ERROR HY000: Too many tables; MySQL can only use XX tables in a join +select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a); +a +1 +2 +select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); +ERROR HY000: Too many tables; MySQL can only use XX tables in a join drop table t1; CREATE TABLE t1 ( a int(11) NOT NULL, @@ -146,9 +152,12 @@ CREATE TABLE t1 (d DATE NOT NULL); CREATE TABLE t2 (d DATE NOT NULL); INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00'); SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL; -d d -2001-08-01 NULL -0000-00-00 NULL +d +2001-08-01 +0000-00-00 +SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE d IS NULL; +d +0000-00-00 SELECT * from t1 WHERE t1.d IS NULL; d 0000-00-00 @@ -271,6 +280,12 @@ cust 20 SELECT emp.rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE lr.siteid = 'rivercats' AND emp.emp_id = 'psmith'; rate_code base_rate cust 20 +SELECT rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE emp.emp_id = 'psmith' AND siteid = 'rivercats'; +rate_code base_rate +cust 20 +SELECT rate_code, lr.base_rate FROM t1 AS emp LEFT JOIN t2 AS lr USING (siteid, rate_code) WHERE siteid = 'rivercats' AND emp.emp_id = 'psmith'; +rate_code base_rate +cust 20 drop table t1,t2; CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, Value1 VARCHAR(255)); CREATE TABLE t2 (ID INTEGER NOT NULL PRIMARY KEY, Value2 VARCHAR(255)); @@ -296,43 +311,43 @@ insert into t1 values(1),(2); insert into t2 values(2),(3); insert into t3 values (2),(4); select * from t1 natural left join t2; -i i -1 NULL -2 2 +i +1 +2 select * from t1 left join t2 on (t1.i=t2.i); i i 1 NULL 2 2 select * from t1 natural left join t2 natural left join t3; -i i i -1 NULL NULL -2 2 2 +i +1 +2 select * from t1 left join t2 on (t1.i=t2.i) left join t3 on (t2.i=t3.i); i i i 1 NULL NULL 2 2 2 select * from t3 natural right join t2; -i i -2 2 -NULL 3 +i +2 +3 select * from t3 right join t2 on (t3.i=t2.i); i i 2 2 NULL 3 select * from t3 natural right join t2 natural right join t1; -i i i -NULL NULL 1 -2 2 2 +i +1 +2 select * from t3 right join t2 on (t3.i=t2.i) right join t1 on (t2.i=t1.i); i i i NULL NULL 1 2 2 2 select * from t1,t2 natural left join t3 order by t1.i,t2.i,t3.i; -i i i -1 2 2 -1 3 NULL -2 2 2 -2 3 NULL +i i +1 2 +1 3 +2 2 +2 3 select * from t1,t2 left join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i; i i i 1 2 2 @@ -352,11 +367,11 @@ i i i 2 2 2 2 3 NULL select * from t1,t2 natural right join t3 order by t1.i,t2.i,t3.i; -i i i -1 NULL 4 -1 2 2 -2 NULL 4 -2 2 2 +i i +1 4 +1 2 +2 4 +2 2 select * from t1,t2 right join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i; i i i 1 NULL 4 diff --git a/mysql-test/r/join_crash.result b/mysql-test/r/join_crash.result index c1671ea7e20..f1a3b4956a8 100644 --- a/mysql-test/r/join_crash.result +++ b/mysql-test/r/join_crash.result @@ -75,18 +75,11 @@ t1.client_ptr as client_ptr, t1.comments as comments, sum( t3.amount_received ) + sum( t3.adjustment ) as total_budget from -t1 , t2 as client_period , -t2 as project_period -left join -t3 -on -t3.project_ptr = t1.project_id -and t3.date_received <= '2001-03-22 14:15:09' - left join -t4 -on -t4.client_id = t1.client_ptr +t2 as project_period, +t3 left join t1 on (t3.project_ptr = t1.project_id and +t3.date_received <= '2001-03-22 14:15:09') +left join t4 on t4.client_id = t1.client_ptr where 1 and ( client_period.period_type = 'client_table' diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result new file mode 100644 index 00000000000..f9a25898a6f --- /dev/null +++ b/mysql-test/r/join_nested.result @@ -0,0 +1,1377 @@ +DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5,t6,t7,t8,t9; +CREATE TABLE t0 (a int, b int, c int); +CREATE TABLE t1 (a int, b int, c int); +CREATE TABLE t2 (a int, b int, c int); +CREATE TABLE t3 (a int, b int, c int); +CREATE TABLE t4 (a int, b int, c int); +CREATE TABLE t5 (a int, b int, c int); +CREATE TABLE t6 (a int, b int, c int); +CREATE TABLE t7 (a int, b int, c int); +CREATE TABLE t8 (a int, b int, c int); +CREATE TABLE t9 (a int, b int, c int); +INSERT INTO t0 VALUES (1,1,0), (1,2,0), (2,2,0); +INSERT INTO t1 VALUES (1,3,0), (2,2,0), (3,2,0); +INSERT INTO t2 VALUES (3,3,0), (4,2,0), (5,3,0); +INSERT INTO t3 VALUES (1,2,0), (2,2,0); +INSERT INTO t4 VALUES (3,2,0), (4,2,0); +INSERT INTO t5 VALUES (3,1,0), (2,2,0), (3,3,0); +INSERT INTO t6 VALUES (3,2,0), (6,2,0), (6,1,0); +INSERT INTO t7 VALUES (1,1,0), (2,2,0); +INSERT INTO t8 VALUES (0,2,0), (1,2,0); +INSERT INTO t9 VALUES (1,1,0), (1,2,0), (3,3,0); +SELECT t2.a,t2.b +FROM t2; +a b +3 3 +4 2 +5 3 +SELECT t3.a,t3.b +FROM t3; +a b +1 2 +2 2 +SELECT t4.a,t4.b +FROM t4; +a b +3 2 +4 2 +SELECT t3.a,t3.b,t4.a,t4.b +FROM t3,t4; +a b a b +1 2 3 2 +2 2 3 2 +1 2 4 2 +2 2 4 2 +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t2.b=t4.b; +a b a b a b +3 3 NULL NULL NULL NULL +4 2 1 2 3 2 +4 2 1 2 4 2 +4 2 2 2 3 2 +4 2 2 2 4 2 +5 3 NULL NULL NULL NULL +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b; +a b a b a b +3 3 NULL NULL NULL NULL +4 2 1 2 3 2 +4 2 1 2 4 2 +5 3 NULL NULL NULL NULL +EXPLAIN EXTENDED +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t2.b=t4.b +WHERE t3.a=1 OR t3.c IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` = 1) or isnull(`test`.`t3`.`c`)) +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t2.b=t4.b +WHERE t3.a=1 OR t3.c IS NULL; +a b a b a b +3 3 NULL NULL NULL NULL +4 2 1 2 3 2 +4 2 1 2 4 2 +5 3 NULL NULL NULL NULL +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t2.b=t4.b +WHERE t3.a>1 OR t3.c IS NULL; +a b a b a b +3 3 NULL NULL NULL NULL +4 2 2 2 3 2 +4 2 2 2 4 2 +5 3 NULL NULL NULL NULL +SELECT t5.a,t5.b +FROM t5; +a b +3 1 +2 2 +3 3 +SELECT t3.a,t3.b,t4.a,t4.b,t5.a,t5.b +FROM t3,t4,t5; +a b a b a b +1 2 3 2 3 1 +2 2 3 2 3 1 +1 2 4 2 3 1 +2 2 4 2 3 1 +1 2 3 2 2 2 +2 2 3 2 2 2 +1 2 4 2 2 2 +2 2 4 2 2 2 +1 2 3 2 3 3 +2 2 3 2 3 3 +1 2 4 2 3 3 +2 2 4 2 3 3 +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b +FROM t2 +LEFT JOIN +(t3, t4, t5) +ON t2.b=t4.b; +a b a b a b a b +3 3 NULL NULL NULL NULL NULL NULL +4 2 1 2 3 2 3 1 +4 2 1 2 3 2 2 2 +4 2 1 2 3 2 3 3 +4 2 1 2 4 2 3 1 +4 2 1 2 4 2 2 2 +4 2 1 2 4 2 3 3 +4 2 2 2 3 2 3 1 +4 2 2 2 3 2 2 2 +4 2 2 2 3 2 3 3 +4 2 2 2 4 2 3 1 +4 2 2 2 4 2 2 2 +4 2 2 2 4 2 3 3 +5 3 NULL NULL NULL NULL NULL NULL +EXPLAIN EXTENDED +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b +FROM t2 +LEFT JOIN +(t3, t4, t5) +ON t2.b=t4.b +WHERE t3.a>1 OR t3.c IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`)) +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b +FROM t2 +LEFT JOIN +(t3, t4, t5) +ON t2.b=t4.b +WHERE t3.a>1 OR t3.c IS NULL; +a b a b a b a b +3 3 NULL NULL NULL NULL NULL NULL +4 2 2 2 3 2 3 1 +4 2 2 2 3 2 2 2 +4 2 2 2 3 2 3 3 +4 2 2 2 4 2 3 1 +4 2 2 2 4 2 2 2 +4 2 2 2 4 2 3 3 +5 3 NULL NULL NULL NULL NULL NULL +EXPLAIN EXTENDED +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b +FROM t2 +LEFT JOIN +(t3, t4, t5) +ON t2.b=t4.b +WHERE (t3.a>1 OR t3.c IS NULL) AND +(t5.a<3 OR t5.c IS NULL); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where (((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`)) and ((`test`.`t5`.`a` < 3) or isnull(`test`.`t5`.`c`))) +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b +FROM t2 +LEFT JOIN +(t3, t4, t5) +ON t2.b=t4.b +WHERE (t3.a>1 OR t3.c IS NULL) AND +(t5.a<3 OR t5.c IS NULL); +a b a b a b a b +3 3 NULL NULL NULL NULL NULL NULL +4 2 2 2 3 2 2 2 +4 2 2 2 4 2 2 2 +5 3 NULL NULL NULL NULL NULL NULL +SELECT t6.a,t6.b +FROM t6; +a b +3 2 +6 2 +6 1 +SELECT t7.a,t7.b +FROM t7; +a b +1 1 +2 2 +SELECT t6.a,t6.b,t7.a,t7.b +FROM t6,t7; +a b a b +3 2 1 1 +3 2 2 2 +6 2 1 1 +6 2 2 2 +6 1 1 1 +6 1 2 2 +SELECT t8.a,t8.b +FROM t8; +a b +0 2 +1 2 +EXPLAIN EXTENDED +SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM (t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1 +SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM (t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10; +a b a b a b +3 2 1 1 NULL NULL +3 2 2 2 0 2 +3 2 2 2 1 2 +6 2 1 1 NULL NULL +6 2 2 2 0 2 +6 2 2 2 1 2 +6 1 1 1 NULL NULL +6 1 2 2 0 2 +6 1 2 2 1 2 +SELECT t5.a,t5.b +FROM t5; +a b +3 1 +2 2 +3 3 +SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b; +a b a b a b a b +3 1 3 2 1 1 NULL NULL +3 1 6 2 1 1 NULL NULL +2 2 3 2 2 2 0 2 +2 2 3 2 2 2 1 2 +2 2 6 2 2 2 0 2 +2 2 6 2 2 2 1 2 +3 3 NULL NULL NULL NULL NULL NULL +SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b AND +(t8.a < 1 OR t8.c IS NULL); +a b a b a b a b +3 1 3 2 1 1 NULL NULL +3 1 6 2 1 1 NULL NULL +2 2 3 2 2 2 0 2 +2 2 6 2 2 2 0 2 +3 3 NULL NULL NULL NULL NULL NULL +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b; +a b a b a b +3 3 NULL NULL NULL NULL +4 2 1 2 3 2 +4 2 1 2 4 2 +5 3 NULL NULL NULL NULL +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b; +a b a b a b a b a b a b a b +3 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +3 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL +4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL +5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +3 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +3 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +3 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +3 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +4 2 1 2 3 2 2 2 3 2 2 2 0 2 +4 2 1 2 3 2 2 2 3 2 2 2 1 2 +4 2 1 2 3 2 2 2 6 2 2 2 0 2 +4 2 1 2 3 2 2 2 6 2 2 2 1 2 +4 2 1 2 4 2 2 2 3 2 2 2 0 2 +4 2 1 2 4 2 2 2 3 2 2 2 1 2 +4 2 1 2 4 2 2 2 6 2 2 2 0 2 +4 2 1 2 4 2 2 2 6 2 2 2 1 2 +5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +5 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +3 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +WHERE t2.a > 3 AND +(t6.a < 6 OR t6.c IS NULL); +a b a b a b a b a b a b a b +4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +4 2 1 2 3 2 2 2 3 2 2 2 0 2 +4 2 1 2 3 2 2 2 3 2 2 2 1 2 +4 2 1 2 4 2 2 2 3 2 2 2 0 2 +4 2 1 2 4 2 2 2 3 2 2 2 1 2 +5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +SELECT t1.a,t1.b +FROM t1; +a b +1 3 +2 2 +3 2 +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2); +a b a b a b a b a b a b a b a b +1 3 3 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +1 3 3 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +1 3 3 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +1 3 3 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +1 3 3 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +1 3 3 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +1 3 3 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +1 3 4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +1 3 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL +1 3 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +1 3 4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +1 3 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL +1 3 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +1 3 5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +1 3 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +1 3 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +1 3 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +1 3 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +1 3 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +1 3 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +3 2 3 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +3 2 3 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +3 2 3 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +3 2 3 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +3 2 3 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +3 2 3 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +3 2 3 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +3 2 4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL +3 2 4 2 1 2 3 2 2 2 3 2 2 2 0 2 +3 2 4 2 1 2 3 2 2 2 3 2 2 2 1 2 +3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 +3 2 4 2 1 2 3 2 2 2 6 2 2 2 1 2 +3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +3 2 4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL +3 2 4 2 1 2 4 2 2 2 3 2 2 2 0 2 +3 2 4 2 1 2 4 2 2 2 3 2 2 2 1 2 +3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 +3 2 4 2 1 2 4 2 2 2 6 2 2 2 1 2 +3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +3 2 5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +3 2 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +3 2 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2) +WHERE (t2.a >= 4 OR t2.c IS NULL); +a b a b a b a b a b a b a b a b +1 3 4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +1 3 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL +1 3 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +1 3 4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +1 3 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL +1 3 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +1 3 5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +1 3 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +1 3 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +1 3 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +1 3 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +1 3 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +1 3 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +3 2 4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL +3 2 4 2 1 2 3 2 2 2 3 2 2 2 0 2 +3 2 4 2 1 2 3 2 2 2 3 2 2 2 1 2 +3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 +3 2 4 2 1 2 3 2 2 2 6 2 2 2 1 2 +3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +3 2 4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL +3 2 4 2 1 2 4 2 2 2 3 2 2 2 0 2 +3 2 4 2 1 2 4 2 2 2 3 2 2 2 1 2 +3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 +3 2 4 2 1 2 4 2 2 2 6 2 2 2 1 2 +3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +3 2 5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +3 2 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +3 2 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +SELECT t0.a,t0.b +FROM t0; +a b +1 1 +1 2 +2 2 +EXPLAIN EXTENDED +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2) +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) where ((`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`))) +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2) +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL); +a b a b a b a b a b a b a b a b a b +1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +1 2 3 2 4 2 1 2 3 2 3 1 3 2 1 1 NULL NULL +1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL +1 2 3 2 4 2 1 2 3 2 2 2 3 2 2 2 0 2 +1 2 3 2 4 2 1 2 3 2 2 2 3 2 2 2 1 2 +1 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 +1 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 1 2 +1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL +1 2 3 2 4 2 1 2 4 2 3 1 3 2 1 1 NULL NULL +1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL +1 2 3 2 4 2 1 2 4 2 2 2 3 2 2 2 0 2 +1 2 3 2 4 2 1 2 4 2 2 2 3 2 2 2 1 2 +1 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 +1 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 1 2 +1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL +1 2 3 2 5 3 NULL NULL NULL NULL 3 1 3 2 1 1 NULL NULL +1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL +1 2 3 2 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 0 2 +1 2 3 2 5 3 NULL NULL NULL NULL 2 2 3 2 2 2 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 +1 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL +EXPLAIN EXTENDED +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) +SELECT t9.a,t9.b +FROM t9; +a b +1 1 +1 2 +3 3 +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +a b a b a b a b a b a b a b a b a b a b +1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 1 +1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 1 +1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 1 +1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1 +1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 1 +1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1 +1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 1 +1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 2 +1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 2 +1 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 1 2 +1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 2 +1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 2 +1 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 1 2 +1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 2 +SELECT t1.a,t1.b +FROM t1; +a b +1 3 +2 2 +3 2 +SELECT t2.a,t2.b +FROM t2; +a b +3 3 +4 2 +5 3 +SELECT t3.a,t3.b +FROM t3; +a b +1 2 +2 2 +SELECT t2.a,t2.b,t3.a,t3.b +FROM t2 +LEFT JOIN +t3 +ON t2.b=t3.b; +a b a b +3 3 NULL NULL +4 2 1 2 +4 2 2 2 +5 3 NULL NULL +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b +FROM t1, t2 +LEFT JOIN +t3 +ON t2.b=t3.b +WHERE t1.a <= 2; +a b a b a b +1 3 3 3 NULL NULL +2 2 3 3 NULL NULL +1 3 4 2 1 2 +1 3 4 2 2 2 +2 2 4 2 1 2 +2 2 4 2 2 2 +1 3 5 3 NULL NULL +2 2 5 3 NULL NULL +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b +FROM t1, t3 +RIGHT JOIN +t2 +ON t2.b=t3.b +WHERE t1.a <= 2; +a b a b a b +1 3 3 3 NULL NULL +2 2 3 3 NULL NULL +1 3 4 2 1 2 +1 3 4 2 2 2 +2 2 4 2 1 2 +2 2 4 2 2 2 +1 3 5 3 NULL NULL +2 2 5 3 NULL NULL +SELECT t3.a,t3.b,t4.a,t4.b +FROM t3,t4; +a b a b +1 2 3 2 +2 2 3 2 +1 2 4 2 +2 2 4 2 +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b; +a b a b a b +3 3 NULL NULL NULL NULL +4 2 1 2 3 2 +4 2 1 2 4 2 +5 3 NULL NULL NULL NULL +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t1, t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b +WHERE t1.a <= 2; +a b a b a b a b +1 3 3 3 NULL NULL NULL NULL +2 2 3 3 NULL NULL NULL NULL +1 3 4 2 1 2 3 2 +1 3 4 2 1 2 4 2 +2 2 4 2 1 2 3 2 +2 2 4 2 1 2 4 2 +1 3 5 3 NULL NULL NULL NULL +2 2 5 3 NULL NULL NULL NULL +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t1, (t3, t4) +RIGHT JOIN +t2 +ON t3.a=1 AND t2.b=t4.b +WHERE t1.a <= 2; +a b a b a b a b +1 3 3 3 NULL NULL NULL NULL +2 2 3 3 NULL NULL NULL NULL +1 3 4 2 1 2 3 2 +1 3 4 2 1 2 4 2 +2 2 4 2 1 2 3 2 +2 2 4 2 1 2 4 2 +1 3 5 3 NULL NULL NULL NULL +2 2 5 3 NULL NULL NULL NULL +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t1, (t3, t4) +RIGHT JOIN +t2 +ON t3.a=1 AND t2.b=t4.b +WHERE t1.a <= 2; +a b a b a b a b +1 3 3 3 NULL NULL NULL NULL +2 2 3 3 NULL NULL NULL NULL +1 3 4 2 1 2 3 2 +1 3 4 2 1 2 4 2 +2 2 4 2 1 2 3 2 +2 2 4 2 1 2 4 2 +1 3 5 3 NULL NULL NULL NULL +2 2 5 3 NULL NULL NULL NULL +EXPLAIN EXTENDED +SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM t1, (t3, t4) +RIGHT JOIN +t2 +ON t3.a=1 AND t2.b=t4.b +WHERE t1.a <= 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2) +CREATE INDEX idx_b ON t2(b); +EXPLAIN EXTENDED +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM (t3,t4) +LEFT JOIN +(t1,t2) +ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 +1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +Warnings: +Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1 +SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b +FROM (t3,t4) +LEFT JOIN +(t1,t2) +ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b; +a b a b a b +4 2 1 2 3 2 +4 2 1 2 3 2 +4 2 1 2 3 2 +NULL NULL 2 2 3 2 +4 2 1 2 4 2 +4 2 1 2 4 2 +4 2 1 2 4 2 +NULL NULL 2 2 4 2 +EXPLAIN EXTENDED +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) +CREATE INDEX idx_b ON t4(b); +CREATE INDEX idx_b ON t5(b); +EXPLAIN EXTENDED +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 Using where +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) +CREATE INDEX idx_b ON t8(b); +EXPLAIN EXTENDED +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 Using where +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) +CREATE INDEX idx_b ON t1(b); +CREATE INDEX idx_a ON t0(a); +EXPLAIN EXTENDED +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ref idx_a idx_a 5 const 1 Using where +1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 Using where +1 SIMPLE t5 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 Using where +1 SIMPLE t6 ALL NULL NULL NULL NULL 3 Using where +1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 Using where +1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) +SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b, +t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b +FROM t0,t1 +LEFT JOIN +( +t2 +LEFT JOIN +(t3, t4) +ON t3.a=1 AND t2.b=t4.b, +t5 +LEFT JOIN +( +(t6, t7) +LEFT JOIN +t8 +ON t7.b=t8.b AND t6.b < 10 +) +ON t6.b >= 2 AND t5.b=t7.b +) +ON (t3.b=2 OR t3.c IS NULL) AND (t6.b=2 OR t6.c IS NULL) AND +(t1.b=t5.b OR t3.c IS NULL OR t6.c IS NULL or t8.c IS NULL) AND +(t1.a != 2), +t9 +WHERE t0.a=1 AND +t0.b=t1.b AND +(t2.a >= 4 OR t2.c IS NULL) AND +(t3.a < 5 OR t3.c IS NULL) AND +(t3.b=t4.b OR t3.c IS NULL OR t4.c IS NULL) AND +(t5.a >=2 OR t5.c IS NULL) AND +(t6.a >=4 OR t6.c IS NULL) AND +(t7.a <= 2 OR t7.c IS NULL) AND +(t8.a < 1 OR t8.c IS NULL) AND +(t8.b=t9.b OR t8.c IS NULL) AND +(t9.a=1); +a b a b a b a b a b a b a b a b a b a b +1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 1 +1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 1 +1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 1 +1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1 +1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 1 +1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1 +1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 1 +1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 2 +1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 2 +1 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 1 2 +1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 2 +1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 2 +1 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 1 2 +1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 1 2 +1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 2 +SELECT t2.a,t2.b +FROM t2; +a b +3 3 +4 2 +5 3 +SELECT t3.a,t3.b +FROM t3; +a b +1 2 +2 2 +SELECT t2.a,t2.b,t3.a,t3.b +FROM t2 LEFT JOIN t3 ON t2.b=t3.b +WHERE t2.a = 4 OR (t2.a > 4 AND t3.a IS NULL); +a b a b +4 2 1 2 +4 2 2 2 +5 3 NULL NULL +SELECT t2.a,t2.b,t3.a,t3.b +FROM t2 LEFT JOIN (t3) ON t2.b=t3.b +WHERE t2.a = 4 OR (t2.a > 4 AND t3.a IS NULL); +a b a b +4 2 1 2 +4 2 2 2 +5 3 NULL NULL +ALTER TABLE t3 +CHANGE COLUMN a a1 int, +CHANGE COLUMN c c1 int; +SELECT t2.a,t2.b,t3.a1,t3.b +FROM t2 LEFT JOIN t3 ON t2.b=t3.b +WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS NULL); +a b a1 b +4 2 1 2 +4 2 2 2 +5 3 NULL NULL +SELECT t2.a,t2.b,t3.a1,t3.b +FROM t2 NATURAL LEFT JOIN t3 +WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS NULL); +a b a1 b +4 2 1 2 +4 2 2 2 +5 3 NULL NULL +DROP TABLE t0,t1,t2,t3,t4,t5,t6,t7,t8,t9; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (2); +INSERT INTO t3 VALUES (2); +INSERT INTO t1 VALUES (2); +SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON t2.a=t3.a) ON t1.a=t3.a; +a a a +1 NULL NULL +2 2 2 +SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t2.a=t3.a ON t1.a=t3.a; +a a a +1 NULL NULL +2 2 2 +DELETE FROM t1 WHERE a=2; +SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t2.a=t3.a ON t1.a=t3.a; +a a a +1 NULL NULL +DELETE FROM t2; +SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t2.a=t3.a ON t1.a=t3.a; +a a a +1 NULL NULL +DROP TABLE t1,t2,t3; +CREATE TABLE t1(a int, key (a)); +CREATE TABLE t2(b int, key (b)); +CREATE TABLE t3(c int, key (c)); +INSERT INTO t1 VALUES (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), +(10), (11), (12), (13), (14), (15), (16), (17), (18), (19); +INSERT INTO t2 VALUES (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), +(10), (11), (12), (13), (14), (15), (16), (17), (18), (19); +INSERT INTO t3 VALUES (0), (1), (2), (3), (4), (5); +EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 21 Using index +1 SIMPLE t3 index c c 5 NULL 6 Using index +1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index +EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 21 Using index +1 SIMPLE t3 index c c 5 NULL 6 Using index +1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index +SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +a b c +NULL 0 0 +NULL 1 1 +NULL 2 2 +0 0 0 +0 1 1 +0 2 2 +1 0 0 +1 1 1 +1 2 2 +2 0 0 +2 1 1 +2 2 2 +3 0 0 +3 1 1 +3 2 2 +4 0 0 +4 1 1 +4 2 2 +5 0 0 +5 1 1 +5 2 2 +6 0 0 +6 1 1 +6 2 2 +7 0 0 +7 1 1 +7 2 2 +8 0 0 +8 1 1 +8 2 2 +9 0 0 +9 1 1 +9 2 2 +10 0 0 +10 1 1 +10 2 2 +11 0 0 +11 1 1 +11 2 2 +12 0 0 +12 1 1 +12 2 2 +13 0 0 +13 1 1 +13 2 2 +14 0 0 +14 1 1 +14 2 2 +15 0 0 +15 1 1 +15 2 2 +16 0 0 +16 1 1 +16 2 2 +17 0 0 +17 1 1 +17 2 2 +18 0 0 +18 1 1 +18 2 2 +19 0 0 +19 1 1 +19 2 2 +DELETE FROM t3; +EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 21 Using index +1 SIMPLE t3 index c c 5 NULL 0 Using index +1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index +SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +a b c +NULL NULL NULL +0 NULL NULL +1 NULL NULL +2 NULL NULL +3 NULL NULL +4 NULL NULL +5 NULL NULL +6 NULL NULL +7 NULL NULL +8 NULL NULL +9 NULL NULL +10 NULL NULL +11 NULL NULL +12 NULL NULL +13 NULL NULL +14 NULL NULL +15 NULL NULL +16 NULL NULL +17 NULL NULL +18 NULL NULL +19 NULL NULL +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (c11 int); +CREATE TABLE t2 (c21 int); +CREATE TABLE t3 (c31 int); +INSERT INTO t1 VALUES (4), (5); +SELECT * FROM t1 LEFT JOIN t2 ON c11=c21; +c11 c21 +4 NULL +5 NULL +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON c11=c21; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21; +c11 c21 c31 +4 NULL NULL +5 NULL NULL +EXPLAIN SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 +1 SIMPLE t2 ALL NULL NULL NULL NULL 0 +1 SIMPLE t3 ALL NULL NULL NULL NULL 0 +DROP TABLE t1,t2,t3; +CREATE TABLE t1 (goods int(12) NOT NULL, price varchar(128) NOT NULL); +INSERT INTO t1 VALUES (23, 2340), (26, 9900); +CREATE TABLE t2 (goods int(12), name varchar(50), shop char(2)); +INSERT INTO t2 VALUES (23, 'as300', 'fr'), (26, 'as600', 'fr'); +create table t3 (groupid int(12) NOT NULL, goodsid int(12) NOT NULL); +INSERT INTO t3 VALUES (3,23), (6,26); +CREATE TABLE t4 (groupid int(12)); +INSERT INTO t4 VALUES (1), (2), (3), (4), (5), (6); +SELECT * FROM +(SELECT DISTINCT gl.groupid, gp.price +FROM t4 gl +LEFT JOIN +(t3 g INNER JOIN t2 p ON g.goodsid = p.goods +INNER JOIN t1 gp ON p.goods = gp.goods) +ON gl.groupid = g.groupid and p.shop = 'fr') t; +groupid price +1 NULL +2 NULL +3 2340 +4 NULL +5 NULL +6 9900 +CREATE VIEW v1 AS +SELECT g.groupid groupid, p.goods goods, +p.name name, p.shop shop, +gp.price price +FROM t3 g INNER JOIN t2 p ON g.goodsid = p.goods +INNER JOIN t1 gp on p.goods = gp.goods; +CREATE VIEW v2 AS +SELECT DISTINCT g.groupid, fr.price +FROM t4 g +LEFT JOIN +v1 fr on g.groupid = fr.groupid and fr.shop = 'fr'; +SELECT * FROM v2; +groupid price +1 NULL +2 NULL +3 2340 +4 NULL +5 NULL +6 9900 +SELECT * FROM +(SELECT DISTINCT g.groupid, fr.price +FROM t4 g +LEFT JOIN +v1 fr on g.groupid = fr.groupid and fr.shop = 'fr') t; +groupid price +1 NULL +2 NULL +3 2340 +4 NULL +5 NULL +6 9900 +DROP VIEW v1,v2; +DROP TABLE t1,t2,t3,t4; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index b6265aac4a3..d4a20209162 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2,t3,t4,t5; +drop table if exists t0,t1,t2,t3,t4,t5; CREATE TABLE t1 ( grp int(11) default NULL, a bigint(20) unsigned default NULL, @@ -106,11 +106,11 @@ grp a c id a c d a 3 6 D 3 6 C 6 6 NULL NULL NULL NULL NULL NULL NULL explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions +ERROR 42S22: Unknown column 't3.a' in 'on clause' select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions +ERROR 42S22: Unknown column 't3.a' in 'on clause' select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a); -ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions +ERROR 42S22: Unknown column 't3.a' in 'on clause' select t1.*,t2.* from t1 inner join t2 using (a); grp a c id a c d 1 1 a 1 1 a 1 @@ -124,8 +124,8 @@ grp a c id a c d 3 5 C 3 5 B 5 3 6 D 3 6 C 6 select t1.*,t2.* from t1 natural join t2; -grp a c id d -1 1 a 1 1 +grp a c id a c d +1 1 a 1 1 a 1 drop table t1,t2; CREATE TABLE t1 ( usr_id INT unsigned NOT NULL, @@ -356,13 +356,7 @@ select t1.name, t2.name, t2.id, t2.owner, t3.id from t1 left join t2 on (t1.id = name name id owner id Antonio Paz El Gato 1 1 1 Antonio Paz Perrito 2 1 1 -Lilliana Angelovska NULL NULL NULL 1 -Thimble Smith NULL NULL NULL 1 -Antonio Paz NULL NULL NULL 2 -Lilliana Angelovska NULL NULL NULL 2 -Thimble Smith NULL NULL NULL 2 -Antonio Paz NULL NULL NULL 3 -Lilliana Angelovska NULL NULL NULL 3 +NULL NULL NULL NULL 2 Thimble Smith Happy 3 3 3 drop table t1,t2; create table t1 (id int not null, str char(10), index(str)); @@ -406,7 +400,7 @@ insert into t3 values (1); insert into t4 values (1,1); insert into t5 values (1,1); explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23; -ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions +ERROR 42S22: Unknown column 't2.t2_id' in 'on clause' drop table t1,t2,t3,t4,t5; create table t1 (n int, m int, o int, key(n)); create table t2 (n int not null, m int, o int, primary key(n)); @@ -467,10 +461,10 @@ count color 15 white 7 green select * from t2 natural join t1; -count color name -10 green lime -7 green lime -5 black grape +color count name +green 10 lime +green 7 lime +black 5 grape select t2.count, t1.name from t2 natural join t1; count name 10 lime @@ -634,7 +628,7 @@ insert into t2 values (10,1),(20,2),(30,3); explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL PRIMARY 4 NULL 3 Using index -1 SIMPLE t1 const PRIMARY PRIMARY 2 const 1 Using where; Using index +1 SIMPLE t1 const PRIMARY PRIMARY 2 const 1 Using index select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; fooID barID fooID 10 1 NULL @@ -653,9 +647,22 @@ insert into t1 values(1),(2); insert into t2 values(2),(3); insert into t3 values(2),(4); select * from t1 natural left join t2 natural left join t3; -i i i -1 NULL NULL -2 2 2 +i +1 +2 +select * from t1 natural left join t2 where (t2.i is not null)=0; +i +1 +select * from t1 natural left join t2 where (t2.i is not null) is not null; +i +1 +2 +select * from t1 natural left join t2 where (i is not null)=0; +i +select * from t1 natural left join t2 where (i is not null) is not null; +i +1 +2 drop table t1,t2,t3; create table t1 (f1 integer,f2 integer,f3 integer); create table t2 (f2 integer,f4 integer); @@ -663,7 +670,7 @@ create table t3 (f3 integer,f5 integer); select * from t1 left outer join t2 using (f2) left outer join t3 using (f3); -ERROR 42S22: Unknown column 'test.t2.f3' in 'on clause' +f3 f2 f1 f4 f5 drop table t1,t2,t3; create table t1 (a1 int, a2 int); create table t2 (b1 int not null, b2 int); @@ -729,13 +736,13 @@ explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from order by m.match_id desc; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s ALL NULL NULL NULL NULL 10 -1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where +1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from (t2 s left join t1 m on m.match_id = 1) order by UUX desc; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort -1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where +1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 select s.*, '*', m.*, (s.match_1_h - m.home) UUX from (t2 s left join t1 m on m.match_id = 1) order by UUX desc; @@ -755,7 +762,7 @@ t2 s straight_join t1 m where m.match_id = 1 order by UUX desc; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort -1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using where +1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 select s.*, '*', m.*, (s.match_1_h - m.home) UUX from t2 s straight_join t1 m where m.match_id = 1 order by UUX desc; @@ -810,32 +817,91 @@ t2.flag_value IS NULL; flag_name flag_value flag2 NULL DROP TABLE t1,t2; -CREATE TABLE invoice ( +CREATE TABLE t1 ( id int(11) unsigned NOT NULL auto_increment, text_id int(10) unsigned default NULL, PRIMARY KEY (id) ); -INSERT INTO invoice VALUES("1", "0"); -INSERT INTO invoice VALUES("2", "10"); -CREATE TABLE text_table ( +INSERT INTO t1 VALUES("1", "0"); +INSERT INTO t1 VALUES("2", "10"); +CREATE TABLE t2 ( text_id char(3) NOT NULL default '', language_id char(3) NOT NULL default '', text_data text, PRIMARY KEY (text_id,language_id) ); -INSERT INTO text_table VALUES("0", "EN", "0-EN"); -INSERT INTO text_table VALUES("0", "SV", "0-SV"); -INSERT INTO text_table VALUES("10", "EN", "10-EN"); -INSERT INTO text_table VALUES("10", "SV", "10-SV"); -SELECT invoice.id, invoice.text_id, text_table.text_data -FROM invoice LEFT JOIN text_table -ON invoice.text_id = text_table.text_id -AND text_table.language_id = 'SV' - WHERE (invoice.id LIKE '%' OR text_table.text_data LIKE '%'); +INSERT INTO t2 VALUES("0", "EN", "0-EN"); +INSERT INTO t2 VALUES("0", "SV", "0-SV"); +INSERT INTO t2 VALUES("10", "EN", "10-EN"); +INSERT INTO t2 VALUES("10", "SV", "10-SV"); +SELECT t1.id, t1.text_id, t2.text_data +FROM t1 LEFT JOIN t2 +ON t1.text_id = t2.text_id +AND t2.language_id = 'SV' + WHERE (t1.id LIKE '%' OR t2.text_data LIKE '%'); id text_id text_data 1 0 0-SV 2 10 10-SV -DROP TABLE invoice, text_table; +DROP TABLE t1, t2; +CREATE TABLE t0 (a0 int PRIMARY KEY); +CREATE TABLE t1 (a1 int PRIMARY KEY); +CREATE TABLE t2 (a2 int); +CREATE TABLE t3 (a3 int); +INSERT INTO t0 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1), (2); +INSERT INTO t3 VALUES (1), (2); +SELECT * FROM t1 LEFT JOIN t2 ON a1=0; +a1 a2 +1 NULL +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON a1=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +SELECT * FROM t1 LEFT JOIN (t2,t3) ON a1=0; +a1 a2 a3 +1 NULL NULL +EXPLAIN SELECT * FROM t1 LEFT JOIN (t2,t3) ON a1=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +SELECT * FROM t0, t1 LEFT JOIN (t2,t3) ON a1=0 WHERE a0=a1; +a0 a1 a2 a3 +1 1 NULL NULL +EXPLAIN SELECT * FROM t0, t1 LEFT JOIN (t2,t3) ON a1=0 WHERE a0=a1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 system PRIMARY NULL NULL NULL 1 +1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +INSERT INTO t0 VALUES (0); +INSERT INTO t1 VALUES (0); +SELECT * FROM t0, t1 LEFT JOIN (t2,t3) ON a1=5 WHERE a0=a1 AND a0=1; +a0 a1 a2 a3 +1 1 NULL NULL +EXPLAIN SELECT * FROM t0, t1 LEFT JOIN (t2,t3) ON a1=5 WHERE a0=a1 AND a0=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 const PRIMARY PRIMARY 4 const 1 Using index +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 +drop table t1,t2; +create table t1 (a int, b int); +insert into t1 values (1,1),(2,2),(3,3); +create table t2 (a int, b int); +insert into t2 values (1,1), (2,2); +select * from t2 right join t1 on t2.a=t1.a; +a b a b +1 1 1 1 +2 2 2 2 +NULL NULL 3 3 +select straight_join * from t2 right join t1 on t2.a=t1.a; +a b a b +1 1 1 1 +2 2 2 2 +NULL NULL 3 3 +DROP TABLE t0,t1,t2,t3; CREATE TABLE t1 (a int PRIMARY KEY, b int); CREATE TABLE t2 (a int PRIMARY KEY, b int); INSERT INTO t1 VALUES (1,1), (2,1), (3,1), (4,2); @@ -881,5 +947,57 @@ aaaaa bbbbb Warnings: Warning 1260 2 line(s) were cut by GROUP_CONCAT() +select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a; +group_concat(t1.b,t2.c) +aaaaa +bbbbb +Warnings: +Warning 1260 2 line(s) were cut by GROUP_CONCAT() +select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a; +group_concat(t1.b,t2.c) +aaaaa +bbbbb +Warnings: +Warning 1260 2 line(s) were cut by GROUP_CONCAT() drop table t1, t2; set group_concat_max_len=default; +create table t1 (gid smallint(5) unsigned not null, x int(11) not null, y int(11) not null, art int(11) not null, primary key (gid,x,y)); +insert t1 values (1, -5, -8, 2), (1, 2, 2, 1), (1, 1, 1, 1); +create table t2 (gid smallint(5) unsigned not null, x int(11) not null, y int(11) not null, id int(11) not null, primary key (gid,id,x,y), key id (id)); +insert t2 values (1, -5, -8, 1), (1, 1, 1, 1), (1, 2, 2, 1); +create table t3 ( set_id smallint(5) unsigned not null, id tinyint(4) unsigned not null, name char(12) not null, primary key (id,set_id)); +insert t3 values (0, 1, 'a'), (1, 1, 'b'), (0, 2, 'c'), (1, 2, 'd'), (1, 3, 'e'), (1, 4, 'f'), (1, 5, 'g'), (1, 6, 'h'); +explain select name from t1 left join t2 on t1.x = t2.x and t1.y = t2.y +left join t3 on t1.art = t3.id where t2.id =1 and t2.x = -5 and t2.y =-8 +and t1.gid =1 and t2.gid =1 and t3.set_id =1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 10 const,const,const 1 +1 SIMPLE t2 const PRIMARY,id PRIMARY 14 const,const,const,const 1 Using index +1 SIMPLE t3 const PRIMARY PRIMARY 3 const,const 1 +drop tables t1,t2,t3; +CREATE TABLE t1 (EMPNUM INT, GRP INT); +INSERT INTO t1 VALUES (0, 10); +INSERT INTO t1 VALUES (2, 30); +CREATE TABLE t2 (EMPNUM INT, NAME CHAR(5)); +INSERT INTO t2 VALUES (0, 'KERI'); +INSERT INTO t2 VALUES (9, 'BARRY'); +CREATE VIEW v1 AS +SELECT COALESCE(t2.EMPNUM,t1.EMPNUM) AS EMPNUM, NAME, GRP +FROM t2 LEFT OUTER JOIN t1 ON t2.EMPNUM=t1.EMPNUM; +SELECT * FROM v1; +EMPNUM NAME GRP +0 KERI 10 +9 BARRY NULL +SELECT * FROM v1 WHERE EMPNUM < 10; +EMPNUM NAME GRP +0 KERI 10 +9 BARRY NULL +DROP TABLE t1,t2; +CREATE TABLE t1 (c11 int); +CREATE TABLE t2 (c21 int); +INSERT INTO t1 VALUES (30), (40), (50); +INSERT INTO t2 VALUES (300), (400), (500); +SELECT * FROM t1 LEFT JOIN t2 ON (c11=c21 AND c21=30) WHERE c11=40; +c11 c21 +40 NULL +DROP TABLE t1, t2; diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index cceaf393a60..bce02a1cb0f 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -110,7 +110,11 @@ name_id name SELECT * FROM t2 WHERE name='[T,U]_axpby'; name_id name 2 [T,U]_axpby -drop table t1,t2; +CREATE TABLE t3 SELECT * FROM t2 WHERE name='[T,U]_axpby'; +SELECT * FROM t2 WHERE name='[T,U]_axpby'; +name_id name +2 [T,U]_axpby +drop table t1,t2,t3; create table t1 ( SEQNO numeric(12 ) not null, @@ -155,8 +159,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); INSERT INTO t1 (c) VALUES (NULL),(NULL); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2 SELECT * FROM t1; c i 1 @@ -212,14 +216,14 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index explain select 1 from t1 where id =2 or id=3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 7 Using where; Using index explain select name from t1 where id =2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 ALTER TABLE t1 DROP PRIMARY KEY, ADD INDEX (id); explain select 1 from t1 where id =2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref id id 4 const 1 Using where; Using index +1 SIMPLE t1 ref id id 4 const 1 Using index drop table t1; CREATE TABLE t1 (numeropost mediumint(8) unsigned NOT NULL default '0', numreponse int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (numeropost,numreponse), UNIQUE KEY numreponse (numreponse)); INSERT INTO t1 (numeropost,numreponse) VALUES ('1','1'),('1','2'),('2','3'),('2','4'); @@ -325,3 +329,53 @@ ERROR 42S21: Duplicate column name 'c1' alter table t1 add key (c1,c1,c2); ERROR 42S21: Duplicate column name 'c1' drop table t1; +create table t1 (a varchar(10), b varchar(10), key(a(10),b(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) default NULL, + `b` varchar(10) default NULL, + KEY `a` (`a`,`b`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify b varchar(20); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(10) default NULL, + `b` varchar(20) default NULL, + KEY `a` (`a`,`b`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify a varchar(20); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(20) default NULL, + `b` varchar(20) default NULL, + KEY `a` (`a`,`b`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a int not null primary key, b varchar(20) not null unique); +desc t1; +Field Type Null Key Default Extra +a int(11) NO PRI +b varchar(20) NO UNI +drop table t1; +create table t1 (a int not null primary key, b int not null unique); +desc t1; +Field Type Null Key Default Extra +a int(11) NO PRI +b int(11) NO UNI +drop table t1; +create table t1 (a int not null primary key, b varchar(20) not null, unique (b(10))); +desc t1; +Field Type Null Key Default Extra +a int(11) NO PRI +b varchar(20) NO UNI +drop table t1; +create table t1 (a int not null primary key, b varchar(20) not null, c varchar(20) not null, unique(b(10),c(10))); +desc t1; +Field Type Null Key Default Extra +a int(11) NO PRI +b varchar(20) NO MUL +c varchar(20) NO +drop table t1; diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 41aaa21eea3..de9a2b2c003 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -193,6 +193,8 @@ cache index t1 key (unknown_key) in keycache1; Table Op Msg_type Msg_text test.t1 assign_to_keycache error Key column 'unknown_key' doesn't exist in table test.t1 assign_to_keycache status Operation failed +Warnings: +Error 1072 Key column 'unknown_key' doesn't exist in table select @@keycache2.key_buffer_size; @@keycache2.key_buffer_size 4194304 @@ -287,3 +289,9 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +set @@global.key_buffer_size=0; +Warnings: +Warning 1438 Cannot drop default keycache +select @@global.key_buffer_size; +@@global.key_buffer_size +2097152 diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index c218379110f..88a0ab8abd5 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -1,12 +1,14 @@ drop table if exists t1; -create table t1 (time time, date date, timestamp timestamp); -insert into t1 values ("12:22:22","97:02:03","1997-01-02"); +create table t1 (time time, date date, timestamp timestamp, +quarter int, week int, year int, timestampadd int, timestampdiff int); +insert into t1 values ("12:22:22","97:02:03","1997-01-02",1,2,3,4,5); select * from t1; -time date timestamp -12:22:22 1997-02-03 1997-01-02 00:00:00 -select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time) from t1; -t1.time+0 t1.date+0 t1.timestamp+0 concat(date," ",time) -122222 19970203 19970102000000 1997-02-03 12:22:22 +time date timestamp quarter week year timestampadd timestampdiff +12:22:22 1997-02-03 1997-01-02 00:00:00 1 2 3 4 5 +select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time), +t1.quarter+t1.week, t1.year+timestampadd, timestampdiff from t1; +t1.time+0 t1.date+0 t1.timestamp+0 concat(date," ",time) t1.quarter+t1.week t1.year+timestampadd timestampdiff +122222 19970203 19970102000000 1997-02-03 12:22:22 3 7 5 drop table t1; create table events(binlog int); insert into events values(1); diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index ba9ba2833f6..754568093ff 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -17,3 +17,15 @@ select 4; 4 4 drop table t1; +select get_lock("a", 10); +get_lock("a", 10) +1 + select get_lock("a", 10); +get_lock("a", 10) +NULL +select 1; +1 +1 +select RELEASE_LOCK("a"); +RELEASE_LOCK("a") +1 diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index 6a3d2bffab0..1e38f762dd1 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -1,5 +1,5 @@ drop table if exists t1; -create table t1 (a int primary key, b int not null); +create table t1 (a int not null default 0 primary key, b int not null default 0); insert into t1 () values (); insert into t1 values (1,1),(2,1),(3,1); update t1 set a=4 where b=1 limit 1; diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index c0baabcc507..d76fff372f5 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -1,4 +1,4 @@ -drop table if exists t1; +drop table if exists t1, t2; create table t1 (a date, b date, c date not null, d date); load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ','; Warnings: @@ -43,9 +43,9 @@ drop table t1; create table t1 (a int, b char(10)); load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: -Warning 1265 Data truncated for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 3 Warning 1262 Row 3 was truncated; it contained more data than there were input columns -Warning 1265 Data truncated for column 'a' at row 5 +Warning 1264 Out of range value adjusted for column 'a' at row 5 Warning 1262 Row 5 was truncated; it contained more data than there were input columns select * from t1; a b @@ -57,7 +57,7 @@ a b truncate table t1; load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; Warnings: -Warning 1265 Data truncated for column 'a' at row 4 +Warning 1264 Out of range value adjusted for column 'a' at row 4 Warning 1261 Row 4 doesn't contain data for all columns select * from t1; a b @@ -66,3 +66,57 @@ a b 3 row 3 0 drop table t1; +create table t1 (a int default 100, b int, c varchar(60)); +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set b=@b+10, c=concat("b=",@b); +select * from t1; +a b c +NULL 20 b=10 +NULL 25 b=15 +truncate table t1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (a, @b) set c= if(a is null,"oops",a); +select * from t1; +a b c +NULL NULL oops +NULL NULL oops +truncate table t1; +set @c:=123; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, b) set c= if(@a is null,@c,b); +select * from t1; +a b c +100 10 123 +100 15 123 +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, @b); +select * from t1; +a b c +100 10 123 +100 15 123 +100 NULL NULL +100 NULL NULL +select @a, @b; +@a @b +NULL 15 +truncate table t1; +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c="Wow"; +select * from t1; +a b c +1 2 Wow +3 4 Wow +5 6 Wow +truncate table t1; +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, b) set c=concat(a,"+",b,"+",@c,"+",b,"+",if(c is null,"NIL",c)); +select * from t1; +a b c +1 2 1+2+123+2+NIL +3 4 3+4+123+4+NIL +5 6 5+6+123+6+NIL +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (a, @b); +ERROR HY000: Can't load value from file with fixed size rows to variable +create table t2 (num int primary key, str varchar(10)); +insert into t2 values (10,'Ten'), (15,'Fifteen'); +truncate table t1; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n); +select * from t1; +a b c +10 NULL Ten +15 NULL Fifteen +drop table t1, t2; diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 54162a36d83..a1efb1a8e69 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -41,7 +41,7 @@ lock tables t1 write; check table t2; Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES -insert into t1 select nr from t1; +insert into t1 select index1,nr from t1; ERROR HY000: Table 't1' was not locked with LOCK TABLES unlock tables; lock tables t1 write, t1 as t1_alias read; diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index 9eedbf50064..73e3a9d32e3 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -36,3 +36,10 @@ lock table t1 write, t2 write; drop table t2; ERROR 42S02: Table 'test.t2' doesn't exist drop table t1; +create table t1(a int); +lock tables t1 write; +show columns from t1; +Field Type Null Key Default Extra +a int(11) YES NULL +unlock tables; +drop table t1; diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index 499f46a237e..c09750ed561 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -1,6 +1,7 @@ drop table if exists t1,t2,t3,t4; drop table if exists t0,t5,t6,t7,t8,t9; drop database if exists mysqltest; +drop view if exists v0, v1, v2, v3, v4; create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); create table t4 (id int primary key, Word varchar(40) not null); INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c'); diff --git a/mysql-test/r/lowercase_table3.result b/mysql-test/r/lowercase_table3.result index 8182d07c26b..995a2c0d08a 100644 --- a/mysql-test/r/lowercase_table3.result +++ b/mysql-test/r/lowercase_table3.result @@ -6,5 +6,5 @@ drop table t1; flush tables; CREATE TABLE t1 (a int) ENGINE=INNODB; SELECT * from T1; -ERROR HY000: Can't open file: 'T1.ibd' (errno: 1) +ERROR 42S02: Table 'test.T1' doesn't exist drop table t1; diff --git a/mysql-test/r/lowercase_table_grant.result b/mysql-test/r/lowercase_table_grant.result index 3889bd418db..c3813d57074 100644 --- a/mysql-test/r/lowercase_table_grant.result +++ b/mysql-test/r/lowercase_table_grant.result @@ -6,8 +6,8 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' select * from db where user = 'mysqltest_1'; -Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv -localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y +Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv +localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost'; flush privileges; show grants for mysqltest_1@localhost; @@ -15,8 +15,8 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' select * from db where user = 'mysqltest_1'; -Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv -localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y +Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv +localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost'; flush privileges; drop user mysqltest_1@localhost; diff --git a/mysql-test/r/lowercase_view.result b/mysql-test/r/lowercase_view.result new file mode 100644 index 00000000000..37252c6dde7 --- /dev/null +++ b/mysql-test/r/lowercase_view.result @@ -0,0 +1,133 @@ +drop table if exists t1Aa,t2Aa,v1Aa,v2Aa; +drop view if exists t1Aa,t2Aa,v1Aa,v2Aa; +drop database if exists MySQLTest; +create database MySQLTest; +use MySQLTest; +create table TaB (Field int); +create view ViE as select * from TAb; +show create table VIe; +View Create View +vie CREATE ALGORITHM=UNDEFINED VIEW `mysqltest`.`vie` AS select `mysqltest`.`tab`.`Field` AS `Field` from `mysqltest`.`tab` +drop database MySQLTest; +use test; +create table t1Aa (col1 int); +create table t2aA (col1 int); +create view v1Aa as select * from t1aA; +create view v2aA as select * from v1aA; +create view v3Aa as select v2Aa.col1 from v2aA,t2Aa where v2Aa.col1 = t2aA.col1; +update v2aA set col1 = (select max(col1) from v1Aa); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +update v2Aa set col1 = (select max(col1) from t1Aa); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +update v2aA set col1 = (select max(col1) from v2Aa); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v1aA) where v2aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v1Aa) where t1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v1aA) where v1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v1aa' for update in FROM clause +update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from v1aA) where v2Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from v1Aa) where t1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update t2Aa,v1aA set v1Aa.col1 = (select max(col1) from v1aA) where v1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from t1aA) where v2aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +update t1Aa,t2Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from t1Aa) where v1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v1aa' for update in FROM clause +update t2Aa,v2Aa set v2aA.col1 = (select max(col1) from t1aA) where v2Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from t1Aa) where t1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update t2Aa,v1Aa set v1aA.col1 = (select max(col1) from t1Aa) where v1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update v2aA,t2Aa set v2Aa.col1 = (select max(col1) from v2aA) where v2Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +update t1aA,t2Aa set t1Aa.col1 = (select max(col1) from v2aA) where t1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +update v1aA,t2Aa set v1Aa.col1 = (select max(col1) from v2Aa) where v1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v1aa' for update in FROM clause +update t2Aa,v2aA set v2Aa.col1 = (select max(col1) from v2aA) where v2Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update t2Aa,t1Aa set t1aA.col1 = (select max(col1) from v2aA) where t1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update t2Aa,v1Aa set v1aA.col1 = (select max(col1) from v2Aa) where v1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't2aa' for update in FROM clause +update v3aA set v3Aa.col1 = (select max(col1) from v1aA); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +update v3aA set v3Aa.col1 = (select max(col1) from t1aA); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +update v3aA set v3Aa.col1 = (select max(col1) from v2aA); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +update v3aA set v3Aa.col1 = (select max(col1) from v3aA); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +delete from v2Aa where col1 = (select max(col1) from v1Aa); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +delete from v2aA where col1 = (select max(col1) from t1Aa); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +delete from v2Aa where col1 = (select max(col1) from v2aA); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +delete v2Aa from v2aA,t2Aa where (select max(col1) from v1aA) > 0 and v2Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +delete t1aA from t1Aa,t2Aa where (select max(col1) from v1Aa) > 0 and t1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +delete v1aA from v1Aa,t2Aa where (select max(col1) from v1aA) > 0 and v1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v1aa' for update in FROM clause +delete v2aA from v2Aa,t2Aa where (select max(col1) from t1Aa) > 0 and v2aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +delete t1aA from t1Aa,t2Aa where (select max(col1) from t1aA) > 0 and t1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +delete v1aA from v1Aa,t2Aa where (select max(col1) from t1aA) > 0 and v1aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v1aa' for update in FROM clause +delete v2Aa from v2aA,t2Aa where (select max(col1) from v2Aa) > 0 and v2aA.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +delete t1Aa from t1aA,t2Aa where (select max(col1) from v2Aa) > 0 and t1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +delete v1Aa from v1aA,t2Aa where (select max(col1) from v2aA) > 0 and v1Aa.col1 = t2aA.col1; +ERROR HY000: You can't specify target table 'v1aa' for update in FROM clause +insert into v2Aa values ((select max(col1) from v1aA)); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +insert into t1aA values ((select max(col1) from v1Aa)); +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +insert into v2aA values ((select max(col1) from v1aA)); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +insert into v2Aa values ((select max(col1) from t1Aa)); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +insert into t1aA values ((select max(col1) from t1Aa)); +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +insert into v2aA values ((select max(col1) from t1aA)); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +insert into v2Aa values ((select max(col1) from v2aA)); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +insert into t1Aa values ((select max(col1) from v2Aa)); +ERROR HY000: You can't specify target table 't1aa' for update in FROM clause +insert into v2aA values ((select max(col1) from v2Aa)); +ERROR HY000: You can't specify target table 'v2aa' for update in FROM clause +insert into v3Aa (col1) values ((select max(col1) from v1Aa)); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +insert into v3aA (col1) values ((select max(col1) from t1aA)); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +insert into v3Aa (col1) values ((select max(col1) from v2aA)); +ERROR HY000: You can't specify target table 'v3aa' for update in FROM clause +drop view v3aA,v2Aa,v1aA; +drop table t1Aa,t2Aa; +create table t1Aa (col1 int); +create view v1Aa as select col1 from t1Aa as AaA; +show create view v1AA; +View Create View +v1aa CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA` +drop view v1AA; +select Aaa.col1 from t1Aa as AaA; +col1 +create view v1Aa as select Aaa.col1 from t1Aa as AaA; +drop view v1AA; +create view v1Aa as select AaA.col1 from t1Aa as AaA; +show create view v1AA; +View Create View +v1aa CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1aa` AS select `aaa`.`col1` AS `col1` from `test`.`t1aa` `AaA` +drop view v1AA; +drop table t1Aa; diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 6e14e9a56a8..d4e19201173 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -39,7 +39,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t3 range a a 4 NULL 18 Using where explain select * from t3 where a > 10 and a < 20; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range a a 4 NULL 16 Using where +1 SIMPLE t3 range a a 4 NULL 17 Using where select * from t3 where a = 10; a b 10 Testing @@ -172,22 +172,22 @@ a b show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` char(20) default NULL, KEY `a` (`a`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2); select * from t4; -ERROR HY000: Can't open file: 't4.MRG' (errno: 143) +ERROR HY000: All tables in the MERGE table are not identically defined alter table t4 add column c int; -ERROR HY000: Can't open file: 't4.MRG' (errno: 143) +ERROR HY000: All tables in the MERGE table are not identically defined create database mysqltest; create table mysqltest.t6 (a int not null primary key auto_increment, message char(20)); create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6); show create table t5; Table Create Table t5 CREATE TABLE `t5` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` char(20) default NULL, KEY `a` (`a`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`mysqltest`.`t6`) @@ -260,16 +260,16 @@ ENGINE=MERGE UNION=(t1,t2); show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `incr` int(11) NOT NULL default '0', - `othr` int(11) NOT NULL default '0', + `incr` int(11) NOT NULL, + `othr` int(11) NOT NULL, PRIMARY KEY (`incr`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) alter table t3 drop primary key; show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `incr` int(11) NOT NULL default '0', - `othr` int(11) NOT NULL default '0' + `incr` int(11) NOT NULL, + `othr` int(11) NOT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) drop table t3,t2,t1; create table t1 (a int not null, key(a)) engine=merge; @@ -296,28 +296,28 @@ create table t6 (a int not null, b int not null auto_increment, primary key(a,b) show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, + `b` int(11) NOT NULL, KEY `a` (`a`,`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, + `b` int(11) NOT NULL, KEY `a` (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`) show create table t5; Table Create Table t5 CREATE TABLE `t5` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` int(11) NOT NULL auto_increment, PRIMARY KEY (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`) show create table t6; Table Create Table t6 CREATE TABLE `t6` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` int(11) NOT NULL auto_increment, PRIMARY KEY (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`) @@ -382,8 +382,8 @@ alter table t4 UNION=(t1,t2,t3); show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, + `b` int(11) NOT NULL, KEY `a` (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`,`t3`) select * from t4 order by a,b; @@ -408,8 +408,8 @@ alter table t4 INSERT_METHOD=FIRST; show create table t4; Table Create Table t4 CREATE TABLE `t4` ( - `a` int(11) NOT NULL default '0', - `b` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, + `b` int(11) NOT NULL, KEY `a` (`a`,`b`) ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`,`t2`,`t3`) insert into t4 values (4,1),(4,2); @@ -614,19 +614,19 @@ KEY files (fileset_id,fileset_root_id) EXPLAIN SELECT * FROM t2 IGNORE INDEX (files) WHERE fileset_id = 2 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range PRIMARY PRIMARY 33 NULL 5 Using where +1 SIMPLE t2 range PRIMARY PRIMARY 35 NULL 5 Using where EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range PRIMARY,files PRIMARY 33 NULL 5 Using where +1 SIMPLE t2 range PRIMARY,files PRIMARY 35 NULL 5 Using where EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY,files PRIMARY 33 NULL 5 Using where +1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 5 Using where EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 AND file_code = '0000000115' LIMIT 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 const PRIMARY,files PRIMARY 33 const,const 1 +1 SIMPLE t2 ref PRIMARY,files PRIMARY 35 const,const 1 Using where DROP TABLE t2, t1; create table t1 (x int, y int, index xy(x, y)); create table t2 (x int, y int, index xy(x, y)); @@ -650,6 +650,8 @@ create table t3 engine=merge union=(t1, t2) select * from t1; ERROR HY000: You can't specify target table 't1' for update in FROM clause create table t3 engine=merge union=(t1, t2) select * from t2; ERROR HY000: You can't specify target table 't2' for update in FROM clause +create table t3 engine=merge union=(t1, t2) select (select max(a) from t2); +ERROR HY000: You can't specify target table 't2' for update in FROM clause drop table t1, t2; create table t1 (a int,b int,c int, index (a,b,c)); create table t2 (a int,b int,c int, index (a,b,c)); diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 6297f9cdcb5..50b0b6ae294 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -2,9 +2,9 @@ drop table if exists t1,t2; select 1, 1.0, -1, "hello", NULL; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def 1 8 1 1 N 32897 0 63 -def 1.0 5 3 3 N 32897 1 63 +def 1.0 246 4 3 N 129 1 63 def -1 8 2 2 N 32897 0 63 -def hello 254 5 5 N 1 31 8 +def hello 253 5 5 N 1 31 8 def NULL 6 0 0 Y 32896 0 63 1 1.0 -1 hello NULL 1 1.0 -1 hello NULL @@ -18,7 +18,7 @@ def test t1 t1 d d 3 11 0 Y 32768 0 63 def test t1 t1 e e 8 20 0 Y 32768 0 63 def test t1 t1 f f 4 3 0 Y 32768 2 63 def test t1 t1 g g 5 4 0 Y 32768 3 63 -def test t1 t1 h h 0 7 0 Y 32768 4 63 +def test t1 t1 h h 246 7 0 Y 0 4 63 def test t1 t1 i i 13 4 0 Y 32864 0 63 def test t1 t1 j j 10 10 0 Y 128 0 63 def test t1 t1 k k 7 19 0 N 1249 0 63 diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index 72288d1027b..e4528450b31 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -6,12 +6,12 @@ begin; insert into t1 values(1); insert into t2 select * from t1; commit; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(1) -master-bin.000001 178 Query 1 79 use `test`; insert into t2 select * from t1 -master-bin.000001 244 Query 1 244 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1) +master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Xid 1 # COMMIT /* xid=8 */ delete from t1; delete from t2; reset master; @@ -21,12 +21,12 @@ insert into t2 select * from t1; rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(2) -master-bin.000001 178 Query 1 79 use `test`; insert into t2 select * from t1 -master-bin.000001 244 Query 1 244 use `test`; ROLLBACK +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(2) +master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -39,15 +39,15 @@ rollback to savepoint my_savepoint; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back commit; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(3) -master-bin.000001 178 Query 1 79 use `test`; savepoint my_savepoint -master-bin.000001 235 Query 1 79 use `test`; insert into t1 values(4) -master-bin.000001 294 Query 1 79 use `test`; insert into t2 select * from t1 -master-bin.000001 360 Query 1 79 use `test`; rollback to savepoint my_savepoint -master-bin.000001 429 Query 1 429 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(3) +master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) +master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 616 Xid 1 # COMMIT /* xid=25 */ delete from t1; delete from t2; reset master; @@ -65,16 +65,16 @@ select a from t1 order by a; a 5 7 -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(5) -master-bin.000001 178 Query 1 79 use `test`; savepoint my_savepoint -master-bin.000001 235 Query 1 79 use `test`; insert into t1 values(6) -master-bin.000001 294 Query 1 79 use `test`; insert into t2 select * from t1 -master-bin.000001 360 Query 1 79 use `test`; rollback to savepoint my_savepoint -master-bin.000001 429 Query 1 79 use `test`; insert into t1 values(7) -master-bin.000001 488 Query 1 488 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(5) +master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) +master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7) +master-bin.000001 703 Xid 1 # COMMIT /* xid=37 */ delete from t1; delete from t2; reset master; @@ -87,40 +87,43 @@ insert into t2 select * from t1; select get_lock("a",10); get_lock("a",10) 1 -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(8) -master-bin.000001 178 Query 1 79 use `test`; insert into t2 select * from t1 -master-bin.000001 244 Query 1 244 use `test`; ROLLBACK +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(8) +master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; insert into t1 values(9); insert into t2 select * from t1; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; insert into t1 values(9) -master-bin.000001 138 Query 1 138 use `test`; insert into t2 select * from t1 +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9) +master-bin.000001 185 Xid 1 # COMMIT /* xid=60 */ +master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; reset master; insert into t1 values(10); begin; insert into t2 select * from t1; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; insert into t1 values(10) -master-bin.000001 139 Query 1 139 use `test`; insert into t2 select * from t1 +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) +master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */ +master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; insert into t1 values(10) -master-bin.000001 139 Query 1 139 use `test`; insert into t2 select * from t1 -master-bin.000001 205 Query 1 205 use `test`; BEGIN -master-bin.000001 245 Query 1 205 use `test`; insert into t1 values(11) -master-bin.000001 305 Query 1 305 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) +master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */ +master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 307 Query 1 # use `test`; BEGIN +master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11) +master-bin.000001 463 Xid 1 # COMMIT /* xid=68 */ alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -129,12 +132,12 @@ begin; insert into t1 values(12); insert into t2 select * from t1; commit; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(12) -master-bin.000001 179 Query 1 79 use `test`; insert into t2 select * from t1 -master-bin.000001 245 Query 1 245 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12) +master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 348 Xid 1 # COMMIT /* xid=78 */ delete from t1; delete from t2; reset master; @@ -142,8 +145,8 @@ begin; insert into t1 values(13); insert into t2 select * from t1; rollback; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info delete from t1; delete from t2; reset master; @@ -154,11 +157,11 @@ insert into t1 values(15); insert into t2 select * from t1; rollback to savepoint my_savepoint; commit; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(14) -master-bin.000001 179 Query 1 179 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14) +master-bin.000001 254 Xid 1 # COMMIT /* xid=94 */ delete from t1; delete from t2; reset master; @@ -174,12 +177,12 @@ select a from t1 order by a; a 16 18 -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; BEGIN -master-bin.000001 119 Query 1 79 use `test`; insert into t1 values(16) -master-bin.000001 179 Query 1 79 use `test`; insert into t1 values(18) -master-bin.000001 239 Query 1 239 use `test`; COMMIT +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 # use `test`; BEGIN +master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) +master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) +master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */ delete from t1; delete from t2; alter table t2 type=MyISAM; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index dba10296063..ea02a703c65 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -1,5 +1,6 @@ drop table if exists t1,t2,t3; drop database if exists mysqltest; +drop view if exists v1; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; @@ -134,16 +135,16 @@ create table t1 (n numeric(10)); create table t2 (n numeric(10)); insert into t2 values (1),(2),(4),(8),(16),(32); select * from t2 left outer join t1 using (n); -n n -1 NULL -2 NULL -4 NULL -8 NULL -16 NULL -32 NULL +n +1 +2 +4 +8 +16 +32 delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); -n n +n drop table t1,t2 ; create table t1 (n int(10) not null primary key, d int(10)); create table t2 (n int(10) not null primary key, d int(10)); @@ -475,3 +476,46 @@ aclid bigint, index idx_acl(aclid) insert into t2 values(1,null); delete t2, t1 from t2 left join t1 on (t2.aclid=t1.aclid) where t2.refid='1'; drop table t1, t2; +create table t1 ( c char(8) not null ) engine=innodb; +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); +alter table t1 add b char(8) not null; +alter table t1 add a char(8) not null; +alter table t1 add primary key (a,b,c); +update t1 set a=c, b=c; +create table t2 like t1; +insert into t2 select * from t1; +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; +drop table t1,t2; +create table t1 ( c char(8) not null ) engine=bdb; +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'); +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F'); +alter table t1 add b char(8) not null; +alter table t1 add a char(8) not null; +alter table t1 add primary key (a,b,c); +update t1 set a=c, b=c; +create table t2 like t1; +insert into t2 select * from t1; +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; +drop table t1,t2; +create table t1 (a int, b int); +insert into t1 values (1, 2), (2, 3), (3, 4); +create table t2 (a int); +insert into t2 values (10), (20), (30); +create view v1 as select a as b, a/10 as a from t2; +lock table t1 write; + alter table t1 add column c int default 100 after a; + update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a; +unlock tables; +select * from t1; +a c b +1 100 13 +2 100 25 +3 100 37 +select * from t2; +a +10 +20 +30 +drop view v1; +drop table t1, t2; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 38273c01a98..71cb76fe844 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -408,8 +408,8 @@ Table Op Msg_type Msg_text test.t1 repair status OK select concat(a,'.') from t1 where a='aaa'; concat(a,'.') -aaa. aaa . +aaa. select concat(a,'.') from t1 where binary a='aaa'; concat(a,'.') aaa. @@ -461,20 +461,27 @@ concat(a,'.') a . drop table t1; create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))); -insert into t1 (b) values ('a'),('a '),('a '); +insert into t1 (b) values ('a'),('b'),('c'); select concat(b,'.') from t1; concat(b,'.') a. -a . -a . +b. +c. update t1 set b='b ' where a=2; update t1 set b='b ' where a > 1; ERROR 23000: Duplicate entry 'b ' for key 2 +insert into t1 (b) values ('b'); +ERROR 23000: Duplicate entry 'b' for key 2 +select * from t1; +a b +1 a +2 b +3 c delete from t1 where b='b'; select a,concat(b,'.') from t1; a concat(b,'.') 1 a. -3 a . +3 c. drop table t1; create table t1 (a int not null); create table t2 (a int not null, primary key (a)); @@ -506,19 +513,25 @@ insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, ""); insert t2 select * from t1; checksum table t1, t2, t3 quick; Table Checksum -test.t1 968604391 +test.t1 2948697075 test.t2 NULL test.t3 NULL +Warnings: +Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3; Table Checksum -test.t1 968604391 -test.t2 968604391 +test.t1 2948697075 +test.t2 3092701434 test.t3 NULL +Warnings: +Error 1146 Table 'test.t3' doesn't exist checksum table t1, t2, t3 extended; Table Checksum -test.t1 968604391 -test.t2 968604391 +test.t1 3092701434 +test.t2 3092701434 test.t3 NULL +Warnings: +Error 1146 Table 'test.t3' doesn't exist drop table t1,t2; create table t1 (a int, key (a)); show keys from t1; @@ -581,6 +594,672 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +set storage_engine=MyISAM; +drop table if exists t1,t2,t3; +--- Testing varchar --- +--- Testing varchar --- +create table t1 (v varchar(10), c char(10), t text); +insert into t1 values('+ ', '+ ', '+ '); +set @a=repeat(' ',20); +insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a)); +Warnings: +Note 1265 Data truncated for column 'v' at row 1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+ *+*+ * +*+ *+*+ * +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table t3 select * from t1; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify c varchar(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` varchar(10) default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify v char(10); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify t varchar(10); +Warnings: +Note 1265 Data truncated for column 't' at row 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) default NULL, + `c` varchar(10) default NULL, + `t` varchar(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select concat('*',v,'*',c,'*',t,'*') from t1; +concat('*',v,'*',c,'*',t,'*') +*+*+*+ * +*+*+*+ * +drop table t1,t2,t3; +create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `v` (`v`), + KEY `c` (`c`), + KEY `t` (`t`(10)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1; +count(*) +270 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1))); +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where c='a'; +count(*) +10 +select count(*) from t1 where t='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where c='a '; +count(*) +10 +select count(*) from t1 where t='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where c like 'a%'; +count(*) +11 +select count(*) from t1 where t like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const # Using where; Using index +explain select count(*) from t1 where c='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref c c 11 const # Using where; Using index +explain select count(*) from t1 where t='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range t t 13 NULL # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL # Using where; Using index +alter table t1 add unique(v); +ERROR 23000: Duplicate entry '{ ' for key 1 +alter table t1 add key(v); +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; +qq +*a*a*a* +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +*a *a*a * +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v,v_2 # 13 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(c) from t1 group by v limit 10; +v count(c) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(*) from t1 group by c limit 10; +c count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result c,count(t) from t1 group by c limit 10; +c count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(*) from t1 group by t limit 10; +t count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result t,count(t) from t1 group by t limit 10; +t count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where; Using index +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 303 NULL # Using where; Using index +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 303 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 drop key v, add key v (v(30)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(300) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`(30)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select count(*) from t1 where v='a'; +count(*) +10 +select count(*) from t1 where v='a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a '; +count(*) +10 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +count(*) +10 +select count(*) from t1 where v like 'a%'; +count(*) +11 +select count(*) from t1 where v like 'a %'; +count(*) +9 +explain select count(*) from t1 where v='a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +explain select count(*) from t1 where v like 'a%'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a '; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 33 NULL # Using where +explain select * from t1 where v='a'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 33 const # Using where +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +alter table t1 modify v varchar(600), drop key v, add key v (v); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(600) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `c` (`c`), + KEY `t` (`t`(10)), + KEY `v` (`v`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select v,count(*) from t1 group by v limit 10; +v count(*) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +select sql_big_result v,count(t) from t1 group by v limit 10; +v count(t) +a 1 +a 10 +b 10 +c 10 +d 10 +e 10 +f 10 +g 10 +h 10 +i 10 +drop table t1; +create table t1 (a char(10), unique (a)); +insert into t1 values ('a '); +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a' for key 1 +alter table t1 modify a varchar(10); +insert into t1 values ('a '),('a '),('a '),('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +insert into t1 values ('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +update t1 set a='a ' where a like 'a%'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='abc ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a %'; +select concat(a,'.') from t1; +concat(a,'.') +a . +update t1 set a='a ' where a like 'a '; +select concat(a,'.') from t1; +concat(a,'.') +a . +drop table t1; +create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5))); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL, + `t` text, + KEY `v` (`v`(5)), + KEY `c` (`c`(5)), + KEY `t` (`t`(5)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v char(10) character set utf8); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` char(10) character set utf8 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(10), c char(10)) row_format=fixed; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(10) default NULL, + `c` char(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED +insert into t1 values('a','a'),('a ','a '); +select concat('*',v,'*',c,'*') from t1; +concat('*',v,'*',c,'*') +*a*a* +*a *a* +drop table t1; +create table t1 (v varchar(65530), key(v(10))); +insert into t1 values(repeat('a',65530)); +select length(v) from t1 where v=repeat('a',65530); +length(v) +65530 +drop table t1; +create table t1(a int, b varchar(12), key ba(b, a)); +insert into t1 values (1, 'A'), (20, NULL); +explain select * from t1 where a=20 and b is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref ba ba 20 const,const 1 Using where; Using index +select * from t1 where a=20 and b is null; +a b +20 NULL +drop table t1; +create table t1 (v varchar(65530), key(v)); +Warnings: +Warning 1071 Specified key was too long; max key length is 1000 bytes +drop table if exists t1; +create table t1 (v varchar(65536)); +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65530) character set utf8); +Warnings: +Note 1246 Converting column 'v' from VARCHAR to TEXT +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` mediumtext character set utf8 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (v varchar(65535)); +ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs +set storage_engine=MyISAM; +create table t1 (a int) engine=myisam; +drop table if exists t1; +Warnings: +Error 2 Can't find file: 't1' (errno: 2) +create table t1 (a int) engine=myisam; +drop table t1; +Got one of the listed errors +create table t1 (a int) engine=myisam; +drop table t1; +Got one of the listed errors +drop table t1; +ERROR 42S02: Unknown table 't1' +set @save_concurrent_insert=@@concurrent_insert; +set global concurrent_insert=1; +create table t1 (a int); +insert into t1 values (1),(2),(3),(4),(5); +lock table t1 read local; +insert into t1 values(6),(7); +unlock tables; +delete from t1 where a>=3 and a<=4; +lock table t1 read local; +set global concurrent_insert=2; +insert into t1 values (8),(9); +unlock tables; +insert into t1 values (10),(11),(12); +select * from t1; +a +1 +2 +11 +10 +5 +6 +7 +8 +9 +12 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (a int, b varchar(30) default "hello"); +insert into t1 (a) values (1),(2),(3),(4),(5); +lock table t1 read local; +insert into t1 (a) values(6),(7); +unlock tables; +delete from t1 where a>=3 and a<=4; +lock table t1 read local; +set global concurrent_insert=2; +insert into t1 (a) values (8),(9); +unlock tables; +insert into t1 (a) values (10),(11),(12); +select a from t1; +a +1 +2 +11 +10 +5 +6 +7 +8 +9 +12 +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +set global concurrent_insert=@save_concurrent_insert; create table t1 (a int, key(a)); insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL); analyze table t1; diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result new file mode 100644 index 00000000000..dbb47152926 --- /dev/null +++ b/mysql-test/r/mysql.result @@ -0,0 +1,56 @@ +drop table if exists t1; +create table t1(a int); +insert into t1 values(1); + +Test default delimiter ; +a +1 + +Test delimiter without arg + +Test delimiter : +a +1 + +Test delimiter : +a +1 + +Test delimiter :; +a +1 + +Test delimiter // +a +1 + +Test delimiter MySQL +a +1 + +Test delimiter delimiter +a +1 + +Test delimiter : from command line +a +1 + +Test delimiter :; from command line +a +1 + +Test 'go' command(vertical output) G +*************************** 1. row *************************** +a: 1 + +Test 'go' command g +a +1 +drop table t1; +create table t1(a int); +lock tables t1 write; +database() +test +unlock tables; +drop table t1; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index e88ece6b361..8765e65f11b 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -9,14 +9,18 @@ load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; load data infile '../../std_data/words.dat' into table t1; -load data infile '../../std_data/words.dat' into table t1; insert into t1 values ("Alas"); flush logs; --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; drop table if exists t1,t2; SET TIMESTAMP=1000000000; create table t1 (word varchar(20)); @@ -27,32 +31,58 @@ insert into t1 values ("abirvalg"); SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-1-0' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-2-0' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-3-0' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-4-0' INTO table t1; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Broken LOAD DATA -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; use test; SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=1; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; use test; SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; drop table if exists t1,t2; SET TIMESTAMP=1000000000; create table t1 (word varchar(20)); @@ -63,25 +93,67 @@ insert into t1 values ("abirvalg"); SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); -LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-1-2' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-2-2' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-3-2' INTO table t1; +SET TIMESTAMP=1000000000; +load data LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/SQL_LOAD_MB-4-2' INTO table t1; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Broken LOAD DATA -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; use test; SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=1; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- --position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; use test; SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; + +--- reading stdin -- +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; +use test; +SET TIMESTAMP=1108844556; +BEGIN; +SET TIMESTAMP=1108844555; +insert t1 values (1); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +use test; +SET TIMESTAMP=1108844556; +BEGIN; +SET TIMESTAMP=1108844555; +insert t1 values (1); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; drop table t1, t2; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index 3c1b85e05a1..9899fa54301 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -16,8 +16,13 @@ insert into t1 values(null, "f"); --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -34,12 +39,19 @@ insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -53,20 +65,34 @@ insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -77,13 +103,19 @@ insert into t1 values(null, "b"); SET INSERT_ID=3; SET TIMESTAMP=1579609944; insert into t1 values(null, "c"); -SET INSERT_ID=4; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -91,11 +123,18 @@ insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -103,11 +142,18 @@ insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; insert into t1 values(null, "b"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Local with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -127,13 +173,23 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -150,12 +206,22 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; @@ -163,12 +229,22 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -186,12 +262,19 @@ SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); SET INSERT_ID=6; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -202,12 +285,22 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -215,11 +308,18 @@ insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; insert into t1 values(null, "b"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -236,12 +336,19 @@ insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -255,20 +362,34 @@ insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -279,13 +400,19 @@ insert into t1 values(null, "b"); SET INSERT_ID=3; SET TIMESTAMP=1579609944; insert into t1 values(null, "c"); -SET INSERT_ID=4; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -293,11 +420,18 @@ insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -305,11 +439,18 @@ insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; insert into t1 values(null, "b"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- Remote with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -329,13 +470,23 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -352,12 +503,22 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; @@ -365,12 +526,22 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -388,12 +559,19 @@ SET INSERT_ID=5; SET TIMESTAMP=1579609946; insert into t1 values(null, "e"); SET INSERT_ID=6; +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -404,12 +582,22 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; use test; SET TIMESTAMP=1579609943; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -417,11 +605,18 @@ insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; insert into t1 values(null, "b"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- to-last-log -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; use test; SET TIMESTAMP=1579609942; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -441,6 +636,8 @@ insert into t1 values(null, "e"); SET INSERT_ID=6; SET TIMESTAMP=1579609943; insert into t1 values(null, "f"); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; --- end of test -- drop table t1; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index cb2e8e5528a..917724580cf 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1,4 +1,6 @@ -DROP TABLE IF EXISTS t1, `"t"1`; +DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa; +drop database if exists mysqldump_test_db; +drop view if exists v1, v2, v3; CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); <?xml version="1.0"?> @@ -18,16 +20,18 @@ INSERT INTO t1 VALUES (1), (2); </database> </mysqldump> DROP TABLE t1; -CREATE TABLE t1 (a decimal(240, 20)); +CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); CREATE TABLE `t1` ( - `a` decimal(240,20) default NULL + `a` decimal(64,20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000'); +INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000'); DROP TABLE t1; CREATE TABLE t1 (a double); -INSERT INTO t1 VALUES (-9e999999); +INSERT INTO t1 VALUES ('-9e999999'); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 CREATE TABLE `t1` ( `a` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -108,7 +112,7 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES"); <table_structure name="t1"> <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" /> <field Field="b" Type="text" Null="YES" Key="" Extra="" /> - <field Field="c" Type="char(3)" Null="YES" Key="" Extra="" /> + <field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" /> </table_structure> <table_data name="t1"> <row> @@ -560,9 +564,9 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; DROP TABLE t1; -CREATE TABLE t1 (a decimal(240, 20)); -INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), -("0987654321098765432109876543210987654321"); +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t1 VALUES (4),(5),(6); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -574,13 +578,13 @@ INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` decimal(240,20) default NULL + `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; LOCK TABLES `t1` WRITE; -INSERT IGNORE INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000'); +INSERT IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6); UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; @@ -603,12 +607,14 @@ UNLOCK TABLES; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( - `a` decimal(240,20) default NULL + `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; -INSERT DELAYED IGNORE INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000'); +LOCK TABLES `t1` WRITE; +INSERT IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6); +UNLOCK TABLES; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -1407,6 +1413,28 @@ CREATE TABLE `t2` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +<?xml version="1.0"?> +<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<database name="mysqldump_test_db"> + <table_structure name="t1"> + <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" /> + </table_structure> + <table_structure name="t2"> + <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" /> + </table_structure> +</database> +</mysqldump> +<?xml version="1.0"?> +<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<database name="mysqldump_test_db"> + <table_structure name="t1"> + <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" /> + </table_structure> + <table_structure name="t2"> + <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" /> + </table_structure> +</database> +</mysqldump> DROP TABLE t1, t2; DROP DATABASE mysqldump_test_db; create database mysqldump_test_db; @@ -1493,3 +1521,357 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir </database> </mysqldump> drop table t1, t2; +create table t1(a int); +create view v1 as select * from t1; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +LOCK TABLES `t1` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +DROP TABLE IF EXISTS `v1`; +/*!50001 DROP VIEW IF EXISTS `v1`*/; +/*!50001 CREATE TABLE `v1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1*/; +/*!50001 DROP TABLE IF EXISTS `v1`*/; +/*!50001 DROP VIEW IF EXISTS `v1`*/; +/*!50001 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1`*/; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +drop view v1; +drop table t1; +create database mysqldump_test_db; +use mysqldump_test_db; +CREATE TABLE t2 ( +a varchar(30) default NULL, +KEY a (a(5)) +); +INSERT INTO t2 VALUES ('alfred'); +INSERT INTO t2 VALUES ('angie'); +INSERT INTO t2 VALUES ('bingo'); +INSERT INTO t2 VALUES ('waffle'); +INSERT INTO t2 VALUES ('lemon'); +create view v2 as select * from t2 where a like 'a%' with check option; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t2`; +CREATE TABLE `t2` ( + `a` varchar(30) default NULL, + KEY `a` (`a`(5)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +LOCK TABLES `t2` WRITE; +INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon'); +UNLOCK TABLES; +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; +DROP TABLE IF EXISTS `v2`; +/*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 CREATE TABLE `v2` ( + `a` varchar(30) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1*/; +/*!50001 DROP TABLE IF EXISTS `v2`*/; +/*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 CREATE ALGORITHM=UNDEFINED VIEW `mysqldump_test_db`.`v2` AS select `mysqldump_test_db`.`t2`.`a` AS `a` from `mysqldump_test_db`.`t2` where (`mysqldump_test_db`.`t2`.`a` like _latin1'a%') WITH CASCADED CHECK OPTION*/; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +drop table t2; +drop view v2; +drop database mysqldump_test_db; +use test; +CREATE TABLE t1 (a char(10)); +INSERT INTO t1 VALUES ('\''); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` char(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES ('\''); +UNLOCK TABLES; +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE t1; +create table t1(a int, b int, c varchar(30)); +insert into t1 values(1, 2, "one"), (2, 4, "two"), (3, 6, "three"); +create view v3 as +select * from t1; +create view v1 as +select * from v3 where b in (1, 2, 3, 4, 5, 6, 7); +create view v2 as +select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; +drop view v1, v2, v3; +drop table t1; +show full tables; +Tables_in_test Table_type +t1 BASE TABLE +v1 VIEW +v2 VIEW +v3 VIEW +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `v3`.`a` AS `a`,`v3`.`b` AS `b`,`v3`.`c` AS `c` from `test`.`v3` where (`v3`.`b` in (1,2,3,4,5,6,7)) +select * from v1; +a b c +1 2 one +2 4 two +3 6 three +drop view v1, v2, v3; +drop table t1; +CREATE TABLE t1 (a int, b bigint default NULL); +CREATE TABLE t2 (a int); +create trigger trg1 before insert on t1 for each row +begin +if new.a > 10 then +set new.a := 10; +set new.a := 11; +end if; +end| +create trigger trg2 before update on t1 for each row begin +if old.a % 2 = 0 then set new.b := 12; end if; +end| +set sql_mode="traditional"| +create trigger trg3 after update on t1 for each row +begin +if new.a = -1 then +set @fired:= "Yes"; +end if; +end| +create trigger trg4 before insert on t2 for each row +begin +if new.a > 10 then +set @fired:= "No"; +end if; +end| +set sql_mode=default| +show triggers like "t1"; +Trigger Event Table Statement Timing Created sql_mode +trg1 INSERT t1 +begin +if new.a > 10 then +set new.a := 10; +set new.a := 11; +end if; +end BEFORE 0000-00-00 00:00:00 +trg2 UPDATE t1 begin +if old.a % 2 = 0 then set new.b := 12; end if; +end BEFORE 0000-00-00 00:00:00 +trg3 UPDATE t1 +begin +if new.a = -1 then +set @fired:= "Yes"; +end if; +end AFTER 0000-00-00 00:00:00 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER +INSERT INTO t1 (a) VALUES (1),(2),(3),(22); +update t1 set a = 4 where a=3; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `test`; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) default NULL, + `b` bigint(20) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/; +DELIMITER //; +/*!50003 SET SESSION SQL_MODE=""*/ // +/*!50003 CREATE TRIGGER `trg1` BEFORE INSERT ON `t1` FOR EACH ROW +begin +if new.a > 10 then +set new.a := 10; +set new.a := 11; +end if; +end*/ // + +/*!50003 SET SESSION SQL_MODE=""*/ // +/*!50003 CREATE TRIGGER `trg2` BEFORE UPDATE ON `t1` FOR EACH ROW begin +if old.a % 2 = 0 then set new.b := 12; end if; +end*/ // + +/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER"*/ // +/*!50003 CREATE TRIGGER `trg3` AFTER UPDATE ON `t1` FOR EACH ROW +begin +if new.a = -1 then +set @fired:= "Yes"; +end if; +end*/ // + +DELIMITER ;// +/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/; + +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES (1,NULL),(2,NULL),(4,NULL),(11,NULL); +UNLOCK TABLES; +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +DROP TABLE IF EXISTS `t2`; +CREATE TABLE `t2` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/; +DELIMITER //; +/*!50003 SET SESSION SQL_MODE="STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER"*/ // +/*!50003 CREATE TRIGGER `trg4` BEFORE INSERT ON `t2` FOR EACH ROW +begin +if new.a > 10 then +set @fired:= "No"; +end if; +end*/ // + +DELIMITER ;// +/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/; + +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +LOCK TABLES `t2` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `test`; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) default NULL, + `b` bigint(20) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +LOCK TABLES `t1` WRITE; +INSERT INTO `t1` VALUES (1,NULL),(2,NULL),(4,NULL),(11,NULL); +UNLOCK TABLES; +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +DROP TABLE IF EXISTS `t2`; +CREATE TABLE `t2` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + + +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +LOCK TABLES `t2` WRITE; +UNLOCK TABLES; +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +drop table t1; +show tables; +Tables_in_test +t1 +t2 +show triggers; +Trigger Event Table Statement Timing Created sql_mode +trg1 INSERT t1 +begin +if new.a > 10 then +set new.a := 10; +set new.a := 11; +end if; +end BEFORE # +trg2 UPDATE t1 begin +if old.a % 2 = 0 then set new.b := 12; end if; +end BEFORE # +trg3 UPDATE t1 +begin +if new.a = -1 then +set @fired:= "Yes"; +end if; +end AFTER # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER +trg4 INSERT t2 +begin +if new.a > 10 then +set @fired:= "No"; +end if; +end BEFORE # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER +DROP TABLE t1, t2; diff --git a/mysql-test/r/mysqlshow.result b/mysql-test/r/mysqlshow.result new file mode 100644 index 00000000000..a04a7081b34 --- /dev/null +++ b/mysql-test/r/mysqlshow.result @@ -0,0 +1,76 @@ +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1),(2),(3); +CREATE TABLE t2 (a int, b int); +show tables; +Tables_in_test +t1 +t2 +select "--------------------" as ""; + +-------------------- +Database: test ++--------+ +| Tables | ++--------+ +| t1 | +| t2 | ++--------+ +select "---- -v ------------" as ""; + +---- -v ------------ +Database: test ++--------+----------+ +| Tables | Columns | ++--------+----------+ +| t1 | 1 | +| t2 | 2 | ++--------+----------+ +2 rows in set. + +select "---- -v -v ---------" as ""; + +---- -v -v --------- +Database: test ++--------+----------+------------+ +| Tables | Columns | Total Rows | ++--------+----------+------------+ +| t1 | 1 | 3 | +| t2 | 2 | 0 | ++--------+----------+------------+ +2 rows in set. + +select "----- -t -----------" as ""; + +----- -t ----------- +Database: test ++--------+------------+ +| Tables | table_type | ++--------+------------+ +| t1 | BASE TABLE | +| t2 | BASE TABLE | ++--------+------------+ +select "---- -v -t ---------" as ""; + +---- -v -t --------- +Database: test ++--------+------------+----------+ +| Tables | table_type | Columns | ++--------+------------+----------+ +| t1 | BASE TABLE | 1 | +| t2 | BASE TABLE | 2 | ++--------+------------+----------+ +2 rows in set. + +select "---- -v -v -t ------" as ""; + +---- -v -v -t ------ +Database: test ++--------+------------+----------+------------+ +| Tables | table_type | Columns | Total Rows | ++--------+------------+----------+------------+ +| t1 | BASE TABLE | 1 | 3 | +| t2 | BASE TABLE | 2 | 0 | ++--------+------------+----------+------------+ +2 rows in set. + +DROP TABLE t1, t2; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index d75dbd5d00c..256576704b5 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -142,3 +142,27 @@ after_--enable_abort_on_error 1064 select 3 from t1 ; ERROR 42S02: Table 'test.t1' doesn't exist +select 1 as `a'b`, 2 as `a"b`; +a'b a"b +1 2 +select 'aaa\\','aa''a',"aa""a"; +aaa\ aa'a aa"a +aaa\ aa'a aa"a + +Here comes a message +-------------------- + +root@localhost +-------------- + +"Here comes a very very long message that + - is longer then 80 characters and + - consists of several lines" +-------------------------------------------------------------------------------- + +. Here comes a very very long message that +. - is longer then 80 characters and +. - consists of several lines +-------------------------------------------------------------------------------- +this will be executed +this will be executed diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result index 63afc07718f..ed49e7f3943 100644 --- a/mysql-test/r/ndb_alter_table.result +++ b/mysql-test/r/ndb_alter_table.result @@ -34,13 +34,13 @@ col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, col6 int not null, to_be_deleted int) ENGINE=ndbcluster; show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 9 Dynamic 0 0 0 NULL 0 0 1 NULL NULL NULL latin1_swedish_ci NULL +t1 ndbcluster 10 Dynamic 0 0 # # 0 # 1 # # # latin1_swedish_ci NULL # SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; insert into t1 values (0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 9 Dynamic 9 0 0 NULL 0 0 102 NULL NULL NULL latin1_swedish_ci NULL +t1 ndbcluster 10 Dynamic 9 96 # # 0 # 102 # # # latin1_swedish_ci NULL # select * from t1 order by col1; col1 col2 col3 col4 col5 col6 to_be_deleted 0 4 3 5 PENDING 1 7 @@ -60,7 +60,7 @@ change column col2 fourth varchar(30) not null after col3, modify column col6 int not null first; show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 9 Dynamic 9 0 0 NULL 0 0 102 NULL NULL NULL latin1_swedish_ci NULL +t1 ndbcluster 10 Dynamic 9 152 # # 0 # 102 # # # latin1_swedish_ci NULL # select * from t1 order by col1; col6 col1 col3 fourth col4 col4_5 col5 col7 col8 1 0 3 4 5 PENDING 0000-00-00 00:00:00 @@ -75,7 +75,7 @@ col6 col1 col3 fourth col4 col4_5 col5 col7 col8 insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 ndbcluster 9 Dynamic 10 0 0 NULL 0 0 103 NULL NULL NULL latin1_swedish_ci NULL +t1 ndbcluster 10 Dynamic 10 152 # # 0 # 103 # # # latin1_swedish_ci NULL # select * from t1 order by col1; col6 col1 col3 fourth col4 col4_5 col5 col7 col8 1 0 3 4 5 PENDING 0000-00-00 00:00:00 diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result index 5a1a82832fa..0f17160ea99 100644 --- a/mysql-test/r/ndb_autodiscover.result +++ b/mysql-test/r/ndb_autodiscover.result @@ -105,7 +105,7 @@ Handler_discover 0 SHOW CREATE TABLE t3; Table Create Table t3 CREATE TABLE `t3` ( - `id` int(11) NOT NULL default '0', + `id` int(11) NOT NULL, `name` char(255) default NULL, PRIMARY KEY (`id`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 @@ -144,8 +144,8 @@ Handler_discover 1 flush tables; show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t6 MyISAM 9 Fixed 1 260 # # # 0 NULL # # NULL # NULL -t7 ndbcluster 9 Fixed 1 0 # # # 0 NULL # # NULL # NULL +t6 MyISAM 10 Fixed 1 260 # # # 0 NULL # # NULL # NULL # +t7 ndbcluster 10 Fixed 1 276 # # # 0 NULL # # NULL # NULL # show status like 'handler_discover%'; Variable_name Value Handler_discover 2 @@ -167,6 +167,25 @@ show status like 'handler_discover%'; Variable_name Value Handler_discover 0 drop table t4; +ERROR 42S02: Unknown table 't4' +create table t4( +id int not null primary key, +name char(27) +) engine=ndb; +insert into t4 values (1, "Automatic"); +select * from t4; +id name +1 Automatic +select * from t4; +ERROR 42S02: Table 'test.t4' doesn't exist +drop table if exists t4; +Warnings: +Error 155 Table 'test.t4' doesn't exist +drop table t5; +ERROR 42S02: Unknown table 't5' +drop table if exists t5; +Warnings: +Note 1051 Unknown table 't5' flush status; create table t4( id int not null primary key, @@ -353,11 +372,17 @@ drop table t1; use test2; drop table t2; drop database test2; -show databases; -Database -mysql -test use test; +drop database if exists test_only_ndb_tables; +create database test_only_ndb_tables; +use test_only_ndb_tables; +create table t1 (a int primary key) engine=ndb; +select * from t1; +a +select * from t1; +ERROR HY000: Can't lock file (errno: 4009) +use test; +drop database test_only_ndb_tables; CREATE TABLE t9 ( a int NOT NULL PRIMARY KEY, b int diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result index 3712fa2b5ca..a374f845933 100644 --- a/mysql-test/r/ndb_basic.result +++ b/mysql-test/r/ndb_basic.result @@ -577,7 +577,7 @@ create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a,b,c,d)) engine=ndb -max_rows=200000000; +max_rows=800000000; Warnings: Warning 1105 Ndb might have problems storing the max amount of rows specified insert into t1 values @@ -667,3 +667,9 @@ counter datavalue 57 newval 58 newval drop table t1; +create table atablewithareallylongandirritatingname (a int); +insert into atablewithareallylongandirritatingname values (2); +select * from atablewithareallylongandirritatingname; +a +2 +drop table atablewithareallylongandirritatingname; diff --git a/mysql-test/r/ndb_bitfield.result b/mysql-test/r/ndb_bitfield.result new file mode 100644 index 00000000000..66ec593e195 --- /dev/null +++ b/mysql-test/r/ndb_bitfield.result @@ -0,0 +1,152 @@ +drop table if exists t1; +create table t1 ( +pk1 int not null primary key, +b bit(64) +) engine=ndbcluster; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `pk1` int(11) NOT NULL, + `b` bit(64) default NULL, + PRIMARY KEY (`pk1`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +insert into t1 values +(0,b'1111111111111111111111111111111111111111111111111111111111111111'), +(1,b'1000000000000000000000000000000000000000000000000000000000000000'), +(2,b'0000000000000000000000000000000000000000000000000000000000000001'), +(3,b'1010101010101010101010101010101010101010101010101010101010101010'), +(4,b'0101010101010101010101010101010101010101010101010101010101010101'); +select hex(b) from t1 order by pk1; +hex(b) +FFFFFFFFFFFFFFFF +8000000000000000 +1 +AAAAAAAAAAAAAAAA +5555555555555555 +drop table t1; +create table t1 ( +pk1 int not null primary key, +b bit(9) +) engine=ndbcluster; +insert into t1 values +(0,b'000000000'), +(1,b'000000001'), +(2,b'000000010'), +(3,b'000000011'), +(4,b'000000100'); +select hex(b) from t1 order by pk1; +hex(b) +0 +1 +2 +3 +4 +update t1 set b = b + b'101010101'; +select hex(b) from t1 order by pk1; +hex(b) +155 +156 +157 +158 +159 +drop table t1; +create table t1 (a bit(7), b bit(9)) engine = ndbcluster; +insert into t1 values +(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), +(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), +(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), +(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), +(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), +(44, 307), (68, 454), (57, 135); +select a+0 from t1 order by a; +a+0 +0 +4 +5 +9 +23 +24 +28 +29 +30 +31 +34 +44 +49 +56 +57 +59 +60 +61 +68 +68 +75 +77 +78 +79 +87 +88 +94 +94 +104 +106 +108 +111 +116 +118 +119 +122 +123 +127 +select b+0 from t1 order by b; +b+0 +36 +42 +46 +67 +83 +118 +123 +133 +135 +152 +177 +178 +188 +202 +206 +245 +280 +307 +343 +345 +349 +351 +363 +368 +368 +379 +380 +390 +398 +399 +403 +411 +411 +438 +446 +454 +468 +499 +drop table t1; +create table t1 ( +pk1 bit(9) not null primary key, +b int +) engine=ndbcluster; +ERROR HY000: Can't create table './test/t1.frm' (errno: 739) +create table t1 ( +pk1 int not null primary key, +b bit(9), +key(b) +) engine=ndbcluster; +ERROR HY000: Can't create table './test/t1.frm' (errno: 743) diff --git a/mysql-test/r/ndb_blob.result b/mysql-test/r/ndb_blob.result index 6f25ec95c80..f806cf08ea9 100644 --- a/mysql-test/r/ndb_blob.result +++ b/mysql-test/r/ndb_blob.result @@ -134,7 +134,7 @@ insert into t1 values(2,@b2,222,@d2); commit; explain select * from t1 where c = 111; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref c c 4 const 10 Using where +1 SIMPLE t1 ref c c 4 const 10 select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3) from t1 where c=111; a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3) diff --git a/mysql-test/r/ndb_cache.result b/mysql-test/r/ndb_cache.result index 714e1831267..478663b1aa1 100644 --- a/mysql-test/r/ndb_cache.result +++ b/mysql-test/r/ndb_cache.result @@ -1,43 +1,191 @@ +drop table if exists t1; +set GLOBAL query_cache_type=on; set GLOBAL query_cache_size=1355776; reset query cache; flush status; -drop table if exists t1,t2; -CREATE TABLE t1 (a int) ENGINE=ndbcluster; -CREATE TABLE t2 (a int); +CREATE TABLE t1 ( pk int not null primary key, +a int, b int not null, c varchar(20)) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); select * from t1; -a +pk a b c +1 2 3 First row show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 0 +Qcache_inserts 1 show status like "Qcache_hits"; Variable_name Value Qcache_hits 0 -select * from t2; -a +select * from t1; +pk a b c +1 2 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +update t1 set a=3 where pk=1; +select * from t1; +pk a b c +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +4 5 6 Fourth row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +4 5 6 Fourth row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +delete from t1 where c='Fourth row'; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +use test; +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 4 +update t1 set a=4 where b=3; +use test; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 1 +Qcache_inserts 7 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 0 -select * from t1; -a -select * from t2; -a +Qcache_hits 7 +begin; +update t1 set a=5 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 1 +Qcache_inserts 8 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 1 -drop table t1, t2; +Qcache_hits 7 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 8 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 8 +drop table t1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 SET GLOBAL query_cache_size=0; diff --git a/mysql-test/r/ndb_cache2.result b/mysql-test/r/ndb_cache2.result new file mode 100644 index 00000000000..2876002f864 --- /dev/null +++ b/mysql-test/r/ndb_cache2.result @@ -0,0 +1,623 @@ +drop table if exists t1, t2, t3, t4, t5; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=100; +reset query cache; +flush status; +CREATE TABLE t1 ( +pk int not null primary key, +a1 int, +b1 int not null, +c1 varchar(20) +) ENGINE=ndb; +CREATE TABLE t2 ( +pk int not null primary key, +a2 int, +b2 int not null +) ENGINE=ndb; +CREATE TABLE t3 ( +pk int not null primary key, +a3 int, +b3 int not null, +c3 int not null, +d3 varchar(20) +) ENGINE=ndb; +CREATE TABLE t4 ( +a4 int, +b4 int not null, +c4 char(20) +) ENGINE=ndbcluster; +CREATE TABLE t5 ( +pk int not null primary key, +a5 int, +b5 int not null, +c5 varchar(255) +) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); +insert into t2 value (1, 2, 3); +insert into t3 value (1, 2, 3, 4, '3 - First row'); +insert into t4 value (2, 3, '4 - First row'); +insert into t5 value (1, 2, 3, '5 - First row'); +select * from t1; +pk a1 b1 c1 +1 2 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +pk a1 b1 c1 +1 2 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +update t1 set a1=3 where pk=1; +select * from t1; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk desc; +pk a1 b1 c1 +4 5 6 Fourth row +2 7 8 Second row +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +4 5 6 Fourth row +2 7 8 Second row +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +delete from t1 where c1='Fourth row'; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +use test; +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 3 3 First row +select * from t1 where b1=3; +pk a1 b1 c1 +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 4 +update t1 set a1=4 where b1=3; +use test; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t2; +pk a2 b2 +1 2 3 +select * from t3; +pk a3 b3 c3 d3 +1 2 3 4 3 - First row +select * from t4; +a4 b4 c4 +2 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 2 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +flush status; +begin; +update t1 set a1=5 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +flush status; +begin; +update t1 set a1=6 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +flush status; +begin; +insert into t1 set pk=5, a1=6, b1=3, c1="New row"; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=5; +pk a1 b1 c1 +select * from t1 order by pk desc; +pk a1 b1 c1 +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=5; +pk a1 b1 c1 +5 6 3 New row +select * from t1 where pk=5; +pk a1 b1 c1 +5 6 3 New row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +flush status; +begin; +delete from t1 where pk=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 4 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=2; +pk a1 b1 c1 +2 7 8 Second row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +2 7 8 Second row +1 6 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 where pk=2; +pk a1 b1 c1 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t1 where pk=2; +pk a1 b1 c1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t1 where pk=2; +pk a1 b1 c1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 6 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 4 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +flush status; +begin; +update t1 set a1=9 where pk=1; +update t2 set a2=9 where pk=1; +update t3 set a3=9 where pk=1; +update t4 set a4=9 where a4=2; +update t5 set a5=9 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 6 3 First row +select * from t2; +pk a2 b2 +1 2 3 +select * from t3; +pk a3 b3 c3 d3 +1 2 3 4 3 - First row +select * from t4; +a4 b4 c4 +2 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 2 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 5 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 5 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 10 +select * from t1 order by pk desc; +pk a1 b1 c1 +5 6 3 New row +1 9 3 First row +select * from t2; +pk a2 b2 +1 9 3 +select * from t3; +pk a3 b3 c3 d3 +1 9 3 4 3 - First row +select * from t4; +a4 b4 c4 +9 3 4 - First row +select * from t5; +pk a5 b5 c5 +1 9 3 5 - First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 5 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 10 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 15 +drop table t1, t2, t3, t4, t5; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +SET GLOBAL query_cache_size=0; +SET GLOBAL ndb_cache_check_time=0; diff --git a/mysql-test/r/ndb_cache_multi.result b/mysql-test/r/ndb_cache_multi.result new file mode 100644 index 00000000000..c7135ed9e8a --- /dev/null +++ b/mysql-test/r/ndb_cache_multi.result @@ -0,0 +1,72 @@ +drop table if exists t1, t2; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +update t1 set a=3 where a=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop table t1, t2; diff --git a/mysql-test/r/ndb_cache_multi2.result b/mysql-test/r/ndb_cache_multi2.result new file mode 100644 index 00000000000..2863908a436 --- /dev/null +++ b/mysql-test/r/ndb_cache_multi2.result @@ -0,0 +1,82 @@ +drop table if exists t1, t2; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +update t1 set a=3 where a=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop table t1, t2; +set GLOBAL query_cache_size=0; +set GLOBAL ndb_cache_check_time=0; +reset query cache; +flush status; +set GLOBAL query_cache_size=0; +set GLOBAL ndb_cache_check_time=0; +reset query cache; +flush status; diff --git a/mysql-test/r/ndb_charset.result b/mysql-test/r/ndb_charset.result index 00bc36a7c0d..500b0497890 100644 --- a/mysql-test/r/ndb_charset.result +++ b/mysql-test/r/ndb_charset.result @@ -47,6 +47,40 @@ a aAa drop table t1; create table t1 ( +a varchar(20) character set latin1 collate latin1_swedish_ci primary key +) engine=ndb; +insert into t1 values ('A'),('b '),('C '),('d '),('E'),('f'); +insert into t1 values('b'); +ERROR 23000: Duplicate entry 'b' for key 1 +insert into t1 values('a '); +ERROR 23000: Duplicate entry 'a ' for key 1 +select a,length(a) from t1 order by a; +a length(a) +A 1 +b 2 +C 3 +d 7 +E 1 +f 1 +select a,length(a) from t1 order by a desc; +a length(a) +f 1 +E 1 +d 7 +C 3 +b 2 +A 1 +select * from t1 where a = 'a'; +a +A +select * from t1 where a = 'a '; +a +A +select * from t1 where a = 'd'; +a +d +drop table t1; +create table t1 ( p int primary key, a char(3) character set latin1 collate latin1_bin not null, unique key(a) @@ -99,6 +133,42 @@ p a drop table t1; create table t1 ( p int primary key, +a varchar(20) character set latin1 collate latin1_swedish_ci not null, +unique key(a) +) engine=ndb; +insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); +insert into t1 values(99,'b'); +ERROR 23000: Duplicate entry '99' for key 1 +insert into t1 values(99,'a '); +ERROR 23000: Duplicate entry '99' for key 1 +select a,length(a) from t1 order by a; +a length(a) +A 1 +b 2 +C 3 +d 7 +E 1 +f 1 +select a,length(a) from t1 order by a desc; +a length(a) +f 1 +E 1 +d 7 +C 3 +b 2 +A 1 +select * from t1 where a = 'a'; +p a +1 A +select * from t1 where a = 'a '; +p a +1 A +select * from t1 where a = 'd'; +p a +4 d +drop table t1; +create table t1 ( +p int primary key, a char(3) character set latin1 collate latin1_bin not null, index(a) ) engine=ndb; @@ -190,7 +260,52 @@ p a 6 AAA drop table t1; create table t1 ( -a varchar(10) primary key +p int primary key, +a varchar(20) character set latin1 collate latin1_swedish_ci not null, +index(a, p) +) engine=ndb; +insert into t1 values (1,'A'),(2,'b '),(3,'C '),(4,'d '),(5,'E'),(6,'f'); +insert into t1 values (7,'a'),(8,'B '),(9,'c '),(10,'D'),(11,'e'),(12,'F '); +select p,a,length(a) from t1 order by a, p; +p a length(a) +1 A 1 +7 a 1 +2 b 2 +8 B 2 +3 C 3 +9 c 3 +4 d 7 +10 D 1 +5 E 1 +11 e 1 +6 f 1 +12 F 3 +select * from t1 where a = 'a ' order by a desc, p desc; +p a +7 a +1 A +select * from t1 where a >= 'D' order by a, p; +p a +4 d +10 D +5 E +11 e +6 f +12 F +select * from t1 where a < 'D' order by a, p; +p a +1 A +7 a +2 b +8 B +3 C +9 c +select count(*) from t1 x, t1 y, t1 z where x.a = y.a and y.a = z.a; +count(*) +48 +drop table t1; +create table t1 ( +a char(10) primary key ) engine=ndb; insert into t1 values ('jonas % '); replace into t1 values ('jonas % '); diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result new file mode 100644 index 00000000000..1c3da1b486f --- /dev/null +++ b/mysql-test/r/ndb_condition_pushdown.result @@ -0,0 +1,1770 @@ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 ( +auto int(5) unsigned NOT NULL auto_increment, +string char(10), +vstring varchar(10), +bin binary(7), +vbin varbinary(7), +tiny tinyint(4) DEFAULT '0' NOT NULL , +short smallint(6) DEFAULT '1' NOT NULL , +medium mediumint(8) DEFAULT '0' NOT NULL, +long_int int(11) DEFAULT '0' NOT NULL, +longlong bigint(13) DEFAULT '0' NOT NULL, +real_float float(13,1) DEFAULT 0.0 NOT NULL, +real_double double(16,4), +real_decimal decimal(16,4), +utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, +ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, +umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, +ulong int(11) unsigned DEFAULT '0' NOT NULL, +ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +bits bit(3), +options enum('zero','one','two','three','four') not null, +flags set('zero','one','two','three','four') not null, +date_field date, +year_field year, +time_field time, +date_time datetime, +time_stamp timestamp, +PRIMARY KEY (auto) +) engine=ndb; +insert into t1 values +(NULL,"aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, +b'001','one','one', +'1901-01-01','1901', +'01:01:01','1901-01-01 01:01:01',NULL), +(NULL,"bbbb","bbbb",0xBBBB,0xBBBB,-2,-2,-2,-2,-2,2.2,2.2,2.2,2,2,2,2,2, +b'010','two','one,two', +'1902-02-02','1902', +'02:02:02','1902-02-02 02:02:02',NULL), +(NULL,"cccc","cccc",0xCCCC,0xCCCC,-3,-3,-3,-3,-3,3.3,3.3,3.3,3,3,3,3,3, +b'011','three','one,two,three', +'1903-03-03','1903', +'03:03:03','1903-03-03 03:03:03',NULL), +(NULL,"dddd","dddd",0xDDDD,0xDDDD,-4,-4,-4,-4,-4,4.4,4.4,4.4,4,4,4,4,4, +b'100','four','one,two,three,four', +'1904-04-04','1904', +'04:04:04','1904-04-04 04:04:04',NULL); +CREATE TABLE t2 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 int unsigned, attr3 VARCHAR(10) ) ENGINE=ndbcluster; +insert into t2 values (0,0,0, "a"),(1,1,1,"b"),(2,2,NULL,NULL),(3,3,3,"d"),(4,4,4,"e"),(5,5,5,"f"); +CREATE TABLE t3 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) ) ENGINE=ndbcluster; +insert into t3 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); +CREATE TABLE t4 (pk1 int unsigned NOT NULL PRIMARY KEY, attr1 int unsigned NOT NULL, attr2 bigint unsigned, attr3 tinyint unsigned, attr4 VARCHAR(10) , KEY (attr1)) ENGINE=ndbcluster; +insert into t4 values (0,0,0,0,"a"),(1,1,9223372036854775803,1,"b"),(2,2,9223372036854775804,2,"c"),(3,3,9223372036854775805,3,"d"),(4,4,9223372036854775806,4,"e"),(5,5,9223372036854775807,5,"f"); +set @old_ecpd = @@session.engine_condition_pushdown; +set engine_condition_pushdown = off; +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +bits = b'001' and +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +auto +1 +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +bits != b'001' and +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +bits > b'001' and +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +bits >= b'001' and +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +auto +1 +2 +3 +4 +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +bits < b'100' and +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 and +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +bits <= b'100' and +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +4 +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; +auto +2 +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; +auto +1 +3 +4 +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +(bits between b'001' and b'011') and +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +1 +3 +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +(b'001' between bits and bits) and +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; +auto +1 +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +(bits not between b'001' and b'011') and +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +4 +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +(b'001' not between bits and bits) and +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; +auto +2 +3 +4 +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +bits in(b'001',b'011') and +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +1 +3 +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in(short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +b'001' in(bits) and +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; +auto +1 +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +bits not in(b'001',b'011') and +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +2 +4 +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +b'001' not in(bits) and +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; +auto +2 +3 +4 +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +pk1 attr1 attr2 attr3 +2 2 NULL NULL +3 3 3 d +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +pk1 attr1 attr2 attr3 +3 3 3 d +4 4 4 e +5 5 5 f +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +5 5 9223372036854775807 5 f +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 +0 0 0 a 0 0 0 0 a +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c +3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d +4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e +set engine_condition_pushdown = on; +explain +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +auto +1 +explain +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +auto +1 +2 +3 +4 +explain +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +explain +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +4 +create index medium_index on t1(medium); +explain +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref medium_index medium_index 3 const 10 Using where with pushed condition; Using filesort +select auto from t1 where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01' +order by auto; +auto +1 +explain +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 20 Using where with pushed condition; Using filesort +select auto from t1 where +string != "aaaa" and +vstring != "aaaa" and +bin != 0xAAAA and +vbin != 0xAAAA and +tiny != -1 and +short != -1 and +medium != -1 and +long_int != -1 and +longlong != -1 and +(real_float < 1.0 or real_float > 2.0) and +(real_double < 1.0 or real_double > 2.0) and +(real_decimal < 1.0 or real_decimal > 2.0) and +utiny != 1 and +ushort != 1 and +umedium != 1 and +ulong != 1 and +ulonglong != 1 and +/* bits != b'001' and */ +options != 'one' and +flags != 'one' and +date_field != '1901-01-01' and +year_field != '1901' and +time_field != '01:01:01' and +date_time != '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 10 Using where with pushed condition; Using filesort +select auto from t1 where +string > "aaaa" and +vstring > "aaaa" and +bin > 0xAAAA and +vbin > 0xAAAA and +tiny < -1 and +short < -1 and +medium < -1 and +long_int < -1 and +longlong < -1 and +real_float > 1.1 and +real_double > 1.1 and +real_decimal > 1.1 and +utiny > 1 and +ushort > 1 and +umedium > 1 and +ulong > 1 and +ulonglong > 1 and +/* bits > b'001' and */ +(options = 'two' or options = 'three' or options = 'four') and +(flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field > '1901-01-01' and +year_field > '1901' and +time_field > '01:01:01' and +date_time > '1901-01-01 01:01:01' +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 10 Using where with pushed condition; Using filesort +select auto from t1 where +string >= "aaaa" and +vstring >= "aaaa" and +bin >= 0xAAAA and +vbin >= 0xAAAA and +tiny <= -1 and +short <= -1 and +medium <= -1 and +long_int <= -1 and +longlong <= -1 and +real_float >= 1.0 and +real_double >= 1.0 and +real_decimal >= 1.0 and +utiny >= 1 and +ushort >= 1 and +umedium >= 1 and +ulong >= 1 and +ulonglong >= 1 and +/* bits >= b'001' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field >= '1901-01-01' and +year_field >= '1901' and +time_field >= '01:01:01' and +date_time >= '1901-01-01 01:01:01' +order by auto; +auto +1 +2 +3 +4 +explain +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 10 Using where with pushed condition; Using filesort +select auto from t1 where +string < "dddd" and +vstring < "dddd" and +bin < 0xDDDD and +vbin < 0xDDDD and +tiny > -4 and +short > -4 and +medium > -4 and +long_int > -4 and +longlong > -4 and +real_float < 4.4 and +real_double < 4.4 and +real_decimal < 4.4 and +utiny < 4 and +ushort < 4 and +umedium < 4 and +ulong < 4 and +ulonglong < 4 and +/* bits < b'100' and */ +(options = 'one' or options = 'two' or options = 'three') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three') and +date_field < '1904-01-01' and +year_field < '1904' and +time_field < '04:04:04' and +date_time < '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +explain +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 10 Using where with pushed condition; Using filesort +select auto from t1 where +string <= "dddd" and +vstring <= "dddd" and +bin <= 0xDDDD and +vbin <= 0xDDDD and +tiny >= -4 and +short >= -4 and +medium >= -4 and +long_int >= -4 and +longlong >= -4 and +real_float <= 4.5 and +real_double <= 4.5 and +real_decimal <= 4.5 and +utiny <= 4 - 1 + 1 and /* Checking function composition */ +ushort <= 4 and +umedium <= 4 and +ulong <= 4 and +ulonglong <= 4 and +/* bits <= b'100' and */ +(options = 'one' or options = 'two' or options = 'three' or options = 'four') and +(flags = 'one' or flags = 'one,two' or flags = 'one,two,three' or flags = 'one,two,three,four') and +date_field <= '1904-04-04' and +year_field <= '1904' and +time_field <= '04:04:04' and +date_time <= '1904-04-04 04:04:04' +order by auto; +auto +1 +2 +3 +4 +explain +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string like "b%" and +vstring like "b%" and +bin like concat(0xBB, '%') and +vbin like concat(0xBB, '%') +order by auto; +auto +2 +explain +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +string not like "b%" and +vstring not like "b%" and +bin not like concat(0xBB, '%') and +vbin not like concat(0xBB, '%') +order by auto; +auto +1 +3 +4 +explain +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +/* (bits between b'001' and b'011') and */ +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 10 Using where with pushed condition; Using filesort +select auto from t1 where +(string between "aaaa" and "cccc") and +(vstring between "aaaa" and "cccc") and +(bin between 0xAAAA and 0xCCCC) and +(vbin between 0xAAAA and 0xCCCC) and +(tiny between -3 and -1) and +(short between -3 and -1) and +(medium between -3 and -1) and +(long_int between -3 and -1) and +(longlong between -3 and -1) and +(utiny between 1 and 3) and +(ushort between 1 and 3) and +(umedium between 1 and 3) and +(ulong between 1 and 3) and +(ulonglong between 1 and 3) and +/* (bits between b'001' and b'011') and */ +(options between 'one' and 'three') and +(flags between 'one' and 'one,two,three') and +(date_field between '1901-01-01' and '1903-03-03') and +(year_field between '1901' and '1903') and +(time_field between '01:01:01' and '03:03:03') and +(date_time between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +1 +3 +explain +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +/* (b'001' between bits and bits) and */ +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +("aaaa" between string and string) and +("aaaa" between vstring and vstring) and +(0xAAAA between bin and bin) and +(0xAAAA between vbin and vbin) and +(-1 between tiny and tiny) and +(-1 between short and short) and +(-1 between medium and medium) and +(-1 between long_int and long_int) and +(-1 between longlong and longlong) and +(1 between utiny and utiny) and +(1 between ushort and ushort) and +(1 between umedium and umedium) and +(1 between ulong and ulong) and +(1 between ulonglong and ulonglong) and +/* (b'001' between bits and bits) and */ +('one' between options and options) and +('one' between flags and flags) and +('1901-01-01' between date_field and date_field) and +('1901' between year_field and year_field) and +('01:01:01' between time_field and time_field) and +('1901-01-01 01:01:01' between date_time and date_time) +order by auto; +auto +1 +explain +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +/* (bits not between b'001' and b'011') and */ +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 20 Using where with pushed condition; Using filesort +select auto from t1 where +(string not between "aaaa" and "cccc") and +(vstring not between "aaaa" and "cccc") and +(bin not between 0xAAAA and 0xCCCC) and +(vbin not between 0xAAAA and 0xCCCC) and +(tiny not between -3 and -1) and +(short not between -3 and -1) and +(medium not between -3 and -1) and +(long_int not between -3 and -1) and +(longlong not between -3 and -1) and +(utiny not between 1 and 3) and +(ushort not between 1 and 3) and +(umedium not between 1 and 3) and +(ulong not between 1 and 3) and +(ulonglong not between 1 and 3) and +/* (bits not between b'001' and b'011') and */ +(options not between 'one' and 'three') and +(flags not between 'one' and 'one,two,three') and +(date_field not between '1901-01-01' and '1903-03-03') and +(year_field not between '1901' and '1903') and +(time_field not between '01:01:01' and '03:03:03') and +(date_time not between '1901-01-01 01:01:01' and '1903-03-03 03:03:03') +order by auto; +auto +4 +explain +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +/* (b'001' not between bits and bits) and */ +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +("aaaa" not between string and string) and +("aaaa" not between vstring and vstring) and +(0xAAAA not between bin and bin) and +(0xAAAA not between vbin and vbin) and +(-1 not between tiny and tiny) and +(-1 not between short and short) and +(-1 not between medium and medium) and +(-1 not between long_int and long_int) and +(-1 not between longlong and longlong) and +(1 not between utiny and utiny) and +(1 not between ushort and ushort) and +(1 not between umedium and umedium) and +(1 not between ulong and ulong) and +(1 not between ulonglong and ulonglong) and +/* (b'001' not between bits and bits) and */ +('one' not between options and options) and +('one' not between flags and flags) and +('1901-01-01' not between date_field and date_field) and +('1901' not between year_field and year_field) and +('01:01:01' not between time_field and time_field) and +('1901-01-01 01:01:01' not between date_time and date_time) +order by auto; +auto +2 +3 +4 +explain +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +/* bits in(b'001',b'011') and */ +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 20 Using where with pushed condition; Using filesort +select auto from t1 where +string in("aaaa","cccc") and +vstring in("aaaa","cccc") and +bin in(0xAAAA,0xCCCC) and +vbin in(0xAAAA,0xCCCC) and +tiny in(-1,-3) and +short in(-1,-3) and +medium in(-1,-3) and +long_int in(-1,-3) and +longlong in(-1,-3) and +utiny in(1,3) and +ushort in(1,3) and +umedium in(1,3) and +ulong in(1,3) and +ulonglong in(1,3) and +/* bits in(b'001',b'011') and */ +options in('one','three') and +flags in('one','one,two,three') and +date_field in('1901-01-01','1903-03-03') and +year_field in('1901','1903') and +time_field in('01:01:01','03:03:03') and +date_time in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +1 +3 +explain +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in (short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +/* b'001' in(bits) and */ +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref medium_index medium_index 3 const 10 Using where with pushed condition; Using filesort +select auto from t1 where +"aaaa" in(string) and +"aaaa" in(vstring) and +0xAAAA in(bin) and +0xAAAA in(vbin) and +(-1 in(tiny)) and +(-1 in (short)) and +(-1 in(medium)) and +(-1 in(long_int)) and +(-1 in(longlong)) and +1 in(utiny) and +1 in(ushort) and +1 in(umedium) and +1 in(ulong) and +1 in(ulonglong) and +/* b'001' in(bits) and */ +'one' in(options) and +'one' in(flags) and +'1901-01-01' in(date_field) and +'1901' in(year_field) and +'01:01:01' in(time_field) and +'1901-01-01 01:01:01' in(date_time) +order by auto; +auto +1 +explain +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +/* bits not in(b'001',b'011') and */ +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range medium_index medium_index 3 NULL 30 Using where with pushed condition; Using filesort +select auto from t1 where +string not in("aaaa","cccc") and +vstring not in("aaaa","cccc") and +bin not in(0xAAAA,0xCCCC) and +vbin not in(0xAAAA,0xCCCC) and +tiny not in(-1,-3) and +short not in(-1,-3) and +medium not in(-1,-3) and +long_int not in(-1,-3) and +longlong not in(-1,-3) and +utiny not in(1,3) and +ushort not in(1,3) and +umedium not in(1,3) and +ulong not in(1,3) and +ulonglong not in(1,3) and +/* bits not in(b'001',b'011') and */ +options not in('one','three') and +flags not in('one','one,two,three') and +date_field not in('1901-01-01','1903-03-03') and +year_field not in('1901','1903') and +time_field not in('01:01:01','03:03:03') and +date_time not in('1901-01-01 01:01:01','1903-03-03 03:03:03') +order by auto; +auto +2 +4 +explain +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +/* b'001' not in(bits) and */ +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where with pushed condition; Using filesort +select auto from t1 where +"aaaa" not in(string) and +"aaaa" not in(vstring) and +0xAAAA not in(bin) and +0xAAAA not in(vbin) and +(-1 not in(tiny)) and +(-1 not in(short)) and +(-1 not in(medium)) and +(-1 not in(long_int)) and +(-1 not in(longlong)) and +1 not in(utiny) and +1 not in(ushort) and +1 not in(umedium) and +1 not in(ulong) and +1 not in(ulonglong) and +/* b'001' not in(bits) and */ +'one' not in(options) and +'one' not in(flags) and +'1901-01-01' not in(date_field) and +'1901' not in(year_field) and +'01:01:01' not in(time_field) and +'1901-01-01 01:01:01' not in(date_time) +order by auto; +auto +2 +3 +4 +update t1 +set medium = 17 +where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = -1 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01'; +delete from t1 +where +string = "aaaa" and +vstring = "aaaa" and +bin = 0xAAAA and +vbin = 0xAAAA and +tiny = -1 and +short = -1 and +medium = 17 and +long_int = -1 and +longlong = -1 and +real_float > 1.0 and real_float < 2.0 and +real_double > 1.0 and real_double < 2.0 and +real_decimal > 1.0 and real_decimal < 2.0 and +utiny = 1 and +ushort = 1 and +umedium = 1 and +ulong = 1 and +ulonglong = 1 and +/* bits = b'001' and */ +options = 'one' and +flags = 'one' and +date_field = '1901-01-01' and +year_field = '1901' and +time_field = '01:01:01' and +date_time = '1901-01-01 01:01:01'; +select count(*) from t1; +count(*) +3 +explain +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 6 Using where with pushed condition; Using filesort +select * from t2 where attr3 is null or attr1 > 2 and pk1= 3 order by pk1; +pk1 attr1 attr2 attr3 +2 2 NULL NULL +3 3 3 d +explain +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where with pushed condition; Using filesort +select * from t2 where attr3 is not null and attr1 > 2 order by pk1; +pk1 attr1 attr2 attr3 +3 3 3 d +4 4 4 e +5 5 5 f +explain +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where with pushed condition; Using filesort +select * from t3 where attr2 > 9223372036854775803 and attr3 != 3 order by pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +5 5 9223372036854775807 5 f +explain +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where with pushed condition +select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; +pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 +0 0 0 a 0 0 0 0 a +explain +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 range attr1 attr1 4 NULL 10 Using where with pushed condition; Using filesort +select * from t4 where attr1 < 5 and attr2 > 9223372036854775803 and attr3 != 3 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c +4 4 9223372036854775806 4 e +explain +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 range attr1 attr1 4 NULL 10 Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using where +select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; +pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 +2 2 9223372036854775804 2 c 2 2 9223372036854775804 2 c +3 3 9223372036854775805 3 d 3 3 9223372036854775805 3 d +4 4 9223372036854775806 4 e 4 4 9223372036854775806 4 e +explain +select auto from t1 where string = "aaaa" collate latin1_general_ci order by auto; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where; Using filesort +explain +select * from t2 where (attr1 < 2) = (attr2 < 2) order by pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using filesort +explain +select * from t3 left join t4 on t4.attr2 = t3.attr2 where t4.attr1 > 1 and t4.attr3 < 5 or t4.attr1 is null order by t4.pk1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +1 SIMPLE t4 ALL NULL NULL NULL NULL 6 Using where +set engine_condition_pushdown = @old_ecpd; +DROP TABLE t1,t2,t3,t4; diff --git a/mysql-test/r/ndb_config.result b/mysql-test/r/ndb_config.result index f720b8e98df..c2557f85c0b 100644 --- a/mysql-test/r/ndb_config.result +++ b/mysql-test/r/ndb_config.result @@ -1,4 +1,4 @@ -ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3, mysqld,4, mysqld,5, mysqld,6, mysqld,7, +ndbd,1,localhost ndbd,2,localhost ndb_mgmd,3,localhost mysqld,4, mysqld,5, mysqld,6, mysqld,7, 1,localhost,41943040,12582912 2,localhost,41943040,12582912 1 localhost 41943040 12582912 2 localhost 41943040 12582912 diff --git a/mysql-test/r/ndb_default_cluster.require b/mysql-test/r/ndb_default_cluster.require new file mode 100644 index 00000000000..aa4988cdca3 --- /dev/null +++ b/mysql-test/r/ndb_default_cluster.require @@ -0,0 +1,2 @@ +Variable_name Value +Ndb_connected_host localhost diff --git a/mysql-test/r/ndb_grant.result b/mysql-test/r/ndb_grant.result index 6583065a0c4..6192a7cace5 100644 --- a/mysql-test/r/ndb_grant.result +++ b/mysql-test/r/ndb_grant.result @@ -31,8 +31,8 @@ begin; grant delete on mysqltest.* to mysqltest_1@localhost; commit; select * from mysql.user where user="mysqltest_1"; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections -localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections +localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N 0 0 0 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' @@ -99,7 +99,7 @@ commit; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, CREATE VIEW, SHOW VIEW ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION begin; revoke all privileges on mysqltest.* from mysqltest_1@localhost; commit; @@ -271,23 +271,26 @@ grant select on test.t1 to drop_user2@localhost; grant select on test.* to drop_user3@localhost; grant select on *.* to drop_user4@localhost; commit; +flush privileges; drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; -ERROR HY000: Can't drop one or more of the requested users begin; revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; +ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users commit; +flush privileges; drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, drop_user4@localhost; drop table t1; begin; grant usage on *.* to mysqltest_1@localhost identified by "password"; -grant select, update, insert on test.* to mysqltest@localhost; +grant select, update, insert on test.* to mysqltest_1@localhost; commit; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' +GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' drop user mysqltest_1@localhost; SET NAMES koi8r; CREATE DATABASE ÂÄ; @@ -396,6 +399,31 @@ DROP DATABASE testdb7; DROP DATABASE testdb8; DROP DATABASE testdb9; DROP DATABASE testdb10; +SHOW PRIVILEGES; +Privilege Context Comment +Alter Tables To alter the table +Create Databases,Tables,Indexes To create new databases and tables +Create temporary tables Databases To use CREATE TEMPORARY TABLE +Create view Tables To create new views +Delete Tables To delete existing rows +Drop Databases,Tables To drop databases, tables, and views +File File access on server To read and write files on the server +Grant option Databases,Tables To give to other users those privileges you possess +Index Tables To create or drop indexes +Insert Tables To insert data into tables +Lock tables Databases To use LOCK TABLES (together with SELECT privilege) +Process Server Admin To view the plain text of currently executing queries +References Databases,Tables To have references on tables +Reload Server Admin To reload or refresh tables, logs and privileges +Replication client Server Admin To ask where the slave or master servers are +Replication slave Server Admin To read binary log events from the master +Select Tables To retrieve rows from table +Show databases Server Admin To see all databases with SHOW DATABASES +Show view Tables To see views with SHOW CREATE VIEW +Shutdown Server Admin To shut down the server +Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. +Update Tables To update existing rows +Usage Server Admin No privileges - allow connect only use mysql; alter table columns_priv engine=myisam; alter table db engine=myisam; diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result index f5794d477f3..212c843cc44 100644 --- a/mysql-test/r/ndb_index_ordered.result +++ b/mysql-test/r/ndb_index_ordered.result @@ -275,6 +275,115 @@ a b c 1 1 1 4 4 NULL drop table t1; +create table t1 ( +a int unsigned primary key, +b int unsigned, +c char(10), +key bc (b, c) +) engine=ndb; +insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e'); +insert into t1 select a*7,10*b,'f' from t1; +insert into t1 select a*13,10*b,'g' from t1; +insert into t1 select a*17,10*b,'h' from t1; +insert into t1 select a*19,10*b,'i' from t1; +insert into t1 select a*23,10*b,'j' from t1; +insert into t1 select a*29,10*b,'k' from t1; +select b, c from t1 where b <= 10 and c <'f' order by b, c; +b c +1 a +2 b +3 c +4 d +5 e +select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc; +b c +5 e +4 d +3 c +2 b +1 a +select b, c from t1 where b=4000 and c<'k' order by b, c; +b c +4000 h +4000 i +4000 i +4000 i +4000 j +4000 j +4000 j +4000 j +4000 j +4000 j +select b, c from t1 where b=4000 and c<'k' order by b desc, c desc; +b c +4000 j +4000 j +4000 j +4000 j +4000 j +4000 j +4000 i +4000 i +4000 i +4000 h +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c; +b c +1000 h +1000 i +1000 i +1000 i +2000 h +2000 i +2000 i +2000 i +3000 h +3000 i +3000 i +3000 i +4000 h +4000 i +4000 i +4000 i +5000 h +5000 i +5000 i +5000 i +10000 i +20000 i +30000 i +40000 i +50000 i +select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc; +b c +50000 i +40000 i +30000 i +20000 i +10000 i +5000 i +5000 i +5000 i +5000 h +4000 i +4000 i +4000 i +4000 h +3000 i +3000 i +3000 i +3000 h +2000 i +2000 i +2000 i +2000 h +1000 i +1000 i +1000 i +1000 h +select min(b), max(b) from t1; +min(b) max(b) +1 5000000 +drop table t1; CREATE TABLE test1 ( SubscrID int(11) NOT NULL auto_increment, UsrID int(11) NOT NULL default '0', diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result index 598b9dcccf7..1401ae26ddb 100644 --- a/mysql-test/r/ndb_index_unique.result +++ b/mysql-test/r/ndb_index_unique.result @@ -1,4 +1,4 @@ -drop table if exists t1, t2, t3, t4, t5, t6, t7; +drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; CREATE TABLE t1 ( a int unsigned NOT NULL PRIMARY KEY, b int unsigned not null, @@ -248,8 +248,8 @@ INSERT INTO t3 VALUES (1,'V1',NULL); CREATE TABLE t4 ( uid bigint(20) unsigned NOT NULL default '0', gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL default '-1', -cid bigint(20) unsigned NOT NULL default '-1', +rid bigint(20) unsigned NOT NULL, +cid bigint(20) unsigned NOT NULL, UNIQUE KEY m (uid,gid,rid,cid) ) engine=ndbcluster; INSERT INTO t4 VALUES (1,1,2,4); @@ -275,8 +275,8 @@ CREATE TABLE t7 ( mid bigint(20) unsigned NOT NULL PRIMARY KEY, uid bigint(20) unsigned NOT NULL default '0', gid bigint(20) unsigned NOT NULL, -rid bigint(20) unsigned NOT NULL default '-1', -cid bigint(20) unsigned NOT NULL default '-1', +rid bigint(20) unsigned NOT NULL, +cid bigint(20) unsigned NOT NULL, UNIQUE KEY m (uid,gid,rid,cid) ) engine=ndbcluster; INSERT INTO t7 VALUES(1, 1, 1, 1, 1); diff --git a/mysql-test/r/ndb_read_multi_range.result b/mysql-test/r/ndb_read_multi_range.result new file mode 100644 index 00000000000..f42ac394b6c --- /dev/null +++ b/mysql-test/r/ndb_read_multi_range.result @@ -0,0 +1,265 @@ +DROP TABLE IF EXISTS t1, r1; +create table t1 ( +a int primary key, +b int not null, +c int not null, +index(b), unique index using hash(c) +) engine = ndb; +insert into t1 values +(1,2,1),(2,3,2),(3,4,3),(4,5,4), +(5,2,12),(6,3,11),(7,4,10),(8,5,9), +(9,2,8),(10,3,7),(11,4,6),(12,5,5); +create table r1 as select * from t1 where a in (2,8,12); +select * from r1 order by a; +a b c +2 3 2 +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where b in (1,2,5); +select * from r1 order by a; +a b c +1 2 1 +4 5 4 +5 2 12 +8 5 9 +9 2 8 +12 5 5 +drop table r1; +create table r1 as select * from t1 where c in (2,8,12); +select * from r1 order by a; +a b c +2 3 2 +5 2 12 +9 2 8 +drop table r1; +create table r1 as select * from t1 where a in (2,8) or (a > 11) or (a <= 1); +select * from r1 order by a; +a b c +1 2 1 +2 3 2 +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where a in (33,8,12); +select * from r1 order by a; +a b c +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where a in (2,33,8,12,34); +select * from r1 order by a; +a b c +2 3 2 +8 5 9 +12 5 5 +drop table r1; +create table r1 as select * from t1 where b in (1,33,5); +select * from r1 order by a; +a b c +4 5 4 +8 5 9 +12 5 5 +drop table r1; +select * from t1 where b in (1,33,5) order by a; +a b c +4 5 4 +8 5 9 +12 5 5 +create table r1 as select * from t1 where b in (45,1,33,5,44); +select * from r1 order by a; +a b c +4 5 4 +8 5 9 +12 5 5 +drop table r1; +select * from t1 where b in (45,22) order by a; +a b c +create table r1 as select * from t1 where c in (2,8,33); +select * from r1 order by a; +a b c +2 3 2 +9 2 8 +drop table r1; +create table r1 as select * from t1 where c in (13,2,8,33,12); +select * from r1 order by a; +a b c +2 3 2 +5 2 12 +9 2 8 +drop table r1; +select * from t1 where a in (33,8,12) order by a; +a b c +8 5 9 +12 5 5 +select * from t1 where a in (33,34,35) order by a; +a b c +select * from t1 where a in (2,8) or (a > 11) or (a <= 1) order by a; +a b c +1 2 1 +2 3 2 +8 5 9 +12 5 5 +select * from t1 where b in (6,7) or (b <= 5) or (b >= 10) order by b,a; +a b c +1 2 1 +5 2 12 +9 2 8 +2 3 2 +6 3 11 +10 3 7 +3 4 3 +7 4 10 +11 4 6 +4 5 4 +8 5 9 +12 5 5 +select * from t1 where c in (13,2,8,33,12) order by c,a; +a b c +2 3 2 +9 2 8 +5 2 12 +drop table t1; +create table t1 ( +a int not null, +b int not null, +c int not null, +d int not null, +e int not null, +primary key (a,b,c,d), index (d) +) engine = ndb; +insert into t1 values +(1,2,1,1,1),(2,3,2,3,1),(3,4,3,1,1),(4,5,4,7,1), +(5,2,12,12,1),(6,3,11,1,1),(7,4,10,3,1),(8,5,9,5,1), +(9,2,8,6,1),(10,3,7,5,1),(11,4,6,3,1),(12,5,5,2,1), +(1,2,1,2,1), +(1,2,1,3,1), +(1,2,1,4,1), +(1,2,1,5,1); +create table r1 as select * from t1 +where a=1 and b=2 and c=1 and d in (1,4,3,2); +select * from r1 order by a,b,c,d; +a b c d e +1 2 1 1 1 +1 2 1 2 1 +1 2 1 3 1 +1 2 1 4 1 +drop table r1; +update t1 set e = 100 +where d in (12,6,7); +select * from t1 where d in (12,6,7) order by a,b,c,d; +a b c d e +4 5 4 7 100 +5 2 12 12 100 +9 2 8 6 100 +select * from t1 where d not in (12,6,7) and e = 100; +a b c d e +update t1 +set e = 101 +where a=1 and +b=2 and +c=1 and +d in (1,4,3,2); +select * +from t1 +where a=1 and b=2 and c=1 and d in (1,4,3,2) +order by a,b,c,d; +a b c d e +1 2 1 1 101 +1 2 1 2 101 +1 2 1 3 101 +1 2 1 4 101 +select * +from t1 +where not (a=1 and b=2 and c=1 and d in (1,4,3,2)) +and e=101; +a b c d e +update t1 +set e = +(case d +when 12 then 112 +when 6 then 106 +when 7 then 107 +end) +where d in (12,6,7); +select * from t1 where d in (12,6,7) order by a,b,c,d; +a b c d e +4 5 4 7 107 +5 2 12 12 112 +9 2 8 6 106 +update t1 +set e = +(case d +when 1 then 111 +when 4 then 444 +when 3 then 333 +when 2 then 222 +end) +where a=1 and +b=2 and +c=1 and +d in (1,4,3,2); +select * +from t1 +where a=1 and b=2 and c=1 and d in (1,4,3,2) +order by a,b,c,d; +a b c d e +1 2 1 1 111 +1 2 1 2 222 +1 2 1 3 333 +1 2 1 4 444 +delete from t1 where d in (12,6,7); +select * from t1 where d in (12,6,7); +a b c d e +drop table t1; +create table t1 ( +a int not null primary key, +b int, +c int, +d int, +unique index (b), +index(c) +) engine = ndb; +insert into t1 values +(1,null,1,1), +(2,2,2,2), +(3,null,null,3), +(4,4,null,4), +(5,null,5,null), +(6,6,6,null), +(7,null,null,null), +(8,8,null,null), +(9,null,9,9), +(10,10,10,10), +(11,null,null,11), +(12,12,null,12), +(13,null,13,null), +(14,14,14,null), +(15,null,null,null), +(16,16,null,null); +create table t2 as select * from t1 where a in (5,6,7,8,9,10); +select * from t2 order by a; +a b c d +5 NULL 5 NULL +6 6 6 NULL +7 NULL NULL NULL +8 8 NULL NULL +9 NULL 9 9 +10 10 10 10 +drop table t2; +create table t2 as select * from t1 where b in (5,6,7,8,9,10); +select * from t2 order by a; +a b c d +6 6 6 NULL +8 8 NULL NULL +10 10 10 10 +drop table t2; +create table t2 as select * from t1 where c in (5,6,7,8,9,10); +select * from t2 order by a; +a b c d +5 NULL 5 NULL +6 6 6 NULL +9 NULL 9 9 +10 10 10 10 +drop table t2; +drop table t1; diff --git a/mysql-test/r/ndb_subquery.result b/mysql-test/r/ndb_subquery.result index f65f09b71b3..b19571b05c1 100644 --- a/mysql-test/r/ndb_subquery.result +++ b/mysql-test/r/ndb_subquery.result @@ -40,3 +40,22 @@ p u o 5 5 5 drop table t1; drop table t2; +create table t1 (p int not null primary key, u int not null) engine=ndb; +insert into t1 values (1,1),(2,2),(3,3); +create table t2 as +select t1.* +from t1 as t1, t1 as t2, t1 as t3, t1 as t4, t1 as t5, t1 as t6, t1 as t7, t1 as t8 +where t1.u = t2.u +and t2.u = t3.u +and t3.u = t4.u +and t4.u = t5.u +and t5.u = t6.u +and t6.u = t7.u +and t7.u = t8.u; +select * from t2 order by 1; +p u +1 1 +2 2 +3 3 +drop table t1; +drop table t2; diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result index 5afa9c57e38..37ce7732f65 100644 --- a/mysql-test/r/ndb_types.result +++ b/mysql-test/r/ndb_types.result @@ -12,11 +12,13 @@ long_int int(11) DEFAULT '0' NOT NULL, longlong bigint(13) DEFAULT '0' NOT NULL, real_float float(13,1) DEFAULT 0.0 NOT NULL, real_double double(16,4), +real_decimal decimal(16,4), utiny tinyint(3) unsigned DEFAULT '0' NOT NULL, ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL, umedium mediumint(8) unsigned DEFAULT '0' NOT NULL, ulong int(11) unsigned DEFAULT '0' NOT NULL, ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL, +bits bit(3), options enum('one','two','tree') not null, flags set('one','two','tree') not null, date_field date, @@ -40,32 +42,33 @@ KEY (options,flags) set @now = now(); insert into t1 (string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double, utiny, ushort, umedium,ulong,ulonglong, -options,flags,date_field,year_field,time_field,date_time) +real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong, +bits,options,flags,date_field,year_field,time_field,date_time) values -("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1,1,1,1,1, -'one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); +("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1.1,1,1,1,1,1, +b'001','one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01'); select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double, utiny, ushort, umedium,ulong,ulonglong, -options,flags,date_field,year_field,time_field,date_time +real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, +bits,options,flags,date_field,year_field,time_field,date_time from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong options flags date_field year_field time_field date_time -1 aaaa aaaa ªª ªª -1 -1 -1 -1 -1 1.1 1.1000 1 00001 1 1 1 one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01 +auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time +1 aaaa aaaa ªª ªª -1 -1 -1 -1 -1 1.1 1.1000 1.1000 1 00001 1 1 1 one one 1901-01-01 1901 01:01:01 1901-01-01 01:01:01 select time_stamp>@now from t1; time_stamp>@now 1 set @now = now(); update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB, tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2, -real_double=2.2,utiny=2,ushort=2,umedium=2,ulong=2,ulonglong=2, +real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2, +ulonglong=2, bits=b'010', options='one',flags='one', date_field='1902-02-02',year_field='1902', time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1; select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong, -real_float,real_double, utiny, ushort, umedium,ulong,ulonglong, -options,flags,date_field,year_field,time_field,date_time +real_float,real_double,real_decimal,utiny,ushort,umedium,ulong,ulonglong, +bits,options,flags,date_field,year_field,time_field,date_time from t1; -auto string vstring bin vbin tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong options flags date_field year_field time_field date_time -1 bbbb bbbb »» »» -2 -2 -2 -2 -2 2.2 2.2000 2 00002 2 2 2 one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02 +auto string vstring bin vbin tiny short medium long_int longlong real_float real_double real_decimal utiny ushort umedium ulong ulonglong bits options flags date_field year_field time_field date_time +1 bbbb bbbb »» »» -2 -2 -2 -2 -2 2.2 2.2000 2.2000 2 00002 2 2 2 one one 1902-02-02 1902 02:02:02 1902-02-02 02:02:02 select time_stamp>@now from t1; time_stamp>@now 1 diff --git a/mysql-test/r/negation_elimination.result b/mysql-test/r/negation_elimination.result index 9193a125cd1..a7dbe0d9052 100644 --- a/mysql-test/r/negation_elimination.result +++ b/mysql-test/r/negation_elimination.result @@ -387,5 +387,5 @@ explain extended select a, not(not(a)), not(a <= 2 and not(a)), not(a not like " id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL a 5 NULL 5 Using where; Using index Warnings: -Note 1003 select test.t1.a AS `a`,(test.t1.a <> 0) AS `not(not(a))`,((test.t1.a > 2) or test.t1.a) AS `not(a <= 2 and not(a))`,(test.t1.a like _latin1'1') AS `not(a not like "1")`,(test.t1.a in (1,2)) AS `not (a not in (1,2))`,(test.t1.a = 2) AS `not(a != 2)` from test.t1 where test.t1.a having test.t1.a +Note 1003 select `test`.`t1`.`a` AS `a`,(`test`.`t1`.`a` <> 0) AS `not(not(a))`,((`test`.`t1`.`a` > 2) or `test`.`t1`.`a`) AS `not(a <= 2 and not(a))`,(`test`.`t1`.`a` like _latin1'1') AS `not(a not like "1")`,(`test`.`t1`.`a` in (1,2)) AS `not (a not in (1,2))`,(`test`.`t1`.`a` = 2) AS `not(a != 2)` from `test`.`t1` where `test`.`t1`.`a` having `test`.`t1`.`a` drop table t1; diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 3e233eb512a..4551fed2732 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -88,7 +88,7 @@ b ifnull(t2.b,"this is null") NULL this is null NULL this is null drop table t1; -CREATE TABLE t1 (a varchar(16) NOT NULL, b smallint(6) NOT NULL, c datetime NOT NULL, d smallint(6) NOT NULL); +CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0); INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55"; Warnings: Warning 1265 Data truncated for column 'd' at row 1 @@ -97,39 +97,39 @@ Warnings: Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=NULL; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1 INSERT INTO t1 (a) values (null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (1/null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (null),(null); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 INSERT INTO t1 (b) values (null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (1/null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (null),(null); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 1 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 INSERT INTO t1 (c) values (null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (1/null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (null),(null); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'c' at row 2 INSERT INTO t1 (d) values (null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (1/null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (null),(null); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'd' at row 2 select * from t1; a b c d 0 0000-00-00 00:00:00 0 @@ -167,13 +167,22 @@ insert into t1 select i*2 from t1; insert into t1 select i*2 from t1; insert into t1 select i*2 from t1; insert into t1 select i*2 from t1; +insert into t1 values(null); explain select * from t1 where i=2 or i is null; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref_or_null i i 5 const 10 Using where; Using index +1 SIMPLE t1 ref_or_null i i 5 const 9 Using where; Using index +select count(*) from t1 where i=2 or i is null; +count(*) +10 alter table t1 change i i int not null; +Warnings: +Warning 1265 Data truncated for column 'i' at row 513 explain select * from t1 where i=2 or i is null; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref i i 4 const 7 Using where; Using index +1 SIMPLE t1 ref i i 4 const 7 Using index +select count(*) from t1 where i=2 or i is null; +count(*) +9 drop table t1; set names latin2; create table t1 select @@ -246,14 +255,14 @@ t1 CREATE TABLE `t1` ( `c25` varchar(12) character set latin2 default NULL, `c26` varchar(7) character set latin2 default NULL, `c27` varchar(7) character set latin2 default NULL, - `c29` longtext character set latin2, - `c30` longtext character set latin2, + `c29` varchar(381) character set latin2 default NULL, + `c30` varchar(317) character set latin2 default NULL, `c31` varchar(192) character set latin2 default NULL, `c32` char(0) character set latin2 default NULL, - `c33` char(3) character set latin2 default NULL, - `c34` char(3) character set latin2 default NULL, - `c35` char(3) character set latin2 default NULL, - `c36` char(3) character set latin2 default NULL, + `c33` varchar(3) character set latin2 default NULL, + `c34` varchar(3) character set latin2 default NULL, + `c35` varchar(3) character set latin2 default NULL, + `c36` varchar(3) character set latin2 default NULL, `c37` varchar(10) character set latin2 default NULL, `c38` varchar(10) character set latin2 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 36d3e005828..7f746a3dbd8 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -30,7 +30,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref a,b a 5 const 3 Using where; Using index explain select * from t1 where a is null and b=9 or a is null and b=7 limit 3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a,b a 9 NULL 2 Using where; Using index +1 SIMPLE t1 ref a,b a 5 const 2 Using where; Using index explain select * from t1 where a > 1 and a < 3 limit 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index @@ -66,6 +66,11 @@ a b NULL 7 NULL 9 NULL 9 +select * from t1 where a > 1 and a < 3 limit 1; +a b +2 2 +select * from t1 where a > 8 and a < 9; +a b create table t2 like t1; insert into t2 select * from t1; alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10)); @@ -153,12 +158,12 @@ a b 7 NULL explain select * from t1 where (a = 7 or a is null) and (b=7 or b is null); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a,b a 10 NULL 3 Using where; Using index +1 SIMPLE t1 ref_or_null a,b a 5 const 4 Using where; Using index select * from t1 where (a = 7 or a is null) and (b=7 or b is null); a b -NULL 7 7 NULL 7 7 +NULL 7 explain select * from t1 where (a = 7 or a is null) and (a = 7 or a is null); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref_or_null a a 5 const 5 Using where; Using index @@ -337,7 +342,7 @@ index (id2) ); insert into t1 values(null,null),(1,1); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id2' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id2' at row 1 select * from t1; id id2 NULL 0 diff --git a/mysql-test/r/odbc.result b/mysql-test/r/odbc.result index c0b2ada0053..2d9d39393b1 100644 --- a/mysql-test/r/odbc.result +++ b/mysql-test/r/odbc.result @@ -12,5 +12,5 @@ select * from t1 where a is null; a b explain select * from t1 where b is null; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE drop table t1; diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index 7178895cf80..69871b2110b 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -1,4 +1,9 @@ drop table if exists t1,t2; +set @sav_dpi= @@div_precision_increment; +set div_precision_increment= 5; +show variables like 'div_precision_increment'; +Variable_name Value +div_precision_increment 5 create table t1 (product varchar(32), country_id int not null, year int, profit int); insert into t1 values ( 'Computer', 2,2000, 1200), ( 'TV', 1, 1999, 150), @@ -40,11 +45,11 @@ TV 600 NULL 7785 select product, sum(profit),avg(profit) from t1 group by product with rollup; product sum(profit) avg(profit) -Calculator 275 68.7500 -Computer 6900 1380.0000 -Phone 10 10.0000 -TV 600 120.0000 -NULL 7785 519.0000 +Calculator 275 68.75000 +Computer 6900 1380.00000 +Phone 10 10.00000 +TV 600 120.00000 +NULL 7785 519.00000 select product, country_id , year, sum(profit) from t1 group by product, country_id, year; product country_id year sum(profit) Calculator 1 1999 50 @@ -85,7 +90,7 @@ explain extended select product, country_id , year, sum(profit) from t1 group by id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 15 Using filesort Warnings: -Note 1003 select test.t1.product AS `product`,test.t1.country_id AS `country_id`,test.t1.year AS `year`,sum(test.t1.profit) AS `sum(profit)` from test.t1 group by test.t1.product,test.t1.country_id,test.t1.year with rollup +Note 1003 select `test`.`t1`.`product` AS `product`,`test`.`t1`.`country_id` AS `country_id`,`test`.`t1`.`year` AS `year`,sum(`test`.`t1`.`profit`) AS `sum(profit)` from `test`.`t1` group by `test`.`t1`.`product`,`test`.`t1`.`country_id`,`test`.`t1`.`year` with rollup select product, country_id , sum(profit) from t1 group by product desc, country_id with rollup; product country_id sum(profit) TV 1 400 @@ -164,48 +169,48 @@ product country_id year sum(profit) NULL NULL NULL 7785 select concat(product,':',country_id) as 'prod', concat(":",year,":") as 'year',1+1, sum(profit)/count(*) from t1 group by 1,2 with rollup; prod year 1+1 sum(profit)/count(*) -Calculator:1 :1999: 2 50.00 -Calculator:1 :2000: 2 75.00 -Calculator:1 NULL 2 62.50 -Calculator:2 :2000: 2 75.00 -Calculator:2 NULL 2 75.00 -Computer:1 :1999: 2 1350.00 -Computer:1 :2000: 2 1500.00 -Computer:1 NULL 2 1400.00 -Computer:2 :2000: 2 1350.00 -Computer:2 NULL 2 1350.00 -Phone:3 :2003: 2 10.00 -Phone:3 NULL 2 10.00 -TV:1 :1999: 2 125.00 -TV:1 :2000: 2 150.00 -TV:1 NULL 2 133.33 -TV:2 :2000: 2 100.00 -TV:2 NULL 2 100.00 -NULL NULL 2 519.00 +Calculator:1 :1999: 2 50.00000 +Calculator:1 :2000: 2 75.00000 +Calculator:1 NULL 2 62.50000 +Calculator:2 :2000: 2 75.00000 +Calculator:2 NULL 2 75.00000 +Computer:1 :1999: 2 1350.00000 +Computer:1 :2000: 2 1500.00000 +Computer:1 NULL 2 1400.00000 +Computer:2 :2000: 2 1350.00000 +Computer:2 NULL 2 1350.00000 +Phone:3 :2003: 2 10.00000 +Phone:3 NULL 2 10.00000 +TV:1 :1999: 2 125.00000 +TV:1 :2000: 2 150.00000 +TV:1 NULL 2 133.33333 +TV:2 :2000: 2 100.00000 +TV:2 NULL 2 100.00000 +NULL NULL 2 519.00000 select product, sum(profit)/count(*) from t1 group by product with rollup; product sum(profit)/count(*) -Calculator 68.75 -Computer 1380.00 -Phone 10.00 -TV 120.00 -NULL 519.00 +Calculator 68.75000 +Computer 1380.00000 +Phone 10.00000 +TV 120.00000 +NULL 519.00000 select left(product,4) as prod, sum(profit)/count(*) from t1 group by prod with rollup; prod sum(profit)/count(*) -Calc 68.75 -Comp 1380.00 -Phon 10.00 -TV 120.00 -NULL 519.00 +Calc 68.75000 +Comp 1380.00000 +Phon 10.00000 +TV 120.00000 +NULL 519.00000 select concat(product,':',country_id), 1+1, sum(profit)/count(*) from t1 group by concat(product,':',country_id) with rollup; concat(product,':',country_id) 1+1 sum(profit)/count(*) -Calculator:1 2 62.50 -Calculator:2 2 75.00 -Computer:1 2 1400.00 -Computer:2 2 1350.00 -Phone:3 2 10.00 -TV:1 2 133.33 -TV:2 2 100.00 -NULL 2 519.00 +Calculator:1 2 62.50000 +Calculator:2 2 75.00000 +Computer:1 2 1400.00000 +Computer:2 2 1350.00000 +Phone:3 2 10.00000 +TV:1 2 133.33333 +TV:2 2 100.00000 +NULL 2 519.00000 select product, country , year, sum(profit) from t1,t2 where t1.country_id=t2.country_id group by product, country, year with rollup; product country year sum(profit) Calculator India 2000 150 @@ -244,11 +249,11 @@ select product, country_id , year, sum(profit) from t1 group by product, country product country_id year sum(profit) select concat(':',product,':'), sum(profit),avg(profit) from t1 group by product with rollup; concat(':',product,':') sum(profit) avg(profit) -:Calculator: 275 68.7500 -:Computer: 6900 1380.0000 -:Phone: 10 10.0000 -:TV: 600 120.0000 -NULL 7785 519.0000 +:Calculator: 275 68.75000 +:Computer: 6900 1380.00000 +:Phone: 10 10.00000 +:TV: 600 120.00000 +NULL 7785 519.00000 select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube; ERROR 42000: This version of MySQL doesn't yet support 'CUBE' explain select product, country_id , year, sum(profit) from t1 group by product, country_id, year with cube; @@ -378,6 +383,51 @@ a sum(b) 2 6 4 4 NULL 14 +SELECT b, a, sum(b) FROM t1 GROUP BY a,b WITH ROLLUP; +b a sum(b) +4 1 4 +NULL 1 4 +1 2 2 +2 2 4 +NULL 2 6 +1 4 4 +NULL 4 4 +NULL NULL 14 +SELECT DISTINCT b,a, sum(b) FROM t1 GROUP BY a,b WITH ROLLUP; +b a sum(b) +4 1 4 +NULL 1 4 +1 2 2 +2 2 4 +NULL 2 6 +1 4 4 +NULL 4 4 +NULL NULL 14 +ALTER TABLE t1 ADD COLUMN c INT; +SELECT a,b,sum(c) FROM t1 GROUP BY a,b,c WITH ROLLUP; +a b sum(c) +1 4 NULL +1 4 NULL +1 NULL NULL +2 1 NULL +2 1 NULL +2 2 NULL +2 2 NULL +2 NULL NULL +4 1 NULL +4 1 NULL +4 NULL NULL +NULL NULL NULL +SELECT distinct a,b,sum(c) FROM t1 GROUP BY a,b,c WITH ROLLUP; +a b sum(c) +1 4 NULL +1 NULL NULL +2 1 NULL +2 2 NULL +2 NULL NULL +4 1 NULL +4 NULL NULL +NULL NULL NULL DROP TABLE t1; CREATE TABLE t1 (a int, b int); INSERT INTO t1 VALUES @@ -405,6 +455,7 @@ a m 2 2 NULL 3 DROP TABLE t1; +set div_precision_increment= @sav_dpi; CREATE TABLE t1 (a int(11)); INSERT INTO t1 VALUES (1),(2); SELECT a, SUM(a), SUM(a)+1 FROM (SELECT a FROM t1 UNION select 2) d @@ -504,6 +555,28 @@ IFNULL(a, 'TEST') COALESCE(b, 'TEST') 4 TEST TEST TEST DROP TABLE t1,t2; +CREATE TABLE t1(id int, type char(1)); +INSERT INTO t1 VALUES +(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"), +(6,"B"),(7,"A"),(8,"C"),(9,"A"),(10,"C"); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT type FROM t1 GROUP BY type WITH ROLLUP; +type +A +B +C +NULL +SELECT type FROM v1 GROUP BY type WITH ROLLUP; +type +A +B +C +NULL +EXPLAIN SELECT type FROM v1 GROUP BY type WITH ROLLUP; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using filesort +DROP VIEW v1; +DROP TABLE t1; CREATE TABLE t1 (a INT(10) NOT NULL, b INT(10) NOT NULL); INSERT INTO t1 VALUES (1, 1); INSERT INTO t1 VALUES (1, 2); diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index f7cb17a1a74..035c84431f8 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -10,22 +10,22 @@ select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user 'ssl_user1'@'localhost' to database 'test' +ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1' select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user 'ssl_user2'@'localhost' to database 'test' +ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 't1' select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user 'ssl_user3'@'localhost' to database 'test' +ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1' select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user 'ssl_user4'@'localhost' to database 'test' +ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1' delete from mysql.user where user='ssl_user%'; delete from mysql.db where user='ssl_user%'; flush privileges; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index ee8ca5f0328..6864c35dbfc 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -189,6 +189,15 @@ a b if(b = 1,i,if(b = 2,v,'')) 4 2 453 Boardwalk SELECT a,b,if(b = 1,i,if(b = 2,v,'')) FROM t1 +LEFT JOIN t2 ON t1.c = t2.c +LEFT JOIN t3 ON t3.c = t1.c; +a b if(b = 1,i,if(b = 2,v,'')) +1 1 50 +2 1 25 +3 2 123 Park Place +4 2 453 Boardwalk +SELECT a,b,if(b = 1,i,if(b = 2,v,'')) +FROM t1 LEFT JOIN t2 USING(c) LEFT JOIN t3 ON t3.c = t1.c ORDER BY a; @@ -197,6 +206,16 @@ a b if(b = 1,i,if(b = 2,v,'')) 2 1 25 3 2 123 Park Place 4 2 453 Boardwalk +SELECT a,b,if(b = 1,i,if(b = 2,v,'')) +FROM t1 +LEFT JOIN t2 ON t1.c = t2.c +LEFT JOIN t3 ON t3.c = t1.c +ORDER BY a; +a b if(b = 1,i,if(b = 2,v,'')) +1 1 50 +2 1 25 +3 2 123 Park Place +4 2 453 Boardwalk drop table t1,t2,t3; create table t1 (ID int not null primary key, TransactionID int not null); insert into t1 (ID, TransactionID) values (1, 87), (2, 89), (3, 92), (4, 94), (5, 486), (6, 490), (7, 753), (9, 828), (10, 832), (11, 834), (12, 840); @@ -257,7 +276,7 @@ favo_tijdschrift varchar(50) NOT NULL default '', favo_tv varchar(50) NOT NULL default '', favo_eten varchar(50) NOT NULL default '', favo_muziek varchar(30) NOT NULL default '', -info text NOT NULL, +info text NOT NULL default '', ipnr varchar(30) NOT NULL default '', PRIMARY KEY (member_id) ) ENGINE=MyISAM PACK_KEYS=1; @@ -272,7 +291,7 @@ create table t1 (a int not null, b int, c varchar(10), key (a, b, c)); insert into t1 values (1, NULL, NULL), (1, NULL, 'b'), (1, 1, NULL), (1, 1, 'b'), (1, 1, 'b'), (2, 1, 'a'), (2, 1, 'b'), (2, 2, 'a'), (2, 2, 'b'), (2, 3, 'c'),(1,3,'b'); explain select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 20 NULL 2 Using where; Using index +1 SIMPLE t1 index a a 22 NULL 11 Using where; Using index select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc; a b c 1 NULL b @@ -348,7 +367,7 @@ Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'c' at row 3 explain select * from t1 order by a, b, c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL a 18 NULL 11 Using index +1 SIMPLE t1 index NULL a 20 NULL 11 Using index select * from t1 order by a, b, c; a b c 1 0 @@ -364,7 +383,7 @@ a b c 2 3 c explain select * from t1 order by a desc, b desc, c desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL a 18 NULL 11 Using index +1 SIMPLE t1 index NULL a 20 NULL 11 Using index select * from t1 order by a desc, b desc, c desc; a b c 2 3 c @@ -380,7 +399,7 @@ a b c 1 0 explain select * from t1 where (a = 1 and b = 1 and c = 'b') or (a > 2) order by a desc; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range a a 18 NULL 3 Using where; Using index +1 SIMPLE t1 range a a 20 NULL 3 Using where; Using index select * from t1 where (a = 1 and b = 1 and c = 'b') or (a > 2) order by a desc; a b c 1 1 b @@ -526,9 +545,15 @@ INSERT INTO t2 (numeropost,pseudo) VALUES (1,'joce'),(1,'bug'); SELECT titre,t1.numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30; titre numeropost auteur icone nbrep 0 date vue ouvert lastauteur dest test 1 joce 0 0 0 0000-00-00 00:00:00 0 1 bug +SELECT titre,numeropost,auteur,icone,nbrep,0,date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30; +titre numeropost auteur icone nbrep 0 date vue ouvert lastauteur dest +test 1 joce 0 0 0 0000-00-00 00:00:00 0 1 bug SELECT titre,t1.numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30; titre numeropost auteur icone nbrep 0 date vue ouvert lastauteur dest test 1 joce 0 0 0 0000-00-00 00:00:00 0 1 bug +SELECT titre,numeropost,auteur,icone,nbrep,'0',date,vue,ouvert,lastauteur,dest FROM t2 LEFT JOIN t1 USING(numeropost) WHERE t2.pseudo='joce' ORDER BY date DESC LIMIT 0,30; +titre numeropost auteur icone nbrep 0 date vue ouvert lastauteur dest +test 1 joce 0 0 0 0000-00-00 00:00:00 0 1 bug drop table t1,t2; CREATE TABLE t1 (a int, b int); INSERT INTO t1 VALUES (1, 2); @@ -574,7 +599,7 @@ KEY StringField (FieldKey,StringVal(32)) INSERT INTO t1 VALUES ('0',3,'0'),('0',2,'1'),('0',1,'2'),('1',2,'1'),('1',1,'3'), ('1',0,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('2',3,'0'),('2',2,'1'),('2',1,'2'),('3',2,'1'),('3',1,'2'),('3','3','3'); EXPLAIN SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 36 const 3 Using where +1 SIMPLE t1 ref FieldKey,LongField,StringField LongField 38 const 3 Using where SELECT * FROM t1 WHERE FieldKey = '1' ORDER BY LongVal; FieldKey LongVal StringVal 1 0 2 @@ -582,7 +607,7 @@ FieldKey LongVal StringVal 1 2 1 EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 36 NULL 4 Using where; Using filesort +1 SIMPLE t1 range FieldKey,LongField,StringField FieldKey 38 NULL 4 Using where; Using filesort SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY LongVal; FieldKey LongVal StringVal 3 1 2 @@ -590,7 +615,7 @@ FieldKey LongVal StringVal 3 3 3 EXPLAIN SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range FieldKey,LongField,StringField LongField 36 NULL 4 Using where +1 SIMPLE t1 range FieldKey,LongField,StringField LongField 38 NULL 4 Using where SELECT * FROM t1 WHERE FieldKey > '2' ORDER BY FieldKey, LongVal; FieldKey LongVal StringVal 3 1 2 @@ -733,6 +758,13 @@ xxxxxxxxxxxxxxxxxxxaa xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxz drop table t1; +create table t1 (a int not null, b int not null, c int not null); +insert t1 values (1,1,1),(1,1,2),(1,2,1); +select a, b from t1 group by a, b order by sum(c); +a b +1 2 +1 1 +drop table t1; create table t1 ( `sid` decimal(8,0) default null, `wnid` varchar(11) not null default '', @@ -757,7 +789,7 @@ insert into t1 (`sid`, `wnid`) values ('25295','02071491000'),('25296','02071491000'),('25297','02071499000'); explain select * from t1 where wnid like '0101%' order by wnid; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range wnid14,wnid wnid 11 NULL 10 Using where +1 SIMPLE t1 range wnid14,wnid wnid 13 NULL 10 Using where select * from t1 where wnid like '0101%' order by wnid; sid wnid 10100 01019000000 diff --git a/mysql-test/r/preload.result b/mysql-test/r/preload.result index 7237a0da7e0..b668b07b398 100644 --- a/mysql-test/r/preload.result +++ b/mysql-test/r/preload.result @@ -55,15 +55,15 @@ count(*) 4181 show status like "key_read%"; Variable_name Value -Key_read_requests 217 -Key_reads 45 +Key_read_requests 294 +Key_reads 60 select count(*) from t1 where b = 'test1'; count(*) 4181 show status like "key_read%"; Variable_name Value -Key_read_requests 434 -Key_reads 45 +Key_read_requests 588 +Key_reads 60 flush tables; flush status; select @@preload_buffer_size; @@ -74,15 +74,15 @@ Table Op Msg_type Msg_text test.t1 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 581 -Key_reads 581 +Key_read_requests 774 +Key_reads 774 select count(*) from t1 where b = 'test1'; count(*) 4181 show status like "key_read%"; Variable_name Value -Key_read_requests 798 -Key_reads 581 +Key_read_requests 1068 +Key_reads 774 flush tables; flush status; show status like "key_read%"; @@ -98,15 +98,15 @@ Table Op Msg_type Msg_text test.t1 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 10 -Key_reads 10 +Key_read_requests 17 +Key_reads 17 select count(*) from t1 where b = 'test1'; count(*) 4181 show status like "key_read%"; Variable_name Value -Key_read_requests 227 -Key_reads 52 +Key_read_requests 311 +Key_reads 75 flush tables; flush status; show status like "key_read%"; @@ -123,8 +123,8 @@ test.t1 preload_keys status OK test.t2 preload_keys status OK show status like "key_read%"; Variable_name Value -Key_read_requests 587 -Key_reads 587 +Key_read_requests 785 +Key_reads 785 select count(*) from t1 where b = 'test1'; count(*) 4181 @@ -133,8 +133,8 @@ count(*) 2584 show status like "key_read%"; Variable_name Value -Key_read_requests 938 -Key_reads 613 +Key_read_requests 1266 +Key_reads 821 flush tables; flush status; show status like "key_read%"; @@ -145,10 +145,12 @@ load index into cache t3, t2 key (primary,b) ; Table Op Msg_type Msg_text test.t3 preload_keys error Table 'test.t3' doesn't exist test.t2 preload_keys status OK +Warnings: +Error 1146 Table 'test.t3' doesn't exist show status like "key_read%"; Variable_name Value -Key_read_requests 355 -Key_reads 355 +Key_read_requests 478 +Key_reads 478 flush tables; flush status; show status like "key_read%"; @@ -160,6 +162,9 @@ Table Op Msg_type Msg_text test.t3 preload_keys error Table 'test.t3' doesn't exist test.t2 preload_keys error Key column 'c' doesn't exist in table test.t2 preload_keys status Operation failed +Warnings: +Error 1146 Table 'test.t3' doesn't exist +Error 1072 Key column 'c' doesn't exist in table show status like "key_read%"; Variable_name Value Key_read_requests 0 diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index c17015df757..0050dfc0841 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1,4 +1,5 @@ drop table if exists t1,t2; +drop database if exists client_test_db; create table t1 ( a int primary key, @@ -137,7 +138,7 @@ create table t1 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, +c13 date, c14 datetime, c15 timestamp, c16 time, c17 year, c18 bit, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, @@ -153,24 +154,24 @@ id select_type table type possible_keys key key_len ref rows Extra 6 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table 5 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found 4 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found -3 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found -2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables execute stmt1 ; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 6 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table 5 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found 4 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found -3 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found -2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables explain SELECT (SELECT SUM(c1 + c12 + 0.0) FROM t2 where (t1.c2 - 0e-3) = t2.c2 GROUP BY t1.c15 LIMIT 1) as scalar_s, exists (select 1.0e+0 from t2 where t2.c3 * 9.0000000000 = t1.c4) as exists_s, c5 * 4 in (select c6 + 0.3e+1 from t2) as in_s, (c7 - 4, c8 - 4) in (select c9 + 4.0, c10 + 40e-1 from t2) as in_row_s FROM t1, (select c25 x, c32 y from t2) tt WHERE x * 1 = c25; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 6 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table 5 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found 4 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found -3 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found -2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables deallocate prepare stmt1; drop tables t1,t2; set @arg00=1; @@ -207,10 +208,10 @@ create table t1 ( a int primary key, b varchar(30)) engine = MYISAM ; prepare stmt1 from ' show table status from test like ''t1%'' '; execute stmt1; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL +t1 MyISAM 10 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL show table status from test like 't1%' ; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 MyISAM 9 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL +t1 MyISAM 10 Dynamic 0 0 0 4294967295 1024 0 NULL # # # latin1_swedish_ci NULL deallocate prepare stmt1 ; drop table t1; create table t1(a varchar(2), b varchar(3)); @@ -482,6 +483,11 @@ execute stmt; pnum deallocate prepare stmt; drop table t1, t2; +create table t1 (a varchar(20)); +insert into t1 values ('foo'); +prepare stmt FROM 'SELECT char_length (a) FROM t1'; +ERROR 42000: FUNCTION test.char_length does not exist +drop table t1; prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0"; execute stmt; foo @@ -494,6 +500,77 @@ SELECT FOUND_ROWS(); FOUND_ROWS() 2 deallocate prepare stmt; +create table t1 (a char(3) not null, b char(3) not null, +c char(3) not null, primary key (a, b, c)); +create table t2 like t1; +prepare stmt from +"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b) + where t1.a=1"; +execute stmt; +a +execute stmt; +a +execute stmt; +a +prepare stmt from +"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from +(t1 left outer join t2 on t2.a=? and t1.b=t2.b) +left outer join t2 t3 on t3.a=? where t1.a=?"; +set @a:=1, @b:=1, @c:=1; +execute stmt using @a, @b, @c; +a b c a b c +execute stmt using @a, @b, @c; +a b c a b c +execute stmt using @a, @b, @c; +a b c a b c +deallocate prepare stmt; +drop table t1,t2; +SET @aux= "SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS A, + INFORMATION_SCHEMA.COLUMNS B + WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA + AND A.TABLE_NAME = B.TABLE_NAME + AND A.COLUMN_NAME = B.COLUMN_NAME AND + A.TABLE_NAME = 'user'"; +prepare my_stmt from @aux; +execute my_stmt; +COUNT(*) +37 +execute my_stmt; +COUNT(*) +37 +execute my_stmt; +COUNT(*) +37 +deallocate prepare my_stmt; +drop procedure if exists p1| +drop table if exists t1| +create table t1 (id int)| +insert into t1 values(1)| +create procedure p1(a int, b int) +begin +declare c int; +select max(id)+1 into c from t1; +insert into t1 select a+b; +insert into t1 select a-b; +insert into t1 select a-c; +end| +set @a= 3, @b= 4| +prepare stmt from "call p1(?, ?)"| +execute stmt using @a, @b| +execute stmt using @a, @b| +select * from t1| +id +1 +7 +-1 +1 +7 +-1 +-5 +deallocate prepare stmt| +drop procedure p1| +drop table t1| drop table if exists t1; Warnings: Note 1051 Unknown table 't1' @@ -557,6 +634,47 @@ id 3 deallocate prepare stmt; drop table t1, t2; +create table t1 (a int); +insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +prepare stmt from "select * from t1 limit ?, ?"; +set @offset=0, @limit=1; +execute stmt using @offset, @limit; +a +1 +select * from t1 limit 0, 1; +a +1 +set @offset=3, @limit=2; +execute stmt using @offset, @limit; +a +4 +5 +select * from t1 limit 3, 2; +a +4 +5 +prepare stmt from "select * from t1 limit ?"; +execute stmt using @limit; +a +1 +2 +prepare stmt from "select * from t1 where a in (select a from t1 limit ?)"; +ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +prepare stmt from "select * from t1 union all select * from t1 limit ?, ?"; +set @offset=9; +set @limit=2; +execute stmt using @offset, @limit; +a +10 +1 +prepare stmt from "(select * from t1 limit ?, ?) union all + (select * from t1 limit ?, ?) order by a limit ?"; +execute stmt using @offset, @limit, @offset, @limit, @limit; +a +10 +10 +drop table t1; +deallocate prepare stmt; create table t1 (id int); prepare stmt from "insert into t1 (id) select id from t1 union select id from t1"; execute stmt; @@ -641,25 +759,6 @@ execute stmt using @a, @b; ?=? 1 deallocate prepare stmt; -create table t1 (utext varchar(20) character set ucs2); -insert into t1 values ("lily"); -insert into t1 values ("river"); -prepare stmt from 'select utext from t1 where utext like ?'; -set @param1='%%'; -execute stmt using @param1; -utext -lily -river -execute stmt using @param1; -utext -lily -river -select utext from t1 where utext like '%%'; -utext -lily -river -drop table t1; -deallocate prepare stmt; create table t1 (a int); prepare stmt from "select ??"; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1 diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index c4ccdf9eb34..7fb1e1b4df4 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -1,6 +1,9 @@ drop table if exists t5, t6, t7, t8; drop database if exists mysqltest ; drop database if exists client_test_db; +drop database if exists testtets; +drop table if exists t1Aa,t2Aa,v1Aa,v2Aa; +drop view if exists t1Aa,t2Aa,v1Aa,v2Aa; test_sequence ------ basic tests ------ drop table if exists t1, t9 ; @@ -14,8 +17,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -255,16 +258,29 @@ a int primary key, b char(10) prepare stmt4 from ' show databases '; execute stmt4; Database +information_schema mysql test prepare stmt4 from ' show tables from test like ''t2%'' '; execute stmt4; Tables_in_test (t2%) t2 +prepare stmt4 from ' show columns from t2 where field in (select ?) '; +SET @arg00="a"; +execute stmt4 using @arg00; +Field Type Null Key Default Extra +a int(11) NO PRI +SET @arg00="b"; +execute stmt4 using @arg00; +Field Type Null Key Default Extra +b char(10) YES NULL +SET @arg00=1; +execute stmt4 using @arg00; +Field Type Null Key Default Extra prepare stmt4 from ' show columns from t2 from test like ''a%'' '; execute stmt4; Field Type Null Key Default Extra -a int(11) PRI 0 +a int(11) NO PRI create index t2_idx on t2(b); prepare stmt4 from ' show index from t2 from test '; execute stmt4; @@ -274,11 +290,11 @@ t2 1 t2_idx 1 b A NULL NULL NULL YES BTREE prepare stmt4 from ' show table status from test like ''t2%'' '; execute stmt4; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t2 MyISAM 9 Fixed 0 0 0 64424509439 1024 0 NULL # # # latin1_swedish_ci NULL +t2 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # # latin1_swedish_ci NULL prepare stmt4 from ' show table status from test like ''t9%'' '; execute stmt4; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t9 MyISAM 9 Dynamic 2 220 440 4294967295 2048 0 NULL # # # latin1_swedish_ci NULL +t9 MyISAM 10 Dynamic 2 216 432 # 2048 0 NULL # # # latin1_swedish_ci NULL prepare stmt4 from ' show status like ''Threads_running'' '; execute stmt4; Variable_name Value @@ -306,8 +322,8 @@ prepare stmt4 from ' show storage engines '; execute stmt4; Engine Support Comment MyISAM YES/NO Default engine as of MySQL 3.23 with great performance -HEAP YES/NO Alias for MEMORY MEMORY YES/NO Hash based, stored in memory, useful for temporary tables +HEAP YES/NO Alias for MEMORY MERGE YES/NO Collection of identical MyISAM tables MRG_MYISAM YES/NO Alias for MERGE ISAM YES/NO Obsolete storage engine, now replaced by MyISAM @@ -321,7 +337,8 @@ NDB YES/NO Alias for NDBCLUSTER EXAMPLE YES/NO Example storage engine ARCHIVE YES/NO Archive storage engine CSV YES/NO CSV storage engine -BLACKHOLE YES/NO Storage engine designed to act as null storage +FEDERATED YES/NO Federated MySQL storage engine +BLACKHOLE YES/NO /dev/null storage engine (anything you write to it disappears) drop table if exists t5; prepare stmt1 from ' drop table if exists t5 ' ; execute stmt1 ; @@ -393,22 +410,10 @@ create database mysqltest ; prepare stmt3 from ' drop database mysqltest '; ERROR HY000: This command is not supported in the prepared statement protocol yet drop database mysqltest ; -prepare stmt3 from ' grant all on test.t1 to drop_user@localhost -identified by ''looser'' '; -ERROR HY000: This command is not supported in the prepared statement protocol yet -grant all on test.t1 to drop_user@localhost -identified by 'looser' ; -prepare stmt3 from ' revoke all privileges on test.t1 from -drop_user@localhost '; -ERROR HY000: This command is not supported in the prepared statement protocol yet -revoke all privileges on test.t1 from drop_user@localhost ; -prepare stmt3 from ' drop user drop_user@localhost '; -ERROR HY000: This command is not supported in the prepared statement protocol yet -drop user drop_user@localhost; prepare stmt3 from ' describe t2 '; execute stmt3; Field Type Null Key Default Extra -a int(11) PRI 0 +a int(11) NO PRI b char(10) YES MUL NULL drop table t2 ; execute stmt3; @@ -435,9 +440,7 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye prepare stmt1 from ' handler t1 open '; ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' commit ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' rollback ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' SET sql_mode=ansi '; execute stmt4; select 'a' || 'b' ; @@ -445,17 +448,17 @@ select 'a' || 'b' ; ab prepare stmt4 from ' SET sql_mode="" '; execute stmt4; -select 'a' || 'b' ; -'a' || 'b' -0 -prepare stmt5 from ' select ''a'' || ''b'' ' ; +select '2' || '3' ; +'2' || '3' +1 +prepare stmt5 from ' select ''2'' || ''3'' ' ; execute stmt5; -'a' || 'b' -0 +'2' || '3' +1 SET sql_mode=ansi; execute stmt5; -'a' || 'b' -0 +'2' || '3' +1 SET sql_mode=""; prepare stmt1 from ' flush local privileges ' ; ERROR HY000: This command is not supported in the prepared statement protocol yet @@ -470,12 +473,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 14 N 1 31 8 +def Extra 253 255 14 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort SET @arg00=1 ; @@ -486,12 +489,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 5 Y 0 31 8 -def possible_keys 252 4096 7 Y 0 31 8 +def possible_keys 253 4096 7 Y 0 31 8 def key 253 64 7 Y 0 31 8 -def key_len 8 3 1 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 1 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 27 N 1 31 8 +def Extra 253 255 27 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort drop table if exists t2; @@ -545,11 +548,8 @@ m 1 drop table t3; prepare stmt3 from ' create index t2_idx on t2(b) '; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' drop index t2_idx on t2 ' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' alter table t2 drop primary key '; -ERROR HY000: This command is not supported in the prepared statement protocol yet drop table if exists new_t2; prepare stmt3 from ' rename table t2 to new_t2 '; execute stmt3; @@ -560,7 +560,7 @@ drop table t2; prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; create table t5 (a int) ; execute stmt1 ; -ERROR HY000: Can't find file: './test/t7.frm' (errno: 2) +ERROR HY000: Can't find file: './test/t7' (errno: 2) create table t7 (a int) ; execute stmt1 ; execute stmt1 ; @@ -803,4 +803,4 @@ prepare stmt1 from @string ; execute stmt1 ; prepare stmt1 from ' select * from t5 ' ; execute stmt1 ; -drop table t5 ; +drop table t5, t9; diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 6ef61b05577..16ead200933 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -10,8 +10,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -59,17 +59,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 @@ -444,9 +444,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -530,44 +531,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -593,44 +594,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -656,23 +657,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -1153,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 2 drop table if exists t2 ; @@ -1223,7 +1224,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -1302,7 +1302,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -1382,10 +1382,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -1713,8 +1711,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1732,8 +1730,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; @@ -1777,13 +1775,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -1799,7 +1797,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1807,13 +1805,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -1829,13 +1827,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1917,40 +1915,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1964,38 +1962,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -2014,78 +2012,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2102,40 +2100,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2146,38 +2144,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2192,76 +2190,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2572,12 +2570,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2589,18 +2587,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2612,18 +2610,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2641,12 +2639,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2664,14 +2662,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2683,7 +2681,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2695,8 +2693,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2708,20 +2706,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2745,8 +2743,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2818,10 +2816,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 @@ -2977,45 +2975,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 96047ac3182..9ab5a79f755 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -10,8 +10,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -59,17 +59,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 @@ -444,9 +444,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -530,44 +531,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -593,44 +594,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -656,23 +657,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -1153,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 2 test_sequence @@ -1206,7 +1207,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -1285,7 +1285,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -1365,10 +1365,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -1696,8 +1694,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1715,8 +1713,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; @@ -1760,13 +1758,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -1782,7 +1780,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1790,13 +1788,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -1812,13 +1810,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1900,40 +1898,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1947,38 +1945,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -1997,78 +1995,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2085,40 +2083,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2129,38 +2127,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2175,76 +2173,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2555,12 +2553,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2572,18 +2570,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2595,18 +2593,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2624,12 +2622,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2647,14 +2645,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2666,7 +2664,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2678,8 +2676,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2691,20 +2689,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2728,8 +2726,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2801,10 +2799,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 @@ -2960,45 +2958,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index bff4b6a5ad8..8336a5bf99b 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -11,11 +11,11 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, -c21 char(10), c22 varchar(30), c23 char(100), c24 char(100), -c25 char(100), c26 char(100), c27 char(100), c28 char(100), -c29 char(100), c30 char(100), c31 enum('one', 'two', 'three'), +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, +c21 char(10), c22 varchar(30), c23 varchar(100), c24 varchar(100), +c25 varchar(100), c26 varchar(100), c27 varchar(100), c28 varchar(100), +c29 varchar(100), c30 varchar(100), c31 enum('one', 'two', 'three'), c32 set('monday', 'tuesday', 'wednesday'), primary key(c1) ) engine = 'HEAP' ; @@ -60,17 +60,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 253 100 8 Y 0 0 8 def test t9 t9 c24 c24 253 100 8 Y 0 0 8 @@ -445,9 +445,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -531,44 +532,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -594,44 +595,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -657,23 +658,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -1154,12 +1155,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 2 test_sequence @@ -1207,7 +1208,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -1286,7 +1286,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -1366,10 +1366,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -1697,8 +1695,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1716,8 +1714,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; @@ -1761,13 +1759,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -1783,7 +1781,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1791,13 +1789,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -1813,13 +1811,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1901,40 +1899,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 0 31 8 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 0 31 8 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 0 31 8 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 0 31 8 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 0 31 8 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 0 31 8 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 0 31 8 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 0 31 8 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1948,38 +1946,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 0 31 8 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 0 31 8 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 0 31 8 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 0 31 8 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 0 31 8 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 0 31 8 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 0 31 8 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 0 31 8 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -1998,78 +1996,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 0 31 8 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 0 31 8 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 0 31 8 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 0 31 8 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 0 31 8 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 0 31 8 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 0 31 8 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 0 31 8 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 0 31 8 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 0 31 8 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 0 31 8 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 0 31 8 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 0 31 8 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 0 31 8 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 0 31 8 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 0 31 8 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2086,40 +2084,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 0 31 8 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 0 31 8 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 0 31 8 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 0 31 8 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 0 31 8 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 0 31 8 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 0 31 8 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 0 31 8 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2130,38 +2128,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 0 31 8 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 0 31 8 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 0 31 8 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 0 31 8 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 0 31 8 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 0 31 8 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 0 31 8 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 0 31 8 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2176,76 +2174,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 0 31 8 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 0 31 8 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 0 31 8 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 0 31 8 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 0 31 8 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 0 31 8 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 0 31 8 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 0 31 8 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 0 31 8 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 0 31 8 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 0 31 8 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 0 31 8 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 0 31 8 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 0 31 8 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 0 31 8 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 0 31 8 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2556,12 +2554,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2573,18 +2571,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2596,18 +2594,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2625,12 +2623,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2648,14 +2646,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2667,7 +2665,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2679,8 +2677,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2692,20 +2690,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2729,8 +2727,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2802,10 +2800,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50 50 50 50 50 50 50 50 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52 52 52 52 52 52 52 52 -53 5 53 53 53 53 53 53 53 53 53 53 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54 54 54 54 54 54 54 54 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56 56 56 56 56 56 56 56 @@ -2961,45 +2959,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 5ed6c10a47c..f341247a417 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -12,8 +12,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -32,8 +32,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -52,8 +52,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -102,17 +102,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 @@ -487,9 +487,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -573,44 +574,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -636,44 +637,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -699,23 +700,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -1196,12 +1197,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 2 test_sequence @@ -1249,7 +1250,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -1328,7 +1328,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -1408,10 +1408,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -1697,13 +1695,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -1719,7 +1717,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1727,13 +1725,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -1749,13 +1747,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1837,40 +1835,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1884,38 +1882,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -1934,78 +1932,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2022,40 +2020,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2066,38 +2064,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2112,76 +2110,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2492,12 +2490,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2509,18 +2507,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2532,18 +2530,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2561,12 +2559,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2584,14 +2582,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2603,7 +2601,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2615,8 +2613,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2628,20 +2626,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2665,8 +2663,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2738,10 +2736,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 @@ -2897,45 +2895,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 @@ -3066,8 +3064,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -3116,17 +3114,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 @@ -3501,9 +3499,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -3587,44 +3586,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -3650,44 +3649,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -3713,23 +3712,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -4210,12 +4209,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 2 test_sequence @@ -4263,7 +4262,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -4342,7 +4340,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -4422,10 +4420,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -4711,13 +4707,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -4733,7 +4729,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -4741,13 +4737,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -4763,13 +4759,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -4851,40 +4847,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -4898,38 +4894,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -4948,78 +4944,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -5036,40 +5032,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -5080,38 +5076,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -5126,76 +5122,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -5506,12 +5502,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -5523,18 +5519,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -5546,18 +5542,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -5575,12 +5571,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -5598,14 +5594,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -5617,7 +5613,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -5629,8 +5625,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -5642,20 +5638,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -5679,8 +5675,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -5752,10 +5748,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 @@ -5911,45 +5907,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index ef74e13a41d..fe4536827e6 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -10,8 +10,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -59,17 +59,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 @@ -444,9 +444,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -530,44 +531,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -593,44 +594,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -656,23 +657,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -1153,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 test_sequence @@ -1206,7 +1207,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -1285,7 +1285,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -1365,10 +1365,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -1696,8 +1694,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1715,8 +1713,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; @@ -1760,13 +1758,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -1782,7 +1780,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1790,13 +1788,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -1812,13 +1810,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1900,40 +1898,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1947,38 +1945,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -1997,78 +1995,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2085,40 +2083,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2129,38 +2127,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2175,76 +2173,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2555,12 +2553,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2572,18 +2570,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2595,18 +2593,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2624,12 +2622,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2647,14 +2645,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2666,7 +2664,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2678,8 +2676,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2691,20 +2689,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2728,8 +2726,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2801,10 +2799,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 @@ -2960,45 +2958,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index e7ffbb7c6ef..c4cb92bdc02 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -10,8 +10,8 @@ create table t9 c1 tinyint, c2 smallint, c3 mediumint, c4 int, c5 integer, c6 bigint, c7 float, c8 double, c9 double precision, c10 real, c11 decimal(7, 4), c12 numeric(8, 4), -c13 date, c14 datetime, c15 timestamp(14), c16 time, -c17 year, c18 bit, c19 bool, c20 char, +c13 date, c14 datetime, c15 timestamp, c16 time, +c17 year, c18 tinyint, c19 bool, c20 char, c21 char(10), c22 varchar(30), c23 tinyblob, c24 tinytext, c25 blob, c26 text, c27 mediumblob, c28 mediumtext, c29 longblob, c30 longtext, c31 enum('one', 'two', 'three'), @@ -59,17 +59,17 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 9 6 Y 0 4 63 +def test t9 t9 c12 c12 246 10 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 def test t9 t9 c16 c16 11 8 8 Y 128 0 63 def test t9 t9 c17 c17 13 4 4 Y 32864 0 63 -def test t9 t9 c18 c18 1 1 1 Y 32768 0 63 +def test t9 t9 c18 c18 1 4 1 Y 32768 0 63 def test t9 t9 c19 c19 1 1 1 Y 32768 0 63 def test t9 t9 c20 c20 254 1 1 Y 0 0 8 -def test t9 t9 c21 c21 253 10 10 Y 0 0 8 +def test t9 t9 c21 c21 254 10 10 Y 0 0 8 def test t9 t9 c22 c22 253 30 30 Y 0 0 8 def test t9 t9 c23 c23 252 255 8 Y 144 0 63 def test t9 t9 c24 c24 252 255 8 Y 16 0 8 @@ -444,9 +444,10 @@ limit 1 '; execute stmt1 ; a b 1 one -prepare stmt1 from ' select a,b from t1 -limit ? '; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 2 +prepare stmt1 from ' select a,b from t1 order by a limit ? '; +execute stmt1 using @arg00; +a b +1 one set @arg00='b' ; set @arg01=0 ; set @arg02=2 ; @@ -530,44 +531,44 @@ the join statement is: SELECT * FROM t2 right join t1 using(a) order by t2.a prepare stmt1 from @query9 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural right join t1 order by t2.a prepare stmt1 from @query8 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 right join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query7 ; @@ -593,44 +594,44 @@ the join statement is: SELECT * FROM t2 left join t1 using(a) order by t2.a prepare stmt1 from @query6 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural left join t1 order by t2.a prepare stmt1 from @query5 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b +1 one +2 two +3 three +4 four the join statement is: SELECT * FROM t2 left join t1 on(t1.a=t2.a) order by t2.a prepare stmt1 from @query4 ; @@ -656,23 +657,23 @@ the join statement is: SELECT * FROM t2 join t1 using(a) order by t2.a prepare stmt1 from @query3 ; execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four -execute stmt1 ; -a b a b -1 one 1 one -2 two 2 two -3 three 3 three -4 four 4 four +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four +execute stmt1 ; +a b b +1 one one +2 two two +3 three three +4 four four the join statement is: SELECT * FROM t2 natural join t1 order by t2.a prepare stmt1 from @query2 ; @@ -1153,12 +1154,12 @@ def id 8 3 1 N 32929 0 63 def select_type 253 19 6 N 1 31 8 def table 253 64 2 Y 0 31 8 def type 253 10 3 Y 0 31 8 -def possible_keys 252 4096 0 Y 0 31 8 +def possible_keys 253 4096 0 Y 0 31 8 def key 253 64 0 Y 0 31 8 -def key_len 8 3 0 Y 32928 0 63 -def ref 252 1024 0 Y 0 31 8 +def key_len 253 4096 0 Y 128 31 63 +def ref 253 1024 0 Y 0 31 8 def rows 8 10 1 Y 32928 0 63 -def Extra 252 255 0 N 1 31 8 +def Extra 253 255 0 N 1 31 8 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t9 ALL NULL NULL NULL NULL 2 test_sequence @@ -1206,7 +1207,6 @@ execute stmt1 using @arg00; select a,b from t1 where b=@arg00; a b prepare stmt1 from 'truncate table t1' ; -ERROR HY000: This command is not supported in the prepared statement protocol yet test_sequence ------ update tests ------ delete from t1 ; @@ -1285,7 +1285,7 @@ set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 select a,b from t1 order by a; a b 0 two @@ -1365,10 +1365,8 @@ execute stmt1 ; select a,b from t1 where b = 'bla' ; a b 2 bla -prepare stmt1 from 'update t1 set b=''bla'' -where a=2 -limit ?'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 3 +prepare stmt1 from 'update t1 set b=''bla'' where a=2 limit ?'; +execute stmt1 using @arg00; test_sequence ------ insert tests ------ delete from t1 ; @@ -1696,8 +1694,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three delete from t2 ; prepare stmt1 from ' insert into t2 (b,a) @@ -1715,8 +1713,8 @@ affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 select a,b from t2 order by a ; a b -3 duplicate -4 duplicate +3 duplicate +4 duplicate 103 three drop table t2; drop table if exists t5 ; @@ -1760,13 +1758,13 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(2,1) NOT NULL default '0.0', + `param02` decimal(65,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, - `const04` char(3) NOT NULL default '', + `const04` varchar(3) NOT NULL default '', `param04` longtext, - `const05` binary(3) NOT NULL default '', + `const05` varbinary(3) NOT NULL default '', `param05` longblob, `const06` varchar(10) NOT NULL default '', `param06` longtext, @@ -1782,7 +1780,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(65,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1790,13 +1788,13 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 -def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 -def test t5 t5 const04 const04 254 3 3 N 1 0 8 +def test t5 t5 const02 const02 246 4 3 N 1 1 63 +def test t5 t5 param02 param02 246 67 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 +def test t5 t5 param03 param03 5 23 1 Y 32768 31 63 +def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8 -def test t5 t5 const05 const05 254 3 3 N 129 0 63 +def test t5 t5 const05 const05 253 3 3 N 129 0 63 def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63 def test t5 t5 const06 const06 253 10 10 N 1 0 8 def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8 @@ -1812,13 +1810,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 67 0 Y 0 30 63 def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8 def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1900,40 +1898,40 @@ from t9 where c1= 1 ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1947,38 +1945,38 @@ from t9 where c1= 0 ; 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select @@ -1997,78 +1995,78 @@ execute stmt1 using @my_key ; 1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select ? := c1 from t9 where c1= 1" ; @@ -2085,40 +2083,40 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 1 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2129,38 +2127,38 @@ into @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, from t9 where c1= 0 ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, @@ -2175,76 +2173,76 @@ set @my_key= 1 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 1 Y 128 31 63 -def @arg03 254 20 1 Y 128 31 63 -def @arg04 254 20 1 Y 128 31 63 -def @arg05 254 20 1 Y 128 31 63 -def @arg06 254 20 1 Y 128 31 63 -def @arg07 254 20 1 Y 128 31 63 -def @arg08 254 20 1 Y 128 31 63 -def @arg09 254 20 1 Y 128 31 63 -def @arg10 254 20 1 Y 128 31 63 -def @arg11 254 20 1 Y 128 31 63 -def @arg12 254 20 1 Y 128 31 63 -def @arg13 254 8192 10 Y 128 31 63 -def @arg14 254 8192 19 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 8 Y 128 31 63 -def @arg17 254 20 4 Y 128 31 63 -def @arg18 254 20 1 Y 128 31 63 -def @arg19 254 20 1 Y 128 31 63 -def @arg20 254 8192 1 Y 0 31 8 -def @arg21 254 8192 10 Y 0 31 8 -def @arg22 254 8192 30 Y 0 31 8 -def @arg23 254 8192 8 Y 128 31 63 -def @arg24 254 8192 8 Y 0 31 8 -def @arg25 254 8192 4 Y 128 31 63 -def @arg26 254 8192 4 Y 0 31 8 -def @arg27 254 8192 10 Y 128 31 63 -def @arg28 254 8192 10 Y 0 31 8 -def @arg29 254 8192 8 Y 128 31 63 -def @arg30 254 8192 8 Y 0 31 8 -def @arg31 254 8192 3 Y 0 31 8 -def @arg32 254 8192 6 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 1 Y 128 0 63 +def @arg03 253 20 1 Y 128 0 63 +def @arg04 253 20 1 Y 128 0 63 +def @arg05 253 20 1 Y 128 0 63 +def @arg06 253 20 1 Y 128 0 63 +def @arg07 253 23 1 Y 128 31 63 +def @arg08 253 23 1 Y 128 31 63 +def @arg09 253 23 1 Y 128 31 63 +def @arg10 253 23 1 Y 128 31 63 +def @arg11 253 67 6 Y 128 30 63 +def @arg12 253 67 6 Y 128 30 63 +def @arg13 253 8192 10 Y 128 31 63 +def @arg14 253 8192 19 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 8 Y 128 31 63 +def @arg17 253 20 4 Y 128 0 63 +def @arg18 253 20 1 Y 128 0 63 +def @arg19 253 20 1 Y 128 0 63 +def @arg20 253 8192 1 Y 0 31 8 +def @arg21 253 8192 10 Y 0 31 8 +def @arg22 253 8192 30 Y 0 31 8 +def @arg23 253 8192 8 Y 128 31 63 +def @arg24 253 8192 8 Y 0 31 8 +def @arg25 253 8192 4 Y 128 31 63 +def @arg26 253 8192 4 Y 0 31 8 +def @arg27 253 8192 10 Y 128 31 63 +def @arg28 253 8192 10 Y 0 31 8 +def @arg29 253 8192 8 Y 128 31 63 +def @arg30 253 8192 8 Y 0 31 8 +def @arg31 253 8192 3 Y 0 31 8 +def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def @arg01 254 20 1 Y 128 31 63 -def @arg02 254 20 0 Y 128 31 63 -def @arg03 254 20 0 Y 128 31 63 -def @arg04 254 20 0 Y 128 31 63 -def @arg05 254 20 0 Y 128 31 63 -def @arg06 254 20 0 Y 128 31 63 -def @arg07 254 20 0 Y 128 31 63 -def @arg08 254 20 0 Y 128 31 63 -def @arg09 254 20 0 Y 128 31 63 -def @arg10 254 20 0 Y 128 31 63 -def @arg11 254 20 0 Y 128 31 63 -def @arg12 254 20 0 Y 128 31 63 -def @arg13 254 8192 0 Y 128 31 63 -def @arg14 254 8192 0 Y 128 31 63 -def @arg15 254 8192 19 Y 128 31 63 -def @arg16 254 8192 0 Y 128 31 63 -def @arg17 254 20 0 Y 128 31 63 -def @arg18 254 20 0 Y 128 31 63 -def @arg19 254 20 0 Y 128 31 63 -def @arg20 254 8192 0 Y 0 31 8 -def @arg21 254 8192 0 Y 0 31 8 -def @arg22 254 8192 0 Y 0 31 8 -def @arg23 254 8192 0 Y 128 31 63 -def @arg24 254 8192 0 Y 0 31 8 -def @arg25 254 8192 0 Y 128 31 63 -def @arg26 254 8192 0 Y 0 31 8 -def @arg27 254 8192 0 Y 128 31 63 -def @arg28 254 8192 0 Y 0 31 8 -def @arg29 254 8192 0 Y 128 31 63 -def @arg30 254 8192 0 Y 0 31 8 -def @arg31 254 8192 0 Y 0 31 8 -def @arg32 254 8192 0 Y 0 31 8 +def @arg01 253 20 1 Y 128 0 63 +def @arg02 253 20 0 Y 128 0 63 +def @arg03 253 20 0 Y 128 0 63 +def @arg04 253 20 0 Y 128 0 63 +def @arg05 253 20 0 Y 128 0 63 +def @arg06 253 20 0 Y 128 0 63 +def @arg07 253 23 0 Y 128 31 63 +def @arg08 253 23 0 Y 128 31 63 +def @arg09 253 23 0 Y 128 31 63 +def @arg10 253 23 0 Y 128 31 63 +def @arg11 253 67 0 Y 128 30 63 +def @arg12 253 67 0 Y 128 30 63 +def @arg13 253 8192 0 Y 128 31 63 +def @arg14 253 8192 0 Y 128 31 63 +def @arg15 253 8192 19 Y 128 31 63 +def @arg16 253 8192 0 Y 128 31 63 +def @arg17 253 20 0 Y 128 0 63 +def @arg18 253 20 0 Y 128 0 63 +def @arg19 253 20 0 Y 128 0 63 +def @arg20 253 8192 0 Y 0 31 8 +def @arg21 253 8192 0 Y 0 31 8 +def @arg22 253 8192 0 Y 0 31 8 +def @arg23 253 8192 0 Y 128 31 63 +def @arg24 253 8192 0 Y 0 31 8 +def @arg25 253 8192 0 Y 128 31 63 +def @arg26 253 8192 0 Y 0 31 8 +def @arg27 253 8192 0 Y 128 31 63 +def @arg28 253 8192 0 Y 0 31 8 +def @arg29 253 8192 0 Y 128 31 63 +def @arg30 253 8192 0 Y 0 31 8 +def @arg31 253 8192 0 Y 0 31 8 +def @arg32 253 8192 0 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL prepare stmt1 from "select c1 into ? from t9 where c1= 1" ; @@ -2555,12 +2553,12 @@ set @arg00= 9223372036854775807 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2572,18 +2570,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2595,18 +2593,18 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2624,12 +2622,12 @@ set @arg00= '-9223372036854775808' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1265 Data truncated for column 'c4' at row 1 -Warning 1265 Data truncated for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2647,14 +2645,14 @@ set @arg00= 1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 c2 32767 @@ -2666,7 +2664,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2678,8 +2676,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 c2 1 @@ -2691,20 +2689,20 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00 ; Warnings: -Warning 1264 Data truncated; out of range for column 'c1' at row 1 -Warning 1264 Data truncated; out of range for column 'c2' at row 1 -Warning 1264 Data truncated; out of range for column 'c3' at row 1 -Warning 1264 Data truncated; out of range for column 'c4' at row 1 -Warning 1264 Data truncated; out of range for column 'c5' at row 1 -Warning 1264 Data truncated; out of range for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c1' at row 1 +Warning 1264 Out of range value adjusted for column 'c2' at row 1 +Warning 1264 Out of range value adjusted for column 'c3' at row 1 +Warning 1264 Out of range value adjusted for column 'c4' at row 1 +Warning 1264 Out of range value adjusted for column 'c5' at row 1 +Warning 1264 Out of range value adjusted for column 'c6' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 c2 -32768 @@ -2728,8 +2726,8 @@ Warning 1265 Data truncated for column 'c3' at row 1 Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 -Warning 1264 Data truncated; out of range for column 'c7' at row 1 -Warning 1264 Data truncated; out of range for column 'c12' at row 1 +Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 c2 -1 @@ -2801,10 +2799,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 +52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 +53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 @@ -2960,45 +2958,45 @@ Warning 1265 Data truncated for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: -Warning 1264 Data truncated; out of range for column 'c13' at row 1 -Warning 1265 Data truncated for column 'c14' at row 1 +Warning 1264 Out of range value adjusted for column 'c13' at row 1 +Warning 1264 Out of range value adjusted for column 'c14' at row 1 Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 Warnings: Warning 1265 Data truncated for column 'c15' at row 1 -Warning 1264 Data truncated; out of range for column 'c16' at row 1 -Warning 1264 Data truncated; out of range for column 'c17' at row 1 +Warning 1264 Out of range value adjusted for column 'c16' at row 1 +Warning 1264 Out of range value adjusted for column 'c17' at row 1 select c1, c13, c14, c15, c16, c17 from t9 order by c1 ; c1 c13 c14 c15 c16 c17 20 1991-01-01 1991-01-01 01:01:01 1991-01-01 01:01:01 01:01:01 1991 diff --git a/mysql-test/r/ps_grant.result b/mysql-test/r/ps_grant.result index f883bef8591..fdc1f97bb4c 100644 --- a/mysql-test/r/ps_grant.result +++ b/mysql-test/r/ps_grant.result @@ -32,19 +32,19 @@ identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' drop table mysqltest.t9 ; show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' show grants for second_user@localhost ; Grants for second_user@localhost GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' prepare s_t1 from 'select a as my_col from t1' ; execute s_t1 ; my_col @@ -76,3 +76,15 @@ commit ; show grants for second_user@localhost ; ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost' drop database mysqltest; +prepare stmt3 from ' grant all on test.t1 to drop_user@localhost +identified by ''looser'' '; +ERROR HY000: This command is not supported in the prepared statement protocol yet +grant all on test.t1 to drop_user@localhost +identified by 'looser' ; +prepare stmt3 from ' revoke all privileges on test.t1 from +drop_user@localhost '; +ERROR HY000: This command is not supported in the prepared statement protocol yet +revoke all privileges on test.t1 from drop_user@localhost ; +prepare stmt3 from ' drop user drop_user@localhost '; +ERROR HY000: This command is not supported in the prepared statement protocol yet +drop user drop_user@localhost; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index ed87e2be2b4..0efd5ac1566 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -231,7 +231,7 @@ explain extended select benchmark(1,1) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select sql_no_cache benchmark(1,1) AS `benchmark(1,1)` from test.t1 +Note 1003 select sql_no_cache benchmark(1,1) AS `benchmark(1,1)` from `test`.`t1` show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 @@ -776,6 +776,7 @@ Qcache_hits 6 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 4 +SET NAMES default; DROP TABLE t1; CREATE TABLE t1 (a int(1)); CREATE DATABASE mysqltest; @@ -848,6 +849,42 @@ group_concat(a) 12345678901234567890 set group_concat_max_len=default; drop table t1; +create table t1 (a int); +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 18 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 6 +/**/ select * from t1; +a +/**/ select * from t1; +a +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 19 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +DROP TABLE t1; +SET GLOBAL query_cache_size=0; +SET SESSION query_cache_type = 2; +create table t1(a int); +select table_name from information_schema.tables +where table_schema="test"; +table_name +t1 +drop table t1; +select table_name from information_schema.tables +where table_schema="test"; +table_name +SET SESSION query_cache_type = 1; set global query_cache_size=1024*1024; flush query cache; create table t1 ( a int ); @@ -895,6 +932,8 @@ abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzab zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba flush query cache; drop table t1, t2; +set GLOBAL query_cache_size=1355776 +#; flush status; CREATE TABLE t1 ( `date` datetime NOT NULL default '0000-00-00 00:00:00', @@ -906,20 +945,20 @@ SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid'; COUNT(*) 0 Warnings: -Warning 1292 Truncated incorrect datetime value: '20050327 invalid' -Warning 1292 Truncated incorrect datetime value: '20050327 invalid' +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid'; COUNT(*) 0 Warnings: -Warning 1292 Truncated incorrect datetime value: '20050328 invalid' -Warning 1292 Truncated incorrect datetime value: '20050328 invalid' +Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1 +Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1 SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid'; COUNT(*) 0 Warnings: -Warning 1292 Truncated incorrect datetime value: '20050327 invalid' -Warning 1292 Truncated incorrect datetime value: '20050327 invalid' +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 @@ -982,4 +1021,109 @@ show status like "Qcache_hits"; Variable_name Value Qcache_hits 1 drop table t1; +create table t1 (a int); +insert into t1 values (1),(2); +CREATE PROCEDURE `p1`() +begin +Declare c1 cursor for select a from t1; +open c1; +select * from t1; +end// +call p1()// +a +1 +2 +drop procedure p1; +create function f1() returns int +begin +Declare var1 int; +select max(a) from t1 into var1; +return var1; +end// +create procedure `p1`() +begin +select a, f1() from t1; +end// +call p1()// +a f1() +1 2 +2 2 +drop procedure p1// +drop table t1// +flush query cache; +reset query cache; +flush status; +create table t1 (s1 int)// +create procedure f1 () begin +select sql_cache * from t1; +select sql_cache * from t1; +end;// +call f1(); +s1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +call f1(); +s1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +call f1(); +s1 +select sql_cache * from t1; +s1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +insert into t1 values (1); +select sql_cache * from t1; +s1 +1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +call f1(); +s1 +1 +call f1(); +s1 +1 +select sql_cache * from t1; +s1 +1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 4 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 9 +drop procedure f1; +drop table t1; set GLOBAL query_cache_size=0; diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 07e96aee22b..e8e30b3653a 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -218,26 +218,26 @@ drop table t1; create table t1 (x int, y int, index(x), index(y)); insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9); update t1 set y=x; -explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 7 and t1.y+0; +explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 Using where -1 SIMPLE t2 range x x 5 NULL 4 Range checked for each record (index map: 0x1) -explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 7 and t2.x <= t1.y+0; +1 SIMPLE t2 range x x 5 NULL 2 Using where +explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 Using where -1 SIMPLE t2 range x x 5 NULL 4 Using where +1 SIMPLE t2 range x x 5 NULL 2 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 Using where -1 SIMPLE t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 0x1) +1 SIMPLE t2 range x x 5 NULL 3 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 Using where -1 SIMPLE t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 0x1) +1 SIMPLE t2 range x x 5 NULL 3 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 Using where -1 SIMPLE t2 ALL x NULL NULL NULL 9 Range checked for each record (index map: 0x1) +1 SIMPLE t2 range x x 5 NULL 2 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref y y 5 const 1 Using where @@ -247,16 +247,21 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref x x 5 const 1 Using where; Using index explain select count(*) from t1 where x in (1,2); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range x x 5 NULL 2 Using where; Using index +1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index drop table t1; CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1)); -INSERT INTO t1 VALUES (0),(0),(1),(1); +INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(1),(1); CREATE TABLE t2 (keya int(11) NOT NULL default '0', KEY j1 (keya)); INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2); explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref j1 j1 4 const 1 Using where; Using index -1 SIMPLE t1 ALL i1 NULL NULL NULL 4 Range checked for each record (index map: 0x1) +1 SIMPLE t2 ref j1 j1 4 const 1 Using index +1 SIMPLE t1 index i1 i1 4 NULL 7 Using where; Using index +explain select * from t1 force index(i1), t2 force index(j1) where +(t1.key1 <t2.keya + 1) and t2.keya=3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ref j1 j1 4 const 1 Using index +1 SIMPLE t1 index i1 i1 4 NULL 7 Using where; Using index DROP TABLE t1,t2; CREATE TABLE t1 ( a int(11) default NULL, @@ -410,13 +415,25 @@ count(*) select count(*) from t2; count(*) 1026 +analyze table t1,t2; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status Table is already up to date explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uid_index uid_index 4 NULL 128 Using where +1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using where +1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38 +explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range uid_index uid_index 4 NULL 112 Using where 1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38 explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uid_index uid_index 4 NULL 129 Using where +1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using where +1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38 +explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range uid_index uid_index 4 NULL 113 Using where 1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 38 select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; id name uid id name uid @@ -531,7 +548,7 @@ count(*) select count(*) from t2 where x = 18446744073709551601; count(*) 0 -drop table t1; +drop table t1,t2; create table t1 (x bigint unsigned not null primary key) engine=innodb; insert into t1(x) values (0xfffffffffffffff0); insert into t1(x) values (0xfffffffffffffff1); @@ -627,3 +644,127 @@ SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1'); count(*) 4 drop table t1; +CREATE TABLE t1 ( +id int(11) NOT NULL auto_increment, +status varchar(20), +PRIMARY KEY (id), +KEY (status) +); +INSERT INTO t1 VALUES +(1,'B'), (2,'B'), (3,'B'), (4,'B'), (5,'B'), (6,'B'), +(7,'B'), (8,'B'), (9,'B'), (10,'B'), (11,'B'), (12,'B'), +(13,'B'), (14,'B'), (15,'B'), (16,'B'), (17,'B'), (18,'B'), +(19,'B'), (20,'B'), (21,'B'), (22,'B'), (23,'B'), (24,'B'), +(25,'A'), (26,'A'), (27,'A'), (28,'A'), (29,'A'), (30,'A'), +(31,'A'), (32,'A'), (33,'A'), (34,'A'), (35,'A'), (36,'A'), +(37,'A'), (38,'A'), (39,'A'), (40,'A'), (41,'A'), (42,'A'), +(43,'A'), (44,'A'), (45,'A'), (46,'A'), (47,'A'), (48,'A'), +(49,'A'), (50,'A'), (51,'A'), (52,'A'), (53,'C'), (54,'C'), +(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C'); +EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range status status 23 NULL 11 Using where +EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range status status 23 NULL 11 Using where +SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B'; +id status +53 C +54 C +55 C +56 C +57 C +58 C +59 C +60 C +SELECT * FROM t1 WHERE status NOT IN ('A','B'); +id status +53 C +54 C +55 C +56 C +57 C +58 C +59 C +60 C +EXPLAIN SELECT status FROM t1 WHERE status <> 'A' AND status <> 'B'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index +EXPLAIN SELECT status FROM t1 WHERE status NOT IN ('A','B'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range status status 23 NULL 11 Using where; Using index +EXPLAIN SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range status status 23 NULL 10 Using where +EXPLAIN SELECT * FROM t1 WHERE status < 'A' OR status > 'B'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range status status 23 NULL 10 Using where +SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B'; +id status +53 C +54 C +55 C +56 C +57 C +58 C +59 C +60 C +SELECT * FROM t1 WHERE status < 'A' OR status > 'B'; +id status +53 C +54 C +55 C +56 C +57 C +58 C +59 C +60 C +DROP TABLE t1; +CREATE TABLE t1 (a int, b int, primary key(a,b)); +INSERT INTO t1 VALUES +(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3),(4,1),(4,2),(4,3); +CREATE VIEW v1 as SELECT a,b FROM t1 WHERE b=3; +EXPLAIN SELECT a,b FROM t1 WHERE a < 2 and b=3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index +EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index +EXPLAIN SELECT a,b FROM t1 WHERE a < 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index +EXPLAIN SELECT a,b FROM v1 WHERE a < 2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index +SELECT a,b FROM t1 WHERE a < 2 and b=3; +a b +1 3 +SELECT a,b FROM v1 WHERE a < 2 and b=3; +a b +1 3 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (name varchar(15) NOT NULL, KEY idx(name)); +INSERT INTO t1 VALUES ('Betty'), ('Anna'); +SELECT * FROM t1; +name +Anna +Betty +DELETE FROM t1 WHERE name NOT LIKE 'A%a'; +SELECT * FROM t1; +name +Anna +DROP TABLE t1; +CREATE TABLE t1 (a int, KEY idx(a)); +INSERT INTO t1 VALUES (NULL), (1), (2), (3); +SELECT * FROM t1; +a +NULL +1 +2 +3 +DELETE FROM t1 WHERE NOT(a <=> 2); +SELECT * FROM t1; +a +2 +DROP TABLE t1; diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index dbca5c39a6c..d8fa4dbbb72 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -27,11 +27,15 @@ drop table t1; repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair error Table 'test.t1' doesn't exist +Warnings: +Error 1146 Table 'test.t1' doesn't exist create table t1 engine=myisam SELECT 1,"table 1"; flush tables; repair table t1; Table Op Msg_type Msg_text -test.t1 repair error Can't open file: 't1.MYI' (errno: 130) +test.t1 repair error Incorrect file format 't1' +Warnings: +Error 130 Incorrect file format 't1' repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair warning Number of rows changed from 0 to 1 diff --git a/mysql-test/r/replace.result b/mysql-test/r/replace.result index 83cde76215a..a7d59fcfa62 100644 --- a/mysql-test/r/replace.result +++ b/mysql-test/r/replace.result @@ -3,12 +3,10 @@ CREATE TABLE t1 ( gesuchnr int(11) DEFAULT '0' NOT NULL, benutzer_id int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (gesuchnr,benutzer_id) -) engine=ISAM; +); replace into t1 (gesuchnr,benutzer_id) values (2,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); -alter table t1 engine=myisam; -replace into t1 (gesuchnr,benutzer_id) values (1,1); alter table t1 engine=heap; replace into t1 (gesuchnr,benutzer_id) values (1,1); drop table t1; diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result index 76d6fa13766..1762587415d 100644 --- a/mysql-test/r/row.result +++ b/mysql-test/r/row.result @@ -14,12 +14,17 @@ row(10,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3)) select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')); row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')) 1 -select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)); -row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)) -1 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: 'a' +Warning 1292 Truncated incorrect INTEGER value: 'a' select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)); row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)) 1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'a' +select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)); +row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)) +1 select row('a',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3)); row('a',1.5,3) IN (row(3,NULL,3), row('a',1.5,3), row(1,3,3)) 1 @@ -53,7 +58,7 @@ SELECT (1,2,3)=(1,NULL,3); NULL SELECT (1,2,3)=(1,NULL,0); (1,2,3)=(1,NULL,0) -NULL +0 SELECT ROW(1,2,3)=ROW(1,2,3); ROW(1,2,3)=ROW(1,2,3) 1 @@ -170,3 +175,9 @@ ROW(2,10) <=> ROW(3,4) SELECT ROW(NULL,10) <=> ROW(3,NULL); ROW(NULL,10) <=> ROW(3,NULL) 0 +SELECT ROW(1,1,1) = ROW(1,1,1) as `1`, ROW(1,1,1) = ROW(1,2,1) as `0`, ROW(1,NULL,1) = ROW(2,2,1) as `0`, ROW(1,NULL,1) = ROW(1,2,2) as `0`, ROW(1,NULL,1) = ROW(1,2,1) as `null` ; +1 0 0 0 null +1 0 0 0 NULL +select row(NULL,1)=(2,0); +row(NULL,1)=(2,0) +0 diff --git a/mysql-test/r/rowid_order_bdb.result b/mysql-test/r/rowid_order_bdb.result new file mode 100644 index 00000000000..bbdc6f6ff77 --- /dev/null +++ b/mysql-test/r/rowid_order_bdb.result @@ -0,0 +1,186 @@ +drop table if exists t1, t2, t3,t4; +create table t1 ( +pk1 int not NULL, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1), +KEY key1 (key1), +KEY key2 (key2) +) engine=bdb; +insert into t1 values (-5, 1, 1), +(-100, 1, 1), +(3, 1, 1), +(0, 1, 1), +(10, 1, 1); +explain select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 5 Using sort_union(key1,key2); Using where +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 key1 key2 +-100 1 1 +-5 1 1 +0 1 1 +3 1 1 +10 1 1 +drop table t1; +create table t1 ( +pk1 int unsigned not NULL, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1), +KEY key1 (key1), +KEY key2 (key2) +) engine=bdb; +insert into t1 values (0, 1, 1), +(0xFFFFFFFF, 1, 1), +(0xFFFFFFFE, 1, 1), +(1, 1, 1), +(2, 1, 1); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 key1 key2 +0 1 1 +1 1 1 +2 1 1 +4294967294 1 1 +4294967295 1 1 +drop table t1; +create table t1 ( +pk1 char(4) not NULL, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1), +KEY key1 (key1), +KEY key2 (key2) +) engine=bdb collate latin2_general_ci; +insert into t1 values ('a1', 1, 1), +('b2', 1, 1), +('A3', 1, 1), +('B4', 1, 1); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 key1 key2 +a1 1 1 +A3 1 1 +b2 1 1 +B4 1 1 +drop table t1; +create table t1 ( +pk1 int not NULL, +pk2 char(4) not NULL collate latin1_german1_ci, +pk3 char(4) not NULL collate latin1_bin, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1,pk2,pk3), +KEY key1 (key1), +KEY key2 (key2) +) engine=bdb; +insert into t1 values +(1, 'u', 'u', 1, 1), +(1, 'u', char(0xEC), 1, 1), +(1, 'u', 'x', 1, 1); +insert ignore into t1 select pk1, char(0xEC), pk3, key1, key2 from t1; +insert ignore into t1 select pk1, 'x', pk3, key1, key2 from t1 where pk2='u'; +insert ignore into t1 select 2, pk2, pk3, key1, key2 from t1; +select * from t1; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +alter table t1 drop primary key; +select * from t1; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +drop table t1; +create table t1 ( +pk1 varchar(8) NOT NULL default '', +pk2 varchar(4) NOT NULL default '', +key1 int(11), +key2 int(11), +primary key(pk1, pk2), +KEY key1 (key1), +KEY key2 (key2) +) engine=bdb; +insert into t1 values ('','empt',2,2), +('a','a--a',2,2), +('bb','b--b',2,2), +('ccc','c--c',2,2), +('dddd','d--d',2,2); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 key1 key2 + empt 2 2 +a a--a 2 2 +bb b--b 2 2 +ccc c--c 2 2 +dddd d--d 2 2 +drop table t1; diff --git a/mysql-test/r/rowid_order_innodb.result b/mysql-test/r/rowid_order_innodb.result new file mode 100644 index 00000000000..d55029f9064 --- /dev/null +++ b/mysql-test/r/rowid_order_innodb.result @@ -0,0 +1,186 @@ +drop table if exists t1, t2, t3,t4; +create table t1 ( +pk1 int not NULL, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1), +KEY key1 (key1), +KEY key2 (key2) +) engine=innodb; +insert into t1 values (-5, 1, 1), +(-100, 1, 1), +(3, 1, 1), +(0, 1, 1), +(10, 1, 1); +explain select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 4 Using sort_union(key1,key2); Using where +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 key1 key2 +-100 1 1 +-5 1 1 +0 1 1 +3 1 1 +10 1 1 +drop table t1; +create table t1 ( +pk1 int unsigned not NULL, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1), +KEY key1 (key1), +KEY key2 (key2) +) engine=innodb; +insert into t1 values (0, 1, 1), +(0xFFFFFFFF, 1, 1), +(0xFFFFFFFE, 1, 1), +(1, 1, 1), +(2, 1, 1); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 key1 key2 +0 1 1 +1 1 1 +2 1 1 +4294967294 1 1 +4294967295 1 1 +drop table t1; +create table t1 ( +pk1 char(4) not NULL, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1), +KEY key1 (key1), +KEY key2 (key2) +) engine=innodb collate latin2_general_ci; +insert into t1 values ('a1', 1, 1), +('b2', 1, 1), +('A3', 1, 1), +('B4', 1, 1); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 key1 key2 +a1 1 1 +A3 1 1 +b2 1 1 +B4 1 1 +drop table t1; +create table t1 ( +pk1 int not NULL, +pk2 char(4) not NULL collate latin1_german1_ci, +pk3 char(4) not NULL collate latin1_bin, +key1 int(11), +key2 int(11), +PRIMARY KEY (pk1,pk2,pk3), +KEY key1 (key1), +KEY key2 (key2) +) engine=innodb; +insert into t1 values +(1, 'u', 'u', 1, 1), +(1, 'u', char(0xEC), 1, 1), +(1, 'u', 'x', 1, 1); +insert ignore into t1 select pk1, char(0xEC), pk3, key1, key2 from t1; +insert ignore into t1 select pk1, 'x', pk3, key1, key2 from t1 where pk2='u'; +insert ignore into t1 select 2, pk2, pk3, key1, key2 from t1; +select * from t1; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +alter table t1 drop primary key; +select * from t1; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 pk3 key1 key2 +1 ì u 1 1 +1 ì x 1 1 +1 ì ì 1 1 +1 u u 1 1 +1 u x 1 1 +1 u ì 1 1 +1 x u 1 1 +1 x x 1 1 +1 x ì 1 1 +2 ì u 1 1 +2 ì x 1 1 +2 ì ì 1 1 +2 u u 1 1 +2 u x 1 1 +2 u ì 1 1 +2 x u 1 1 +2 x x 1 1 +2 x ì 1 1 +drop table t1; +create table t1 ( +pk1 varchar(8) NOT NULL default '', +pk2 varchar(4) NOT NULL default '', +key1 int(11), +key2 int(11), +primary key(pk1, pk2), +KEY key1 (key1), +KEY key2 (key2) +) engine=innodb; +insert into t1 values ('','empt',2,2), +('a','a--a',2,2), +('bb','b--b',2,2), +('ccc','c--c',2,2), +('dddd','d--d',2,2); +select * from t1 force index(key1, key2) where key1 < 3 or key2 < 3; +pk1 pk2 key1 key2 +a a--a 2 2 +bb b--b 2 2 +ccc c--c 2 2 +dddd d--d 2 2 + empt 2 2 +drop table t1; diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result index eef986d8f8c..450e728090e 100644 --- a/mysql-test/r/rpl000001.result +++ b/mysql-test/r/rpl000001.result @@ -33,27 +33,12 @@ select sum(length(word)) from t1; sum(length(word)) 1022 drop table t1,t3; +create table t1 (n int) engine=myisam; reset master; stop slave; reset slave; -create table t1(n int); -select get_lock("hold_slave",10); -get_lock("hold_slave",10) -1 -explain extended select get_lock("hold_slave",10); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used -Warnings: -Note 1003 select sql_no_cache get_lock(_latin1'hold_slave',10) AS `get_lock("hold_slave",10)` +lock tables t1 read; start slave; -select release_lock("hold_slave"); -release_lock("hold_slave") -1 -explain extended select release_lock("hold_slave"); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used -Warnings: -Note 1003 select sql_no_cache release_lock(_latin1'hold_slave') AS `release_lock("hold_slave")` unlock tables; create table t2(id int); insert into t2 values(connection_id()); @@ -76,6 +61,10 @@ create table t1 (n int); insert into t1 values(3456); insert into mysql.user (Host, User, Password) VALUES ("10.10.10.%", "blafasel2", password("blafasel2")); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value select select_priv,user from mysql.user where user = _binary'blafasel2'; select_priv user N blafasel2 diff --git a/mysql-test/r/rpl000009.result b/mysql-test/r/rpl000009.result index bb82dcb1e6a..a4dbf54f39b 100644 --- a/mysql-test/r/rpl000009.result +++ b/mysql-test/r/rpl000009.result @@ -32,6 +32,7 @@ create database mysqltest2; create database mysqltest; show databases; Database +information_schema mysql mysqltest mysqltest2 @@ -48,6 +49,7 @@ insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'), set sql_log_bin = 1; show databases; Database +information_schema mysql test create database mysqltest2; @@ -66,6 +68,7 @@ insert into mysqltest.t3 values (1, 'original bar.t3'); load data from master; show databases; Database +information_schema mysql mysqltest mysqltest2 diff --git a/mysql-test/r/rpl000015.result b/mysql-test/r/rpl000015.result index 8cbbe3ab0e8..e33201ced93 100644 --- a/mysql-test/r/rpl000015.result +++ b/mysql-test/r/rpl000015.result @@ -1,23 +1,23 @@ reset master; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 79 +master-bin.000001 98 reset slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master change master to master_host='127.0.0.1'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # +# 127.0.0.1 test MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 79 slave-relay-bin.000001 123 master-bin.000001 Yes Yes 0 0 79 123 None 0 No # +# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # drop table if exists t1; create table t1 (n int); insert into t1 values (10),(45),(90); diff --git a/mysql-test/r/rpl_EE_error.result b/mysql-test/r/rpl_EE_error.result index 49ad4832c81..f4765b4b13c 100644 --- a/mysql-test/r/rpl_EE_error.result +++ b/mysql-test/r/rpl_EE_error.result @@ -6,7 +6,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; create table t1 (a int) engine=myisam; flush tables; -drop table t1; +drop table if exists t1; +Warnings: +Error 2 Can't find file: 't1' (errno: 2) create table t1 (a int, unique(a)) engine=myisam; set sql_log_bin=0; insert into t1 values(2); diff --git a/mysql-test/r/rpl_auto_increment.result b/mysql-test/r/rpl_auto_increment.result new file mode 100644 index 00000000000..9eca51ad2d9 --- /dev/null +++ b/mysql-test/r/rpl_auto_increment.result @@ -0,0 +1,185 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3; +insert into t1 values (NULL,1),(NULL,2),(NULL,3); +select * from t1; +a b +12 1 +22 2 +32 3 +select * from t1; +a b +12 1 +22 2 +32 3 +drop table t1; +create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam; +insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4); +delete from t1 where b=4; +insert into t1 values (NULL,5),(NULL,6); +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +select * from t1; +a b +1 1 +2 2 +3 3 +22 5 +32 6 +drop table t1; +set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10; +show variables like "%auto_inc%"; +Variable_name Value +auto_increment_increment 100 +auto_increment_offset 10 +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +create table t1 (a int not null auto_increment, primary key (a)) engine=innodb; +insert into t1 values (NULL),(5),(NULL); +insert into t1 values (250),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +insert into t1 values (1000); +set @@insert_id=400; +insert into t1 values(NULL),(NULL); +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +select * from t1; +a +5 +10 +110 +250 +310 +400 +410 +1000 +drop table t1; +set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values (NULL),(5),(NULL),(NULL); +insert into t1 values (500),(NULL),(502),(NULL),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +set @@insert_id=600; +insert into t1 values(600),(NULL),(NULL); +ERROR 23000: Duplicate entry '600' for key 1 +set @@insert_id=600; +insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL); +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +select * from t1; +a +1 +5 +6 +7 +500 +501 +502 +503 +504 +600 +610 +611 +drop table t1; +set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1; +create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; +insert into t1 values(2),(12),(22),(32),(42); +insert into t1 values (NULL),(NULL); +insert into t1 values (3),(NULL),(NULL); +select * from t1; +a +1 +3 +11 +21 +31 +select * from t1; +a +1 +2 +3 +11 +12 +21 +22 +31 +32 +42 +drop table t1; diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index a6342d47b49..7f2ba568fb3 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -4,26 +4,20 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -select get_lock("a",5); -get_lock("a",5) -1 create table t1(n int); -insert into t1 values(1+get_lock("a",15)*0); -insert into t1 values(2); -stop slave; select * from t1; n -1 +stop slave sql_thread; +insert into t1 values(1); +insert into t1 values(2); +stop slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 357 # # master-bin.000001 No No 0 0 183 # None 0 No # change master to master_user='root'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No # -select release_lock("a"); -release_lock("a") -1 +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 183 # # master-bin.000001 No No 0 0 183 # None 0 No # start slave; select * from t1; n diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index 292cfb19175..b27acc0972e 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +set timestamp=1000000000; drop database if exists mysqltest2; drop database if exists mysqltest3; create database mysqltest2 character set latin2; @@ -87,7 +88,6 @@ a b 2 Muffler 3 latin1_german2_ci 4 Müller -load data infile '../../std_data/words.dat' into table t1 (b); set @a= _cp850 'Müller' collate cp850_general_ci; truncate table t1; insert into t1 (b) values(collation(@a)); @@ -103,68 +103,44 @@ a b 1 cp850_general_ci drop database mysqltest2; drop database mysqltest3; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 drop database if exists mysqltest2 -master-bin.000001 154 Query 1 154 drop database if exists mysqltest3 -master-bin.000001 229 Query 1 229 create database mysqltest2 character set latin2 -master-bin.000001 317 Query 1 317 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30 -master-bin.000001 451 Query 1 451 create database mysqltest3 -master-bin.000001 518 Query 1 518 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 -master-bin.000001 652 Query 1 652 drop database mysqltest3 -master-bin.000001 717 Query 1 717 use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 -master-bin.000001 851 Query 1 851 create database mysqltest3 -master-bin.000001 918 Query 1 918 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 1058 Query 1 1058 use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 1165 Query 1 1165 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 1306 Intvar 1 1306 INSERT_ID=1 -master-bin.000001 1334 Query 1 1334 use `mysqltest2`; insert into t1 (b) values(@@character_set_server) -master-bin.000001 1424 Query 1 1424 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 1565 Intvar 1 1565 INSERT_ID=2 -master-bin.000001 1593 Query 1 1593 use `mysqltest2`; insert into t1 (b) values(@@collation_server) -master-bin.000001 1679 Query 1 1679 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 1820 Intvar 1 1820 INSERT_ID=3 -master-bin.000001 1848 Query 1 1848 use `mysqltest2`; insert into t1 (b) values(@@character_set_client) -master-bin.000001 1938 Query 1 1938 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 2079 Intvar 1 2079 INSERT_ID=4 -master-bin.000001 2107 Query 1 2107 use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) -master-bin.000001 2201 Query 1 2201 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 2342 Intvar 1 2342 INSERT_ID=5 -master-bin.000001 2370 Query 1 2370 use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 2460 Query 1 2460 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 2600 Query 1 2600 use `mysqltest2`; truncate table t1 -master-bin.000001 2658 Query 1 2658 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 2798 Intvar 1 2798 INSERT_ID=1 -master-bin.000001 2826 Query 1 2826 use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 2916 Query 1 2916 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 3056 Intvar 1 3056 INSERT_ID=2 -master-bin.000001 3084 Query 1 3084 use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 3177 Query 1 3177 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 3318 Intvar 1 3318 INSERT_ID=3 -master-bin.000001 3346 Query 1 3346 use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 3436 Query 1 3436 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 3577 Intvar 1 3577 INSERT_ID=4 -master-bin.000001 3605 Query 1 3605 use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 3698 Query 1 3698 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 3839 Intvar 1 3839 INSERT_ID=74 -master-bin.000001 3867 Create_file 1 3867 db=mysqltest2;table=t1;file_id=1;block_len=581 -master-bin.000001 4540 Query 1 4540 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 4681 Intvar 1 4681 INSERT_ID=5 -master-bin.000001 4709 Exec_load 1 4709 ;file_id=1 -master-bin.000001 4732 Query 1 4732 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 4873 Query 1 4873 use `mysqltest2`; truncate table t1 -master-bin.000001 4931 Query 1 4931 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 5072 Intvar 1 5072 INSERT_ID=1 -master-bin.000001 5100 User var 1 5100 @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci -master-bin.000001 5140 Query 1 5140 use `mysqltest2`; insert into t1 (b) values(collation(@a)) -master-bin.000001 5221 Query 1 5221 use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 5362 Query 1 5362 drop database mysqltest2 -master-bin.000001 5427 Query 1 5427 SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 5558 Query 1 5558 drop database mysqltest3 +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # drop database if exists mysqltest2 +master-bin.000001 # Query 1 # drop database if exists mysqltest3 +master-bin.000001 # Query 1 # create database mysqltest2 character set latin2 +master-bin.000001 # Query 1 # create database mysqltest3 +master-bin.000001 # Query 1 # drop database mysqltest3 +master-bin.000001 # Query 1 # create database mysqltest3 +master-bin.000001 # Query 1 # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) +master-bin.000001 # Intvar 1 # INSERT_ID=1 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_server) +master-bin.000001 # Intvar 1 # INSERT_ID=2 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_server) +master-bin.000001 # Intvar 1 # INSERT_ID=3 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_client) +master-bin.000001 # Intvar 1 # INSERT_ID=4 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) +master-bin.000001 # Intvar 1 # INSERT_ID=5 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 +master-bin.000001 # Intvar 1 # INSERT_ID=1 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Intvar 1 # INSERT_ID=2 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) +master-bin.000001 # Intvar 1 # INSERT_ID=3 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) +master-bin.000001 # Intvar 1 # INSERT_ID=4 +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) +master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 +master-bin.000001 # Intvar 1 # INSERT_ID=1 +master-bin.000001 # User var 1 # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci +master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(collation(@a)) +master-bin.000001 # Query 1 # drop database mysqltest2 +master-bin.000001 # Query 1 # drop database mysqltest3 set global character_set_server=latin2; -ERROR HY000: Binary logging and replication forbid changing the global server character set or collation +set global character_set_server=latin1; set global character_set_server=latin2; -ERROR HY000: Binary logging and replication forbid changing the global server character set or collation +set global character_set_server=latin1; set one_shot @@character_set_server=latin5; set @@max_join_size=1000; select @@character_set_server; @@ -181,7 +157,7 @@ select @@character_set_server; @@character_set_server latin5 set one_shot max_join_size=10; -ERROR HY000: The SET ONE_SHOT syntax is reserved for purposes internal to the MySQL server +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server set character_set_client=9999999; ERROR 42000: Unknown character set: '9999999' set collation_server=9999998; @@ -198,14 +174,80 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -stop slave; -delete from t1; -change master to master_log_pos=5847; -start slave until master_log_file='master-bin.000001', master_log_pos=5983; -start slave; -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; +SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; +drop database if exists mysqltest2; +SET TIMESTAMP=1000000000; +drop database if exists mysqltest3; +SET TIMESTAMP=1000000000; +create database mysqltest2 character set latin2; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; +create database mysqltest3; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64; +drop database mysqltest3; +SET TIMESTAMP=1000000000; +create database mysqltest3; +use mysqltest2; +SET TIMESTAMP=1000000000; +create table t1 (a int auto_increment primary key, b varchar(100)); +SET INSERT_ID=1; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64; +insert into t1 (b) values(@@character_set_server); +SET INSERT_ID=2; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@collation_server); +SET INSERT_ID=3; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@character_set_client); +SET INSERT_ID=4; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@character_set_connection); +SET INSERT_ID=5; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@collation_connection); +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64; +truncate table t1; +SET INSERT_ID=1; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@collation_connection); +SET INSERT_ID=2; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(LEAST("Müller","Muffler")); +SET INSERT_ID=3; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64; +insert into t1 (b) values(@@collation_connection); +SET INSERT_ID=4; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(LEAST("Müller","Muffler")); +SET TIMESTAMP=1000000000; +truncate table t1; +SET INSERT_ID=1; +SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(collation(@a)); +SET TIMESTAMP=1000000000; +drop database mysqltest2; +SET TIMESTAMP=1000000000; +drop database mysqltest3; +use test; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; drop table t1; create table `t1` ( `pk` varchar(10) not null default '', diff --git a/mysql-test/r/rpl_create_database.result b/mysql-test/r/rpl_create_database.result index 2375e13bb5c..ca4585d0d8d 100644 --- a/mysql-test/r/rpl_create_database.result +++ b/mysql-test/r/rpl_create_database.result @@ -22,6 +22,7 @@ USE mysqltest_sisyfos; ALTER DATABASE mysqltest_bob CHARACTER SET latin1; SHOW DATABASES; Database +information_schema mysql mysqltest_bob mysqltest_prometheus @@ -29,6 +30,7 @@ mysqltest_sisyfos test SHOW DATABASES; Database +information_schema mysql mysqltest_prometheus mysqltest_sisyfos @@ -41,22 +43,23 @@ CREATE DATABASE mysqltest_sisyfos; USE mysqltest_sisyfos; CREATE TABLE t2 (a INT); SHOW BINLOG EVENTS; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 DROP DATABASE IF EXISTS mysqltest_prometheus -master-bin.000001 174 Query 1 174 DROP DATABASE IF EXISTS mysqltest_sisyfos -master-bin.000001 263 Query 1 263 CREATE DATABASE mysqltest_prometheus -master-bin.000001 350 Query 1 350 CREATE DATABASE mysqltest_sisyfos -master-bin.000001 431 Query 1 431 use `mysqltest_sisyfos`; CREATE TABLE t1 (b int) -master-bin.000001 502 Query 1 502 use `mysqltest_sisyfos`; INSERT INTO t1 VALUES(1) -master-bin.000001 574 Query 1 574 ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1 -master-bin.000001 675 Query 1 675 DROP DATABASE IF EXISTS mysqltest_sisyfos -master-bin.000001 764 Query 1 764 use `mysqltest_prometheus`; CREATE TABLE t1 (a INT) -master-bin.000001 838 Query 1 838 use `mysqltest_prometheus`; INSERT INTO t1 VALUES (1) -master-bin.000001 914 Query 1 914 CREATE DATABASE mysqltest_sisyfos -master-bin.000001 995 Query 1 995 use `mysqltest_sisyfos`; CREATE TABLE t2 (a INT) +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest_prometheus +master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest_sisyfos +master-bin.000001 # Query 1 # CREATE DATABASE mysqltest_prometheus +master-bin.000001 # Query 1 # CREATE DATABASE mysqltest_sisyfos +master-bin.000001 # Query 1 # use `mysqltest_sisyfos`; CREATE TABLE t1 (b int) +master-bin.000001 # Query 1 # use `mysqltest_sisyfos`; INSERT INTO t1 VALUES(1) +master-bin.000001 # Query 1 # ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1 +master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS mysqltest_sisyfos +master-bin.000001 # Query 1 # use `mysqltest_prometheus`; CREATE TABLE t1 (a INT) +master-bin.000001 # Query 1 # use `mysqltest_prometheus`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query 1 # CREATE DATABASE mysqltest_sisyfos +master-bin.000001 # Query 1 # use `mysqltest_sisyfos`; CREATE TABLE t2 (a INT) SHOW DATABASES; Database +information_schema mysql mysqltest_bob mysqltest_prometheus @@ -64,6 +67,7 @@ mysqltest_sisyfos test SHOW DATABASES; Database +information_schema mysql mysqltest_prometheus mysqltest_sisyfos diff --git a/mysql-test/r/rpl_deadlock.result b/mysql-test/r/rpl_deadlock.result index 8eb9d64fcae..b112a51a145 100644 --- a/mysql-test/r/rpl_deadlock.result +++ b/mysql-test/r/rpl_deadlock.result @@ -10,17 +10,17 @@ create table t3 (a int) engine=innodb; create table t4 (a int) engine=innodb; show variables like 'slave_transaction_retries'; Variable_name Value -slave_transaction_retries 0 +slave_transaction_retries 10 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, KEY `a` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, KEY `a` (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 show variables like 'slave_transaction_retries'; @@ -45,9 +45,9 @@ a 22 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 13110 # # master-bin.000001 Yes Yes 0 0 13110 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No # stop slave; -change master to master_log_pos=401; +change master to master_log_pos=532; begin; select * from t2 for update; a @@ -63,10 +63,10 @@ a 22 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 13110 # # master-bin.000001 Yes Yes 0 0 13110 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No # set global max_relay_log_size=0; stop slave; -change master to master_log_pos=401; +change master to master_log_pos=532; begin; select * from t2 for update; a @@ -83,5 +83,5 @@ a 22 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 13110 # # master-bin.000001 Yes Yes 0 0 13110 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 18911 # # master-bin.000001 Yes Yes 0 0 18911 # None 0 No # drop table t1,t2,t3,t4; diff --git a/mysql-test/r/rpl_delete_all.result b/mysql-test/r/rpl_delete_all.result index 5ed221823e8..1aa556270c9 100644 --- a/mysql-test/r/rpl_delete_all.result +++ b/mysql-test/r/rpl_delete_all.result @@ -9,7 +9,7 @@ drop database if exists mysqltest; Warnings: Note 1008 Can't drop database 'mysqltest'; database doesn't exist show tables from mysqltest; -ERROR HY000: Can't read dir of './mysqltest/' (Errcode: X) +ERROR 42000: Unknown database 'mysqltest' create table t1 (a int); drop table if exists t1; Warnings: diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result index 4a562dbfc70..a0a808ce9a8 100644 --- a/mysql-test/r/rpl_error_ignored_table.result +++ b/mysql-test/r/rpl_error_ignored_table.result @@ -9,7 +9,7 @@ insert into t1 values (1),(1); ERROR 23000: Duplicate entry '1' for key 1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 213 slave-relay-bin.000002 257 master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 213 257 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 288 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288 # None 0 No # show tables like 't1'; Tables_in_test (t1) drop table t1; @@ -26,14 +26,14 @@ select (@id := id) - id from t3; 0 kill @id; drop table t2,t3; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int primary key) -master-bin.000001 149 Query 1 149 use `test`; insert into t1 values (1),(1) -master-bin.000001 213 Query 1 213 use `test`; drop table t1 -master-bin.000001 261 Query 1 261 use `test`; create table t2 (a int primary key) -master-bin.000001 331 Query 1 331 use `test`; insert into t2 values(1) -master-bin.000001 390 Query 1 390 use `test`; create table t3 (id int) -master-bin.000001 449 Query 1 449 use `test`; insert into t3 values(connection_id()) -master-bin.000001 522 Query 1 522 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) -master-bin.000001 613 Query 1 613 use `test`; drop table t2,t3 +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1 (a int primary key) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (1),(1) +master-bin.000001 # Query 1 # use `test`; drop table t1 +master-bin.000001 # Query 1 # use `test`; create table t2 (a int primary key) +master-bin.000001 # Query 1 # use `test`; insert into t2 values(1) +master-bin.000001 # Query 1 # use `test`; create table t3 (id int) +master-bin.000001 # Query 1 # use `test`; insert into t3 values(connection_id()) +master-bin.000001 # Query 1 # use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) +master-bin.000001 # Query 1 # use `test`; drop table t2,t3 diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index 120bb53ed25..fd711f89222 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -11,6 +11,10 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize error Lock wait timeout exceeded; try restarting transaction test.t1 optimize status Operation failed +Warnings: +Error 1205 Lock wait timeout exceeded; try restarting transaction OPTIMIZE TABLE non_existing; Table Op Msg_type Msg_text test.non_existing optimize error Table 'test.non_existing' doesn't exist +Warnings: +Error 1146 Table 'test.non_existing' doesn't exist diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result index 25177a6bca3..b4e840ba271 100644 --- a/mysql-test/r/rpl_flush_log_loop.result +++ b/mysql-test/r/rpl_flush_log_loop.result @@ -14,4 +14,4 @@ start slave; flush logs; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 161 relay-log.000002 4 slave-bin.000001 Yes Yes 0 0 161 4 None 0 No # +# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 208 # # slave-bin.000001 Yes Yes 0 0 208 # None 0 No # diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result index 70e4774a920..ca2e77cac66 100644 --- a/mysql-test/r/rpl_flush_tables.result +++ b/mysql-test/r/rpl_flush_tables.result @@ -13,28 +13,28 @@ insert into t4 select * from t3; rename table t1 to t5, t2 to t1; flush no_write_to_binlog tables; show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: SERVER_VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int) -master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10) -master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int) -master-bin.000001 256 Query 1 256 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 337 Query 1 337 use `test`; create table t4 (a int) -master-bin.000001 395 Query 1 395 use `test`; insert into t4 select * from t3 -master-bin.000001 461 Query 1 461 use `test`; rename table t1 to t5, t2 to t1 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (10) +master-bin.000001 # Query 1 # use `test`; create table t2 (a int) +master-bin.000001 # Query 1 # use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 # Query 1 # use `test`; create table t4 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t4 select * from t3 +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 select * from t3; a flush tables; show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: SERVER_VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int) -master-bin.000001 137 Query 1 137 use `test`; insert into t1 values (10) -master-bin.000001 198 Query 1 198 use `test`; create table t2 (a int) -master-bin.000001 256 Query 1 256 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 337 Query 1 337 use `test`; create table t4 (a int) -master-bin.000001 395 Query 1 395 use `test`; insert into t4 select * from t3 -master-bin.000001 461 Query 1 461 use `test`; rename table t1 to t5, t2 to t1 -master-bin.000001 527 Query 1 527 use `test`; flush tables +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: SERVER_VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; create table t1 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (10) +master-bin.000001 # Query 1 # use `test`; create table t2 (a int) +master-bin.000001 # Query 1 # use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 # Query 1 # use `test`; create table t4 (a int) +master-bin.000001 # Query 1 # use `test`; insert into t4 select * from t3 +master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 # Query 1 # use `test`; flush tables select * from t3; a diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index 65fc9d1b415..dc11d10fab8 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -22,7 +22,7 @@ day id category name 2003-03-22 2416 a bbbbb show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 964 +slave-bin.000001 1286 drop table t1; drop table t2; drop table t3; @@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1311 slave-relay-bin.000002 1355 master-bin.000001 Yes Yes 0 0 1311 1355 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1789 # # master-bin.000001 Yes Yes 0 0 1789 # None 0 No # set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -43,7 +43,7 @@ change master to master_user='test'; change master to master_user='root'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1419 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 1419 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1824 # # master-bin.000001 No No 0 0 1824 # None 0 No # set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -54,15 +54,28 @@ stop slave; reset slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 4 # # No No 0 0 0 # None 0 No # reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), -unique(day)); +unique(day)) engine=MyISAM; load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; ERROR 23000: Duplicate entry '2003-03-22' for key 1 -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 491 +select * from t2; +day id category name +2003-02-22 2461 b a a a @ % ' " a +2003-03-22 2161 c asdf +start slave; +select * from t2; +day id category name +2003-02-22 2461 b a a a @ % ' " a +2003-03-22 2161 c asdf +alter table t2 drop key day; +delete from t2; +load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields +terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by +'\n##\n' starting by '>' ignore 1 lines; +ERROR 23000: Duplicate entry '2003-03-22' for key 1 +drop table t2; drop table t2; diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result index 08f2c2ec071..3571c9973ea 100644 --- a/mysql-test/r/rpl_loaddata_rule_m.result +++ b/mysql-test/r/rpl_loaddata_rule_m.result @@ -10,8 +10,10 @@ create database mysqltest; create table t1(a int, b int, unique(b)); use mysqltest; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 drop database if exists mysqltest -master-bin.000001 152 Query 1 152 create database mysqltest +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # drop database if exists mysqltest +master-bin.000001 # Query 1 # create database mysqltest +master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=12 +master-bin.000001 # Execute_load_query 1 # use `mysqltest`; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1 ;file_id=1 drop database mysqltest; diff --git a/mysql-test/r/rpl_loaddata_rule_s.result b/mysql-test/r/rpl_loaddata_rule_s.result index 26893cb1e9e..16720c81374 100644 --- a/mysql-test/r/rpl_loaddata_rule_s.result +++ b/mysql-test/r/rpl_loaddata_rule_s.result @@ -10,5 +10,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; select count(*) from t1; count(*) 2 -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/r/rpl_loaddatalocal.result b/mysql-test/r/rpl_loaddatalocal.result index b49ea842485..c29825c3c98 100644 --- a/mysql-test/r/rpl_loaddatalocal.result +++ b/mysql-test/r/rpl_loaddatalocal.result @@ -12,3 +12,20 @@ select a,count(*) from t1 group by a; a count(*) 1 10000 drop table t1; +create table t1(a int); +insert into t1 values (1), (2), (2), (3); +select * into outfile '../../var/master-data/rpl_loaddatalocal.select_outfile' from t1; +drop table t1; +create table t1(a int primary key); +load data local infile './var/master-data/rpl_loaddatalocal.select_outfile' into table t1; +select * from t1; +a +1 +2 +3 +select * from t1; +a +1 +2 +3 +drop table t1; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 9fcab2a7cbe..be8d5291ad9 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -18,26 +18,26 @@ count(*) 69 drop table t1; show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 172 Intvar 1 172 INSERT_ID=1 -master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) -master-bin.000001 263 Query 1 263 use `test`; drop table t1 -master-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) -master-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581 -master-bin.000001 1056 Exec_load 1 1056 ;file_id=1 -master-bin.000001 1079 Query 1 1079 use `test`; drop table t1 -show binlog events from 79 limit 1; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -show binlog events from 79 limit 2; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 172 Intvar 1 172 INSERT_ID=1 -show binlog events from 79 limit 2,1; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 219 Intvar 1 247 INSERT_ID=1 +master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) +master-bin.000001 338 Query 1 414 use `test`; drop table t1 +master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null) +master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581 +master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 1269 Query 1 1345 use `test`; drop table t1 +show binlog events from 98 limit 1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key) +show binlog events from 98 limit 2; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 219 Intvar 1 247 INSERT_ID=1 +show binlog events from 98 limit 2,1; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) flush logs; create table t5 (a int); drop table t5; @@ -48,54 +48,56 @@ create table t1 (n int); insert into t1 values (1); drop table t1; show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 172 Intvar 1 172 INSERT_ID=1 -master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) -master-bin.000001 263 Query 1 263 use `test`; drop table t1 -master-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) -master-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581 -master-bin.000001 1056 Exec_load 1 1056 ;file_id=1 -master-bin.000001 1079 Query 1 1079 use `test`; drop table t1 -master-bin.000001 1127 Rotate 1 1127 master-bin.000002;pos=4 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 219 Intvar 1 247 INSERT_ID=1 +master-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) +master-bin.000001 338 Query 1 414 use `test`; drop table t1 +master-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null) +master-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581 +master-bin.000001 1121 Execute_load_query 1 1269 use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1 +master-bin.000001 1269 Query 1 1345 use `test`; drop table t1 +master-bin.000001 1345 Rotate 1 1389 master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000002 4 Query 1 4 use `test`; create table t5 (a int) -master-bin.000002 62 Query 1 62 use `test`; drop table t5 -master-bin.000002 110 Query 1 110 use `test`; create table t1 (n int) -master-bin.000002 168 Query 1 168 use `test`; insert into t1 values (1) -master-bin.000002 228 Query 1 228 use `test`; drop table t1 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000002 98 Query 1 184 use `test`; create table t5 (a int) +master-bin.000002 184 Query 1 260 use `test`; drop table t5 +master-bin.000002 260 Query 1 346 use `test`; create table t1 (n int) +master-bin.000002 346 Query 1 434 use `test`; insert into t1 values (1) +master-bin.000002 434 Query 1 510 use `test`; drop table t1 show binary logs; Log_name File_size -master-bin.000001 1171 -master-bin.000002 276 +master-bin.000001 1389 +master-bin.000002 510 start slave; show binary logs; Log_name File_size -slave-bin.000001 1285 -slave-bin.000002 170 +slave-bin.000001 1559 +slave-bin.000002 348 show binlog events in 'slave-bin.000001' from 4; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 -slave-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -slave-bin.000001 172 Intvar 1 172 INSERT_ID=1 -slave-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) -slave-bin.000001 263 Query 1 263 use `test`; drop table t1 -slave-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) -slave-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581 -slave-bin.000001 1065 Exec_load 1 1065 ;file_id=1 -slave-bin.000001 1088 Query 1 1088 use `test`; drop table t1 -slave-bin.000001 1136 Query 1 1136 use `test`; create table t5 (a int) -slave-bin.000001 1194 Query 1 1194 use `test`; drop table t5 -slave-bin.000001 1242 Rotate 2 1242 slave-bin.000002;pos=4 +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4 +slave-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key) +slave-bin.000001 219 Intvar 1 247 INSERT_ID=1 +slave-bin.000001 247 Query 1 338 use `test`; insert into t1 values (NULL) +slave-bin.000001 338 Query 1 414 use `test`; drop table t1 +slave-bin.000001 414 Query 1 517 use `test`; create table t1 (word char(20) not null) +slave-bin.000001 517 Begin_load_query 1 1121 ;file_id=1;block_len=581 +slave-bin.000001 1121 Execute_load_query 1 1278 use `test`; load data INFILE '../../var/tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1 +slave-bin.000001 1278 Query 1 1354 use `test`; drop table t1 +slave-bin.000001 1354 Query 1 1440 use `test`; create table t5 (a int) +slave-bin.000001 1440 Query 1 1516 use `test`; drop table t5 +slave-bin.000001 1516 Rotate 2 1559 slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000002 4 Query 1 4 use `test`; create table t1 (n int) -slave-bin.000002 62 Query 1 62 use `test`; insert into t1 values (1) -slave-bin.000002 122 Query 1 122 use `test`; drop table t1 +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000002 4 Format_desc 2 98 Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 98 Query 1 184 use `test`; create table t1 (n int) +slave-bin.000002 184 Query 1 272 use `test`; insert into t1 values (1) +slave-bin.000002 272 Query 1 348 use `test`; drop table t1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 276 slave-relay-bin.000003 214 master-bin.000002 Yes Yes 0 0 276 214 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 510 # # master-bin.000002 Yes Yes 0 0 510 # None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index 10c78272de6..cf13756966e 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 79 +master-bin.000001 98 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # stop slave; change master to master_log_pos=73; start slave; @@ -17,26 +17,26 @@ stop slave; change master to master_log_pos=73; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 73 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 # # master-bin.000001 No No 0 0 73 # None 0 No # start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 slave-relay-bin.000001 48 master-bin.000001 No Yes 0 0 73 48 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73 # # master-bin.000001 No Yes 0 0 73 # None 0 No # stop slave; change master to master_log_pos=173; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 slave-relay-bin.000001 4 master-bin.000001 No Yes 0 0 173 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 # # master-bin.000001 No Yes 0 0 173 # None 0 No # show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 79 +master-bin.000001 98 create table if not exists t1 (n int); drop table if exists t1; create table t1 (n int); insert into t1 values (1),(2),(3); stop slave; -change master to master_log_pos=79; +change master to master_log_pos=98; start slave; select * from t1; n diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result index 5c3360b0f66..fbe3b89828a 100644 --- a/mysql-test/r/rpl_max_relay_size.result +++ b/mysql-test/r/rpl_max_relay_size.result @@ -16,7 +16,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000014 1221 master-bin.000001 Yes Yes 0 0 50477 1221 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72952 # # master-bin.000001 Yes Yes 0 0 72952 # None 0 No # stop slave; reset slave; set global max_relay_log_size=(5*4096); @@ -26,7 +26,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000004 9457 master-bin.000001 Yes Yes 0 0 50477 9457 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72952 # # master-bin.000001 Yes Yes 0 0 72952 # None 0 No # stop slave; reset slave; set global max_relay_log_size=0; @@ -36,26 +36,26 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50477 slave-relay-bin.000008 1283 master-bin.000001 Yes Yes 0 0 50477 1283 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72952 # # master-bin.000001 Yes Yes 0 0 72952 # None 0 No # stop slave; reset slave; flush logs; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 4 # # No No 0 0 0 # None 0 No # reset slave; start slave; flush logs; create table t1 (a int); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50535 slave-relay-bin.000009 62 master-bin.000001 Yes Yes 0 0 50535 62 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73038 # # master-bin.000001 Yes Yes 0 0 73038 # None 0 No # flush logs; drop table t1; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 50583 slave-relay-bin.000010 52 master-bin.000001 Yes Yes 0 0 50583 52 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73114 # # master-bin.000001 Yes Yes 0 0 73114 # None 0 No # flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 4 +master-bin.000002 98 diff --git a/mysql-test/r/rpl_multi_query.result b/mysql-test/r/rpl_multi_query.result index 2521dbe1ed9..f2d8ea77536 100644 --- a/mysql-test/r/rpl_multi_query.result +++ b/mysql-test/r/rpl_multi_query.result @@ -19,8 +19,8 @@ n 3 4 5 -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest master-bin.000001 # Query 1 # create database mysqltest master-bin.000001 # Query 1 # use `test`; create table mysqltest.t1 ( n int) diff --git a/mysql-test/r/rpl_openssl.result b/mysql-test/r/rpl_openssl.result index ad7251fd631..d916e9f2c5c 100644 --- a/mysql-test/r/rpl_openssl.result +++ b/mysql-test/r/rpl_openssl.result @@ -4,7 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -grant replication slave on *.* to replssl@'%' require ssl; +grant replication slave on *.* to replssl@localhost require ssl; create table t1 (t int); stop slave; change master to master_user='replssl',master_password=''; @@ -20,11 +20,11 @@ t 1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 replssl MASTER_MYPORT 1 master-bin.000001 289 slave-relay-bin.000001 108 master-bin.000001 Yes Yes 0 0 289 108 None 0 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # +# 127.0.0.1 replssl MASTER_MYPORT 1 master-bin.000001 398 # # master-bin.000001 Yes Yes 0 0 398 # None 0 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # stop slave; change master to master_user='root',master_password='', master_ssl=0; start slave; drop table t1; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 337 slave-relay-bin.000001 96 master-bin.000001 Yes Yes 0 0 337 96 None 0 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 474 # # master-bin.000001 Yes Yes 0 0 474 # None 0 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result index bf9bbbb9b93..c79187e12d0 100644 --- a/mysql-test/r/rpl_relayrotate.result +++ b/mysql-test/r/rpl_relayrotate.result @@ -13,7 +13,10 @@ start slave; select master_pos_wait('master-bin.001',3000)>=0; master_pos_wait('master-bin.001',3000)>=0 1 -select * from t1 where a=8000; -a +select max(a) from t1; +max(a) 8000 +show slave status; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 735186 # # master-bin.000001 Yes Yes 0 0 735186 # None 0 No # drop table t1; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index ca290d46fda..8bcae3d25ad 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1340 slave-relay-bin.000002 1384 master-bin.000001 Yes Yes test.t1 0 0 1340 1384 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1658 # # master-bin.000001 Yes Yes test.t1 0 0 1658 # None 0 No # diff --git a/mysql-test/r/rpl_reset_slave.result b/mysql-test/r/rpl_reset_slave.result index 42d41533cb0..ab55423b773 100644 --- a/mysql-test/r/rpl_reset_slave.result +++ b/mysql-test/r/rpl_reset_slave.result @@ -6,20 +6,20 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # stop slave; change master to master_user='test'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 79 4 None 0 No # +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 No No 0 0 98 # None 0 No # reset slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 slave-relay-bin.000001 4 No No 0 0 0 4 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 4 # # No No 0 0 0 # None 0 No # start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 79 slave-relay-bin.000002 123 master-bin.000001 Yes Yes 0 0 79 123 None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 98 # # master-bin.000001 Yes Yes 0 0 98 # None 0 No # stop slave; reset slave; start slave; diff --git a/mysql-test/r/rpl_rewrite_db.result b/mysql-test/r/rpl_rewrite_db.result index da3ec0243fe..d4a24626cc3 100644 --- a/mysql-test/r/rpl_rewrite_db.result +++ b/mysql-test/r/rpl_rewrite_db.result @@ -67,9 +67,9 @@ drop table t1; create table t1 (a int, b char(10)); load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: -Warning 1265 Data truncated for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 3 Warning 1262 Row 3 was truncated; it contained more data than there were input columns -Warning 1265 Data truncated for column 'a' at row 5 +Warning 1264 Out of range value adjusted for column 'a' at row 5 Warning 1262 Row 5 was truncated; it contained more data than there were input columns select * from rewrite.t1; a b @@ -81,7 +81,7 @@ a b truncate table t1; load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; Warnings: -Warning 1265 Data truncated for column 'a' at row 4 +Warning 1264 Out of range value adjusted for column 'a' at row 4 Warning 1261 Row 4 doesn't contain data for all columns select * from rewrite.t1; a b diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index 9f74cdb9502..bf2ef98c87f 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -1,7 +1,7 @@ drop table if exists t1, t2, t3, t4; drop table if exists t1, t2, t3, t4; start slave; -ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log +Got one of the listed errors start slave; ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; @@ -16,7 +16,7 @@ create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 417 slave-relay-bin.000001 461 master-bin.000001 Yes Yes 0 0 417 461 None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 548 # # master-bin.000001 Yes Yes 0 0 548 # None 0 No # select * from t1; s Could not break slave @@ -27,9 +27,9 @@ insert into t2 values (34),(67),(123); flush logs; show binary logs; Log_name File_size -master-bin.000001 461 -master-bin.000002 213 -master-bin.000003 4 +master-bin.000001 592 +master-bin.000002 363 +master-bin.000003 98 create table t3 select * from temp_table; select * from t3; a @@ -43,21 +43,21 @@ start slave; purge master logs to 'master-bin.000002'; show master logs; Log_name File_size -master-bin.000002 213 -master-bin.000003 229 +master-bin.000002 363 +master-bin.000003 407 purge binary logs to 'master-bin.000002'; show binary logs; Log_name File_size -master-bin.000002 213 -master-bin.000003 229 +master-bin.000002 363 +master-bin.000003 407 purge master logs before now(); show binary logs; Log_name File_size -master-bin.000003 229 +master-bin.000003 407 insert into t2 values (65); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 290 slave-relay-bin.000001 1088 master-bin.000003 Yes Yes 0 0 290 1088 None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 496 # # master-bin.000003 Yes Yes 0 0 496 # None 0 No # select * from t2; m 34 @@ -74,17 +74,18 @@ count(*) create table t4 select * from temp_table; show binary logs; Log_name File_size -master-bin.000003 4167 -master-bin.000004 2886 +master-bin.000003 4185 +master-bin.000004 4190 +master-bin.000005 2032 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000004 2886 +master-bin.000005 2032 select * from t4; a testing temporary tables part 2 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000004 2886 slave-relay-bin.000001 7891 master-bin.000004 Yes Yes 0 0 2886 7891 None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2032 # # master-bin.000005 Yes Yes 0 0 2032 # None 0 No # lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_server_id1.result b/mysql-test/r/rpl_server_id1.result index 32e14b053d7..a3ab6672f69 100644 --- a/mysql-test/r/rpl_server_id1.result +++ b/mysql-test/r/rpl_server_id1.result @@ -10,7 +10,7 @@ stop slave; change master to master_port=SLAVE_PORT; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 4 None 0 No NULL + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 98 None 0 No NULL start slave; insert into t1 values (1); show status like "slave_running"; diff --git a/mysql-test/r/rpl_server_id2.result b/mysql-test/r/rpl_server_id2.result index 82ab1ff85a7..b196646aecc 100644 --- a/mysql-test/r/rpl_server_id2.result +++ b/mysql-test/r/rpl_server_id2.result @@ -10,7 +10,7 @@ stop slave; change master to master_port=SLAVE_PORT; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 4 None 0 No NULL + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 98 None 0 No NULL start slave; insert into t1 values (1); select * from t1; diff --git a/mysql-test/r/rpl_session_var.result b/mysql-test/r/rpl_session_var.result new file mode 100644 index 00000000000..b5b4b815ade --- /dev/null +++ b/mysql-test/r/rpl_session_var.result @@ -0,0 +1,43 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1(a varchar(100),b int); +set @@session.sql_mode=pipes_as_concat; +insert into t1 values('My'||'SQL', 1); +set @@session.sql_mode=default; +insert into t1 values('1'||'2', 2); +select * from t1 where b<3 order by a; +a b +1 2 +MySQL 1 +select * from t1 where b<3 order by a; +a b +1 2 +MySQL 1 +set @@session.sql_mode=ignore_space; +insert into t1 values(password ('MySQL'), 3); +set @@session.sql_mode=ansi_quotes; +create table "t2" ("a" int); +drop table t1, t2; +set @@session.sql_mode=default; +create table t1(a int auto_increment primary key); +create table t2(b int, a int); +set @@session.sql_auto_is_null=1; +insert into t1 values(null); +insert into t2 select 1,a from t1 where a is null; +set @@session.sql_auto_is_null=0; +insert into t1 values(null); +insert into t2 select 2,a from t1 where a is null; +select * from t2 order by b; +b a +1 1 +select * from t2 order by b; +b a +1 1 +drop table t1,t2; diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result new file mode 100644 index 00000000000..394f93f2ea0 --- /dev/null +++ b/mysql-test/r/rpl_sp.result @@ -0,0 +1,269 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create database if not exists mysqltest1; +use mysqltest1; +create table t1 (a varchar(100)); +use mysqltest1; +drop procedure if exists foo; +drop procedure if exists foo2; +drop procedure if exists foo3; +drop procedure if exists foo4; +drop procedure if exists bar; +drop function if exists fn1; +create procedure foo() +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end| +ERROR HY000: This routine has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable) +show binlog events from 98| +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # create database if not exists mysqltest1 +master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a varchar(100)) +create procedure foo() deterministic +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end| +select * from mysql.proc where name='foo' and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL YES DEFINER begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end root@localhost # # +select * from mysql.proc where name='foo' and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo PROCEDURE foo SQL CONTAINS_SQL YES DEFINER begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end @ # # +set timestamp=1000000000; +call foo(); +show binlog events from 308; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `mysqltest1`; create procedure foo() deterministic +begin +declare b int; +set b = 8; +insert into t1 values (b); +insert into t1 values (unix_timestamp()); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8)) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (unix_timestamp()) +select * from t1; +a +8 +1000000000 +select * from t1; +a +8 +1000000000 +delete from t1; +create procedure foo2() +not deterministic +reads sql data +select * from mysqltest1.t1; +call foo2(); +a +show binlog events from 518; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8)) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (unix_timestamp()) +master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000001 # Query 1 # use `mysqltest1`; create procedure foo2() +not deterministic +reads sql data +select * from mysqltest1.t1 +alter procedure foo2 contains sql; +ERROR HY000: This routine has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable) +drop table t1; +create table t1 (a int); +create table t2 like t1; +create procedure foo3() +deterministic +insert into t1 values (15); +grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1; +grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1; +grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1; +create procedure foo4() +deterministic +insert into t1 values (10); +ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_routine_creators variable) +set global log_bin_trust_routine_creators=1; +create procedure foo4() +deterministic +begin +insert into t2 values(3); +insert into t1 values (5); +end| +call foo4(); +Got one of the listed errors +show warnings; +Level Code Message +Error 1142 INSERT command denied to user 'zedjzlcsjhd'@'localhost' for table 't1' +Warning 1417 A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes +call foo3(); +show warnings; +Level Code Message +call foo4(); +Got one of the listed errors +show warnings; +Level Code Message +Error 1142 INSERT command denied to user 'zedjzlcsjhd'@'localhost' for table 't1' +Warning 1417 A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes +alter procedure foo4 sql security invoker; +call foo4(); +show warnings; +Level Code Message +show binlog events from 990; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1 +master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int) +master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1 +master-bin.000001 # Query 1 # use `mysqltest1`; create procedure foo3() +deterministic +insert into t1 values (15) +master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1 +master-bin.000001 # Query 1 # use `mysqltest1`; create procedure foo4() +deterministic +begin +insert into t2 values(3); +insert into t1 values (5); +end +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (15) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo4 sql security invoker +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3) +master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (5) +select * from t1; +a +15 +5 +select * from t2; +a +3 +3 +3 +select * from t1; +a +15 +5 +select * from t2; +a +3 +3 +3 +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES INVOKER begin +insert into t2 values(3); +insert into t1 values (5); +end @ # # +drop procedure foo4; +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +select * from mysql.proc where name="foo4" and db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +drop procedure foo; +drop procedure foo2; +drop procedure foo3; +create function fn1(x int) +returns int +deterministic +begin +insert into t1 values (x); +return x+2; +end| +delete t1,t2 from t1,t2; +select fn1(20); +fn1(20) +22 +insert into t2 values(fn1(21)); +select * from t1; +a +21 +20 +select * from t2; +a +23 +select * from t1; +a +21 +20 +select * from t2; +a +23 +drop function fn1; +create function fn1() +returns int +deterministic +begin +return unix_timestamp(); +end| +delete from t1; +set timestamp=1000000000; +insert into t1 values(fn1()); +select * from mysql.proc where db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 fn1 FUNCTION fn1 SQL CONTAINS_SQL YES DEFINER int(11) begin +return unix_timestamp(); +end root@localhost # # +select * from t1; +a +1000000000 +use mysqltest1; +select * from t1; +a +1000000000 +select * from mysql.proc where db='mysqltest1'; +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +mysqltest1 fn1 FUNCTION fn1 SQL CONTAINS_SQL YES DEFINER int(11) begin +return unix_timestamp(); +end @ # # +create trigger trg before insert on t1 for each row set new.a= 10; +ERROR 42000: Access denied; you need the SUPER privilege for this operation +flush logs; +delete from t1; +create trigger trg before insert on t1 for each row set new.a= 10; +insert into t1 values (1); +select * from t1; +a +10 +select * from t1; +a +10 +delete from t1; +drop trigger trg; +insert into t1 values (1); +select * from t1; +a +1 +show binlog events in 'master-bin.000002' from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000002 # Query 1 # use `mysqltest1`; create trigger trg before insert on t1 for each row set new.a= 10 +master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1) +master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1 +master-bin.000002 # Query 1 # use `mysqltest1`; drop trigger trg +master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1) +select * from t1; +a +1 +drop function fn1; +drop database mysqltest1; +drop user "zedjzlcsjhd"@127.0.0.1; diff --git a/mysql-test/r/rpl_sp_effects.result b/mysql-test/r/rpl_sp_effects.result new file mode 100644 index 00000000000..8bcbf1a60d0 --- /dev/null +++ b/mysql-test/r/rpl_sp_effects.result @@ -0,0 +1,158 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop procedure if exists p1; +drop procedure if exists p2; +drop function if exists f1; +drop table if exists t1,t2; +drop view if exists v1; +create table t1 (a int); +create procedure p1() +begin +declare spv int default 0; +while spv < 5 do +insert into t1 values(spv+1); +set spv=spv+1; +end while; +end// +call p1(); +select * from t1; +a +1 +2 +3 +4 +5 +delete from t1; +create procedure p2() +begin +declare a int default 4; +create table t2 as select a; +end// +call p2(); +select * from t2; +a +4 +select * from t2; +a +4 +drop procedure p1; +drop procedure p2; +drop table t2; +create function f1(x int) returns int +begin +insert into t1 values(x); +return x+1; +end// +create procedure p1(a int, b int) +begin +declare v int default f1(5); +if (f1(6)) then +select 'yes'; +end if; +set v = f1(7); +while f1(8) < 1 do +select 'this cant be'; +end while; +end// +call p1(f1(1), f1(2)); +yes +yes +select * from t1; +a +1 +2 +5 +6 +7 +8 +create table t2(a int); +insert into t2 values (10),(11); +select a,f1(a) from t2; +a f1(a) +10 11 +11 12 +insert into t2 select f1(3); +select 'master:',a from t1; +master: a +master: 1 +master: 2 +master: 5 +master: 6 +master: 7 +master: 8 +master: 10 +master: 11 +master: 3 +select 'slave:',a from t1; +slave: a +slave: 1 +slave: 2 +slave: 5 +slave: 6 +slave: 7 +slave: 8 +slave: 10 +slave: 11 +slave: 3 +drop procedure p1; +delete from t1; +delete from t2; +delete from t1; +insert into t2 values(1),(2); +create view v1 as select f1(a) from t2; +select * from v1; +f1(a) +2 +3 +select 'master:',a from t1; +master: a +master: 1 +master: 2 +select 'slave:',a from t1; +slave: a +slave: 1 +slave: 2 +drop view v1; +delete from t1; +prepare s1 from 'select f1(?)'; +set @xx=123; +execute s1 using @xx; +f1(?) +124 +select 'master:',a from t1; +master: a +master: 123 +select 'slave:',a from t1; +slave: a +slave: 123 +delete from t1; +create procedure p1(spv int) +begin +declare c cursor for select f1(spv) from t2; +while (spv > 2) do +open c; +fetch c into spv; +close c; +set spv= spv - 10; +end while; +end// +call p1(15); +select 'master:',a from t1; +master: a +master: 15 +master: 15 +master: 6 +master: 6 +select 'slave:',a from t1; +slave: a +slave: 15 +slave: 15 +slave: 6 +slave: 6 +drop procedure p1; +drop function f1; +drop table t1,t2; diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result index b9865d282fa..a76fb87a52b 100644 --- a/mysql-test/r/rpl_temporary.result +++ b/mysql-test/r/rpl_temporary.result @@ -7,12 +7,12 @@ start slave; reset master; SET @save_select_limit=@@session.sql_select_limit; SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; -ERROR HY000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need the SUPER privilege for this operation SELECT @@session.sql_select_limit = @save_select_limit; @@session.sql_select_limit = @save_select_limit 1 SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; -ERROR HY000: Access denied; you need the SUPER privilege for this operation +ERROR 42000: Access denied; you need the SUPER privilege for this operation SELECT @@session.sql_select_limit = @save_select_limit; @@session.sql_select_limit = @save_select_limit 1 @@ -37,20 +37,20 @@ f 5 7 show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; drop table if exists t1,t2 -master-bin.000001 140 Query 1 140 use `test`; create table t1(f int) -master-bin.000001 197 Query 1 197 use `test`; create table t2(f int) -master-bin.000001 254 Query 1 254 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) -master-bin.000001 351 Query 1 351 use `test`; create temporary table t3(f int) -master-bin.000001 418 Query 1 418 use `test`; insert into t3 select * from t1 where f<6 -master-bin.000001 494 Query 1 494 use `test`; create temporary table t3(f int) -master-bin.000001 561 Query 1 561 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 634 Query 1 634 use `test`; insert into t3 select * from t1 where f>=4 -master-bin.000001 711 Query 1 711 use `test`; drop temporary table t3 -master-bin.000001 769 Query 1 769 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 842 Query 1 842 use `test`; drop temporary table t3 +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # use `test`; drop table if exists t1,t2 +master-bin.000001 # Query 1 # use `test`; create table t1(f int) +master-bin.000001 # Query 1 # use `test`; create table t2(f int) +master-bin.000001 # Query 1 # use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) +master-bin.000001 # Query 1 # use `test`; create temporary table t3(f int) +master-bin.000001 # Query 1 # use `test`; insert into t3 select * from t1 where f<6 +master-bin.000001 # Query 1 # use `test`; create temporary table t3(f int) +master-bin.000001 # Query 1 # use `test`; insert into t2 select count(*) from t3 +master-bin.000001 # Query 1 # use `test`; insert into t3 select * from t1 where f>=4 +master-bin.000001 # Query 1 # use `test`; drop temporary table t3 +master-bin.000001 # Query 1 # use `test`; insert into t2 select count(*) from t3 +master-bin.000001 # Query 1 # use `test`; drop temporary table t3 drop table t1, t2; use test; SET TIMESTAMP=1040323920; diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result index c7be3324533..85637638f99 100644 --- a/mysql-test/r/rpl_timezone.result +++ b/mysql-test/r/rpl_timezone.result @@ -4,21 +4,31 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +set timestamp=100000000; create table t1 (t timestamp); create table t2 (t char(32)); select @@time_zone; @@time_zone +Japan +select @@time_zone; +@@time_zone Europe/Moscow +insert into t1 values ('20050101000000'), ('20050611093902'); set time_zone='UTC'; insert into t1 values ('20040101000000'), ('20040611093902'); select * from t1; t +2004-12-31 21:00:00 +2005-06-11 05:39:02 2004-01-01 00:00:00 2004-06-11 09:39:02 +set time_zone='UTC'; select * from t1; t -2004-01-01 03:00:00 -2004-06-11 13:39:02 +2004-12-31 21:00:00 +2005-06-11 05:39:02 +2004-01-01 00:00:00 +2004-06-11 09:39:02 delete from t1; set time_zone='Europe/Moscow'; insert into t1 values ('20040101000000'), ('20040611093902'); @@ -26,19 +36,51 @@ select * from t1; t 2004-01-01 00:00:00 2004-06-11 09:39:02 +set time_zone='Europe/Moscow'; +select * from t1; +t +2004-01-01 00:00:00 +2004-06-11 09:39:02 +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; +use test; +SET TIMESTAMP=100000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; +create table t1 (t timestamp); +SET TIMESTAMP=100000000; +create table t2 (t char(32)); +SET TIMESTAMP=100000000; +SET @@session.time_zone='Europe/Moscow'; +insert into t1 values ('20050101000000'), ('20050611093902'); +SET TIMESTAMP=100000000; +SET @@session.time_zone='UTC'; +insert into t1 values ('20040101000000'), ('20040611093902'); +SET TIMESTAMP=100000000; +delete from t1; +SET TIMESTAMP=100000000; +SET @@session.time_zone='Europe/Moscow'; +insert into t1 values ('20040101000000'), ('20040611093902'); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +delete from t1; +set time_zone='UTC'; +load data infile '../../std_data/rpl_timezone.dat' into table t1; select * from t1; t 2004-01-01 00:00:00 2004-06-11 09:39:02 -show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; create table t1 (t timestamp) -master-bin.000001 143 Query 1 143 use `test`; create table t2 (t char(32)) -master-bin.000001 206 Query 1 206 use `test`; SET ONE_SHOT TIME_ZONE='UTC' -master-bin.000001 269 Query 1 269 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') -master-bin.000001 364 Query 1 364 use `test`; delete from t1 -master-bin.000001 413 Query 1 413 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +set time_zone='UTC'; +select * from t1; +t +2004-01-01 00:00:00 +2004-06-11 09:39:02 +set time_zone='Europe/Moscow'; +set time_zone='Europe/Moscow'; +delete from t1; +insert into t1 values ('20040101000000'), ('20040611093902'); set time_zone='MET'; insert into t2 (select t from t1); select * from t1; @@ -52,10 +94,6 @@ t delete from t2; set timestamp=1000072000; insert into t2 values (current_timestamp), (current_date), (current_time); -set timestamp=1000072000; -select current_timestamp, current_date, current_time; -current_timestamp current_date current_time -2001-09-10 01:46:40 2001-09-10 01:46:40 select * from t2; t 2001-09-09 23:46:40 @@ -73,5 +111,16 @@ t 2001-09-09 03:46:40 1000000000 set global time_zone='MET'; -ERROR HY000: Binary logging and replication forbid changing of the global server time zone +delete from t2; +set time_zone='UTC'; +insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone)); +insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan')); +select * from t2; +t +2003-12-31 23:00:00 +2005-01-01 08:00:00 +select * from t2; +t +2003-12-31 23:00:00 +2005-01-01 08:00:00 drop table t1, t2; diff --git a/mysql-test/r/rpl_trigger.result b/mysql-test/r/rpl_trigger.result new file mode 100644 index 00000000000..db824c9c423 --- /dev/null +++ b/mysql-test/r/rpl_trigger.result @@ -0,0 +1,108 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); +create table t2 (a int auto_increment, primary key (a), b int); +create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); +create trigger t1 before insert on t1 for each row +begin +insert into t3 values (NULL, "t1", new.a, new.b, rand()); +end| +create trigger t2 after insert on t2 for each row +begin +insert into t3 values (NULL, "t2", new.a, new.b, rand()); +end| +insert into t3 values(100,"log",0,0,0); +SET @@RAND_SEED1=658490765, @@RAND_SEED2=635893186; +insert into t1 values(1,1,rand()),(NULL,2,rand()); +insert into t2 (b) values(last_insert_id()); +insert into t2 values(3,0),(NULL,0); +insert into t2 values(NULL,0),(500,0); +select a,b, truncate(rand_value,4) from t1; +a b truncate(rand_value,4) +1 1 0.4320 +2 2 0.3055 +select * from t2; +a b +1 2 +3 0 +4 0 +5 0 +500 0 +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +a name old_a old_b truncate(rand_value,4) +100 log 0 0 0.0000 +101 t1 1 1 0.3203 +102 t1 0 2 0.5666 +103 t2 1 2 0.9164 +104 t2 3 0 0.8826 +105 t2 4 0 0.6635 +106 t2 5 0 0.6699 +107 t2 500 0 0.3593 + +--- On slave -- +select a,b, truncate(rand_value,4) from t1; +a b truncate(rand_value,4) +1 1 0.4320 +2 2 0.3055 +select * from t2; +a b +1 2 +3 0 +4 0 +5 0 +500 0 +select a,name, old_a, old_b, truncate(rand_value,4) from t3; +a name old_a old_b truncate(rand_value,4) +100 log 0 0 0.0000 +101 t1 1 1 0.3203 +102 t1 0 2 0.5666 +103 t2 1 2 0.9164 +104 t2 3 0 0.8826 +105 t2 4 0 0.6635 +106 t2 5 0 0.6699 +107 t2 500 0 0.3593 +drop table t1,t2,t3; +select get_lock("bug12480",2); +get_lock("bug12480",2) +1 +create table t1 (a datetime,b datetime, c datetime); +drop function if exists bug12480; +Warnings: +Note 1305 FUNCTION bug12480 does not exist +create function bug12480() returns datetime +begin +set @a=get_lock("bug12480",2); +return now(); +end| +create trigger t1_first before insert on t1 +for each row begin +set @a=get_lock("bug12480",2); +set new.b= now(); +set new.c= bug12480(); +end +| +insert into t1 set a = now(); +select a=b && a=c from t1; +a=b && a=c +1 + +--- On slave -- +select a=b && a=c from t1; +a=b && a=c +1 +test +1 +truncate table t1; +drop trigger t1_first; +insert into t1 values ("2003-03-03","2003-03-03","2003-03-03"),(bug12480(),bug12480(),bug12480()),(now(),now(),now()); +select a=b && a=c from t1; +a=b && a=c +1 +1 +1 +drop function bug12480; +drop table t1; diff --git a/mysql-test/r/rpl_trunc_binlog.result b/mysql-test/r/rpl_trunc_binlog.result deleted file mode 100644 index 085a2937584..00000000000 --- a/mysql-test/r/rpl_trunc_binlog.result +++ /dev/null @@ -1,13 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -stop slave; -flush logs; -reset slave; -start slave; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 # None 0 No # diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 5772f176919..64efeab0145 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -13,16 +13,16 @@ insert into t2 values (1),(2); insert into t2 values (3),(4); drop table t2; show binlog events; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 -master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 172 Query 1 172 use `test`; insert into t1 values (1),(2),(3),(4) -master-bin.000001 244 Query 1 244 use `test`; drop table t1 -master-bin.000001 292 Query 1 292 use `test`; create table t2(n int not null auto_increment primary key) -master-bin.000001 385 Query 1 385 use `test`; insert into t2 values (1),(2) -master-bin.000001 449 Query 1 449 use `test`; insert into t2 values (3),(4) -master-bin.000001 513 Query 1 513 use `test`; drop table t2 -start slave until master_log_file='master-bin.000001', master_log_pos=244; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4 +master-bin.000001 98 Query 1 219 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 219 Query 1 319 use `test`; insert into t1 values (1),(2),(3),(4) +master-bin.000001 319 Query 1 395 use `test`; drop table t1 +master-bin.000001 395 Query 1 516 use `test`; create table t2(n int not null auto_increment primary key) +master-bin.000001 516 Query 1 608 use `test`; insert into t2 values (1),(2) +master-bin.000001 608 Query 1 700 use `test`; insert into t2 values (3),(4) +master-bin.000001 700 Query 1 776 use `test`; drop table t2 +start slave until master_log_file='master-bin.000001', master_log_pos=319; select * from t1; n 1 @@ -31,7 +31,7 @@ n 4 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 244 # Master master-bin.000001 244 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-bin.000001 319 No # start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -41,21 +41,21 @@ n 4 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 244 # Master master-no-such-bin.000001 291 No # -start slave until relay_log_file='slave-relay-bin.000002', relay_log_pos=537; +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-no-such-bin.000001 291 No # +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; select * from t2; n 1 2 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 449 # Relay slave-relay-bin.000002 537 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 608 # Relay slave-relay-bin.000004 746 No # start slave; stop slave; -start slave until master_log_file='master-bin.000001', master_log_pos=561; +start slave until master_log_file='master-bin.000001', master_log_pos=776; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 561 # Master master-bin.000001 561 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 776 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 776 # Master master-bin.000001 776 No # start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; @@ -67,6 +67,6 @@ ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UN start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave sql_thread; -start slave until master_log_file='master-bin.000001', master_log_pos=561; +start slave until master_log_file='master-bin.000001', master_log_pos=776; Warnings: Note 1254 Slave is already running diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result index 85768270ba3..4198bbcc154 100644 --- a/mysql-test/r/rpl_user_variables.result +++ b/mysql-test/r/rpl_user_variables.result @@ -76,34 +76,35 @@ abcn1n2 NULL NULL NULL -show binlog events from 141; -Log_name Pos Event_type Server_id Orig_log_pos Info -slave-bin.000001 141 User var 2 141 @`i1`=12345678901234 -slave-bin.000001 184 User var 2 184 @`i2`=-12345678901234 -slave-bin.000001 227 User var 2 227 @`i3`=0 -slave-bin.000001 270 User var 2 270 @`i4`=-1 -slave-bin.000001 313 Query 1 313 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) -slave-bin.000001 396 User var 2 396 @`r1`=12.5 -slave-bin.000001 439 User var 2 439 @`r2`=-12.5 -slave-bin.000001 482 Query 1 482 use `test`; insert into t1 values (@r1), (@r2) -slave-bin.000001 551 User var 2 551 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci -slave-bin.000001 600 User var 2 600 @`s2`=_latin1 "" COLLATE latin1_swedish_ci -slave-bin.000001 635 User var 2 635 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci -slave-bin.000001 677 User var 2 677 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci -slave-bin.000001 719 User var 2 719 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci -slave-bin.000001 761 Query 1 761 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) -slave-bin.000001 851 User var 2 851 @`n1`=NULL -slave-bin.000001 877 Query 1 877 use `test`; insert into t1 values (@n1) -slave-bin.000001 939 User var 2 939 @`n2`=NULL -slave-bin.000001 965 Query 1 965 use `test`; insert into t1 values (@n2) -slave-bin.000001 1027 Query 1 1027 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) -slave-bin.000001 1115 User var 2 1115 @`a`=2 -slave-bin.000001 1157 Query 1 1157 use `test`; insert into t1 values (@a+(@b:=@a+1)) -slave-bin.000001 1229 User var 2 1229 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci -slave-bin.000001 1266 Query 1 1266 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) -slave-bin.000001 1370 User var 2 1370 @`a`=5 -slave-bin.000001 1412 Query 1 1412 use `test`; insert into t1 values (@a),(@a) -slave-bin.000001 1478 User var 2 1478 @`a`=NULL -slave-bin.000001 1503 Query 1 1503 use `test`; insert into t1 values (@a),(@a),(@a*5) +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Query 1 # use `test`; create table t1(n char(30)) +slave-bin.000001 # User var 2 # @`i1`=12345678901234 +slave-bin.000001 # User var 2 # @`i2`=-12345678901234 +slave-bin.000001 # User var 2 # @`i3`=0 +slave-bin.000001 # User var 2 # @`i4`=-1 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) +slave-bin.000001 # User var 2 # @`r1`=12.5 +slave-bin.000001 # User var 2 # @`r2`=-12.5 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@r1), (@r2) +slave-bin.000001 # User var 2 # @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s2`=_latin1 "" COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci +slave-bin.000001 # User var 2 # @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) +slave-bin.000001 # User var 2 # @`n1`=NULL +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@n1) +slave-bin.000001 # User var 2 # @`n2`=NULL +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@n2) +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) +slave-bin.000001 # User var 2 # @`a`=2 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a+(@b:=@a+1)) +slave-bin.000001 # User var 2 # @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci +slave-bin.000001 # Query 1 # use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) +slave-bin.000001 # User var 2 # @`a`=5 +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a),(@a) +slave-bin.000001 # User var 2 # @`a`=NULL +slave-bin.000001 # Query 1 # use `test`; insert into t1 values (@a),(@a),(@a*5) drop table t1; stop slave; diff --git a/mysql-test/r/rpl_variables.result b/mysql-test/r/rpl_variables.result index 227d8ecfad9..25b5ca13f77 100644 --- a/mysql-test/r/rpl_variables.result +++ b/mysql-test/r/rpl_variables.result @@ -6,3 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; set global slave_net_timeout=100; set global sql_slave_skip_counter=100; +show variables like 'slave_compressed_protocol'; +Variable_name Value +slave_compressed_protocol OFF +show variables like 'slave_load_tmpdir'; +Variable_name Value +slave_load_tmpdir SLAVE_LOAD_TMPDIR +show variables like 'slave_skip_errors'; +Variable_name Value +slave_skip_errors 3,100,137,643,1752 diff --git a/mysql-test/r/rpl_view.result b/mysql-test/r/rpl_view.result new file mode 100644 index 00000000000..ce807a361ba --- /dev/null +++ b/mysql-test/r/rpl_view.result @@ -0,0 +1,44 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +drop table if exists t1,v1; +drop view if exists t1,v1; +create table t1 (a int); +insert into t1 values (1); +create view v1 as select a from t1; +insert into v1 values (2); +select * from v1 order by a; +a +1 +2 +select * from v1 order by a; +a +1 +2 +update v1 set a=3 where a=1; +select * from v1 order by a; +a +2 +3 +select * from v1 order by a; +a +2 +3 +delete from v1 where a=2; +select * from v1 order by a; +a +3 +select * from v1 order by a; +a +3 +alter view v1 as select a as b from t1; +select * from v1 order by 1; +b +3 +drop view v1; +select * from v1 order by a; +ERROR 42S02: Table 'test.v1' doesn't exist +drop table t1; diff --git a/mysql-test/r/schema.result b/mysql-test/r/schema.result new file mode 100644 index 00000000000..48e6ebcfad2 --- /dev/null +++ b/mysql-test/r/schema.result @@ -0,0 +1,11 @@ +create schema foo; +show create schema foo; +Database Create Database +foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */ +show schemas; +Database +information_schema +foo +mysql +test +drop schema foo; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 993fe7d22f1..83682d87504 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -1,5 +1,6 @@ drop table if exists t1,t2,t3,t4; -drop table if exists t1_1,t1_2,t9_1,t9_2; +drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa; +drop view if exists v1; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL @@ -1363,6 +1364,17 @@ explain select t2.companynr,companyname from t4 left join t2 using (companynr) w id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists +select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; +companynr companyname +select count(*) from t2 left join t4 using (companynr) where companynr is not null; +count(*) +1200 +explain select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +explain select companynr,companyname from t4 left join t2 using (companynr) where companynr is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra @@ -1375,7 +1387,19 @@ id select_type table type possible_keys key key_len ref rows Extra explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where +1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 +explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 @@ -1388,14 +1412,26 @@ explain select t2.companynr,companyname from t4 left join t2 using (companynr) w id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr 37 36 41 40 explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using temporary -1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using where; Using index +1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; fld1 companynr fld3 period 038008 37 reporters 1008 @@ -1471,7 +1507,7 @@ explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where Warnings: -Note 1003 select count(0) AS `count(*)`,min(test.t2.fld4) AS `min(fld4)`,max(test.t2.fld4) AS `max(fld4)`,sum(test.t2.fld1) AS `sum(fld1)`,avg(test.t2.fld1) AS `avg(fld1)`,std(test.t2.fld1) AS `std(fld1)`,variance(test.t2.fld1) AS `variance(fld1)` from test.t2 where ((test.t2.companynr = 34) and (test.t2.fld4 <> _latin1'')) +Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where ((`test`.`t2`.`companynr` = 34) and (`test`.`t2`.`fld4` <> _latin1'')) select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 00 82 Anthony windmills 10355753 126289.6707 115550.9757 13352027981.7087 @@ -1671,7 +1707,7 @@ fld1 count(*) 158402 4181 select sum(Period)/count(*) from t1; sum(Period)/count(*) -9410.00 +9410.0000 select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; companynr count sum diff func 37 12543 309394878010 0.0000 464091 @@ -1683,7 +1719,7 @@ companynr count sum diff func 512 4181 3288532102 0.0000 2140672 select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg; companynr avg -154 983543950.00 +154 983543950.0000 select companynr,count(*) from t2 group by companynr order by 2 desc; companynr count(*) 37 588 @@ -2033,20 +2069,20 @@ show tables from test like "t?"; Tables_in_test (t?) show full columns from t2; Field Type Collation Null Key Default Extra Privileges Comment -auto int(11) NULL PRI NULL auto_increment # -fld1 int(6) unsigned zerofill NULL UNI 000000 # -companynr tinyint(2) unsigned zerofill NULL 00 # -fld3 char(30) latin1_swedish_ci MUL # -fld4 char(35) latin1_swedish_ci # -fld5 char(35) latin1_swedish_ci # -fld6 char(4) latin1_swedish_ci # +auto int(11) NULL NO PRI NULL auto_increment # +fld1 int(6) unsigned zerofill NULL NO UNI 000000 # +companynr tinyint(2) unsigned zerofill NULL NO 00 # +fld3 char(30) latin1_swedish_ci NO MUL # +fld4 char(35) latin1_swedish_ci NO # +fld5 char(35) latin1_swedish_ci NO # +fld6 char(4) latin1_swedish_ci NO # show full columns from t2 from test like 'f%'; Field Type Collation Null Key Default Extra Privileges Comment -fld1 int(6) unsigned zerofill NULL UNI 000000 # -fld3 char(30) latin1_swedish_ci MUL # -fld4 char(35) latin1_swedish_ci # -fld5 char(35) latin1_swedish_ci # -fld6 char(4) latin1_swedish_ci # +fld1 int(6) unsigned zerofill NULL NO UNI 000000 # +fld3 char(30) latin1_swedish_ci NO MUL # +fld4 char(35) latin1_swedish_ci NO # +fld5 char(35) latin1_swedish_ci NO # +fld6 char(4) latin1_swedish_ci NO # show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; @@ -2072,17 +2108,15 @@ INSERT INTO t1 (pseudo) VALUES ('test1'); SELECT 1 as rnd1 from t1 where rand() > 2; rnd1 DROP TABLE t1; -CREATE TABLE t1 (gvid int(10) unsigned default NULL, hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, mmid int(10) unsigned default NULL, hdid int(10) unsigned default NULL, fsid int(10) unsigned default NULL, ctid int(10) unsigned default NULL, dtid int(10) unsigned default NULL, cost int(10) unsigned default NULL, performance int(10) unsigned default NULL, serialnumber bigint(20) unsigned default NULL, monitored tinyint(3) unsigned default '1', removed tinyint(3) unsigned default '0', target tinyint(3) unsigned default '0', dt_modified timestamp(14) NOT NULL, name varchar(255) binary default NULL, description varchar(255) default NULL, UNIQUE KEY hmid (hmid,volid)) ENGINE=MyISAM; +CREATE TABLE t1 (gvid int(10) unsigned default NULL, hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, mmid int(10) unsigned default NULL, hdid int(10) unsigned default NULL, fsid int(10) unsigned default NULL, ctid int(10) unsigned default NULL, dtid int(10) unsigned default NULL, cost int(10) unsigned default NULL, performance int(10) unsigned default NULL, serialnumber bigint(20) unsigned default NULL, monitored tinyint(3) unsigned default '1', removed tinyint(3) unsigned default '0', target tinyint(3) unsigned default '0', dt_modified timestamp NOT NULL, name varchar(255) binary default NULL, description varchar(255) default NULL, UNIQUE KEY hmid (hmid,volid)) ENGINE=MyISAM; INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL); CREATE TABLE t2 ( hmid int(10) unsigned default NULL, volid int(10) unsigned default NULL, sampletid smallint(5) unsigned default NULL, sampletime datetime default NULL, samplevalue bigint(20) unsigned default NULL, KEY idx1 (hmid,volid,sampletid,sampletime)) ENGINE=MyISAM; INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12:00:01',35); SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time Warnings: -Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' -Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' -Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' -Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' +Warning 1292 Incorrect datetime value: 'wrong-date-value' for column 'sampletime' at row 1 +Warning 1292 Incorrect datetime value: 'wrong-date-value' for column 'sampletime' at row 1 SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time DROP TABLE t1,t2; @@ -2110,196 +2144,165 @@ select @b; aaaa select @c; @c -6.26 +6.260 create table t1 (a int not null auto_increment primary key); insert into t1 values (); insert into t1 values (); insert into t1 values (); select * from (t1 as t2 left join t1 as t3 using (a)), t1; -a a a -1 1 1 -2 2 1 -3 3 1 -1 1 2 -2 2 2 -3 3 2 -1 1 3 -2 2 3 -3 3 3 +a a +1 1 +2 1 +3 1 +1 2 +2 2 +3 2 +1 3 +2 3 +3 3 select * from t1, (t1 as t2 left join t1 as t3 using (a)); -a a a -1 1 1 -2 1 1 -3 1 1 -1 2 2 -2 2 2 -3 2 2 -1 3 3 -2 3 3 -3 3 3 +a a +1 1 +2 1 +3 1 +1 2 +2 2 +3 2 +1 3 +2 3 +3 3 select * from (t1 as t2 left join t1 as t3 using (a)) straight_join t1; -a a a -1 1 1 -2 2 1 -3 3 1 -1 1 2 -2 2 2 -3 3 2 -1 1 3 -2 2 3 -3 3 3 +a a +1 1 +2 1 +3 1 +1 2 +2 2 +3 2 +1 3 +2 3 +3 3 select * from t1 straight_join (t1 as t2 left join t1 as t3 using (a)); -a a a -1 1 1 -2 1 1 -3 1 1 -1 2 2 -2 2 2 -3 2 2 -1 3 3 -2 3 3 -3 3 3 +a a +1 1 +2 1 +3 1 +1 2 +2 2 +3 2 +1 3 +2 3 +3 3 select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 on t1.a>1; -a a a -1 1 2 -1 1 3 -2 2 2 -2 2 3 -3 3 2 -3 3 3 +a a +1 2 +2 2 +3 2 +1 3 +2 3 +3 3 select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; -a a a -1 1 NULL -2 1 1 -3 1 1 -1 2 NULL -2 2 2 -3 2 2 -1 3 NULL -2 3 3 -3 3 3 +a a +2 1 +3 1 +2 2 +3 2 +2 3 +3 3 select * from (t1 as t2 left join t1 as t3 using (a)) inner join t1 using ( a ); -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 select * from t1 inner join (t1 as t2 left join t1 as t3 using (a)) using ( a ); -a a a -1 1 1 -2 1 NULL -3 1 NULL -1 2 NULL -2 2 2 -3 2 NULL -1 3 NULL -2 3 NULL -3 3 3 +a +1 +2 +3 select * from (t1 as t2 left join t1 as t3 using (a)) left outer join t1 on t1.a>1; -a a a -1 1 2 -1 1 3 -2 2 2 -2 2 3 -3 3 2 -3 3 3 +a a +1 2 +1 3 +2 2 +2 3 +3 2 +3 3 select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; -a a a -1 1 NULL -2 1 1 -3 1 1 -1 2 NULL -2 2 2 -3 2 2 -1 3 NULL -2 3 3 -3 3 3 +a a +1 NULL +2 1 +2 2 +2 3 +3 1 +3 2 +3 3 select * from (t1 as t2 left join t1 as t3 using (a)) left join t1 using ( a ); -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 select * from t1 left join (t1 as t2 left join t1 as t3 using (a)) using ( a ); -a a a -1 1 1 -2 1 NULL -3 1 NULL -1 2 NULL -2 2 2 -3 2 NULL -1 3 NULL -2 3 NULL -3 3 3 +a +1 +2 +3 select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1; -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 select * from t1 natural left join (t1 as t2 left join t1 as t3 using (a)); -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 select * from (t1 as t2 left join t1 as t3 using (a)) right join t1 on t1.a>1; -a a a -1 NULL 1 -2 NULL 1 -3 NULL 1 -1 1 2 -2 2 2 -3 3 2 -1 1 3 -2 2 3 -3 3 3 +a a +NULL 1 +1 2 +2 2 +3 2 +1 3 +2 3 +3 3 select * from t1 right join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; -a a a -2 1 1 -3 1 1 -2 2 2 -3 2 2 -2 3 3 -3 3 3 +a a +2 1 +3 1 +2 2 +3 2 +2 3 +3 3 select * from (t1 as t2 left join t1 as t3 using (a)) right outer join t1 using ( a ); -a a a -1 1 1 -2 NULL 1 -3 NULL 1 -1 NULL 2 -2 2 2 -3 NULL 2 -1 NULL 3 -2 NULL 3 -3 3 3 +a +1 +2 +3 select * from t1 right outer join (t1 as t2 left join t1 as t3 using (a)) using ( a ); -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 select * from (t1 as t2 left join t1 as t3 using (a)) natural right join t1; -a a a -1 1 1 -2 NULL 1 -3 NULL 1 -1 NULL 2 -2 2 2 -3 NULL 2 -1 NULL 3 -2 NULL 3 -3 3 3 +a +1 +2 +3 select * from t1 natural right join (t1 as t2 left join t1 as t3 using (a)); -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 select * from t1 natural join (t1 as t2 left join t1 as t3 using (a)); -a a -1 1 -2 2 -3 3 +a +1 +2 +3 select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1; -a a a -1 1 1 -2 2 2 -3 3 3 +a +1 +2 +3 drop table t1; CREATE TABLE t1 ( aa char(2), id int(11) NOT NULL auto_increment, t2_id int(11) NOT NULL default '0', PRIMARY KEY (id), KEY replace_id (t2_id)) ENGINE=MyISAM; INSERT INTO t1 VALUES ("1",8264,2506),("2",8299,2517),("3",8301,2518),("4",8302,2519),("5",8303,2520),("6",8304,2521),("7",8305,2522); @@ -2345,7 +2348,7 @@ select * from t2 where s = 'one'; s select * from t3 where s = 'one'; s -one +one select * from t1,t2 where t1.s = t2.s; s s two two @@ -2617,3 +2620,270 @@ select found_rows(); found_rows() 1 DROP TABLE t1; +CREATE TABLE t1 ( city char(30) ); +INSERT INTO t1 VALUES ('London'); +INSERT INTO t1 VALUES ('Paris'); +SELECT * FROM t1 WHERE city='London'; +city +London +SELECT * FROM t1 WHERE city='london'; +city +London +EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +SELECT * FROM t1 WHERE city='London' AND city='london'; +city +London +EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London'; +city +London +DROP TABLE t1; +create table t1 (a int(11) unsigned, b int(11) unsigned); +insert into t1 values (1,0), (1,1), (1,2); +select a-b from t1 order by 1; +a-b +0 +1 +18446744073709551615 +select a-b , (a-b < 0) from t1 order by 1; +a-b (a-b < 0) +0 0 +1 0 +18446744073709551615 0 +select a-b as d, (a-b >= 0), b from t1 group by b having d >= 0; +d (a-b >= 0) b +1 1 0 +0 1 1 +18446744073709551615 1 2 +select cast((a - b) as unsigned) from t1 order by 1; +cast((a - b) as unsigned) +0 +1 +18446744073709551615 +drop table t1; +create table t1 (a int(11)); +select all all * from t1; +a +select distinct distinct * from t1; +a +select all distinct * from t1; +ERROR HY000: Incorrect usage of ALL and DISTINCT +select distinct all * from t1; +ERROR HY000: Incorrect usage of ALL and DISTINCT +drop table t1; +CREATE TABLE t1 ( +K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '', +K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000', +F2I4 int(11) NOT NULL default '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO t1 VALUES +('W%RT', '0100', 1), +('W-RT', '0100', 1), +('WART', '0100', 1), +('WART', '0200', 1), +('WERT', '0100', 2), +('WORT','0200', 2), +('WT', '0100', 2), +('W_RT', '0100', 2), +('WaRT', '0100', 3), +('WART', '0300', 3), +('WRT' , '0400', 3), +('WURM', '0500', 3), +('W%T', '0600', 4), +('WA%T', '0700', 4), +('WA_T', '0800', 4); +SELECT K2C4, K4N4, F2I4 FROM t1 +WHERE K2C4 = 'WART' AND +(F2I4 = 2 AND K2C4 = 'WART' OR (F2I4 = 2 OR K4N4 = '0200')); +K2C4 K4N4 F2I4 +WART 0200 1 +SELECT K2C4, K4N4, F2I4 FROM t1 +WHERE K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200'); +K2C4 K4N4 F2I4 +WART 0100 1 +WART 0200 1 +WART 0300 3 +DROP TABLE t1; +CREATE TABLE t1 ( a BLOB, INDEX (a(20)) ); +CREATE TABLE t2 ( a BLOB, INDEX (a(20)) ); +INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five'); +INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five'); +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 +DROP TABLE t1, t2; +create table t1 (a int, b int); +create table t2 like t1; +select t1.a from (t1 inner join t2 on t1.a=t2.a) where t2.a=1; +a +select t1.a from ((t1 inner join t2 on t1.a=t2.a)) where t2.a=1; +a +select x.a, y.a, z.a from ( (t1 x inner join t2 y on x.a=y.a) inner join t2 z on y.a=z.a) WHERE x.a=1; +a a a +drop table t1,t2; +create table t1 (s1 varchar(5)); +insert into t1 values ('Wall'); +select min(s1) from t1 group by s1 with rollup; +min(s1) +Wall +Wall +drop table t1; +create table t1 (s1 int) engine=myisam; +insert into t1 values (0); +select avg(distinct s1) from t1 group by s1 with rollup; +avg(distinct s1) +0.0000 +0.0000 +drop table t1; +create table t1 (s1 int); +insert into t1 values (null),(1); +select distinct avg(s1) as x from t1 group by s1 with rollup; +x +NULL +1.0000 +drop table t1; +create table t1 (a int(11)); +select all all * from t1; +a +select distinct distinct * from t1; +a +select all distinct * from t1; +ERROR HY000: Incorrect usage of ALL and DISTINCT +select distinct all * from t1; +ERROR HY000: Incorrect usage of ALL and DISTINCT +drop table t1; +CREATE TABLE t1 ( a BLOB, INDEX (a(20)) ); +CREATE TABLE t2 ( a BLOB, INDEX (a(20)) ); +INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five'); +INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five'); +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref a a 23 test.t1.a 2 +DROP TABLE t1, t2; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (a int); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5); +INSERT INTO t2 VALUES (2), (4), (6); +SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a; +a +2 +4 +EXPLAIN SELECT t1.a FROM t1 STRAIGHT_JOIN t2 ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where +EXPLAIN SELECT t1.a FROM t1 INNER JOIN t2 ON t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where +DROP TABLE t1,t2; +select x'10' + 0, X'10' + 0, b'10' + 0, B'10' + 0; +x'10' + 0 X'10' + 0 b'10' + 0 B'10' + 0 +16 16 2 2 +create table t1 (f1 varchar(6) default NULL, f2 int(6) primary key not null); +create table t2 (f3 varchar(5) not null, f4 varchar(5) not null, UNIQUE KEY UKEY (f3,f4)); +insert into t1 values (" 2", 2); +insert into t2 values (" 2", " one "),(" 2", " two "); +select * from t1 left join t2 on f1 = f3; +f1 f2 f3 f4 + 2 2 2 one + 2 2 2 two +drop table t1,t2; +create table t1 (empnum smallint, grp int); +create table t2 (empnum int, name char(5)); +insert into t1 values(1,1); +insert into t2 values(1,'bob'); +create view v1 as select * from t2 inner join t1 using (empnum); +select * from v1; +empnum name grp +1 bob 1 +drop table t1,t2; +drop view v1; +create table t1 (pk int primary key, b int); +create table t2 (pk int primary key, c int); +select pk from t1 inner join t2 using (pk); +pk +drop table t1,t2; +create table t1 (s1 int, s2 char(5), s3 decimal(10)); +create view v1 as select s1, s2, 'x' as s3 from t1; +select * from t1 natural join v1; +s1 s2 s3 +insert into t1 values (1,'x',5); +select * from t1 natural join v1; +s1 s2 s3 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'x' +drop table t1; +drop view v1; +create table t1(a1 int); +create table t2(a2 int); +insert into t1 values(1),(2); +insert into t2 values(1),(2); +create view v2 (c) as select a1 from t1; +select * from t1 natural left join t2; +a1 a2 +1 1 +1 2 +2 1 +2 2 +select * from t1 natural right join t2; +a2 a1 +1 1 +1 2 +2 1 +2 2 +select * from v2 natural left join t2; +c a2 +1 1 +1 2 +2 1 +2 2 +select * from v2 natural right join t2; +a2 c +1 1 +1 2 +2 1 +2 2 +drop table t1, t2; +drop view v2; +create table t1 (a int(10), t1_val int(10)); +create table t2 (b int(10), t2_val int(10)); +create table t3 (a int(10), b int(10)); +insert into t1 values (1,1),(2,2); +insert into t2 values (1,1),(2,2),(3,3); +insert into t3 values (1,1),(2,1),(3,1),(4,1); +select * from t1 natural join t2 natural join t3; +a b t1_val t2_val +1 1 1 1 +2 1 2 1 +select * from t1 natural join t3 natural join t2; +b a t1_val t2_val +1 1 1 1 +1 2 2 1 +drop table t1, t2, t3; +create table t1 (a char(1)); +create table t2 (a char(1)); +insert into t1 values ('a'),('b'),('c'); +insert into t2 values ('b'),('c'),('d'); +select a from t1 natural join t2; +a +b +c +select * from t1 natural join t2 where a = 'b'; +a +b +drop table t1, t2; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index b8178bbeb52..7abd65beb46 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -84,7 +84,7 @@ UNIQUE KEY e_n (email,name) EXPLAIN SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system PRIMARY,kid NULL NULL NULL 0 const row not found -1 SIMPLE t2 index NULL e_n 100 NULL 200 +1 SIMPLE t2 index NULL e_n 104 NULL 200 SELECT SQL_CALC_FOUND_ROWS DISTINCT email FROM t2 LEFT JOIN t1 ON kid = t2.id WHERE t1.id IS NULL LIMIT 10; email email1 diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result index 7a29db42dd9..feac9efcb13 100644 --- a/mysql-test/r/select_safe.result +++ b/mysql-test/r/select_safe.result @@ -60,9 +60,6 @@ a b 3 a 4 a 5 a -SELECT @@MAX_SEEKS_FOR_KEY; -@@MAX_SEEKS_FOR_KEY -4294967295 analyze table t1; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -87,7 +84,7 @@ set local max_join_size=8; select * from (select * from t1) x; ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay set local max_join_size=1; -select * from (select * from t1 a, t1 b) x; +select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x; ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay set local max_join_size=1; select * from (select 1 union select 2 union select 3) x; diff --git a/mysql-test/r/have_isam.require b/mysql-test/r/server_id.require index 9b4142361ed..adffcc483b1 100644 --- a/mysql-test/r/have_isam.require +++ b/mysql-test/r/server_id.require @@ -1,2 +1,2 @@ Variable_name Value -have_isam YES +server_id 1 diff --git a/mysql-test/r/server_id1.require b/mysql-test/r/server_id1.require new file mode 100644 index 00000000000..666c94ef633 --- /dev/null +++ b/mysql-test/r/server_id1.require @@ -0,0 +1,2 @@ +Variable_name Value +server_id 102 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 1e5e8f442a8..c143c7f0f29 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1,4 +1,5 @@ drop table if exists t1,t2; +drop table if exists t1aa,t2aa; drop database if exists mysqltest; delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; delete from mysql.db where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; @@ -50,6 +51,7 @@ show table status from test like "this_doesn't_exists%"; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment show databases; Database +information_schema mysql test show databases like "test%"; @@ -80,13 +82,13 @@ create temporary table t1 (a int not null); show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( - `a` int(11) NOT NULL default '0' + `a` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 rename t2; show create table t2; Table Create Table t2 CREATE TEMPORARY TABLE `t2` ( - `a` int(11) NOT NULL default '0' + `a` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2; create table t1 ( @@ -101,7 +103,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `test_set` set('val1','val2','val3') NOT NULL default '', `name` char(20) default 'O''Brien' COMMENT 'O''Brien as default', - `c` int(11) NOT NULL default '0' COMMENT 'int column', + `c` int(11) NOT NULL COMMENT 'int column', `c-b` int(11) default NULL COMMENT 'name with a minus', `space 2` int(11) default NULL COMMENT 'name with a space' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table' @@ -110,17 +112,17 @@ show create table t1; Table Create Table t1 CREATE TABLE t1 ( test_set set('val1','val2','val3') NOT NULL default '', - name char(20) default 'O''Brien' COMMENT 'O''Brien as default', - c int(11) NOT NULL default '0' COMMENT 'int column', + `name` char(20) default 'O''Brien' COMMENT 'O''Brien as default', + c int(11) NOT NULL COMMENT 'int column', `c-b` int(11) default NULL COMMENT 'name with a minus', `space 2` int(11) default NULL COMMENT 'name with a space' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table' set sql_quote_show_create=1; show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment -test_set set('val1','val2','val3') latin1_swedish_ci select,insert,update,references +test_set set('val1','val2','val3') latin1_swedish_ci NO select,insert,update,references name char(20) latin1_swedish_ci YES O'Brien select,insert,update,references O'Brien as default -c int(11) NULL 0 select,insert,update,references int column +c int(11) NULL NO select,insert,update,references int column c-b int(11) NULL YES NULL select,insert,update,references name with a minus space 2 int(11) NULL YES NULL select,insert,update,references name with a space drop table t1; @@ -128,7 +130,7 @@ create table t1 (a int not null, unique aa (a)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, UNIQUE KEY `aa` (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -136,7 +138,7 @@ create table t1 (a int not null, primary key (a)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -153,15 +155,15 @@ create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CH show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', - `b` char(10) default NULL, + `a` int(11) NOT NULL, + `b` varchar(10) default NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=100 AVG_ROW_LENGTH=10 PACK_KEYS=1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=FIXED COMMENT='test' alter table t1 MAX_ROWS=200 ROW_FORMAT=dynamic PACK_KEYS=0; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` varchar(10) default NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MIN_ROWS=10 MAX_ROWS=200 AVG_ROW_LENGTH=10 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC COMMENT='test' @@ -169,7 +171,7 @@ ALTER TABLE t1 AVG_ROW_LENGTH=0 CHECKSUM=0 COMMENT="" MIN_ROWS=0 MAX_ROWS=0 PACK show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` varchar(10) default NULL, KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -193,7 +195,7 @@ h float(3,2) NULL YES NULL select,insert,update,references i float(3,0) NULL YES NULL select,insert,update,references drop table t1; create table t1 ( -type_bool bool not null, +type_bool bool not null default 0, type_tiny tinyint not null auto_increment primary key, type_short smallint(3), type_mediumint mediumint, @@ -204,9 +206,9 @@ empty_char char(0), type_char char(2), type_varchar varchar(10), type_timestamp timestamp not null, -type_date date not null, -type_time time not null, -type_datetime datetime not null, +type_date date not null default '0000-00-00', +type_time time not null default '00:00:00', +type_datetime datetime not null default '0000-00-00 00:00:00', type_year year, type_enum enum ('red', 'green', 'blue'), type_set enum ('red', 'green', 'blue'), @@ -250,11 +252,9 @@ type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_nume drop table t1; create table t1 (a int not null); create table t2 select max(a) from t1; -Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'max(a)' at row 1 show columns from t2; Field Type Null Key Default Extra -max(a) int(11) 0 +max(a) int(11) YES NULL drop table t1,t2; create table t1 (c decimal, d double, f float, r real); show columns from t1; @@ -267,15 +267,14 @@ drop table t1; create table t1 (c decimal(3,3), d double(3,3), f float(3,3)); show columns from t1; Field Type Null Key Default Extra -c decimal(4,3) YES NULL -d double(4,3) YES NULL -f float(4,3) YES NULL +c decimal(3,3) YES NULL +d double(3,3) YES NULL +f float(3,3) YES NULL drop table t1; SET @old_sql_mode= @@sql_mode, sql_mode= ''; SET @old_sql_quote_show_create= @@sql_quote_show_create, sql_quote_show_create= OFF; CREATE TABLE `a/b` (i INT); ERROR 42000: Incorrect table name 'a/b' -SET sql_mode= 'ANSI_QUOTES'; SET sql_mode= ''; SET sql_quote_show_create= OFF; CREATE TABLE t1 (i INT); @@ -299,7 +298,7 @@ select @@max_heap_table_size; 1047552 CREATE TABLE t1 ( a int(11) default NULL, -KEY a TYPE BTREE (a) +KEY a USING BTREE (a) ) ENGINE=HEAP; CREATE TABLE t2 ( b int(11) default NULL, @@ -308,7 +307,7 @@ index(b) CREATE TABLE t3 ( a int(11) default NULL, b int(11) default NULL, -KEY a TYPE BTREE (a), +KEY a USING BTREE (a), index(b) ) ENGINE=HEAP; insert into t1 values (1),(2); @@ -316,57 +315,57 @@ insert into t2 values (1),(2); insert into t3 values (1,1),(2,2); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL insert into t1 values (3),(4); insert into t2 values (3),(4); insert into t3 values (3,3),(4,4); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL insert into t1 values (5); insert into t2 values (5); insert into t3 values (5,5); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL delete from t1 where a=3; delete from t2 where b=3; delete from t3 where a=3; show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL delete from t1; delete from t2; delete from t3; show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL insert into t1 values (5); insert into t2 values (5); insert into t3 values (5,5); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL delete from t1 where a=5; delete from t2 where b=5; delete from t3 where a=5; show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 HEAP 9 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL -t2 HEAP 9 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL -t3 HEAP 9 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL +t1 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL +t2 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL +t3 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL drop table t1, t2, t3; create database mysqltest; show create database mysqltest; @@ -384,19 +383,19 @@ show create database mysqltest; Database Create Database mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */ drop table t1; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' drop database mysqltest; ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' select * from mysqltest.t1; -ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't1' show create database mysqltest; ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' drop table mysqltest.t1; -ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' +ERROR 42000: DROP command denied to user 'mysqltest_2'@'localhost' for table 't1' drop database mysqltest; ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' select * from mysqltest.t1; -ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1' show create database mysqltest; ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest' drop table mysqltest.t1; @@ -413,7 +412,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) default NULL, KEY `i` (`i`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; @@ -421,7 +420,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) default NULL, KEY `i` USING HASH (`i`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY; SHOW CREATE TABLE t1; @@ -429,7 +428,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) default NULL, KEY `i` USING BTREE (`i`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (i int, KEY (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; @@ -460,7 +459,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) default NULL, KEY `i` (`i`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM; SHOW CREATE TABLE t1; @@ -475,7 +474,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) default NULL, KEY `i` USING BTREE (`i`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 +) ENGINE=MEMORY DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1( field1 text NOT NULL, @@ -483,18 +482,18 @@ PRIMARY KEY(field1(1000)) ); show index from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def Table 253 64 2 N 129 31 63 -def Non_unique 1 1 1 N 32929 0 63 -def Key_name 253 64 7 N 129 31 63 -def Seq_in_index 1 2 1 N 32929 0 63 -def Column_name 253 64 6 N 129 31 63 -def Collation 253 1 1 Y 128 31 63 -def Cardinality 8 21 1 Y 32896 0 63 -def Sub_part 2 3 4 Y 32928 0 63 -def Packed 253 10 0 Y 128 31 63 -def Null 253 3 0 N 129 31 63 -def Index_type 253 16 5 N 129 31 63 -def Comment 253 255 0 N 129 31 63 +def STATISTICS TABLE_NAME Table 253 64 2 N 1 0 63 +def STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63 +def STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 63 +def STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63 +def STATISTICS COLUMN_NAME Column_name 253 64 6 N 1 0 63 +def STATISTICS COLLATION Collation 253 1 1 Y 0 0 63 +def STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63 +def STATISTICS SUB_PART Sub_part 8 3 4 Y 32768 0 63 +def STATISTICS PACKED Packed 253 10 0 Y 0 0 63 +def STATISTICS NULLABLE Null 253 3 0 N 1 0 63 +def STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 63 +def STATISTICS COMMENT Comment 253 16 0 Y 0 0 63 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 field1 A 0 1000 NULL BTREE drop table t1; @@ -507,9 +506,54 @@ INDEX USING BTREE(c2) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL default '0', - `c2` int(11) NOT NULL default '0', + `c1` int(11) NOT NULL, + `c2` int(11) NOT NULL, PRIMARY KEY USING HASH (`c1`), KEY `c2` USING BTREE (`c2`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; +CREATE TABLE txt1(a int); +CREATE TABLE tyt2(a int); +CREATE TABLE urkunde(a int); +FLUSH TABLES; +SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0; +1 +SHOW OPEN TABLES; +Database Table In_use Name_locked +mysql db 0 0 +test urkunde 0 0 +mysql time_zone 0 0 +mysql user 0 0 +test txt1 0 0 +mysql proc 0 0 +test tyt2 0 0 +mysql time_zone_name 0 0 +SHOW OPEN TABLES FROM mysql; +Database Table In_use Name_locked +mysql db 0 0 +mysql time_zone 0 0 +mysql user 0 0 +mysql proc 0 0 +mysql time_zone_name 0 0 +SHOW OPEN TABLES FROM mysql LIKE 'u%'; +Database Table In_use Name_locked +mysql user 0 0 +SHOW OPEN TABLES LIKE 't%'; +Database Table In_use Name_locked +mysql time_zone 0 0 +test txt1 0 0 +test tyt2 0 0 +mysql time_zone_name 0 0 +SHOW OPEN TABLES LIKE '%o%'; +Database Table In_use Name_locked +mysql time_zone 0 0 +mysql proc 0 0 +mysql time_zone_name 0 0 +FLUSH TABLES; +SHOW OPEN TABLES; +Database Table In_use Name_locked +DROP TABLE txt1; +DROP TABLE tyt2; +DROP TABLE urkunde; +SHOW TABLES FROM non_existing_database; +ERROR 42000: Unknown database 'non_existing_database' diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result new file mode 100644 index 00000000000..c0c20eb25be --- /dev/null +++ b/mysql-test/r/skip_grants.result @@ -0,0 +1,10 @@ +drop table if exists t1,v1; +drop view if exists t1,v1; +drop procedure if exists f1; +use test; +create table t1 (field1 INT); +CREATE VIEW v1 AS SELECT field1 FROM t1; +drop view v1; +drop table t1; +create procedure f1() select 1; +drop procedure f1; diff --git a/mysql-test/r/sp-big.result b/mysql-test/r/sp-big.result new file mode 100644 index 00000000000..004ff586aab --- /dev/null +++ b/mysql-test/r/sp-big.result @@ -0,0 +1,15 @@ +drop procedure if exists test.longprocedure; +drop table if exists t1; +create table t1 (a int); +insert into t1 values (1),(2),(3); +length +107520 +select length(routine_definition) from information_schema.routines where routine_schema = 'test' and routine_name = 'longprocedure'; +length(routine_definition) +107530 +call test.longprocedure(@value); +select @value; +@value +3 +drop procedure test.longprocedure; +drop table t1; diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result new file mode 100644 index 00000000000..4ac29a07757 --- /dev/null +++ b/mysql-test/r/sp-error.result @@ -0,0 +1,766 @@ +drop table if exists t1, t2; +delete from mysql.proc; +create procedure syntaxerror(t int)| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +create procedure syntaxerror(t int)| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +create procedure syntaxerror(t int)| +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +drop table if exists t3| +create table t3 ( x int )| +insert into t3 values (2), (3)| +create procedure bad_into(out param int) +select x from t3 into param| +call bad_into(@x)| +ERROR 42000: Result consisted of more than one row +drop procedure bad_into| +drop table t3| +create procedure proc1() +set @x = 42| +create function func1() returns int +return 42| +create procedure foo() +create procedure bar() set @x=3| +ERROR 2F003: Can't create a PROCEDURE from within another stored routine +create procedure foo() +create function bar() returns double return 2.3| +ERROR 2F003: Can't create a FUNCTION from within another stored routine +create procedure proc1() +set @x = 42| +ERROR 42000: PROCEDURE proc1 already exists +create function func1() returns int +return 42| +ERROR 42000: FUNCTION func1 already exists +drop procedure proc1| +drop function func1| +alter procedure foo| +ERROR 42000: PROCEDURE test.foo does not exist +alter function foo| +ERROR 42000: FUNCTION test.foo does not exist +drop procedure foo| +ERROR 42000: PROCEDURE test.foo does not exist +drop function foo| +ERROR 42000: FUNCTION test.foo does not exist +call foo()| +ERROR 42000: PROCEDURE test.foo does not exist +drop procedure if exists foo| +Warnings: +Note 1305 PROCEDURE foo does not exist +show create procedure foo| +ERROR 42000: PROCEDURE foo does not exist +show create function foo| +ERROR 42000: FUNCTION foo does not exist +create procedure foo() +foo: loop +leave bar; +end loop| +ERROR 42000: LEAVE with no matching label: bar +create procedure foo() +foo: loop +iterate bar; +end loop| +ERROR 42000: ITERATE with no matching label: bar +create procedure foo() +foo: begin +iterate foo; +end| +ERROR 42000: ITERATE with no matching label: foo +create procedure foo() +foo: loop +foo: loop +set @x=2; +end loop foo; +end loop foo| +ERROR 42000: Redefining label foo +create procedure foo() +foo: loop +set @x=2; +end loop bar| +ERROR 42000: End-label bar without match +create procedure foo() +return 42| +ERROR 42000: RETURN is only allowed in a FUNCTION +create procedure p(x int) +set @x = x| +create function f(x int) returns int +return x+42| +call p()| +ERROR 42000: Incorrect number of arguments for PROCEDURE test.p; expected 1, got 0 +call p(1, 2)| +ERROR 42000: Incorrect number of arguments for PROCEDURE test.p; expected 1, got 2 +select f()| +ERROR 42000: Incorrect number of arguments for FUNCTION test.f; expected 1, got 0 +select f(1, 2)| +ERROR 42000: Incorrect number of arguments for FUNCTION test.f; expected 1, got 2 +drop procedure p| +drop function f| +create procedure p(val int, out res int) +begin +declare x int default 0; +declare continue handler for foo set x = 1; +insert into test.t1 values (val); +if (x) then +set res = 0; +else +set res = 1; +end if; +end| +ERROR 42000: Undefined CONDITION: foo +create procedure p(val int, out res int) +begin +declare x int default 0; +declare foo condition for 1146; +declare continue handler for bar set x = 1; +insert into test.t1 values (val); +if (x) then +set res = 0; +else +set res = 1; +end if; +end| +ERROR 42000: Undefined CONDITION: bar +create function f(val int) returns int +begin +declare x int; +set x = val+3; +end| +ERROR 42000: No RETURN found in FUNCTION f +create function f(val int) returns int +begin +declare x int; +set x = val+3; +if x < 4 then +return x; +end if; +end| +select f(10)| +ERROR 2F005: FUNCTION f ended without RETURN +drop function f| +create procedure p() +begin +declare c cursor for insert into test.t1 values ("foo", 42); +open c; +close c; +end| +ERROR 42000: Cursor statement must be a SELECT +create procedure p() +begin +declare x int; +declare c cursor for select * into x from test.t limit 1; +open c; +close c; +end| +ERROR 42000: Cursor SELECT must not have INTO +create procedure p() +begin +declare c cursor for select * from test.t; +open cc; +close c; +end| +ERROR 42000: Undefined CURSOR: cc +drop table if exists t1| +create table t1 (val int)| +create procedure p() +begin +declare c cursor for select * from test.t1; +open c; +open c; +close c; +end| +call p()| +ERROR 24000: Cursor is already open +drop procedure p| +create procedure p() +begin +declare c cursor for select * from test.t1; +open c; +close c; +close c; +end| +call p()| +ERROR 24000: Cursor is not open +drop procedure p| +alter procedure bar3 sql security invoker| +ERROR 42000: PROCEDURE test.bar3 does not exist +drop table t1| +drop table if exists t1| +create table t1 (val int, x float)| +insert into t1 values (42, 3.1), (19, 1.2)| +create procedure p() +begin +declare x int; +declare c cursor for select * from t1; +open c; +fetch c into x, y; +close c; +end| +ERROR 42000: Undeclared variable: y +create procedure p() +begin +declare x int; +declare c cursor for select * from t1; +open c; +fetch c into x; +close c; +end| +call p()| +ERROR HY000: Incorrect number of FETCH variables +drop procedure p| +create procedure p() +begin +declare x int; +declare y float; +declare z int; +declare c cursor for select * from t1; +open c; +fetch c into x, y, z; +close c; +end| +call p()| +ERROR HY000: Incorrect number of FETCH variables +drop procedure p| +create procedure p(in x int, x char(10)) +begin +end| +ERROR 42000: Duplicate parameter: x +create function p(x int, x char(10)) +begin +end| +ERROR 42000: Duplicate parameter: x +create procedure p() +begin +declare x float; +declare x int; +end| +ERROR 42000: Duplicate variable: x +create procedure p() +begin +declare c condition for 1064; +declare c condition for 1065; +end| +ERROR 42000: Duplicate condition: c +create procedure p() +begin +declare c cursor for select * from t1; +declare c cursor for select field from t1; +end| +ERROR 42000: Duplicate cursor: c +create procedure u() +use sptmp| +ERROR 0A000: USE is not allowed in stored procedures +create procedure p() +begin +declare c cursor for select * from t1; +declare x int; +end| +ERROR 42000: Variable or condition declaration after cursor or handler declaration +create procedure p() +begin +declare x int; +declare continue handler for sqlstate '42S99' set x = 1; +declare foo condition for sqlstate '42S99'; +end| +ERROR 42000: Variable or condition declaration after cursor or handler declaration +create procedure p() +begin +declare x int; +declare continue handler for sqlstate '42S99' set x = 1; +declare c cursor for select * from t1; +end| +ERROR 42000: Cursor declaration after handler declaration +drop procedure if exists p| +create procedure p(in x int, inout y int, out z int) +begin +set y = x+y; +set z = x+y; +end| +set @tmp_x = 42| +set @tmp_y = 3| +set @tmp_z = 0| +call p(@tmp_x, @tmp_y, @tmp_z)| +select @tmp_x, @tmp_y, @tmp_z| +@tmp_x @tmp_y @tmp_z +42 45 87 +call p(42, 43, @tmp_z)| +ERROR 42000: OUT or INOUT argument 2 for routine test.p is not a variable +call p(42, @tmp_y, 43)| +ERROR 42000: OUT or INOUT argument 3 for routine test.p is not a variable +drop procedure p| +create procedure p() begin end| +lock table t1 read| +call p()| +unlock tables| +drop procedure p| +lock tables t1 read, mysql.proc write| +ERROR HY000: You can't combine write-locking of system 'mysql.proc' table with other tables +lock tables mysql.proc write, mysql.user write| +ERROR HY000: You can't combine write-locking of system 'mysql.proc' table with other tables +lock tables t1 read, mysql.proc read| +unlock tables| +lock tables mysql.proc write| +unlock tables| +drop function if exists f1| +create function f1(i int) returns int +begin +insert into t1 (val) values (i); +return 0; +end| +select val, f1(val) from t1| +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select val, f1(val) from t1 as tab| +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select * from t1| +val x +42 3.1 +19 1.2 +update t1 set val= f1(val)| +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select * from t1| +val x +42 3.1 +19 1.2 +select f1(17)| +f1(17) +0 +select * from t1| +val x +42 3.1 +19 1.2 +17 NULL +delete from t1 where val= 17| +drop function f1| +create procedure bug1965() +begin +declare c cursor for select val from t1 order by valname; +open c; +close c; +end| +call bug1965()| +ERROR 42S22: Unknown column 'valname' in 'order clause' +drop procedure bug1965| +select 1 into a| +ERROR 42000: Undeclared variable: a +drop table if exists t3| +create table t3 (column_1_0 int)| +create procedure bug1653() +update t3 set column_1 = 0| +call bug1653()| +ERROR 42S22: Unknown column 'column_1' in 'field list' +drop table t3| +create table t3 (column_1 int)| +call bug1653()| +drop procedure bug1653| +drop table t3| +create procedure bug2259() +begin +declare v1 int; +declare c1 cursor for select s1 from t1; +fetch c1 into v1; +end| +call bug2259()| +ERROR 24000: Cursor is not open +drop procedure bug2259| +create procedure bug2272() +begin +declare v int; +update t1 set v = 42; +end| +insert into t1 values (666, 51.3)| +call bug2272()| +ERROR 42S22: Unknown column 'v' in 'field list' +delete from t1| +drop procedure bug2272| +create procedure bug2329_1() +begin +declare v int; +insert into t1 (v) values (5); +end| +create procedure bug2329_2() +begin +declare v int; +replace t1 set v = 5; +end| +call bug2329_1()| +ERROR 42S22: Unknown column 'v' in 'field list' +call bug2329_2()| +ERROR 42S22: Unknown column 'v' in 'field list' +drop procedure bug2329_1| +drop procedure bug2329_2| +create function bug3287() returns int +begin +declare v int default null; +case +when v is not null then return 1; +end case; +return 2; +end| +select bug3287()| +ERROR 20000: Case not found for CASE statement +drop function bug3287| +create procedure bug3287(x int) +case x +when 0 then +insert into test.t1 values (x, 0.1); +when 1 then +insert into test.t1 values (x, 1.1); +end case| +call bug3287(2)| +ERROR 20000: Case not found for CASE statement +drop procedure bug3287| +drop table if exists t3| +create table t3 (s1 int, primary key (s1))| +insert into t3 values (5),(6)| +create procedure bug3279(out y int) +begin +declare x int default 0; +begin +declare exit handler for sqlexception set x = x+1; +insert into t3 values (5); +end; +if x < 2 then +set x = x+1; +insert into t3 values (6); +end if; +set y = x; +end| +set @x = 0| +call bug3279(@x)| +ERROR 23000: Duplicate entry '6' for key 1 +select @x| +@x +0 +drop procedure bug3279| +drop table t3| +create procedure nodb.bug3339() begin end| +ERROR 42000: Unknown database 'nodb' +create procedure bug2653_1(a int, out b int) +set b = aa| +create procedure bug2653_2(a int, out b int) +begin +if aa < 0 then +set b = - a; +else +set b = a; +end if; +end| +call bug2653_1(1, @b)| +ERROR 42S22: Unknown column 'aa' in 'order clause' +call bug2653_2(2, @b)| +ERROR 42S22: Unknown column 'aa' in 'order clause' +drop procedure bug2653_1| +drop procedure bug2653_2| +create procedure bug4344() drop procedure bug4344| +ERROR HY000: Can't drop or alter a PROCEDURE from within another stored routine +create procedure bug4344() drop function bug4344| +ERROR HY000: Can't drop or alter a FUNCTION from within another stored routine +drop procedure if exists bug3294| +create procedure bug3294() +begin +declare continue handler for sqlexception drop table t5; +drop table t5; +drop table t5; +end| +create table t5 (x int)| +call bug3294()| +ERROR 42S02: Unknown table 't5' +drop procedure bug3294| +drop procedure if exists bug6807| +create procedure bug6807() +begin +declare id int; +set id = connection_id(); +kill query id; +select 'Not reached'; +end| +call bug6807()| +ERROR 70100: Query execution was interrupted +call bug6807()| +ERROR 70100: Query execution was interrupted +drop procedure bug6807| +drop procedure if exists bug8776_1| +drop procedure if exists bug8776_2| +drop procedure if exists bug8776_3| +drop procedure if exists bug8776_4| +create procedure bug8776_1() +begin +declare continue handler for sqlstate '42S0200test' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '42S0200test' +create procedure bug8776_2() +begin +declare continue handler for sqlstate '4200' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '4200' +create procedure bug8776_3() +begin +declare continue handler for sqlstate '420000' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '420000' +create procedure bug8776_4() +begin +declare continue handler for sqlstate '42x00' begin end; +begin end; +end| +ERROR 42000: Bad SQLSTATE: '42x00' +create procedure bug6600() +check table t1| +ERROR 0A000: CHECK is not allowed in stored procedures +create procedure bug6600() +lock table t1 read| +ERROR 0A000: LOCK is not allowed in stored procedures +create procedure bug6600() +unlock table t1| +ERROR 0A000: UNLOCK is not allowed in stored procedures +drop procedure if exists bug9566| +create procedure bug9566() +begin +select * from t1; +end| +lock table t1 read| +alter procedure bug9566 comment 'Some comment'| +ERROR HY000: Table 'proc' was not locked with LOCK TABLES +unlock tables| +drop procedure bug9566| +drop procedure if exists bug7299| +create procedure bug7299() +begin +declare v int; +declare c cursor for select val from t1; +declare exit handler for sqlexception select 'Error!'; +open c; +fetch c into v; +end| +delete from t1| +call bug7299()| +ERROR 02000: No data to FETCH +drop procedure bug7299| +create procedure bug9073() +begin +declare continue handler for sqlexception select 1; +declare continue handler for sqlexception select 2; +end| +ERROR 42000: Duplicate handler declared in the same block +create procedure bug9073() +begin +declare condname1 condition for 1234; +declare continue handler for condname1 select 1; +declare exit handler for condname1 select 2; +end| +ERROR 42000: Duplicate handler declared in the same block +create procedure bug9073() +begin +declare condname1 condition for sqlstate '42000'; +declare condname2 condition for sqlstate '42000'; +declare exit handler for condname1 select 1; +declare continue handler for condname2 select 2; +end| +ERROR 42000: Duplicate handler declared in the same block +create procedure bug9073() +begin +declare condname1 condition for sqlstate '42000'; +declare exit handler for condname1 select 1; +declare exit handler for sqlstate '42000' select 2; +end| +ERROR 42000: Duplicate handler declared in the same block +drop procedure if exists bug9073| +create procedure bug9073() +begin +declare condname1 condition for sqlstate '42000'; +declare continue handler for condname1 select 1; +begin +declare exit handler for sqlstate '42000' select 2; +begin +declare continue handler for sqlstate '42000' select 3; +end; +end; +end| +drop procedure bug9073| +create procedure bug7047() +alter procedure bug7047| +ERROR HY000: Can't drop or alter a PROCEDURE from within another stored routine +create function bug7047() returns int +begin +alter function bug7047; +return 0; +end| +ERROR HY000: Can't drop or alter a FUNCTION from within another stored routine +create function bug8408() returns int +begin +select * from t1; +return 0; +end| +ERROR 0A000: Not allowed to return a result set from a function +create function bug8408() returns int +begin +show warnings; +return 0; +end| +ERROR 0A000: Not allowed to return a result set from a function +create function bug8408(a int) returns int +begin +declare b int; +select b; +return b; +end| +ERROR 0A000: Not allowed to return a result set from a function +drop function if exists bug8408_f| +drop procedure if exists bug8408_p| +create function bug8408_f() returns int +begin +call bug8408_p(); +return 0; +end| +create procedure bug8408_p() +select * from t1| +call bug8408_p()| +val x +select bug8408_f()| +ERROR 0A000: PROCEDURE test.bug8408_p can't return a result set in the given context +drop procedure bug8408_p| +drop function bug8408_f| +create function bug8408() returns int +begin +declare n int default 0; +select count(*) into n from t1; +return n; +end| +insert into t1 value (2, 2.7), (3, 3.14), (7, 7.0)| +select *,bug8408() from t1| +val x bug8408() +2 2.7 3 +3 3.14 3 +7 7 3 +drop function bug8408| +delete from t1| +drop procedure if exists bug10537| +create procedure bug10537() +load data local infile '/tmp/somefile' into table t1| +ERROR 0A000: LOAD DATA is not allowed in stored procedures +drop function if exists bug8409| +create function bug8409() +returns int +begin +flush tables; +return 5; +end| +ERROR 0A000: FLUSH is not allowed in stored function or trigger +create procedure bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123() +begin +end| +ERROR 42000: Identifier name 'bug9529_90123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' is too long +drop procedure if exists bug10969| +create procedure bug10969() +begin +declare s1 int default 0; +select default(s1) from t30; +end| +ERROR 42000: Incorrect column name 's1' +create procedure bug10969() +begin +declare s1 int default 0; +select default(t30.s1) from t30; +end| +drop procedure bug10969| +drop table t1| +prepare stmt from "select 1"; +create procedure p() deallocate prepare stmt; +ERROR 0A000: DEALLOCATE is not allowed in stored procedures +create function f() returns int begin deallocate prepare stmt; +ERROR 0A000: DEALLOCATE is not allowed in stored procedures +create procedure p() prepare stmt from "select 1"; +ERROR 0A000: PREPARE is not allowed in stored procedures +create function f() returns int begin prepare stmt from "select 1"; +ERROR 0A000: PREPARE is not allowed in stored procedures +create procedure p() execute stmt; +ERROR 0A000: EXECUTE is not allowed in stored procedures +create function f() returns int begin execute stmt; +ERROR 0A000: EXECUTE is not allowed in stored procedures +deallocate prepare stmt; +create table t1(f1 int); +create table t2(f1 int); +CREATE PROCEDURE SP001() +P1: BEGIN +DECLARE ENDTABLE INT DEFAULT 0; +DECLARE TEMP_NUM INT; +DECLARE TEMP_SUM INT; +DECLARE C1 CURSOR FOR SELECT F1 FROM t1; +DECLARE C2 CURSOR FOR SELECT F1 FROM t2; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET ENDTABLE = 1; +SET ENDTABLE=0; +SET TEMP_SUM=0; +SET TEMP_NUM=0; +OPEN C1; +FETCH C1 INTO TEMP_NUM; +WHILE ENDTABLE = 0 DO +SET TEMP_SUM=TEMP_NUM+TEMP_SUM; +FETCH C1 INTO TEMP_NUM; +END WHILE; +SELECT TEMP_SUM; +CLOSE C1; +CLOSE C1; +SELECT 'end of proc'; +END P1| +call SP001(); +TEMP_SUM +0 +drop procedure SP001; +drop table t1, t2; +drop function if exists bug11394| +drop function if exists bug11394_1| +drop function if exists bug11394_2| +drop procedure if exists bug11394| +create function bug11394(i int) returns int +begin +if i <= 0 then +return 0; +else +return (i in (100, 200, bug11394(i-1), 400)); +end if; +end| +select bug11394(2)| +ERROR HY000: Recursive stored routines are not allowed. +drop function bug11394| +create function bug11394_1(i int) returns int +begin +if i <= 0 then +return 0; +else +return (select bug11394_1(i-1)); +end if; +end| +select bug11394_1(2)| +ERROR HY000: Recursive stored routines are not allowed. +drop function bug11394_1| +create function bug11394_2(i int) returns int return i| +select bug11394_2(bug11394_2(10))| +bug11394_2(bug11394_2(10)) +10 +drop function bug11394_2| +create procedure bug11394(i int, j int) +begin +if i > 0 then +call bug11394(i - 1,(select 1)); +end if; +end| +call bug11394(2, 1)| +ERROR HY000: Recursive stored routines are not allowed. +drop procedure bug11394| +drop function if exists bug11834_1; +drop function if exists bug11834_2; +create function bug11834_1() returns int return 10; +create function bug11834_2() returns int return bug11834_1(); +prepare stmt from "select bug11834_2()"; +execute stmt; +bug11834_2() +10 +execute stmt; +bug11834_2() +10 +drop function bug11834_1; +execute stmt; +ERROR 42000: FUNCTION test.bug11834_1 does not exist +deallocate prepare stmt; +drop function bug11834_2; diff --git a/mysql-test/r/sp-goto.result b/mysql-test/r/sp-goto.result new file mode 100644 index 00000000000..ca560f62318 --- /dev/null +++ b/mysql-test/r/sp-goto.result @@ -0,0 +1,205 @@ +drop table if exists t1; +create table t1 ( +id char(16) not null default '', +data int not null +); +drop procedure if exists goto1// +create procedure goto1() +begin +declare y int; +label a; +select * from t1; +select count(*) into y from t1; +if y > 2 then +goto b; +end if; +insert into t1 values ("j", y); +goto a; +label b; +end// +call goto1()// +id data +id data +j 0 +id data +j 0 +j 1 +id data +j 0 +j 1 +j 2 +drop procedure goto1// +drop procedure if exists goto2// +create procedure goto2(a int) +begin +declare x int default 0; +declare continue handler for sqlstate '42S98' set x = 1; +label a; +select * from t1; +b: +while x < 2 do +begin +declare continue handler for sqlstate '42S99' set x = 2; +if a = 0 then +set x = x + 1; +iterate b; +elseif a = 1 then +leave b; +elseif a = 2 then +set a = 1; +goto a; +end if; +end; +end while b; +select * from t1; +end// +call goto2(0)// +id data +j 0 +j 1 +j 2 +id data +j 0 +j 1 +j 2 +call goto2(1)// +id data +j 0 +j 1 +j 2 +id data +j 0 +j 1 +j 2 +call goto2(2)// +id data +j 0 +j 1 +j 2 +id data +j 0 +j 1 +j 2 +id data +j 0 +j 1 +j 2 +drop procedure goto2// +delete from t1// +drop procedure if exists goto3// +create procedure goto3() +begin +label L1; +begin +end; +goto L1; +end// +drop procedure goto3// +drop procedure if exists goto4// +create procedure goto4() +begin +begin +label lab1; +begin +goto lab1; +end; +end; +end// +drop procedure goto4// +drop procedure if exists goto5// +create procedure goto5() +begin +begin +begin +goto lab1; +end; +label lab1; +end; +end// +drop procedure goto5// +drop procedure if exists goto6// +create procedure goto6() +begin +label L1; +goto L5; +begin +label L2; +goto L1; +goto L5; +begin +label L3; +goto L1; +goto L2; +goto L3; +goto L4; +goto L5; +end; +goto L2; +goto L4; +label L4; +end; +label L5; +goto L1; +end// +drop procedure goto6// +create procedure foo() +begin +goto foo; +end// +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +begin +label foo; +end; +goto foo; +end// +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +goto foo; +begin +label foo; +end; +end// +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +begin +goto foo; +end; +begin +label foo; +end; +end// +ERROR 42000: GOTO with no matching label: foo +create procedure foo() +begin +begin +label foo; +end; +begin +goto foo; +end; +end// +ERROR 42000: GOTO with no matching label: foo +create procedure p() +begin +declare continue handler for sqlexception +begin +goto L1; +end; +select field from t1; +label L1; +end// +ERROR HY000: GOTO is not allowed in a stored procedure handler +drop procedure if exists bug6898// +create procedure bug6898() +begin +goto label1; +label label1; +begin end; +goto label1; +end// +drop procedure bug6898// +drop table t1; diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result new file mode 100644 index 00000000000..32d6d4e6264 --- /dev/null +++ b/mysql-test/r/sp-prelocking.result @@ -0,0 +1,215 @@ +drop database if exists mysqltest; +drop table if exists t1, t2, t3, t4; +drop procedure if exists sp1; +drop procedure if exists sp2; +drop procedure if exists sp3; +drop procedure if exists sp4; +drop function if exists f1; +drop function if exists f2; +drop function if exists f3; +create database mysqltest; +use mysqltest// +create procedure sp1 () +begin +drop table if exists t1; +select 1 as "my-col"; +end; +// +select database(); +database() +mysqltest +call sp1(); +my-col +1 +Warnings: +Note 1051 Unknown table 't1' +select database(); +database() +mysqltest +use test; +select database(); +database() +test +call mysqltest.sp1(); +my-col +1 +Warnings: +Note 1051 Unknown table 't1' +select database(); +database() +test +drop procedure mysqltest.sp1; +drop database mysqltest; +create procedure sp1() +begin +create table t1 (a int); +insert into t1 values (10); +end// +create procedure sp2() +begin +create table t2(a int); +insert into t2 values(1); +call sp1(); +end// +create function f1() returns int +begin +return (select max(a) from t1); +end// +create procedure sp3() +begin +call sp1(); +select 'func', f1(); +end// +call sp1(); +select 't1',a from t1; +t1 a +t1 10 +drop table t1; +call sp2(); +select 't1',a from t1; +t1 a +t1 10 +select 't2',a from t2; +t2 a +t2 1 +drop table t1, t2; +call sp3(); +func f1() +func 10 +select 't1',a from t1; +t1 a +t1 10 +drop table t1; +drop procedure sp1; +drop procedure sp2; +drop procedure sp3; +drop function f1; +create procedure sp1() +begin +create temporary table t2(a int); +insert into t2 select * from t1; +end// +create procedure sp2() +begin +create temporary table t1 (a int); +insert into t1 values(1); +call sp1(); +select 't1', a from t1; +select 't2', a from t2; +drop table t1; +drop table t2; +end// +call sp2(); +t1 a +t1 1 +t2 a +t2 1 +drop procedure sp1; +drop procedure sp2; +create table t1 (a int); +insert into t1 values(1),(2); +create table t2 as select * from t1; +create table t3 as select * from t1; +create table t4 as select * from t1; +create procedure sp1(a int) +begin +select a; +end // +create function f1() returns int +begin +return (select max(a) from t1); +end // +CALL sp1(f1()); +a +2 +create procedure sp2(a int) +begin +select * from t3; +select a; +end // +create procedure sp3() +begin +select * from t1; +call sp2(5); +end // +create procedure sp4() +begin +select * from t2; +call sp3(); +end // +call sp4(); +a +1 +2 +a +1 +2 +a +1 +2 +a +5 +drop procedure sp1; +drop procedure sp2; +drop procedure sp3; +drop procedure sp4; +drop function f1; +drop view if exists v1; +create function f1(ab int) returns int +begin +declare i int; +set i= (select max(a) from t1 where a < ab) ; +return i; +end // +create function f2(ab int) returns int +begin +declare i int; +set i= (select max(a) from t2 where a < ab) ; +return i; +end // +create view v1 as +select t3.a as x, t4.a as y, f2(3) as z +from t3, t4 where t3.a = t4.a // +create procedure sp1() +begin +declare a int; +set a= (select f1(4) + count(*) A from t1, v1); +end // +create function f3() returns int +begin +call sp1(); +return 1; +end // +call sp1() // +select f3() // +f3() +1 +select f3() // +f3() +1 +call sp1() // +drop procedure sp1// +drop function f3// +create procedure sp1() +begin +declare x int; +declare c cursor for select f1(3) + count(*) from v1; +open c; +fetch c into x; +end;// +create function f3() returns int +begin +call sp1(); +return 1; +end // +call sp1() // +call sp1() // +select f3() // +f3() +1 +call sp1() // +drop table t1,t2,t3; +drop function f1; +drop function f2; +drop function f3; +drop procedure sp1; diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result new file mode 100644 index 00000000000..eb2e2ce334e --- /dev/null +++ b/mysql-test/r/sp-security.result @@ -0,0 +1,253 @@ +use test; +grant usage on *.* to user1@localhost; +flush privileges; +drop table if exists t1; +drop database if exists db1_secret; +create database db1_secret; +create procedure db1_secret.dummy() begin end; +drop procedure db1_secret.dummy; +use db1_secret; +create table t1 ( u varchar(64), i int ); +create procedure stamp(i int) +insert into db1_secret.t1 values (user(), i); +show procedure status like 'stamp'; +Db Name Type Definer Modified Created Security_type Comment +db1_secret stamp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +create function db() returns varchar(64) return database(); +show function status like 'db'; +Db Name Type Definer Modified Created Security_type Comment +db1_secret db FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +call stamp(1); +select * from t1; +u i +root@localhost 1 +select db(); +db() +db1_secret +grant execute on procedure db1_secret.stamp to user1@'%'; +grant execute on function db1_secret.db to user1@'%'; +grant execute on procedure db1_secret.stamp to ''@'%'; +grant execute on function db1_secret.db to ''@'%'; +call db1_secret.stamp(2); +select db1_secret.db(); +db1_secret.db() +db1_secret +select * from db1_secret.t1; +ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1' +create procedure db1_secret.dummy() begin end; +ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' +drop procedure db1_secret.dummy; +ERROR 42000: PROCEDURE db1_secret.dummy does not exist +call db1_secret.stamp(3); +select db1_secret.db(); +db1_secret.db() +db1_secret +select * from db1_secret.t1; +ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1' +create procedure db1_secret.dummy() begin end; +ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret' +drop procedure db1_secret.dummy; +ERROR 42000: PROCEDURE db1_secret.dummy does not exist +select * from t1; +u i +root@localhost 1 +user1@localhost 2 +anon@localhost 3 +alter procedure stamp sql security invoker; +show procedure status like 'stamp'; +Db Name Type Definer Modified Created Security_type Comment +db1_secret stamp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER +alter function db sql security invoker; +show function status like 'db'; +Db Name Type Definer Modified Created Security_type Comment +db1_secret db FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER +call stamp(4); +select * from t1; +u i +root@localhost 1 +user1@localhost 2 +anon@localhost 3 +root@localhost 4 +select db(); +db() +db1_secret +call db1_secret.stamp(5); +ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' +select db1_secret.db(); +ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' +call db1_secret.stamp(6); +ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret' +select db1_secret.db(); +ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret' +drop database if exists db2; +create database db2; +use db2; +create table t2 (s1 int); +insert into t2 values (0); +grant usage on db2.* to user1@localhost; +grant select on db2.* to user1@localhost; +grant usage on db2.* to user2@localhost; +grant select,insert,update,delete,create routine on db2.* to user2@localhost; +grant create routine on db2.* to user1@localhost; +flush privileges; +use db2; +create procedure p () insert into t2 values (1); +call p(); +ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 't2' +use db2; +call p(); +ERROR 42000: execute command denied to user 'user2'@'localhost' for routine 'db2.p' +select * from t2; +s1 +0 +create procedure q () insert into t2 values (2); +call q(); +select * from t2; +s1 +0 +2 +grant usage on procedure db2.q to user2@localhost with grant option; +grant execute on procedure db2.q to user1@localhost; +use db2; +call q(); +select * from t2; +s1 +0 +2 +2 +alter procedure p modifies sql data; +drop procedure p; +alter procedure q modifies sql data; +ERROR 42000: alter routine command denied to user 'user1'@'localhost' for routine 'db2.q' +drop procedure q; +ERROR 42000: alter routine command denied to user 'user1'@'localhost' for routine 'db2.q' +use db2; +alter procedure q modifies sql data; +drop procedure q; +use test; +select type,db,name from mysql.proc; +type db name +FUNCTION db1_secret db +PROCEDURE db1_secret stamp +drop database db1_secret; +drop database db2; +select type,db,name from mysql.proc; +type db name +delete from mysql.user where user='user1' or user='user2'; +delete from mysql.procs_priv where user='user1' or user='user2'; +grant usage on *.* to usera@localhost; +grant usage on *.* to userb@localhost; +grant usage on *.* to userc@localhost; +create database sptest; +create table t1 ( u varchar(64), i int ); +create procedure sptest.p1(i int) insert into test.t1 values (user(), i); +grant insert on t1 to usera@localhost; +grant execute on procedure sptest.p1 to usera@localhost; +show grants for usera@localhost; +Grants for usera@localhost +GRANT USAGE ON *.* TO 'usera'@'localhost' +GRANT INSERT ON `test`.`t1` TO 'usera'@'localhost' +GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO 'usera'@'localhost' +grant execute on procedure sptest.p1 to userc@localhost with grant option; +show grants for userc@localhost; +Grants for userc@localhost +GRANT USAGE ON *.* TO 'userc'@'localhost' +GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO 'userc'@'localhost' WITH GRANT OPTION +call sptest.p1(1); +grant execute on procedure sptest.p1 to userb@localhost; +ERROR 42000: grant command denied to user 'usera'@'localhost' for routine 'sptest.p1' +drop procedure sptest.p1; +ERROR 42000: alter routine command denied to user 'usera'@'localhost' for routine 'sptest.p1' +call sptest.p1(2); +ERROR 42000: execute command denied to user 'userb'@'localhost' for routine 'sptest.p1' +grant execute on procedure sptest.p1 to userb@localhost; +ERROR 42000: execute command denied to user 'userb'@'localhost' for routine 'sptest.p1' +drop procedure sptest.p1; +ERROR 42000: alter routine command denied to user 'userb'@'localhost' for routine 'sptest.p1' +call sptest.p1(3); +grant execute on procedure sptest.p1 to userb@localhost; +drop procedure sptest.p1; +ERROR 42000: alter routine command denied to user 'userc'@'localhost' for routine 'sptest.p1' +call sptest.p1(4); +grant execute on procedure sptest.p1 to userb@localhost; +ERROR 42000: grant command denied to user 'userb'@'localhost' for routine 'sptest.p1' +drop procedure sptest.p1; +ERROR 42000: alter routine command denied to user 'userb'@'localhost' for routine 'sptest.p1' +select * from t1; +u i +usera@localhost 1 +userc@localhost 3 +userb@localhost 4 +grant all privileges on procedure sptest.p1 to userc@localhost; +show grants for userc@localhost; +Grants for userc@localhost +GRANT USAGE ON *.* TO 'userc'@'localhost' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `sptest`.`p1` TO 'userc'@'localhost' WITH GRANT OPTION +show grants for userb@localhost; +Grants for userb@localhost +GRANT USAGE ON *.* TO 'userb'@'localhost' +GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO 'userb'@'localhost' +revoke all privileges on procedure sptest.p1 from userb@localhost; +show grants for userb@localhost; +Grants for userb@localhost +GRANT USAGE ON *.* TO 'userb'@'localhost' +use test; +drop database sptest; +delete from mysql.user where user='usera' or user='userb' or user='userc'; +delete from mysql.procs_priv where user='usera' or user='userb' or user='userc'; +drop function if exists bug_9503; +create database mysqltest// +use mysqltest// +create table t1 (s1 int)// +grant select on t1 to user1@localhost// +create function bug_9503 () returns int sql security invoker begin declare v int; +select min(s1) into v from t1; return v; end// +use mysqltest; +select bug_9503(); +ERROR 42000: execute command denied to user 'user1'@'localhost' for routine 'mysqltest.bug_9503' +grant execute on function bug_9503 to user1@localhost; +do 1; +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost; +drop function bug_9503; +use test; +drop database mysqltest; +use test; +select current_user(); +current_user() +root@localhost +select user(); +user() +root@localhost +create procedure bug7291_0 () sql security invoker select current_user(), user(); +create procedure bug7291_1 () sql security definer call bug7291_0(); +create procedure bug7291_2 () sql security invoker call bug7291_0(); +grant execute on procedure bug7291_0 to user1@localhost; +grant execute on procedure bug7291_1 to user1@localhost; +grant execute on procedure bug7291_2 to user1@localhost; +call bug7291_2(); +current_user() user() +user1@localhost user1@localhost +call bug7291_1(); +current_user() user() +root@localhost user1@localhost +drop procedure bug7291_1; +drop procedure bug7291_2; +drop procedure bug7291_0; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost; +drop user user1@localhost; +drop database if exists mysqltest_1; +create database mysqltest_1; +create procedure mysqltest_1.p1() +begin +select 1 from dual; +end// +grant usage on *.* to mysqltest_1@localhost; +call mysqltest_1.p1(); +ERROR 42000: execute command denied to user 'mysqltest_1'@'localhost' for routine 'mysqltest_1.p1' +call mysqltest_1.p1(); +ERROR 42000: execute command denied to user 'mysqltest_1'@'localhost' for routine 'mysqltest_1.p1' +drop procedure mysqltest_1.p1; +drop database mysqltest_1; +revoke usage on *.* from mysqltest_1@localhost; +drop user mysqltest_1@localhost; diff --git a/mysql-test/r/sp-threads.result b/mysql-test/r/sp-threads.result new file mode 100644 index 00000000000..c516d7a643f --- /dev/null +++ b/mysql-test/r/sp-threads.result @@ -0,0 +1,91 @@ +use test; +drop table if exists t1; +create table t1 (s1 int, s2 int, s3 int); +create procedure bug4934() +begin +insert into t1 values (1,0,1); +end// +use test; +call bug4934(); +select * from t1; +s1 s2 s3 +1 0 1 +drop table t1; +create table t1 (s1 int, s2 int, s3 int); +drop procedure bug4934; +create procedure bug4934() +begin +end// +select * from t1; +s1 s2 s3 +call bug4934(); +select * from t1; +s1 s2 s3 +drop table t1; +drop procedure bug4934; +drop procedure if exists bug9486; +drop table if exists t1, t2; +create table t1 (id1 int, val int); +create table t2 (id2 int); +create procedure bug9486() +update t1, t2 set val= 1 where id1=id2; +call bug9486(); +lock tables t2 write; + call bug9486(); +show processlist; +Id User Host db Command Time State Info +# root localhost test Sleep # NULL +# root localhost test Query # Locked update t1, t2 set val= 1 where id1=id2 +# root localhost test Query # NULL show processlist +# root localhost test Sleep # NULL +unlock tables; +drop procedure bug9486; +drop table t1, t2; +drop procedure if exists bug11158; +create procedure bug11158() delete t1 from t1, t2 where t1.id = t2.id; +create table t1 (id int, j int); +insert into t1 values (1, 1), (2, 2); +create table t2 (id int); +insert into t2 values (1); +call bug11158(); +select * from t1; +id j +2 2 +lock tables t2 read; +call bug11158(); +unlock tables; +drop procedure bug11158; +drop table t1, t2; +drop function if exists bug11554; +drop view if exists v1; +create table t1 (i int); +create function bug11554 () returns int return 1; +create view v1 as select bug11554() as f; +insert into t1 (select f from v1); +drop function bug11554; +drop table t1; +drop view v1; +drop procedure if exists p1; +drop procedure if exists p2; +create table t1 (s1 int)| +create procedure p1() select * from t1| +create procedure p2() +begin +insert into t1 values (1); +call p1(); +select * from t1; +end| +use test; +lock table t1 write; + call p2(); +use test; +drop procedure p1; +create procedure p1() select * from t1; +unlock tables; +s1 +1 +s1 +1 +drop procedure p1; +drop procedure p2; +drop table t1; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result new file mode 100644 index 00000000000..4424f4e6ad4 --- /dev/null +++ b/mysql-test/r/sp.result @@ -0,0 +1,3196 @@ +use test; +drop table if exists t1,t2,t3,t4; +create table t1 ( +id char(16) not null default '', +data int not null +); +create table t2 ( +s char(16), +i int, +d double +); +drop procedure if exists foo42; +create procedure foo42() +insert into test.t1 values ("foo", 42); +call foo42(); +select * from t1; +id data +foo 42 +delete from t1; +drop procedure foo42; +drop procedure if exists bar; +create procedure bar(x char(16), y int) +insert into test.t1 values (x, y); +call bar("bar", 666); +select * from t1; +id data +bar 666 +delete from t1; +drop procedure if exists empty| +create procedure empty() +begin +end| +call empty()| +drop procedure empty| +drop procedure if exists scope| +create procedure scope(a int, b float) +begin +declare b int; +declare c float; +begin +declare c int; +end; +end| +drop procedure scope| +drop procedure if exists two| +create procedure two(x1 char(16), x2 char(16), y int) +begin +insert into test.t1 values (x1, y); +insert into test.t1 values (x2, y); +end| +call two("one", "two", 3)| +select * from t1| +id data +one 3 +two 3 +delete from t1| +drop procedure two| +drop procedure if exists locset| +create procedure locset(x char(16), y int) +begin +declare z1, z2 int; +set z1 = y; +set z2 = z1+2; +insert into test.t1 values (x, z2); +end| +call locset("locset", 19)| +select * from t1| +id data +locset 21 +delete from t1| +drop procedure locset| +drop procedure if exists setcontext| +create procedure setcontext() +begin +declare data int default 2; +insert into t1 (id, data) values ("foo", 1); +replace t1 set data = data, id = "bar"; +update t1 set id = "kaka", data = 3 where t1.data = data; +end| +call setcontext()| +select * from t1| +id data +foo 1 +kaka 3 +delete from t1| +drop procedure setcontext| +create table t3 ( d date, i int, f double, s varchar(32) )| +drop procedure if exists nullset| +create procedure nullset() +begin +declare ld date; +declare li int; +declare lf double; +declare ls varchar(32); +set ld = null, li = null, lf = null, ls = null; +insert into t3 values (ld, li, lf, ls); +insert into t3 (i, f, s) values ((ld is null), 1, "ld is null"), +((li is null), 1, "li is null"), +((li = 0), null, "li = 0"), +((lf is null), 1, "lf is null"), +((lf = 0), null, "lf = 0"), +((ls is null), 1, "ls is null"); +end| +call nullset()| +select * from t3| +d i f s +NULL NULL NULL NULL +NULL 1 1 ld is null +NULL 1 1 li is null +NULL NULL NULL li = 0 +NULL 1 1 lf is null +NULL NULL NULL lf = 0 +NULL 1 1 ls is null +drop table t3| +drop procedure nullset| +drop procedure if exists mixset| +create procedure mixset(x char(16), y int) +begin +declare z int; +set @z = y, z = 666, max_join_size = 100; +insert into test.t1 values (x, z); +end| +call mixset("mixset", 19)| +show variables like 'max_join_size'| +Variable_name Value +max_join_size 100 +select id,data,@z from t1| +id data @z +mixset 666 19 +delete from t1| +drop procedure mixset| +drop procedure if exists zip| +create procedure zip(x char(16), y int) +begin +declare z int; +call zap(y, z); +call bar(x, z); +end| +drop procedure if exists zap| +create procedure zap(x int, out y int) +begin +declare z int; +set z = x+1, y = z; +end| +call zip("zip", 99)| +select * from t1| +id data +zip 100 +delete from t1| +drop procedure zip| +drop procedure bar| +call zap(7, @zap)| +select @zap| +@zap +8 +drop procedure zap| +drop procedure if exists c1| +create procedure c1(x int) +call c2("c", x)| +drop procedure if exists c2| +create procedure c2(s char(16), x int) +call c3(x, s)| +drop procedure if exists c3| +create procedure c3(x int, s char(16)) +call c4("level", x, s)| +drop procedure if exists c4| +create procedure c4(l char(8), x int, s char(16)) +insert into t1 values (concat(l,s), x)| +call c1(42)| +select * from t1| +id data +levelc 42 +delete from t1| +drop procedure c1| +drop procedure c2| +drop procedure c3| +drop procedure c4| +drop procedure if exists iotest| +create procedure iotest(x1 char(16), x2 char(16), y int) +begin +call inc2(x2, y); +insert into test.t1 values (x1, y); +end| +drop procedure if exists inc2| +create procedure inc2(x char(16), y int) +begin +call inc(y); +insert into test.t1 values (x, y); +end| +drop procedure if exists inc| +create procedure inc(inout io int) +set io = io + 1| +call iotest("io1", "io2", 1)| +select * from t1| +id data +io2 2 +io1 1 +delete from t1| +drop procedure iotest| +drop procedure inc2| +drop procedure if exists incr| +create procedure incr(inout x int) +call inc(x)| +select @zap| +@zap +8 +call incr(@zap)| +select @zap| +@zap +9 +drop procedure inc| +drop procedure incr| +drop procedure if exists cbv1| +create procedure cbv1() +begin +declare y int default 3; +call cbv2(y+1, y); +insert into test.t1 values ("cbv1", y); +end| +drop procedure if exists cbv2| +create procedure cbv2(y1 int, inout y2 int) +begin +set y2 = 4711; +insert into test.t1 values ("cbv2", y1); +end| +call cbv1()| +select * from t1| +id data +cbv2 4 +cbv1 4711 +delete from t1| +drop procedure cbv1| +drop procedure cbv2| +insert into t2 values ("a", 1, 1.1), ("b", 2, 1.2), ("c", 3, 1.3)| +drop procedure if exists sub1| +create procedure sub1(id char(16), x int) +insert into test.t1 values (id, x)| +drop procedure if exists sub2| +create procedure sub2(id char(16)) +begin +declare x int; +set x = (select sum(t.i) from test.t2 t); +insert into test.t1 values (id, x); +end| +drop procedure if exists sub3| +create function sub3(i int) returns int +return i+1| +call sub1("sub1a", (select 7))| +call sub1("sub1b", (select max(i) from t2))| +call sub1("sub1c", (select i,d from t2 limit 1))| +call sub1("sub1d", (select 1 from (select 1) a))| +call sub2("sub2")| +select * from t1| +id data +sub1a 7 +sub1b 3 +sub1c 1 +sub1d 1 +sub2 6 +select sub3((select max(i) from t2))| +sub3((select max(i) from t2)) +4 +drop procedure sub1| +drop procedure sub2| +drop function sub3| +delete from t1| +delete from t2| +drop procedure if exists a0| +create procedure a0(x int) +while x do +set x = x-1; +insert into test.t1 values ("a0", x); +end while| +call a0(3)| +select * from t1| +id data +a0 2 +a0 1 +a0 0 +delete from t1| +drop procedure a0| +drop procedure if exists a| +create procedure a(x int) +while x > 0 do +set x = x-1; +insert into test.t1 values ("a", x); +end while| +call a(3)| +select * from t1| +id data +a 2 +a 1 +a 0 +delete from t1| +drop procedure a| +drop procedure if exists b| +create procedure b(x int) +repeat +insert into test.t1 values (repeat("b",3), x); +set x = x-1; +until x = 0 end repeat| +call b(3)| +select * from t1| +id data +bbb 3 +bbb 2 +bbb 1 +delete from t1| +drop procedure b| +drop procedure if exists b2| +create procedure b2(x int) +repeat(select 1 into outfile 'b2'); +insert into test.t1 values (repeat("b2",3), x); +set x = x-1; +until x = 0 end repeat| +drop procedure b2| +drop procedure if exists c| +create procedure c(x int) +hmm: while x > 0 do +insert into test.t1 values ("c", x); +set x = x-1; +iterate hmm; +insert into test.t1 values ("x", x); +end while hmm| +call c(3)| +select * from t1| +id data +c 3 +c 2 +c 1 +delete from t1| +drop procedure c| +drop procedure if exists d| +create procedure d(x int) +hmm: while x > 0 do +insert into test.t1 values ("d", x); +set x = x-1; +leave hmm; +insert into test.t1 values ("x", x); +end while| +call d(3)| +select * from t1| +id data +d 3 +delete from t1| +drop procedure d| +drop procedure if exists e| +create procedure e(x int) +foo: loop +if x = 0 then +leave foo; +end if; +insert into test.t1 values ("e", x); +set x = x-1; +end loop foo| +call e(3)| +select * from t1| +id data +e 3 +e 2 +e 1 +delete from t1| +drop procedure e| +drop procedure if exists f| +create procedure f(x int) +if x < 0 then +insert into test.t1 values ("f", 0); +elseif x = 0 then +insert into test.t1 values ("f", 1); +else +insert into test.t1 values ("f", 2); +end if| +call f(-2)| +call f(0)| +call f(4)| +select * from t1| +id data +f 0 +f 1 +f 2 +delete from t1| +drop procedure f| +drop procedure if exists g| +create procedure g(x int) +case +when x < 0 then +insert into test.t1 values ("g", 0); +when x = 0 then +insert into test.t1 values ("g", 1); +else +insert into test.t1 values ("g", 2); +end case| +call g(-42)| +call g(0)| +call g(1)| +select * from t1| +id data +g 0 +g 1 +g 2 +delete from t1| +drop procedure g| +drop procedure if exists h| +create procedure h(x int) +case x +when 0 then +insert into test.t1 values ("h0", x); +when 1 then +insert into test.t1 values ("h1", x); +else +insert into test.t1 values ("h?", x); +end case| +call h(0)| +call h(1)| +call h(17)| +select * from t1| +id data +h0 0 +h1 1 +h? 17 +delete from t1| +drop procedure h| +drop procedure if exists i| +create procedure i(x int) +foo: +begin +if x = 0 then +leave foo; +end if; +insert into test.t1 values ("i", x); +end foo| +call i(0)| +call i(3)| +select * from t1| +id data +i 3 +delete from t1| +drop procedure i| +insert into t1 values ("foo", 3), ("bar", 19)| +insert into t2 values ("x", 9, 4.1), ("y", -1, 19.2), ("z", 3, 2.2)| +drop procedure if exists sel1| +create procedure sel1() +begin +select * from t1; +end| +call sel1()| +id data +foo 3 +bar 19 +drop procedure sel1| +drop procedure if exists sel2| +create procedure sel2() +begin +select * from t1; +select * from t2; +end| +call sel2()| +id data +foo 3 +bar 19 +s i d +x 9 4.1 +y -1 19.2 +z 3 2.2 +drop procedure sel2| +delete from t1| +delete from t2| +drop procedure if exists into_test| +create procedure into_test(x char(16), y int) +begin +insert into test.t1 values (x, y); +select id,data into x,y from test.t1 limit 1; +insert into test.t1 values (concat(x, "2"), y+2); +end| +call into_test("into", 100)| +select * from t1| +id data +into 100 +into2 102 +delete from t1| +drop procedure into_test| +drop procedure if exists into_tes2| +create procedure into_test2(x char(16), y int) +begin +insert into test.t1 values (x, y); +select id,data into x,@z from test.t1 limit 1; +insert into test.t1 values (concat(x, "2"), y+2); +end| +call into_test2("into", 100)| +select id,data,@z from t1| +id data @z +into 100 100 +into2 102 100 +delete from t1| +drop procedure into_test2| +drop procedure if exists into_test3| +create procedure into_test3() +begin +declare x char(16); +declare y int; +select * into x,y from test.t1 limit 1; +insert into test.t2 values (x, y, 0.0); +end| +insert into t1 values ("into3", 19)| +call into_test3()| +call into_test3()| +select * from t2| +s i d +into3 19 0 +into3 19 0 +delete from t1| +delete from t2| +drop procedure into_test3| +drop procedure if exists into_test4| +create procedure into_test4() +begin +declare x int; +select data into x from test.t1 limit 1; +insert into test.t3 values ("into4", x); +end| +delete from t1| +create table t3 ( s char(16), d int)| +call into_test4()| +Warnings: +Warning 1329 No data to FETCH +select * from t3| +s d +into4 NULL +insert into t1 values ("i4", 77)| +call into_test4()| +select * from t3| +s d +into4 NULL +into4 77 +delete from t1| +drop table t3| +drop procedure into_test4| +drop procedure if exists into_outfile| +create procedure into_outfile(x char(16), y int) +begin +insert into test.t1 values (x, y); +select * into outfile "/tmp/spout" from test.t1; +insert into test.t1 values (concat(x, "2"), y+2); +end| +call into_outfile("ofile", 1)| +delete from t1| +drop procedure into_outfile| +drop procedure if exists into_dumpfile| +create procedure into_dumpfile(x char(16), y int) +begin +insert into test.t1 values (x, y); +select * into dumpfile "/tmp/spdump" from test.t1 limit 1; +insert into test.t1 values (concat(x, "2"), y+2); +end| +call into_dumpfile("dfile", 1)| +delete from t1| +drop procedure into_dumpfile| +drop procedure if exists create_select| +create procedure create_select(x char(16), y int) +begin +insert into test.t1 values (x, y); +create temporary table test.t3 select * from test.t1; +insert into test.t3 values (concat(x, "2"), y+2); +end| +call create_select("cs", 90)| +select * from t1, t3| +id data id data +cs 90 cs 90 +cs 90 cs2 92 +drop table t3| +delete from t1| +drop procedure create_select| +drop function if exists e| +create function e() returns double +return 2.7182818284590452354| +set @e = e()| +select e(), @e| +e() @e +2.718281828459 2.718281828459 +drop function if exists inc| +create function inc(i int) returns int +return i+1| +select inc(1), inc(99), inc(-71)| +inc(1) inc(99) inc(-71) +2 100 -70 +drop function if exists mul| +create function mul(x int, y int) returns int +return x*y| +select mul(1,1), mul(3,5), mul(4711, 666)| +mul(1,1) mul(3,5) mul(4711, 666) +1 15 3137526 +drop function if exists append| +create function append(s1 char(8), s2 char(8)) returns char(16) +return concat(s1, s2)| +select append("foo", "bar")| +append("foo", "bar") +foobar +drop function if exists fac| +create function fac(n int unsigned) returns bigint unsigned +begin +declare f bigint unsigned default 1; +while n > 1 do +set f = f * n; +set n = n - 1; +end while; +return f; +end| +select fac(1), fac(2), fac(5), fac(10)| +fac(1) fac(2) fac(5) fac(10) +1 2 120 3628800 +drop function if exists fun| +create function fun(d double, i int, u int unsigned) returns double +return mul(inc(i), fac(u)) / e()| +select fun(2.3, 3, 5)| +fun(2.3, 3, 5) +176.58213176229 +insert into t2 values (append("xxx", "yyy"), mul(4,3), e())| +insert into t2 values (append("a", "b"), mul(2,mul(3,4)), fun(1.7, 4, 6))| +select * from t2 where s = append("a", "b")| +s i d +ab 24 1324.36598821719 +select * from t2 where i = mul(4,3) or i = mul(mul(3,4),2)| +s i d +xxxyyy 12 2.71828182845905 +ab 24 1324.36598821719 +select * from t2 where d = e()| +s i d +xxxyyy 12 2.71828182845905 +select * from t2| +s i d +xxxyyy 12 2.71828182845905 +ab 24 1324.36598821719 +delete from t2| +drop function e| +drop function inc| +drop function mul| +drop function append| +drop function fun| +drop procedure if exists hndlr1| +create procedure hndlr1(val int) +begin +declare x int default 0; +declare foo condition for 1136; +declare bar condition for sqlstate '42S98'; # Just for testing syntax +declare zip condition for sqlstate value '42S99'; # Just for testing syntax +declare continue handler for foo set x = 1; +insert into test.t1 values ("hndlr1", val, 2); # Too many values +if (x) then +insert into test.t1 values ("hndlr1", val); # This instead then +end if; +end| +call hndlr1(42)| +select * from t1| +id data +hndlr1 42 +delete from t1| +drop procedure hndlr1| +drop procedure if exists hndlr2| +create procedure hndlr2(val int) +begin +declare x int default 0; +begin +declare exit handler for sqlstate '21S01' set x = 1; +insert into test.t1 values ("hndlr2", val, 2); # Too many values +end; +insert into test.t1 values ("hndlr2", x); +end| +call hndlr2(42)| +select * from t1| +id data +hndlr2 1 +delete from t1| +drop procedure hndlr2| +drop procedure if exists hndlr3| +create procedure hndlr3(val int) +begin +declare x int default 0; +declare continue handler for sqlexception # Any error +begin +declare z int; +set z = 2 * val; +set x = 1; +end; +if val < 10 then +begin +declare y int; +set y = val + 10; +insert into test.t1 values ("hndlr3", y, 2); # Too many values +if x then +insert into test.t1 values ("hndlr3", y); +end if; +end; +end if; +end| +call hndlr3(3)| +select * from t1| +id data +hndlr3 13 +delete from t1| +drop procedure hndlr3| +create table t3 ( id char(16), data int )| +drop procedure if exists hndlr4| +create procedure hndlr4() +begin +declare x int default 0; +declare val int; # No default +declare continue handler for sqlstate '02000' set x=1; +select data into val from test.t3 where id='z' limit 1; # No hits +insert into test.t3 values ('z', val); +end| +call hndlr4()| +select * from t3| +id data +z NULL +drop table t3| +drop procedure hndlr4| +drop procedure if exists cur1| +create procedure cur1() +begin +declare a char(16); +declare b int; +declare c double; +declare done int default 0; +declare c cursor for select * from test.t2; +declare continue handler for sqlstate '02000' set done = 1; +open c; +repeat +fetch c into a, b, c; +if not done then +insert into test.t1 values (a, b+c); +end if; +until done end repeat; +close c; +end| +insert into t2 values ("foo", 42, -1.9), ("bar", 3, 12.1), ("zap", 666, -3.14)| +call cur1()| +select * from t1| +id data +foo 40 +bar 15 +zap 663 +drop procedure cur1| +create table t3 ( s char(16), i int )| +drop procedure if exists cur2| +create procedure cur2() +begin +declare done int default 0; +declare c1 cursor for select id,data from test.t1; +declare c2 cursor for select i from test.t2; +declare continue handler for sqlstate '02000' set done = 1; +open c1; +open c2; +repeat +begin +declare a char(16); +declare b,c int; +fetch from c1 into a, b; +fetch next from c2 into c; +if not done then +if b < c then +insert into test.t3 values (a, b); +else +insert into test.t3 values (a, c); +end if; +end if; +end; +until done end repeat; +close c1; +close c2; +end| +call cur2()| +select * from t3| +s i +foo 40 +bar 3 +zap 663 +delete from t1| +delete from t2| +drop table t3| +drop procedure cur2| +drop procedure if exists chistics| +create procedure chistics() +language sql +modifies sql data +not deterministic +sql security definer +comment 'Characteristics procedure test' + insert into t1 values ("chistics", 1)| +show create procedure chistics| +Procedure sql_mode Create Procedure +chistics CREATE PROCEDURE `chistics`() + MODIFIES SQL DATA + COMMENT 'Characteristics procedure test' +insert into t1 values ("chistics", 1) +call chistics()| +select * from t1| +id data +chistics 1 +delete from t1| +alter procedure chistics sql security invoker| +show create procedure chistics| +Procedure sql_mode Create Procedure +chistics CREATE PROCEDURE `chistics`() + MODIFIES SQL DATA + SQL SECURITY INVOKER + COMMENT 'Characteristics procedure test' +insert into t1 values ("chistics", 1) +drop procedure chistics| +drop function if exists chistics| +create function chistics() returns int +language sql +deterministic +sql security invoker +comment 'Characteristics procedure test' + return 42| +show create function chistics| +Function sql_mode Create Function +chistics CREATE FUNCTION `chistics`() RETURNS int(11) + DETERMINISTIC + SQL SECURITY INVOKER + COMMENT 'Characteristics procedure test' +return 42 +select chistics()| +chistics() +42 +alter function chistics +no sql +comment 'Characteristics function test'| +show create function chistics| +Function sql_mode Create Function +chistics CREATE FUNCTION `chistics`() RETURNS int(11) + NO SQL + DETERMINISTIC + SQL SECURITY INVOKER + COMMENT 'Characteristics function test' +return 42 +drop function chistics| +insert into t1 values ("foo", 1), ("bar", 2), ("zip", 3)| +set @@sql_mode = 'ANSI'| +drop procedure if exists modes$ +create procedure modes(out c1 int, out c2 int) +begin +declare done int default 0; +declare x int; +declare c cursor for select data from t1; +declare continue handler for sqlstate '02000' set done = 1; +select 1 || 2 into c1; +set c2 = 0; +open c; +repeat +fetch c into x; +if not done then +set c2 = c2 + 1; +end if; +until done end repeat; +close c; +end$ +set @@sql_mode = ''| +set sql_select_limit = 1| +call modes(@c1, @c2)| +set sql_select_limit = default| +select @c1, @c2| +@c1 @c2 +12 3 +delete from t1| +drop procedure modes| +create database sp_db1| +drop database sp_db1| +create database sp_db2| +use sp_db2| +create table t3 ( s char(4), t int )| +insert into t3 values ("abcd", 42), ("dcba", 666)| +use test| +drop database sp_db2| +create database sp_db3| +use sp_db3| +drop procedure if exists dummy| +create procedure dummy(out x int) +set x = 42| +use test| +drop database sp_db3| +select type,db,name from mysql.proc where db = 'sp_db3'| +type db name +drop procedure if exists rc| +create procedure rc() +begin +delete from t1; +insert into t1 values ("a", 1), ("b", 2), ("c", 3); +end| +call rc()| +select row_count()| +row_count() +3 +update t1 set data=42 where id = "b"; +select row_count()| +row_count() +1 +delete from t1| +select row_count()| +row_count() +3 +delete from t1| +select row_count()| +row_count() +0 +select * from t1| +id data +select row_count()| +row_count() +-1 +drop procedure rc| +drop function if exists f0| +drop function if exists f1| +drop function if exists f2| +drop function if exists f3| +drop function if exists f4| +drop function if exists f5| +drop function if exists f6| +drop function if exists f7| +drop function if exists f8| +drop view if exists v0| +drop view if exists v1| +drop view if exists v2| +delete from t1| +delete from t2| +insert into t1 values ("a", 1), ("b", 2) | +insert into t2 values ("a", 1, 1.0), ("b", 2, 2.0), ("c", 3, 3.0) | +create function f1() returns int +return (select sum(data) from t1)| +select f1()| +f1() +3 +select id, f1() from t1| +id f1() +a 3 +b 3 +create function f2() returns int +return (select data from t1 where data <= (select sum(data) from t1) limit 1)| +select f2()| +f2() +1 +select id, f2() from t1| +id f2() +a 1 +b 1 +create function f3() returns int +begin +declare n int; +declare m int; +set n:= (select min(data) from t1); +set m:= (select max(data) from t1); +return n < m; +end| +select f3()| +f3() +1 +select id, f3() from t1| +id f3() +a 1 +b 1 +select f1(), f3()| +f1() f3() +3 1 +select id, f1(), f3() from t1| +id f1() f3() +a 3 1 +b 3 1 +create function f4() returns double +return (select d from t1, t2 where t1.data = t2.i and t1.id= "b")| +select f4()| +f4() +2 +select s, f4() from t2| +s f4() +a 2 +b 2 +c 2 +create function f5(i int) returns int +begin +if i <= 0 then +return 0; +elseif i = 1 then +return (select count(*) from t1 where data = i); +else +return (select count(*) + f5( i - 1) from t1 where data = i); +end if; +end| +select f5(1)| +f5(1) +1 +create function f6() returns int +begin +declare n int; +set n:= f1(); +return (select count(*) from t1 where data <= f7() and data <= n); +end| +create function f7() returns int +return (select sum(data) from t1 where data <= f1())| +select f6()| +f6() +2 +select id, f6() from t1| +id f6() +a 2 +b 2 +create view v1 (a) as select f1()| +select * from v1| +a +3 +select id, a from t1, v1| +id a +a 3 +b 3 +select * from v1, v1 as v| +a a +3 3 +create view v2 (a) as select a*10 from v1| +select * from v2| +a +30 +select id, a from t1, v2| +id a +a 30 +b 30 +select * from v1, v2| +a a +3 30 +create function f8 () returns int +return (select count(*) from v2)| +select *, f8() from v1| +a f8() +3 1 +drop function f1| +select * from v1| +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) +create function f1() returns int +return (select sum(data) from t1) + (select sum(data) from v1)| +drop function f1| +create function f1() returns int +return (select sum(data) from t1)| +create function f0() returns int +return (select * from (select 100) as r)| +select f0()| +f0() +100 +select *, f0() from (select 1) as t| +1 f0() +1 100 +create view v0 as select f0()| +select * from v0| +f0() +100 +select *, f0() from v0| +f0() f0() +100 100 +lock tables t1 read, t1 as t11 read, mysql.proc read| +select f3()| +f3() +1 +select id, f3() from t1 as t11| +id f3() +a 1 +b 1 +select f0()| +f0() +100 +select * from v0| +f0() +100 +select *, f0() from v0, (select 123) as d1| +f0() 123 f0() +100 123 100 +select id, f3() from t1| +ERROR HY000: Table 't1' was not locked with LOCK TABLES +select f4()| +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables| +lock tables v2 read, mysql.proc read| +select * from v2| +a +30 +select * from v1| +a +3 +select * from v1, t1| +ERROR HY000: Table 't1' was not locked with LOCK TABLES +select f4()| +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables| +drop function f0| +drop function f1| +drop function f2| +drop function f3| +drop function f4| +drop function f5| +drop function f6| +drop function f7| +drop function f8| +drop view v0| +drop view v1| +drop view v2| +delete from t1 | +delete from t2 | +drop table if exists fac| +create table fac (n int unsigned not null primary key, f bigint unsigned)| +drop procedure if exists ifac| +create procedure ifac(n int unsigned) +begin +declare i int unsigned default 1; +if n > 20 then +set n = 20; # bigint overflow otherwise +end if; +while i <= n do +begin +insert into test.fac values (i, fac(i)); +set i = i + 1; +end; +end while; +end| +call ifac(20)| +select * from fac| +n f +1 1 +2 2 +3 6 +4 24 +5 120 +6 720 +7 5040 +8 40320 +9 362880 +10 3628800 +11 39916800 +12 479001600 +13 6227020800 +14 87178291200 +15 1307674368000 +16 20922789888000 +17 355687428096000 +18 6402373705728000 +19 121645100408832000 +20 2432902008176640000 +drop table fac| +show function status like '%f%'| +Db Name Type Definer Modified Created Security_type Comment +test fac FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +drop procedure ifac| +drop function fac| +show function status like '%f%'| +Db Name Type Definer Modified Created Security_type Comment +drop table if exists primes| +create table primes ( +i int unsigned not null primary key, +p bigint unsigned not null +)| +insert into primes values +( 0, 3), ( 1, 5), ( 2, 7), ( 3, 11), ( 4, 13), +( 5, 17), ( 6, 19), ( 7, 23), ( 8, 29), ( 9, 31), +(10, 37), (11, 41), (12, 43), (13, 47), (14, 53), +(15, 59), (16, 61), (17, 67), (18, 71), (19, 73), +(20, 79), (21, 83), (22, 89), (23, 97), (24, 101), +(25, 103), (26, 107), (27, 109), (28, 113), (29, 127), +(30, 131), (31, 137), (32, 139), (33, 149), (34, 151), +(35, 157), (36, 163), (37, 167), (38, 173), (39, 179), +(40, 181), (41, 191), (42, 193), (43, 197), (44, 199)| +drop procedure if exists opp| +create procedure opp(n bigint unsigned, out pp bool) +begin +declare r double; +declare b, s bigint unsigned default 0; +set r = sqrt(n); +again: +loop +if s = 45 then +set b = b+200, s = 0; +else +begin +declare p bigint unsigned; +select t.p into p from test.primes t where t.i = s; +if b+p > r then +set pp = 1; +leave again; +end if; +if mod(n, b+p) = 0 then +set pp = 0; +leave again; +end if; +set s = s+1; +end; +end if; +end loop; +end| +drop procedure if exists ip| +create procedure ip(m int unsigned) +begin +declare p bigint unsigned; +declare i int unsigned; +set i=45, p=201; +while i < m do +begin +declare pp bool default 0; +call opp(p, pp); +if pp then +insert into test.primes values (i, p); +set i = i+1; +end if; +set p = p+2; +end; +end while; +end| +show create procedure opp| +Procedure sql_mode Create Procedure +opp CREATE PROCEDURE `opp`(n bigint unsigned, out pp bool) +begin +declare r double; +declare b, s bigint unsigned default 0; +set r = sqrt(n); +again: +loop +if s = 45 then +set b = b+200, s = 0; +else +begin +declare p bigint unsigned; +select t.p into p from test.primes t where t.i = s; +if b+p > r then +set pp = 1; +leave again; +end if; +if mod(n, b+p) = 0 then +set pp = 0; +leave again; +end if; +set s = s+1; +end; +end if; +end loop; +end +show procedure status like '%p%'| +Db Name Type Definer Modified Created Security_type Comment +test ip PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +test opp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER +call ip(200)| +select * from primes where i=45 or i=100 or i=199| +i p +45 211 +100 557 +199 1229 +drop table primes| +drop procedure opp| +drop procedure ip| +show procedure status like '%p%'| +Db Name Type Definer Modified Created Security_type Comment +drop procedure if exists bar| +create procedure bar(x char(16), y int) +comment "111111111111" sql security invoker +insert into test.t1 values (x, y)| +show procedure status like 'bar'| +Db Name Type Definer Modified Created Security_type Comment +test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 INVOKER 111111111111 +alter procedure bar comment "2222222222" sql security definer| +alter procedure bar comment "3333333333"| +alter procedure bar| +show create procedure bar| +Procedure sql_mode Create Procedure +bar CREATE PROCEDURE `bar`(x char(16), y int) + COMMENT '3333333333' +insert into test.t1 values (x, y) +show procedure status like 'bar'| +Db Name Type Definer Modified Created Security_type Comment +test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER 3333333333 +drop procedure bar| +drop procedure if exists p1| +create procedure p1 () +select (select s1 from t3) from t3| +create table t3 (s1 int)| +call p1()| +(select s1 from t3) +insert into t3 values (1)| +call p1()| +(select s1 from t3) +1 +drop procedure p1| +drop table t3| +drop function if exists foo| +create function `foo` () returns int +return 5| +select `foo` ()| +`foo` () +5 +drop function `foo`| +drop function if exists t1max| +Warnings: +Note 1305 FUNCTION t1max does not exist +create function t1max() returns int +begin +declare x int; +select max(data) into x from t1; +return x; +end| +insert into t1 values ("foo", 3), ("bar", 2), ("zip", 5), ("zap", 1)| +select t1max()| +t1max() +5 +drop function t1max| +create table t3 ( +v char(16) not null primary key, +c int unsigned not null +)| +create function getcount(s char(16)) returns int +begin +declare x int; +select count(*) into x from t3 where v = s; +if x = 0 then +insert into t3 values (s, 1); +else +update t3 set c = c+1 where v = s; +end if; +return x; +end| +select * from t1 where data = getcount("bar")| +id data +zap 1 +select * from t3| +v c +bar 4 +select getcount("zip")| +getcount("zip") +0 +select getcount("zip")| +getcount("zip") +1 +select * from t3| +v c +bar 4 +zip 2 +select getcount(id) from t1 where data = 3| +getcount(id) +0 +select getcount(id) from t1 where data = 5| +getcount(id) +1 +select * from t3| +v c +bar 4 +zip 3 +foo 1 +drop table t3| +drop function getcount| +drop procedure if exists bug822| +create procedure bug822(a_id char(16), a_data int) +begin +declare n int; +select count(*) into n from t1 where id = a_id and data = a_data; +if n = 0 then +insert into t1 (id, data) values (a_id, a_data); +end if; +end| +delete from t1| +call bug822('foo', 42)| +call bug822('foo', 42)| +call bug822('bar', 666)| +select * from t1| +id data +foo 42 +bar 666 +delete from t1| +drop procedure bug822| +drop procedure if exists bug1495| +create procedure bug1495() +begin +declare x int; +select data into x from t1 order by id limit 1; +if x > 10 then +insert into t1 values ("less", x-10); +else +insert into t1 values ("more", x+10); +end if; +end| +insert into t1 values ('foo', 12)| +call bug1495()| +delete from t1 where id='foo'| +insert into t1 values ('bar', 7)| +call bug1495()| +delete from t1 where id='bar'| +select * from t1| +id data +less 2 +more 17 +delete from t1| +drop procedure bug1495| +drop procedure if exists bug1547| +create procedure bug1547(s char(16)) +begin +declare x int; +select data into x from t1 where s = id limit 1; +if x > 10 then +insert into t1 values ("less", x-10); +else +insert into t1 values ("more", x+10); +end if; +end| +insert into t1 values ("foo", 12), ("bar", 7)| +call bug1547("foo")| +call bug1547("bar")| +select * from t1| +id data +foo 12 +bar 7 +less 2 +more 17 +delete from t1| +drop procedure bug1547| +drop table if exists t70| +create table t70 (s1 int,s2 int)| +insert into t70 values (1,2)| +drop procedure if exists bug1656| +create procedure bug1656(out p1 int, out p2 int) +select * into p1, p1 from t70| +call bug1656(@1, @2)| +select @1, @2| +@1 @2 +2 NULL +drop table t70| +drop procedure bug1656| +create table t3(a int)| +drop procedure if exists bug1862| +create procedure bug1862() +begin +insert into t3 values(2); +flush tables; +end| +call bug1862()| +call bug1862()| +select * from t3| +a +2 +2 +drop table t3| +drop procedure bug1862| +drop procedure if exists bug1874| +create procedure bug1874() +begin +declare x int; +declare y double; +select max(data) into x from t1; +insert into t2 values ("max", x, 0); +select min(data) into x from t1; +insert into t2 values ("min", x, 0); +select sum(data) into x from t1; +insert into t2 values ("sum", x, 0); +select avg(data) into y from t1; +insert into t2 values ("avg", 0, y); +end| +insert into t1 (data) values (3), (1), (5), (9), (4)| +call bug1874()| +select * from t2| +s i d +max 9 0 +min 1 0 +sum 22 0 +avg 0 4.4 +delete from t1| +delete from t2| +drop procedure bug1874| +drop procedure if exists bug2260| +create procedure bug2260() +begin +declare v1 int; +declare c1 cursor for select data from t1; +declare continue handler for not found set @x2 = 1; +open c1; +fetch c1 into v1; +set @x2 = 2; +close c1; +end| +call bug2260()| +select @x2| +@x2 +2 +drop procedure bug2260| +drop procedure if exists bug2227| +create procedure bug2227(x int) +begin +declare y float default 2.6; +declare z char(16) default "zzz"; +select 1.3, x, y, 42, z; +end| +call bug2227(9)| +1.3 x y 42 z +1.3 9 2.6 42 zzz +drop procedure bug2227| +drop function if exists bug2674| +create function bug2674() returns int +return @@sort_buffer_size| +set @osbs = @@sort_buffer_size| +set @@sort_buffer_size = 262000| +select bug2674()| +bug2674() +262000 +drop function bug2674| +set @@sort_buffer_size = @osbs| +drop procedure if exists bug3259_1 | +create procedure bug3259_1 () begin end| +drop procedure if exists BUG3259_2 | +create procedure BUG3259_2 () begin end| +drop procedure if exists Bug3259_3 | +create procedure Bug3259_3 () begin end| +call BUG3259_1()| +call BUG3259_1()| +call bug3259_2()| +call Bug3259_2()| +call bug3259_3()| +call bUG3259_3()| +drop procedure bUg3259_1| +drop procedure BuG3259_2| +drop procedure BUG3259_3| +drop function if exists bug2772| +create function bug2772() returns char(10) character set latin2 +return 'a'| +select bug2772()| +bug2772() +a +drop function bug2772| +drop procedure if exists bug2776_1| +create procedure bug2776_1(out x int) +begin +declare v int; +set v = default; +set x = v; +end| +drop procedure if exists bug2776_2| +create procedure bug2776_2(out x int) +begin +declare v int default 42; +set v = default; +set x = v; +end| +set @x = 1| +call bug2776_1(@x)| +select @x| +@x +NULL +call bug2776_2(@x)| +select @x| +@x +42 +drop procedure bug2776_1| +drop procedure bug2776_2| +create table t3 (s1 smallint)| +insert into t3 values (123456789012)| +Warnings: +Warning 1264 Out of range value adjusted for column 's1' at row 1 +drop procedure if exists bug2780| +create procedure bug2780() +begin +declare exit handler for sqlwarning set @x = 1; +set @x = 0; +insert into t3 values (123456789012); +insert into t3 values (0); +end| +call bug2780()| +select @x| +@x +1 +select * from t3| +s1 +32767 +32767 +drop procedure bug2780| +drop table t3| +create table t3 (content varchar(10) )| +insert into t3 values ("test1")| +insert into t3 values ("test2")| +create table t4 (f1 int, rc int, t3 int)| +drop procedure if exists bug1863| +create procedure bug1863(in1 int) +begin +declare ind int default 0; +declare t1 int; +declare t2 int; +declare t3 int; +declare rc int default 0; +declare continue handler for 1065 set rc = 1; +drop temporary table if exists temp_t1; +create temporary table temp_t1 ( +f1 int auto_increment, f2 varchar(20), primary key (f1) +); +insert into temp_t1 (f2) select content from t3; +select f2 into t3 from temp_t1 where f1 = 10; +if (rc) then +insert into t4 values (1, rc, t3); +end if; +insert into t4 values (2, rc, t3); +end| +call bug1863(10)| +Warnings: +Note 1051 Unknown table 'temp_t1' +Warning 1329 No data to FETCH +call bug1863(10)| +Warnings: +Warning 1329 No data to FETCH +select * from t4| +f1 rc t3 +2 0 NULL +2 0 NULL +drop procedure bug1863| +drop temporary table temp_t1; +drop table t3, t4| +create table t3 ( +OrderID int not null, +MarketID int, +primary key (OrderID) +)| +create table t4 ( +MarketID int not null, +Market varchar(60), +Status char(1), +primary key (MarketID) +)| +insert t3 (OrderID,MarketID) values (1,1)| +insert t3 (OrderID,MarketID) values (2,2)| +insert t4 (MarketID,Market,Status) values (1,"MarketID One","A")| +insert t4 (MarketID,Market,Status) values (2,"MarketID Two","A")| +drop procedure if exists bug2656_1| +create procedure bug2656_1() +begin +select +m.Market +from t4 m JOIN t3 o +ON o.MarketID != 1 and o.MarketID = m.MarketID; +end | +drop procedure if exists bug2656_2| +create procedure bug2656_2() +begin +select +m.Market +from +t4 m, t3 o +where +m.MarketID != 1 and m.MarketID = o.MarketID; +end | +call bug2656_1()| +Market +MarketID Two +call bug2656_1()| +Market +MarketID Two +call bug2656_2()| +Market +MarketID Two +call bug2656_2()| +Market +MarketID Two +drop procedure bug2656_1| +drop procedure bug2656_2| +drop table t3, t4| +drop procedure if exists bug3426| +create procedure bug3426(in_time int unsigned, out x int) +begin +if in_time is null then +set @stamped_time=10; +set x=1; +else +set @stamped_time=in_time; +set x=2; +end if; +end| +call bug3426(1000, @i)| +select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time| +@i time +2 01-01-1970 03:16:40 +call bug3426(NULL, @i)| +select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time| +@i time +1 01-01-1970 03:00:10 +alter procedure bug3426 sql security invoker| +call bug3426(NULL, @i)| +select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time| +@i time +1 01-01-1970 03:00:10 +call bug3426(1000, @i)| +select @i, from_unixtime(@stamped_time, '%d-%m-%Y %h:%i:%s') as time| +@i time +2 01-01-1970 03:16:40 +drop procedure bug3426| +create table t3 ( +a int primary key, +ach char(1) +) engine = innodb| +create table t4 ( +b int primary key , +bch char(1) +) engine = innodb| +insert into t3 values (1 , 'aCh1' ) , ('2' , 'aCh2')| +Warnings: +Warning 1265 Data truncated for column 'ach' at row 1 +Warning 1265 Data truncated for column 'ach' at row 2 +insert into t4 values (1 , 'bCh1' )| +Warnings: +Warning 1265 Data truncated for column 'bch' at row 1 +drop procedure if exists bug3448| +create procedure bug3448() +select * from t3 inner join t4 on t3.a = t4.b| +select * from t3 inner join t4 on t3.a = t4.b| +a ach b bch +1 a 1 b +call bug3448()| +a ach b bch +1 a 1 b +call bug3448()| +a ach b bch +1 a 1 b +drop procedure bug3448| +drop table t3, t4| +create table t3 ( +id int unsigned auto_increment not null primary key, +title VARCHAR(200), +body text, +fulltext (title,body) +)| +insert into t3 (title,body) values +('MySQL Tutorial','DBMS stands for DataBase ...'), +('How To Use MySQL Well','After you went through a ...'), +('Optimizing MySQL','In this tutorial we will show ...'), +('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'), +('MySQL vs. YourSQL','In the following database comparison ...'), +('MySQL Security','When configured properly, MySQL ...')| +drop procedure if exists bug3734 | +create procedure bug3734 (param1 varchar(100)) +select * from t3 where match (title,body) against (param1)| +call bug3734('database')| +id title body +5 MySQL vs. YourSQL In the following database comparison ... +1 MySQL Tutorial DBMS stands for DataBase ... +call bug3734('Security')| +id title body +6 MySQL Security When configured properly, MySQL ... +drop procedure bug3734| +drop table t3| +drop procedure if exists bug3863| +create procedure bug3863() +begin +set @a = 0; +while @a < 5 do +set @a = @a + 1; +end while; +end| +call bug3863()| +select @a| +@a +5 +call bug3863()| +select @a| +@a +5 +drop procedure bug3863| +create table t3 ( +id int(10) unsigned not null default 0, +rid int(10) unsigned not null default 0, +msg text not null, +primary key (id), +unique key rid (rid, id) +)| +drop procedure if exists bug2460_1| +create procedure bug2460_1(in v int) +begin +( select n0.id from t3 as n0 where n0.id = v ) +union +( select n0.id from t3 as n0, t3 as n1 +where n0.id = n1.rid and n1.id = v ) +union +( select n0.id from t3 as n0, t3 as n1, t3 as n2 +where n0.id = n1.rid and n1.id = n2.rid and n2.id = v ); +end| +call bug2460_1(2)| +id +call bug2460_1(2)| +id +insert into t3 values (1, 1, 'foo'), (2, 1, 'bar'), (3, 1, 'zip zap')| +call bug2460_1(2)| +id +2 +1 +call bug2460_1(2)| +id +2 +1 +drop procedure if exists bug2460_2| +create procedure bug2460_2() +begin +drop table if exists t3; +create temporary table t3 (s1 int); +insert into t3 select 1 union select 1; +end| +call bug2460_2()| +call bug2460_2()| +select * from t3| +s1 +1 +drop procedure bug2460_1| +drop procedure bug2460_2| +drop table t3| +set @@sql_mode = ''| +drop procedure if exists bug2564_1| +create procedure bug2564_1() +comment 'Joe''s procedure' + insert into `t1` values ("foo", 1)| +set @@sql_mode = 'ANSI_QUOTES'| +drop procedure if exists bug2564_2| +create procedure bug2564_2() +insert into "t1" values ('foo', 1)| +set @@sql_mode = ''$ +drop function if exists bug2564_3$ +create function bug2564_3(x int, y int) returns int +return x || y$ +set @@sql_mode = 'ANSI'$ +drop function if exists bug2564_4$ +create function bug2564_4(x int, y int) returns int +return x || y$ +set @@sql_mode = ''| +show create procedure bug2564_1| +Procedure sql_mode Create Procedure +bug2564_1 CREATE PROCEDURE `bug2564_1`() + COMMENT 'Joe''s procedure' +insert into `t1` values ("foo", 1) +show create procedure bug2564_2| +Procedure sql_mode Create Procedure +bug2564_2 ANSI_QUOTES CREATE PROCEDURE "bug2564_2"() +insert into "t1" values ('foo', 1) +show create function bug2564_3| +Function sql_mode Create Function +bug2564_3 CREATE FUNCTION `bug2564_3`(x int, y int) RETURNS int(11) +return x || y +show create function bug2564_4| +Function sql_mode Create Function +bug2564_4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI CREATE FUNCTION "bug2564_4"(x int, y int) RETURNS int(11) +return x || y +drop procedure bug2564_1| +drop procedure bug2564_2| +drop function bug2564_3| +drop function bug2564_4| +drop function if exists bug3132| +create function bug3132(s char(20)) returns char(50) +return concat('Hello, ', s, '!')| +select bug3132('Bob') union all select bug3132('Judy')| +bug3132('Bob') +Hello, Bob! +Hello, Judy! +drop function bug3132| +drop procedure if exists bug3843| +create procedure bug3843() +analyze table t1| +call bug3843()| +Table Op Msg_type Msg_text +test.t1 analyze status OK +call bug3843()| +Table Op Msg_type Msg_text +test.t1 analyze status Table is already up to date +select 1+2| +1+2 +3 +drop procedure bug3843| +create table t3 ( s1 char(10) )| +insert into t3 values ('a'), ('b')| +drop procedure if exists bug3368| +create procedure bug3368(v char(10)) +begin +select group_concat(v) from t3; +end| +call bug3368('x')| +group_concat(v) +x,x +call bug3368('yz')| +group_concat(v) +yz,yz +drop procedure bug3368| +drop table t3| +create table t3 (f1 int, f2 int)| +insert into t3 values (1,1)| +drop procedure if exists bug4579_1| +create procedure bug4579_1 () +begin +declare sf1 int; +select f1 into sf1 from t3 where f1=1 and f2=1; +update t3 set f2 = f2 + 1 where f1=1 and f2=1; +call bug4579_2(); +end| +drop procedure if exists bug4579_2| +create procedure bug4579_2 () +begin +end| +call bug4579_1()| +call bug4579_1()| +Warnings: +Warning 1329 No data to FETCH +call bug4579_1()| +Warnings: +Warning 1329 No data to FETCH +drop procedure bug4579_1| +drop procedure bug4579_2| +drop table t3| +drop procedure if exists bug2773| +create function bug2773() returns int return null| +create table t3 as select bug2773()| +show create table t3| +Table Create Table +t3 CREATE TABLE `t3` ( + `bug2773()` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t3| +drop function bug2773| +drop procedure if exists bug3788| +create function bug3788() returns date return cast("2005-03-04" as date)| +select bug3788()| +bug3788() +2005-03-04 +drop function bug3788| +create function bug3788() returns binary(5) return 5| +select bug3788()| +bug3788() +5 +drop function bug3788| +create table t3 (f1 int, f2 int, f3 int)| +insert into t3 values (1,1,1)| +drop procedure if exists bug4726| +create procedure bug4726() +begin +declare tmp_o_id INT; +declare tmp_d_id INT default 1; +while tmp_d_id <= 2 do +begin +select f1 into tmp_o_id from t3 where f2=1 and f3=1; +set tmp_d_id = tmp_d_id + 1; +end; +end while; +end| +call bug4726()| +call bug4726()| +call bug4726()| +drop procedure bug4726| +drop table t3| +drop procedure if exists bug4902| +create procedure bug4902() +begin +show charset like 'foo'; +show collation like 'foo'; +show column types; +show create table t1; +show create database test; +show databases like 'foo'; +show errors; +show columns from t1; +show grants for 'root'@'localhost'; +show keys from t1; +show open tables like 'foo'; +show privileges; +show status like 'foo'; +show tables like 'foo'; +show variables like 'foo'; +show warnings; +end| +call bug4902()| +Charset Description Default collation Maxlen +Collation Charset Id Default Compiled Sortlen +Type Size Min_Value Max_Value Prec Scale Nullable Auto_Increment Unsigned Zerofill Searchable Case_Sensitive Default Comment +tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer +tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer +Table Create Table +t1 CREATE TABLE `t1` ( + `id` char(16) NOT NULL default '', + `data` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +Database Create Database +test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ +Database (foo) +Level Code Message +Field Type Null Key Default Extra +id char(16) NO +data int(11) NO +Grants for root@localhost +GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +Database Table In_use Name_locked +Privilege Context Comment +Alter Tables To alter the table +Alter routine Functions,Procedures To alter or drop stored functions/procedures +Create Databases,Tables,Indexes To create new databases and tables +Create routine Functions,Procedures To use CREATE FUNCTION/PROCEDURE +Create temporary tables Databases To use CREATE TEMPORARY TABLE +Create view Tables To create new views +Create user Server Admin To create new users +Delete Tables To delete existing rows +Drop Databases,Tables To drop databases, tables, and views +Execute Functions,Procedures To execute stored routines +File File access on server To read and write files on the server +Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess +Index Tables To create or drop indexes +Insert Tables To insert data into tables +Lock tables Databases To use LOCK TABLES (together with SELECT privilege) +Process Server Admin To view the plain text of currently executing queries +References Databases,Tables To have references on tables +Reload Server Admin To reload or refresh tables, logs and privileges +Replication client Server Admin To ask where the slave or master servers are +Replication slave Server Admin To read binary log events from the master +Select Tables To retrieve rows from table +Show databases Server Admin To see all databases with SHOW DATABASES +Show view Tables To see views with SHOW CREATE VIEW +Shutdown Server Admin To shut down the server +Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. +Update Tables To update existing rows +Usage Server Admin No privileges - allow connect only +Variable_name Value +Tables_in_test (foo) +Variable_name Value +Level Code Message +call bug4902()| +Charset Description Default collation Maxlen +Collation Charset Id Default Compiled Sortlen +Type Size Min_Value Max_Value Prec Scale Nullable Auto_Increment Unsigned Zerofill Searchable Case_Sensitive Default Comment +tinyint 1 -128 127 0 0 YES YES NO YES YES NO NULL,0 A very small integer +tinyint unsigned 1 0 255 0 0 YES YES YES YES YES NO NULL,0 A very small integer +Table Create Table +t1 CREATE TABLE `t1` ( + `id` char(16) NOT NULL default '', + `data` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +Database Create Database +test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ +Database (foo) +Level Code Message +Field Type Null Key Default Extra +id char(16) NO +data int(11) NO +Grants for root@localhost +GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +Database Table In_use Name_locked +Privilege Context Comment +Alter Tables To alter the table +Alter routine Functions,Procedures To alter or drop stored functions/procedures +Create Databases,Tables,Indexes To create new databases and tables +Create routine Functions,Procedures To use CREATE FUNCTION/PROCEDURE +Create temporary tables Databases To use CREATE TEMPORARY TABLE +Create view Tables To create new views +Create user Server Admin To create new users +Delete Tables To delete existing rows +Drop Databases,Tables To drop databases, tables, and views +Execute Functions,Procedures To execute stored routines +File File access on server To read and write files on the server +Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess +Index Tables To create or drop indexes +Insert Tables To insert data into tables +Lock tables Databases To use LOCK TABLES (together with SELECT privilege) +Process Server Admin To view the plain text of currently executing queries +References Databases,Tables To have references on tables +Reload Server Admin To reload or refresh tables, logs and privileges +Replication client Server Admin To ask where the slave or master servers are +Replication slave Server Admin To read binary log events from the master +Select Tables To retrieve rows from table +Show databases Server Admin To see all databases with SHOW DATABASES +Show view Tables To see views with SHOW CREATE VIEW +Shutdown Server Admin To shut down the server +Super Server Admin To use KILL thread, SET GLOBAL, CHANGE MASTER, etc. +Update Tables To update existing rows +Usage Server Admin No privileges - allow connect only +Variable_name Value +Tables_in_test (foo) +Variable_name Value +Level Code Message +drop procedure bug4902| +drop procedure if exists bug4902_2| +create procedure bug4902_2() +begin +show processlist; +end| +call bug4902_2()| +Id User Host db Command Time State Info +# root localhost test Query # NULL show processlist +call bug4902_2()| +Id User Host db Command Time State Info +# root localhost test Query # NULL show processlist +drop procedure bug4902_2| +drop procedure if exists bug4904| +create procedure bug4904() +begin +declare continue handler for sqlstate 'HY000' begin end; +create table t2 as select * from t3; +end| +call bug4904()| +ERROR 42S02: Table 'test.t3' doesn't exist +drop procedure bug4904| +create table t3 (s1 char character set latin1, s2 char character set latin2)| +drop procedure if exists bug4904| +create procedure bug4904 () +begin +declare continue handler for sqlstate 'HY000' begin end; +select s1 from t3 union select s2 from t3; +end| +call bug4904()| +drop procedure bug4904| +drop table t3| +drop procedure if exists bug336| +create procedure bug336(out y int) +begin +declare x int; +set x = (select sum(t.data) from test.t1 t); +set y = x; +end| +insert into t1 values ("a", 2), ("b", 3)| +call bug336(@y)| +select @y| +@y +5 +delete from t1| +drop procedure bug336| +drop procedure if exists bug3157| +create procedure bug3157() +begin +if exists(select * from t1) then +set @n= @n + 1; +end if; +if (select count(*) from t1) then +set @n= @n + 1; +end if; +end| +set @n = 0| +insert into t1 values ("a", 1)| +call bug3157()| +select @n| +@n +2 +delete from t1| +drop procedure bug3157| +drop procedure if exists bug5251| +create procedure bug5251() +begin +end| +select created into @c1 from mysql.proc +where db='test' and name='bug5251'| +alter procedure bug5251 comment 'foobar'| +select count(*) from mysql.proc +where db='test' and name='bug5251' and created = @c1| +count(*) +1 +drop procedure bug5251| +drop procedure if exists bug5251| +create procedure bug5251() +checksum table t1| +call bug5251()| +Table Checksum +test.t1 0 +call bug5251()| +Table Checksum +test.t1 0 +drop procedure bug5251| +drop procedure if exists bug5287| +create procedure bug5287(param1 int) +label1: +begin +declare c cursor for select 5; +loop +if param1 >= 0 then +leave label1; +end if; +end loop; +end| +call bug5287(1)| +drop procedure bug5287| +drop procedure if exists bug5307| +create procedure bug5307() +begin +end; set @x = 3| +call bug5307()| +select @x| +@x +3 +drop procedure bug5307| +drop procedure if exists bug5258| +create procedure bug5258() +begin +end| +drop procedure if exists bug5258_aux| +create procedure bug5258_aux() +begin +declare c, m char(19); +select created,modified into c,m from mysql.proc where name = 'bug5258'; +if c = m then +select 'Ok'; +else +select c, m; +end if; +end| +call bug5258_aux()| +Ok +Ok +drop procedure bug5258| +drop procedure bug5258_aux| +drop function if exists bug4487| +create function bug4487() returns char +begin +declare v char; +return v; +end| +select bug4487()| +bug4487() +NULL +drop function bug4487| +drop procedure if exists bug4941| +drop procedure if exists bug4941| +create procedure bug4941(out x int) +begin +declare c cursor for select i from t2 limit 1; +open c; +fetch c into x; +close c; +end| +insert into t2 values (null, null, null)| +set @x = 42| +call bug4941(@x)| +select @x| +@x +NULL +delete from t1| +drop procedure bug4941| +drop procedure if exists bug3583| +drop procedure if exists bug3583| +create procedure bug3583() +begin +declare c int; +select * from t1; +select count(*) into c from t1; +select c; +end| +insert into t1 values ("x", 3), ("y", 5)| +set @x = @@query_cache_size| +set global query_cache_size = 10*1024*1024| +flush status| +flush query cache| +show status like 'Qcache_hits'| +Variable_name Value +Qcache_hits 0 +call bug3583()| +id data +x 3 +y 5 +c +2 +show status like 'Qcache_hits'| +Variable_name Value +Qcache_hits 0 +call bug3583()| +id data +x 3 +y 5 +c +2 +call bug3583()| +id data +x 3 +y 5 +c +2 +show status like 'Qcache_hits'| +Variable_name Value +Qcache_hits 2 +set global query_cache_size = @x| +flush status| +flush query cache| +delete from t1| +drop procedure bug3583| +drop procedure if exists bug4905| +create table t3 (s1 int,primary key (s1))| +drop procedure if exists bug4905| +create procedure bug4905() +begin +declare v int; +declare continue handler for sqlstate '23000' set v = 5; +insert into t3 values (1); +end| +call bug4905()| +select row_count()| +row_count() +1 +call bug4905()| +select row_count()| +row_count() +0 +call bug4905()| +select row_count()| +row_count() +0 +select * from t3| +s1 +1 +drop procedure bug4905| +drop table t3| +drop procedure if exists bug6029| +drop procedure if exists bug6029| +create procedure bug6029() +begin +declare exit handler for 1136 select '1136'; +declare exit handler for sqlstate '23000' select 'sqlstate 23000'; +declare continue handler for sqlexception select 'sqlexception'; +insert into t3 values (1); +insert into t3 values (1,2); +end| +create table t3 (s1 int, primary key (s1))| +insert into t3 values (1)| +call bug6029()| +sqlstate 23000 +sqlstate 23000 +delete from t3| +call bug6029()| +1136 +1136 +drop procedure bug6029| +drop table t3| +drop procedure if exists bug8540| +create procedure bug8540() +begin +declare x int default 1; +select x as y, x+0 as z; +end| +call bug8540()| +y z +1 1 +drop procedure bug8540| +create table t3 (s1 int)| +drop procedure if exists bug6642| +create procedure bug6642() +select abs(count(s1)) from t3| +call bug6642()| +abs(count(s1)) +0 +call bug6642()| +abs(count(s1)) +0 +drop procedure bug6642| +insert into t3 values (0),(1)| +drop procedure if exists bug7013| +create procedure bug7013() +select s1,count(s1) from t3 group by s1 with rollup| +call bug7013()| +s1 count(s1) +0 1 +1 1 +NULL 2 +call bug7013()| +s1 count(s1) +0 1 +1 1 +NULL 2 +drop procedure bug7013| +drop table if exists t4| +create table t4 ( +a mediumint(8) unsigned not null auto_increment, +b smallint(5) unsigned not null, +c char(32) not null, +primary key (a) +) engine=myisam default charset=latin1| +insert into t4 values (1, 2, 'oneword')| +insert into t4 values (2, 2, 'anotherword')| +drop procedure if exists bug7743| +create procedure bug7743 ( searchstring char(28) ) +begin +declare var mediumint(8) unsigned; +select a into var from t4 where b = 2 and c = binary searchstring limit 1; +select var; +end| +call bug7743("oneword")| +var +1 +call bug7743("OneWord")| +var +NULL +Warnings: +Warning 1329 No data to FETCH +call bug7743("anotherword")| +var +2 +call bug7743("AnotherWord")| +var +NULL +Warnings: +Warning 1329 No data to FETCH +drop procedure bug7743| +drop table t4| +delete from t3| +insert into t3 values(1)| +drop procedure if exists bug7992_1| +Warnings: +Note 1305 PROCEDURE bug7992_1 does not exist +drop procedure if exists bug7992_2| +Warnings: +Note 1305 PROCEDURE bug7992_2 does not exist +create procedure bug7992_1() +begin +declare i int; +select max(s1)+1 into i from t3; +end| +create procedure bug7992_2() +insert into t3 (s1) select max(t4.s1)+1 from t3 as t4| +call bug7992_1()| +call bug7992_1()| +call bug7992_2()| +call bug7992_2()| +drop procedure bug7992_1| +drop procedure bug7992_2| +drop table t3| +create table t3 ( userid bigint(20) not null default 0 )| +drop procedure if exists bug8116| +create procedure bug8116(in _userid int) +select * from t3 where userid = _userid| +call bug8116(42)| +userid +call bug8116(42)| +userid +drop procedure bug8116| +drop table t3| +drop procedure if exists bug6857| +create procedure bug6857(counter int) +begin +declare t0, t1 int; +declare plus bool default 0; +set t0 = current_time(); +while counter > 0 do +set counter = counter - 1; +end while; +set t1 = current_time(); +if t1 > t0 then +set plus = 1; +end if; +select plus; +end| +drop procedure bug6857| +drop procedure if exists bug8757| +create procedure bug8757() +begin +declare x int; +declare c1 cursor for select data from t1 limit 1; +begin +declare y int; +declare c2 cursor for select i from t2 limit 1; +open c2; +fetch c2 into y; +close c2; +select 2,y; +end; +open c1; +fetch c1 into x; +close c1; +select 1,x; +end| +delete from t1| +delete from t2| +insert into t1 values ("x", 1)| +insert into t2 values ("y", 2, 0.0)| +call bug8757()| +2 y +2 2 +1 x +1 1 +delete from t1| +delete from t2| +drop procedure bug8757| +drop procedure if exists bug8762| +drop procedure if exists bug8762; create procedure bug8762() begin end| +drop procedure if exists bug8762; create procedure bug8762() begin end| +drop procedure bug8762| +drop function if exists bug5240| +create function bug5240 () returns int +begin +declare x int; +declare c cursor for select data from t1 limit 1; +open c; +fetch c into x; +close c; +return x; +end| +delete from t1| +insert into t1 values ("answer", 42)| +select id, bug5240() from t1| +id bug5240() +answer 42 +drop function bug5240| +drop function if exists bug5278| +create function bug5278 () returns char +begin +SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass'); +return 'okay'; +end| +select bug5278()| +ERROR 42000: Can't find any matching row in the user table +select bug5278()| +ERROR 42000: Can't find any matching row in the user table +drop function bug5278| +drop procedure if exists p1| +create table t3(id int)| +insert into t3 values(1)| +create procedure bug7992() +begin +declare i int; +select max(id)+1 into i from t3; +end| +call bug7992()| +call bug7992()| +drop procedure bug7992| +drop table t3| +create table t3 ( +lpitnumber int(11) default null, +lrecordtype int(11) default null +)| +create table t4 ( +lbsiid int(11) not null default '0', +ltradingmodeid int(11) not null default '0', +ltradingareaid int(11) not null default '0', +csellingprice decimal(19,4) default null, +primary key (lbsiid,ltradingmodeid,ltradingareaid) +)| +create table t5 ( +lbsiid int(11) not null default '0', +ltradingareaid int(11) not null default '0', +primary key (lbsiid,ltradingareaid) +)| +drop procedure if exists bug8849| +create procedure bug8849() +begin +insert into t5 +( +t5.lbsiid, +t5.ltradingareaid +) +select distinct t3.lpitnumber, t4.ltradingareaid +from +t4 join t3 on +t3.lpitnumber = t4.lbsiid +and t3.lrecordtype = 1 +left join t4 as price01 on +price01.lbsiid = t4.lbsiid and +price01.ltradingmodeid = 1 and +t4.ltradingareaid = price01.ltradingareaid; +end| +call bug8849()| +call bug8849()| +call bug8849()| +drop procedure bug8849| +drop tables t3,t4,t5| +drop procedure if exists bug8937| +create procedure bug8937() +begin +declare s,x,y,z int; +declare a float; +select sum(data),avg(data),min(data),max(data) into s,x,y,z from t1; +select s,x,y,z; +select avg(data) into a from t1; +select a; +end| +delete from t1| +insert into t1 (data) values (1), (2), (3), (4), (6)| +call bug8937()| +s x y z +16 3 1 6 +a +3.2000 +drop procedure bug8937| +delete from t1| +drop procedure if exists bug6900| +drop procedure if exists bug9074| +drop procedure if exists bug6900_9074| +create table t3 (w char unique, x char)| +insert into t3 values ('a', 'b')| +create procedure bug6900() +begin +declare exit handler for sqlexception select '1'; +begin +declare exit handler for sqlexception select '2'; +insert into t3 values ('x', 'y', 'z'); +end; +end| +create procedure bug9074() +begin +declare x1, x2, x3, x4, x5, x6 int default 0; +begin +declare continue handler for sqlstate '23000' set x5 = 1; +insert into t3 values ('a', 'b'); +set x6 = 1; +end; +begin1_label: +begin +declare continue handler for sqlstate '23000' set x1 = 1; +insert into t3 values ('a', 'b'); +set x2 = 1; +begin2_label: +begin +declare exit handler for sqlstate '23000' set x3 = 1; +set x4= 1; +insert into t3 values ('a','b'); +set x4= 0; +end begin2_label; +end begin1_label; +select x1, x2, x3, x4, x5, x6; +end| +create procedure bug6900_9074(z int) +begin +declare exit handler for sqlstate '23000' select '23000'; +begin +declare exit handler for sqlexception select 'sqlexception'; +if z = 1 then +insert into t3 values ('a', 'b'); +else +insert into t3 values ('x', 'y', 'z'); +end if; +end; +end| +call bug6900()| +2 +2 +call bug9074()| +x1 x2 x3 x4 x5 x6 +1 1 1 1 1 1 +call bug6900_9074(0)| +sqlexception +sqlexception +call bug6900_9074(1)| +23000 +23000 +drop procedure bug6900| +drop procedure bug9074| +drop procedure bug6900_9074| +drop table t3| +drop procedure if exists avg| +create procedure avg () +begin +end| +call avg ()| +drop procedure avg| +drop procedure if exists bug6129| +set @old_mode= @@sql_mode; +set @@sql_mode= "ERROR_FOR_DIVISION_BY_ZERO"; +create procedure bug6129() +select @@sql_mode| +call bug6129()| +@@sql_mode +ERROR_FOR_DIVISION_BY_ZERO +set @@sql_mode= "NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO"| +call bug6129()| +@@sql_mode +ERROR_FOR_DIVISION_BY_ZERO +set @@sql_mode= "NO_ZERO_IN_DATE"| +call bug6129()| +@@sql_mode +ERROR_FOR_DIVISION_BY_ZERO +set @@sql_mode=@old_mode; +drop procedure bug6129| +drop procedure if exists bug9856| +create procedure bug9856() +begin +declare v int; +declare c cursor for select data from t1; +declare exit handler for sqlexception, not found select '16'; +open c; +fetch c into v; +select v; +end| +delete from t1| +call bug9856()| +16 +16 +call bug9856()| +16 +16 +drop procedure bug9856| +drop procedure if exists bug9674_1| +drop procedure if exists bug9674_2| +create procedure bug9674_1(out arg int) +begin +declare temp_in1 int default 0; +declare temp_fl1 int default 0; +set temp_in1 = 100; +set temp_fl1 = temp_in1/10; +set arg = temp_fl1; +end| +create procedure bug9674_2() +begin +declare v int default 100; +select v/10; +end| +call bug9674_1(@sptmp)| +call bug9674_1(@sptmp)| +select @sptmp| +@sptmp +10 +call bug9674_2()| +v/10 +10.0000 +call bug9674_2()| +v/10 +10.0000 +drop procedure bug9674_1| +drop procedure bug9674_2| +drop procedure if exists bug9598_1| +drop procedure if exists bug9598_2| +create procedure bug9598_1(in var_1 char(16), +out var_2 integer, out var_3 integer) +begin +set var_2 = 50; +set var_3 = 60; +end| +create procedure bug9598_2(in v1 char(16), +in v2 integer, +in v3 integer, +in v4 integer, +in v5 integer) +begin +select v1,v2,v3,v4,v5; +call bug9598_1(v1,@tmp1,@tmp2); +select v1,v2,v3,v4,v5; +end| +call bug9598_2('Test',2,3,4,5)| +v1 v2 v3 v4 v5 +Test 2 3 4 5 +v1 v2 v3 v4 v5 +Test 2 3 4 5 +select @tmp1, @tmp2| +@tmp1 @tmp2 +50 60 +drop procedure bug9598_1| +drop procedure bug9598_2| +drop procedure if exists bug9902| +create function bug9902() returns int(11) +begin +set @x = @x + 1; +return @x; +end| +set @qcs1 = @@query_cache_size| +set global query_cache_size = 100000| +set @x = 1| +insert into t1 values ("qc", 42)| +select bug9902() from t1| +bug9902() +2 +select bug9902() from t1| +bug9902() +3 +select @x| +@x +3 +set global query_cache_size = @qcs1| +delete from t1| +drop function bug9902| +drop function if exists bug9102| +create function bug9102() returns blob return 'a'| +select bug9102()| +bug9102() +a +drop function bug9102| +drop function if exists bug7648| +create function bug7648() returns bit(8) return 'a'| +select bug7648()| +bug7648() +a +drop function bug7648| +drop function if exists bug9775| +create function bug9775(v1 char(1)) returns enum('a','b') return v1| +select bug9775('a'),bug9775('b'),bug9775('c')| +bug9775('a') bug9775('b') bug9775('c') +a b +drop function bug9775| +create function bug9775(v1 int) returns enum('a','b') return v1| +select bug9775(1),bug9775(2),bug9775(3)| +bug9775(1) bug9775(2) bug9775(3) +a b +drop function bug9775| +create function bug9775(v1 char(1)) returns set('a','b') return v1| +select bug9775('a'),bug9775('b'),bug9775('a,b'),bug9775('c')| +bug9775('a') bug9775('b') bug9775('a,b') bug9775('c') +a b a,b +drop function bug9775| +create function bug9775(v1 int) returns set('a','b') return v1| +select bug9775(1),bug9775(2),bug9775(3),bug9775(4)| +bug9775(1) bug9775(2) bug9775(3) bug9775(4) +a b a,b +drop function bug9775| +drop function if exists bug8861| +create function bug8861(v1 int) returns year return v1| +select bug8861(05)| +bug8861(05) +2005 +set @x = bug8861(05)| +select @x| +@x +2005 +drop function bug8861| +drop procedure if exists bug9004_1| +drop procedure if exists bug9004_2| +create procedure bug9004_1(x char(16)) +begin +insert into t1 values (x, 42); +insert into t1 values (x, 17); +end| +create procedure bug9004_2(x char(16)) +call bug9004_1(x)| +call bug9004_1('12345678901234567')| +Warnings: +Warning 1265 Data truncated for column 'id' at row 1 +Warning 1265 Data truncated for column 'id' at row 2 +call bug9004_2('12345678901234567890')| +Warnings: +Warning 1265 Data truncated for column 'id' at row 1 +Warning 1265 Data truncated for column 'id' at row 2 +delete from t1| +drop procedure bug9004_1| +drop procedure bug9004_2| +drop procedure if exists bug7293| +insert into t1 values ('secret', 0)| +create procedure bug7293(p1 varchar(100)) +begin +if exists (select id from t1 where soundex(p1)=soundex(id)) then +select 'yes'; +end if; +end;| +call bug7293('secret')| +yes +yes +call bug7293 ('secrete')| +yes +yes +drop procedure bug7293| +delete from t1| +drop procedure if exists bug9841| +drop view if exists v1| +create view v1 as select * from t1, t2 where id = s| +create procedure bug9841 () +update v1 set data = 10| +call bug9841()| +drop view v1| +drop procedure bug9841| +drop procedure if exists bug5963| +create procedure bug5963_1 () begin declare v int; set v = (select s1 from t3); select v; end;| +create table t3 (s1 int)| +insert into t3 values (5)| +call bug5963_1()| +v +5 +call bug5963_1()| +v +5 +drop procedure bug5963_1| +drop table t3| +create procedure bug5963_2 (cfk_value int) +begin +if cfk_value in (select cpk from t3) then +set @x = 5; +end if; +end; +| +create table t3 (cpk int)| +insert into t3 values (1)| +call bug5963_2(1)| +call bug5963_2(1)| +drop procedure bug5963_2| +drop table t3| +drop function if exists bug9559| +create function bug9559() +returns int +begin +set @y = -6/2; +return @y; +end| +select bug9559()| +bug9559() +-3 +drop function bug9559| +drop procedure if exists bug10961| +create procedure bug10961() +begin +declare v char; +declare x int; +declare c cursor for select * from dual; +declare continue handler for sqlexception select x; +set x = 1; +open c; +set x = 2; +fetch c into v; +set x = 3; +close c; +end| +call bug10961()| +x +1 +x +2 +x +3 +call bug10961()| +x +1 +x +2 +x +3 +drop procedure bug10961| +DROP PROCEDURE IF EXISTS bug6866| +DROP VIEW IF EXISTS tv| +Warnings: +Note 1051 Unknown table 'test.tv' +DROP TABLE IF EXISTS tt1,tt2,tt3| +Warnings: +Note 1051 Unknown table 'tt1' +Note 1051 Unknown table 'tt2' +Note 1051 Unknown table 'tt3' +CREATE TABLE tt1 (a1 int, a2 int, a3 int, data varchar(10))| +CREATE TABLE tt2 (a2 int, data2 varchar(10))| +CREATE TABLE tt3 (a3 int, data3 varchar(10))| +INSERT INTO tt1 VALUES (1, 1, 4, 'xx')| +INSERT INTO tt2 VALUES (1, 'a')| +INSERT INTO tt2 VALUES (2, 'b')| +INSERT INTO tt2 VALUES (3, 'c')| +INSERT INTO tt3 VALUES (4, 'd')| +INSERT INTO tt3 VALUES (5, 'e')| +INSERT INTO tt3 VALUES (6, 'f')| +CREATE VIEW tv AS +SELECT tt1.*, tt2.data2, tt3.data3 +FROM tt1 INNER JOIN tt2 ON tt1.a2 = tt2.a2 +LEFT JOIN tt3 ON tt1.a3 = tt3.a3 +ORDER BY tt1.a1, tt2.a2, tt3.a3| +CREATE PROCEDURE bug6866 (_a1 int) +BEGIN +SELECT * FROM tv WHERE a1 = _a1; +END| +CALL bug6866(1)| +a1 a2 a3 data data2 data3 +1 1 4 xx a d +CALL bug6866(1)| +a1 a2 a3 data data2 data3 +1 1 4 xx a d +CALL bug6866(1)| +a1 a2 a3 data data2 data3 +1 1 4 xx a d +DROP PROCEDURE bug6866; +DROP VIEW tv| +DROP TABLE tt1, tt2, tt3| +DROP PROCEDURE IF EXISTS bug10136| +create table t3 ( name char(5) not null primary key, val float not null)| +insert into t3 values ('aaaaa', 1), ('bbbbb', 2), ('ccccc', 3)| +create procedure bug10136() +begin +declare done int default 3; +repeat +select * from t3; +set done = done - 1; +until done <= 0 end repeat; +end| +call bug10136()| +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +call bug10136()| +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +call bug10136()| +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +name val +aaaaa 1 +bbbbb 2 +ccccc 3 +drop procedure bug10136| +drop table t3| +drop procedure if exists bug11529| +create procedure bug11529() +begin +declare c cursor for select id, data from t1 where data in (10,13); +open c; +begin +declare vid char(16); +declare vdata int; +declare exit handler for not found begin end; +while true do +fetch c into vid, vdata; +end while; +end; +close c; +end| +insert into t1 values +('Name1', 10), +('Name2', 11), +('Name3', 12), +('Name4', 13), +('Name5', 14)| +call bug11529()| +call bug11529()| +delete from t1| +drop procedure bug11529| +drop procedure if exists bug6063| +drop procedure if exists bug7088_1| +drop procedure if exists bug7088_2| +drop procedure if exists bug9565_sub| +drop procedure if exists bug9565| +create procedure bug9565_sub() +begin +select * from t1; +end| +create procedure bug9565() +begin +insert into t1 values ("one", 1); +call bug9565_sub(); +end| +call bug9565()| +id data +one 1 +delete from t1| +drop procedure bug9565_sub| +drop procedure bug9565| +drop procedure if exists bug9538| +create procedure bug9538() +set @@sort_buffer_size = 1000000| +set @x = @@sort_buffer_size| +set @@sort_buffer_size = 2000000| +select @@sort_buffer_size| +@@sort_buffer_size +2000000 +call bug9538()| +select @@sort_buffer_size| +@@sort_buffer_size +1000000 +set @@sort_buffer_size = @x| +drop procedure bug9538| +drop procedure if exists bug8692| +create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob, c6 char(5), c7 varchar(5))| +insert into t3 values ('', '', '', '', '', '', NULL)| +Warnings: +Warning 1265 Data truncated for column 'c3' at row 1 +create procedure bug8692() +begin +declare v1 VARCHAR(10); +declare v2 VARCHAR(10); +declare v3 VARCHAR(10); +declare v4 VARCHAR(10); +declare v5 VARCHAR(10); +declare v6 VARCHAR(10); +declare v7 VARCHAR(10); +declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3; +open c8692; +fetch c8692 into v1,v2,v3,v4,v5,v6,v7; +select v1, v2, v3, v4, v5, v6, v7; +end| +call bug8692()| +v1 v2 v3 v4 v5 v6 v7 + NULL +drop procedure bug8692| +drop table t3| +drop function if exists bug10055| +create function bug10055(v char(255)) returns char(255) return lower(v)| +select t.column_name, bug10055(t.column_name) +from information_schema.columns as t +where t.table_schema = 'test' and t.table_name = 't1'| +column_name bug10055(t.column_name) +id id +data data +drop function bug10055| +drop function if exists f_bug11247| +drop procedure if exists p_bug11247| +create function f_bug11247(param int) +returns int +return param + 1| +create procedure p_bug11247(lim int) +begin +declare v int default 0; +while v < lim do +set v= f_bug11247(v); +end while; +end| +call p_bug11247(10)| +drop function f_bug11247| +drop procedure p_bug11247| +drop procedure if exists bug12168| +drop table if exists t3, t4| +create table t3 (a int)| +insert into t3 values (1),(2),(3),(4)| +create table t4 (a int)| +create procedure bug12168(arg1 char(1)) +begin +declare b, c integer; +if arg1 = 'a' then +begin +declare c1 cursor for select a from t3 where a % 2; +declare continue handler for not found set b = 1; +set b = 0; +open c1; +c1_repeat: repeat +fetch c1 into c; +if (b = 1) then +leave c1_repeat; +end if; +insert into t4 values (c); +until b = 1 +end repeat; +end; +end if; +if arg1 = 'b' then +begin +declare c2 cursor for select a from t3 where not a % 2; +declare continue handler for not found set b = 1; +set b = 0; +open c2; +c2_repeat: repeat +fetch c2 into c; +if (b = 1) then +leave c2_repeat; +end if; +insert into t4 values (c); +until b = 1 +end repeat; +end; +end if; +end| +call bug12168('a')| +select * from t4| +a +1 +3 +truncate t4| +call bug12168('b')| +select * from t4| +a +2 +4 +truncate t4| +call bug12168('a')| +select * from t4| +a +1 +3 +truncate t4| +call bug12168('b')| +select * from t4| +a +2 +4 +truncate t4| +drop table t3, t4| +drop procedure if exists bug12168| +drop table if exists t3| +drop procedure if exists bug11333| +create table t3 (c1 char(128))| +insert into t3 values +('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')| +create procedure bug11333(i int) +begin +declare tmp varchar(128); +set @x = 0; +repeat +select c1 into tmp from t3 +where c1 = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; +set @x = @x + 1; +until @x >= i +end repeat; +end| +call bug11333(10)| +drop procedure bug11333| +drop table t3| +drop function if exists bug9048| +create function bug9048(f1 char binary) returns char binary +begin +set f1= concat( 'hello', f1 ); +return f1; +end| +drop function bug9048| +drop table t1,t2; diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result new file mode 100644 index 00000000000..6077087ab87 --- /dev/null +++ b/mysql-test/r/sp_trans.result @@ -0,0 +1,176 @@ +drop table if exists t1, t2; +drop procedure if exists bug8850| +create table t1 (a int) engine=innodb| +create procedure bug8850() +begin +truncate table t1; insert t1 values (1); rollback; +end| +set autocommit=0| +insert t1 values (2)| +call bug8850()| +commit| +select * from t1| +a +call bug8850()| +set autocommit=1| +select * from t1| +a +drop table t1| +drop procedure bug8850| +drop function if exists bug10015_1| +drop function if exists bug10015_2| +drop function if exists bug10015_3| +drop function if exists bug10015_4| +drop function if exists bug10015_5| +drop function if exists bug10015_6| +drop function if exists bug10015_7| +drop procedure if exists bug10015_8| +create table t1 (id int) engine=innodb| +create table t2 (id int primary key, j int) engine=innodb| +insert into t1 values (1),(2),(3)| +create function bug10015_1() returns int return (select count(*) from t1)| +select *, bug10015_1() from t1| +id bug10015_1() +1 3 +2 3 +3 3 +drop function bug10015_1| +create function bug10015_2() returns int +begin +declare i, s int; +set i:= (select min(id) from t1); +set s:= (select max(id) from t1); +return (s - i); +end| +select *, bug10015_2() from t1| +id bug10015_2() +1 2 +2 2 +3 2 +drop function bug10015_2| +create function bug10015_3() returns int +return (select max(a.id - b.id) from t1 as a, t1 as b where a.id >= b.id)| +select *, bug10015_3() from t1| +id bug10015_3() +1 2 +2 2 +3 2 +drop function bug10015_3| +create function bug10015_4(i int) returns int +begin +declare m int; +set m:= (select max(id) from t2); +insert into t2 values (i, m); +return m; +end| +select *, bug10015_4(id) from t1| +id bug10015_4(id) +1 NULL +2 1 +3 2 +select * from t2| +id j +1 NULL +2 1 +3 2 +drop function bug10015_4| +create function bug10015_5(i int) returns int +begin +if (i = 5) then +insert into t2 values (1, 0); +end if; +return i; +end| +insert into t1 values (bug10015_5(4)), (bug10015_5(5))| +ERROR 23000: Duplicate entry '1' for key 1 +select * from t1| +id +1 +2 +3 +drop function bug10015_5| +create function bug10015_6(i int) returns int +begin +declare continue handler for sqlexception set @error_in_func:= 1; +if (i = 5) then +insert into t2 values (4, 0), (1, 0); +end if; +return i; +end| +set @error_in_func:= 0| +insert into t1 values (bug10015_6(5)), (bug10015_6(6))| +select @error_in_func| +@error_in_func +1 +select * from t1| +id +1 +2 +3 +5 +6 +select * from t2| +id j +1 NULL +2 1 +3 2 +4 0 +drop function bug10015_6| +create function bug10015_7() returns int +begin +alter table t1 add k int; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function bug10015_7() returns int +begin +start transaction; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function bug10015_7() returns int +begin +drop table t1; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function bug10015_7() returns int +begin +drop temporary table t1; +return 1; +end| +drop function bug10015_7| +create function bug10015_7() returns int +begin +commit; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function bug10015_7() returns int +begin +call bug10015_8(); +return 1; +end| +create procedure bug10015_8() alter table t1 add k int| +select *, bug10015_7() from t1| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop procedure bug10015_8| +create procedure bug10015_8() start transaction| +select *, bug10015_7() from t1| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop procedure bug10015_8| +create procedure bug10015_8() drop temporary table if exists t1_temp| +select *, bug10015_7() from t1| +id bug10015_7() +1 1 +2 1 +3 1 +5 1 +6 1 +drop procedure bug10015_8| +create procedure bug10015_8() commit| +select *, bug10015_7() from t1| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop procedure bug10015_8| +drop function bug10015_7| +drop table t1, t2| diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 4e1693e15ec..084b257b699 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -18,7 +18,7 @@ t1 CREATE TABLE `t1` ( `email` varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY (`a`), UNIQUE KEY `email` USING BTREE (`email`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set @@sql_mode="ansi_quotes"; show variables like 'sql_mode'; Variable_name Value @@ -31,7 +31,7 @@ t1 CREATE TABLE "t1" ( "email" varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY ("a"), UNIQUE KEY "email" USING BTREE ("email") -) ENGINE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set @@sql_mode="no_table_options"; show variables like 'sql_mode'; Variable_name Value @@ -57,11 +57,11 @@ t1 CREATE TABLE `t1` ( `email` varchar(60) character set latin2 NOT NULL default '', PRIMARY KEY (`a`), UNIQUE KEY `email` (`email`) -) ENGINE=HEAP DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +) ENGINE=MEMORY DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set @@sql_mode="no_field_options,mysql323,mysql40"; show variables like 'sql_mode'; Variable_name Value -sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40 +sql_mode NO_FIELD_OPTIONS,MYSQL323,MYSQL40,HIGH_NOT_PRECEDENCE show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -74,7 +74,7 @@ t1 CREATE TABLE `t1` ( set sql_mode="postgresql,oracle,mssql,db2,maxdb"; select @@sql_mode; @@sql_mode -PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS +PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,POSTGRESQL,ORACLE,MSSQL,DB2,MAXDB,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER show create table t1; Table Create Table t1 CREATE TABLE "t1" ( @@ -120,7 +120,7 @@ create table t1 ( min_num dec(6,6) default .000001); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `min_num` decimal(7,6) default '0.000001' + `min_num` decimal(6,6) default '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; set session sql_mode = 'IGNORE_SPACE'; @@ -128,15 +128,333 @@ create table t1 ( min_num dec(6,6) default 0.000001); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `min_num` decimal(7,6) default '0.000001' + `min_num` decimal(6,6) default '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; create table t1 ( min_num dec(6,6) default .000001); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `min_num` decimal(7,6) default '0.000001' + `min_num` decimal(6,6) default '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; set @@SQL_MODE=NULL; ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL' +SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=''; +show local variables like 'SQL_MODE'; +Variable_name Value +sql_mode +CREATE TABLE t1 (p int not null auto_increment, a varchar(20), primary key(p)); +INSERT t1 (a) VALUES +('\\'), +('\n'), +('\b'), +('\r'), +('\t'), +('\x'), +('\a'), +('\aa'), +('\\a'), +('\\aa'), +('_'), +('\_'), +('\\_'), +('\\\_'), +('\\\\_'), +('%'), +('\%'), +('\\%'), +('\\\%'), +('\\\\%') +; +SELECT p, hex(a) FROM t1; +p hex(a) +1 5C +2 0A +3 08 +4 0D +5 09 +6 78 +7 61 +8 6161 +9 5C61 +10 5C6161 +11 5F +12 5C5F +13 5C5F +14 5C5C5F +15 5C5C5F +16 25 +17 5C25 +18 5C25 +19 5C5C25 +20 5C5C25 +delete from t1 where a in ('\n','\r','\t', '\b'); +select +masks.p, +masks.a as mask, +examples.a as example +from +t1 as masks +left join t1 as examples on examples.a LIKE masks.a +order by masks.p, example; +p mask example +1 \ \ +6 x x +7 a a +8 aa aa +9 \a a +10 \aa aa +11 _ % +11 _ a +11 _ x +11 _ \ +11 _ _ +12 \_ _ +13 \_ _ +14 \\_ \% +14 \\_ \% +14 \\_ \a +14 \\_ \_ +14 \\_ \_ +15 \\_ \% +15 \\_ \% +15 \\_ \a +15 \\_ \_ +15 \\_ \_ +16 % % +16 % a +16 % aa +16 % x +16 % \ +16 % \% +16 % \% +16 % \a +16 % \aa +16 % \\% +16 % \\% +16 % \\_ +16 % \\_ +16 % \_ +16 % \_ +16 % _ +17 \% % +18 \% % +19 \\% \ +19 \\% \% +19 \\% \% +19 \\% \a +19 \\% \aa +19 \\% \\% +19 \\% \\% +19 \\% \\_ +19 \\% \\_ +19 \\% \_ +19 \\% \_ +20 \\% \ +20 \\% \% +20 \\% \% +20 \\% \a +20 \\% \aa +20 \\% \\% +20 \\% \\% +20 \\% \\_ +20 \\% \\_ +20 \\% \_ +20 \\% \_ +DROP TABLE t1; +SET @@SQL_MODE='NO_BACKSLASH_ESCAPES'; +show local variables like 'SQL_MODE'; +Variable_name Value +sql_mode NO_BACKSLASH_ESCAPES +CREATE TABLE t1 (p int not null auto_increment, a varchar(20), primary key(p)); +INSERT t1 (a) VALUES +('\\'), +('\n'), +('\b'), +('\r'), +('\t'), +('\x'), +('\a'), +('\aa'), +('\\a'), +('\\aa'), +('_'), +('\_'), +('\\_'), +('\\\_'), +('\\\\_'), +('%'), +('\%'), +('\\%'), +('\\\%'), +('\\\\%') +; +SELECT p, hex(a) FROM t1; +p hex(a) +1 5C5C +2 5C6E +3 5C62 +4 5C72 +5 5C74 +6 5C78 +7 5C61 +8 5C6161 +9 5C5C61 +10 5C5C6161 +11 5F +12 5C5F +13 5C5C5F +14 5C5C5C5F +15 5C5C5C5C5F +16 25 +17 5C25 +18 5C5C25 +19 5C5C5C25 +20 5C5C5C5C25 +delete from t1 where a in ('\n','\r','\t', '\b'); +select +masks.p, +masks.a as mask, +examples.a as example +from +t1 as masks +left join t1 as examples on examples.a LIKE masks.a +order by masks.p, example; +p mask example +1 \\ \\ +6 \x \x +7 \a \a +8 \aa \aa +9 \\a \\a +10 \\aa \\aa +11 _ % +11 _ _ +12 \_ \% +12 \_ \a +12 \_ \x +12 \_ \\ +12 \_ \_ +13 \\_ \\% +13 \\_ \\a +13 \\_ \\_ +14 \\\_ \\\% +14 \\\_ \\\_ +15 \\\\_ \\\\% +15 \\\\_ \\\\_ +16 % % +16 % \% +16 % \a +16 % \aa +16 % \x +16 % \\ +16 % \\% +16 % \\a +16 % \\aa +16 % \\\% +16 % \\\\% +16 % \\\\_ +16 % \\\_ +16 % \\_ +16 % \_ +16 % _ +17 \% \% +17 \% \a +17 \% \aa +17 \% \x +17 \% \\ +17 \% \\% +17 \% \\a +17 \% \\aa +17 \% \\\% +17 \% \\\\% +17 \% \\\\_ +17 \% \\\_ +17 \% \\_ +17 \% \_ +18 \\% \\ +18 \\% \\% +18 \\% \\a +18 \\% \\aa +18 \\% \\\% +18 \\% \\\\% +18 \\% \\\\_ +18 \\% \\\_ +18 \\% \\_ +19 \\\% \\\% +19 \\\% \\\\% +19 \\\% \\\\_ +19 \\\% \\\_ +20 \\\\% \\\\% +20 \\\\% \\\\_ +DROP TABLE t1; +SET @@SQL_MODE='NO_BACKSLASH_ESCAPES'; +SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b'; +a\\b a\\\"b a'\\b a'\\\"b +a\\b a\\\"b a'\\b a'\\\"b +SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; +a\\b a\\\'b a"\\b a"\\\'b +a\\b a\\\'b a"\\b a"\\\'b +SET @@SQL_MODE=''; +SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b'; +a\b a\"b a'\b a'\"b +a\b a\"b a'\b a'\"b +SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; +a\b a\'b a"\b a"\'b +a\b a\'b a"\b a"\'b +set session sql_mode = 'NO_ENGINE_SUBSTITUTION'; +create table t1 (a int) engine=isam; +ERROR HY000: The 'ISAM' feature is disabled; you need MySQL built with 'ISAM' to have it working +show create table t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +set session sql_mode = ''; +create table t1 (a int) engine=isam; +Warnings: +Warning 1266 Using storage engine MyISAM for table 't1' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +SET @@SQL_MODE=''; +create function `foo` () returns int return 5; +show create function `foo`; +Function sql_mode Create Function +foo CREATE FUNCTION `foo`() RETURNS int(11) +return 5 +SET @@SQL_MODE='ANSI_QUOTES'; +show create function `foo`; +Function sql_mode Create Function +foo CREATE FUNCTION `foo`() RETURNS int(11) +return 5 +drop function `foo`; +create function `foo` () returns int return 5; +show create function `foo`; +Function sql_mode Create Function +foo ANSI_QUOTES CREATE FUNCTION "foo"() RETURNS int(11) +return 5 +SET @@SQL_MODE=''; +show create function `foo`; +Function sql_mode Create Function +foo ANSI_QUOTES CREATE FUNCTION "foo"() RETURNS int(11) +return 5 +drop function `foo`; +SET @@SQL_MODE=''; +create table t1 (a int); +create table t2 (a int); +create view v1 as select a from t1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` +SET @@SQL_MODE='ANSI_QUOTES'; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW "test"."v1" AS select "test"."t1"."a" AS "a" from "test"."t1" +create view v2 as select a from t2 where a in (select a from v1); +drop view v2, v1; +drop table t1, t2; +SET @@SQL_MODE=@OLD_SQL_MODE; diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result new file mode 100644 index 00000000000..6299e8dcc88 --- /dev/null +++ b/mysql-test/r/strict.result @@ -0,0 +1,1288 @@ +set @org_mode=@@sql_mode; +set @@sql_mode='ansi,traditional'; +select @@sql_mode; +@@sql_mode +REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (col1 date); +INSERT INTO t1 VALUES('2004-01-01'),('0000-10-31'),('2004-02-29'); +INSERT INTO t1 VALUES('2004-0-31'); +ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-01-02'),('2004-0-31'); +ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 2 +INSERT INTO t1 VALUES('2004-10-0'); +ERROR 22007: Incorrect date value: '2004-10-0' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-09-31'); +ERROR 22007: Incorrect date value: '2004-09-31' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-32'); +ERROR 22007: Incorrect date value: '2004-10-32' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2003-02-29'); +ERROR 22007: Incorrect date value: '2003-02-29' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-13-15'); +ERROR 22007: Incorrect date value: '2004-13-15' for column 'col1' at row 1 +INSERT INTO t1 VALUES('0000-00-00'); +ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 +INSERT INTO t1 VALUES ('59'); +ERROR 22007: Incorrect date value: '59' for column 'col1' at row 1 +set @@sql_mode='STRICT_ALL_TABLES'; +INSERT INTO t1 VALUES('2004-01-03'),('2004-0-31'); +set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_IN_DATE'; +INSERT INTO t1 VALUES('2004-0-30'); +ERROR 22007: Incorrect date value: '2004-0-30' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-01-04'),('2004-0-31'),('2004-01-05'); +ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 2 +INSERT INTO t1 VALUES('0000-00-00'); +INSERT IGNORE INTO t1 VALUES('2004-0-29'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE'; +INSERT INTO t1 VALUES('0000-00-00'); +ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 +INSERT IGNORE INTO t1 VALUES('0000-00-00'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT INTO t1 VALUES ('2004-0-30'); +INSERT INTO t1 VALUES ('2004-2-30'); +ERROR 22007: Incorrect date value: '2004-2-30' for column 'col1' at row 1 +set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES'; +INSERT INTO t1 VALUES ('2004-2-30'); +set @@sql_mode='ansi,traditional'; +INSERT IGNORE INTO t1 VALUES('2004-02-29'),('2004-13-15'),('0000-00-00'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 2 +Warning 1265 Data truncated for column 'col1' at row 3 +select * from t1; +col1 +2004-01-01 +0000-10-31 +2004-02-29 +2004-01-02 +2004-01-03 +2004-00-31 +2004-01-04 +0000-00-00 +0000-00-00 +0000-00-00 +2004-00-30 +2004-02-30 +2004-02-29 +0000-00-00 +0000-00-00 +drop table t1; +set @@sql_mode='strict_trans_tables'; +CREATE TABLE t1 (col1 date) engine=myisam; +INSERT INTO t1 VALUES('2004-13-31'),('2004-1-1'); +ERROR 22007: Incorrect date value: '2004-13-31' for column 'col1' at row 1 +INSERT INTO t1 VALUES ('2004-1-2'), ('2004-13-31'),('2004-1-3'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 2 +INSERT IGNORE INTO t1 VALUES('2004-13-31'),('2004-1-4'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT INTO t1 VALUES ('2003-02-29'); +ERROR 22007: Incorrect date value: '2003-02-29' for column 'col1' at row 1 +INSERT ignore INTO t1 VALUES('2003-02-30'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES'; +INSERT ignore INTO t1 VALUES('2003-02-31'); +select * from t1; +col1 +2004-01-02 +0000-00-00 +2004-01-03 +0000-00-00 +2004-01-04 +0000-00-00 +2003-02-31 +drop table t1; +set @@sql_mode='strict_trans_tables'; +CREATE TABLE t1 (col1 date) engine=innodb; +INSERT INTO t1 VALUES('2004-13-31'),('2004-1-1'); +ERROR 22007: Incorrect date value: '2004-13-31' for column 'col1' at row 1 +INSERT INTO t1 VALUES ('2004-1-2'), ('2004-13-31'),('2004-1-3'); +ERROR 22007: Incorrect date value: '2004-13-31' for column 'col1' at row 2 +INSERT IGNORE INTO t1 VALUES('2004-13-31'),('2004-1-4'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT INTO t1 VALUES ('2003-02-29'); +ERROR 22007: Incorrect date value: '2003-02-29' for column 'col1' at row 1 +INSERT ignore INTO t1 VALUES('2003-02-30'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES'; +INSERT ignore INTO t1 VALUES('2003-02-31'); +select * from t1; +col1 +0000-00-00 +2004-01-04 +0000-00-00 +2003-02-31 +drop table t1; +set @@sql_mode='ansi,traditional'; +CREATE TABLE t1 (col1 datetime); +INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('0000-10-31 15:30:00'),('2004-02-29 15:30:00'); +INSERT INTO t1 VALUES('2004-0-31 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-0 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-09-31 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-32 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2003-02-29 15:30:00'); +ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-13-15 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('0000-00-00 15:30:00'); +ERROR 22007: Incorrect datetime value: '0000-00-00 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES ('59'); +ERROR 22007: Incorrect datetime value: '59' for column 'col1' at row 1 +select * from t1; +col1 +2004-10-31 15:30:00 +0000-10-31 15:30:00 +2004-02-29 15:30:00 +drop table t1; +CREATE TABLE t1 (col1 timestamp); +INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); +INSERT INTO t1 VALUES('0000-10-31 15:30:00'); +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-0-31 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-0 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-09-31 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-32 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2003-02-29 15:30:00'); +ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-13-15 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-02-29 25:30:00'); +ERROR 22007: Incorrect datetime value: '2004-02-29 25:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-02-29 15:65:00'); +ERROR 22007: Incorrect datetime value: '2004-02-29 15:65:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-02-29 15:31:61'); +ERROR 22007: Incorrect datetime value: '2004-02-29 15:31:61' for column 'col1' at row 1 +INSERT INTO t1 VALUES('0000-00-00 15:30:00'); +ERROR 22007: Incorrect datetime value: '0000-00-00 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('0000-00-00 00:00:00'); +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1 +INSERT IGNORE INTO t1 VALUES('0000-00-00 00:00:00'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT INTO t1 VALUES ('59'); +ERROR 22007: Incorrect datetime value: '59' for column 'col1' at row 1 +set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES'; +INSERT INTO t1 VALUES('2004-0-31 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-0 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-10-0 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-10-32 15:30:00'); +ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 VALUES('2004-02-30 15:30:04'); +ERROR 22007: Incorrect datetime value: '2004-02-30 15:30:04' for column 'col1' at row 1 +INSERT INTO t1 VALUES('0000-00-00 00:00:00'); +set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_IN_DATE'; +INSERT INTO t1 VALUES('0000-00-00 00:00:00'); +set @@sql_mode='STRICT_ALL_TABLES,NO_ZERO_DATE'; +INSERT INTO t1 VALUES('0000-00-00 00:00:00'); +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1 +set @@sql_mode='ansi,traditional'; +SELECT * FROM t1; +col1 +2004-10-31 15:30:00 +2004-02-29 15:30:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +DROP TABLE t1; +CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp); +INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y')); +INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); +INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect date value: '2004-00-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect date value: '2004-10-00 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect date value: '2004-09-31 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_time +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect date value: '2003-02-29 15:30:00' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_time +INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); +ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_time +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_time +INSERT INTO t1 (col2) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); +ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col2' at row 1 +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_time +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i')); +ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('15.13.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_time +INSERT INTO t1 (col3) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); +ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col3' at row 1 +drop table t1; +CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp); +INSERT INTO t1 (col1) VALUES (CAST('2004-10-15' AS DATE)); +INSERT INTO t1 (col2) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); +INSERT INTO t1 (col3) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); +INSERT INTO t1 (col1) VALUES(CAST('0000-10-31' AS DATE)); +INSERT INTO t1 (col1) VALUES(CAST('2004-10-0' AS DATE)); +ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(CAST('2004-0-10' AS DATE)); +ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); +INSERT INTO t1 (col2) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(CAST('0000-00-00' AS DATETIME)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +drop table t1; +CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp); +INSERT INTO t1 (col1) VALUES (CONVERT('2004-10-15',DATE)); +INSERT INTO t1 (col2) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); +INSERT INTO t1 (col3) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); +INSERT INTO t1 (col1) VALUES(CONVERT('0000-10-31' , DATE)); +INSERT INTO t1 (col1) VALUES(CONVERT('2004-10-0' , DATE)); +ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE)); +ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); +INSERT INTO t1 (col2) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); +ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col3' at row 1 +INSERT INTO t1 (col3) VALUES(CONVERT('0000-00-00',DATETIME)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +drop table t1; +CREATE TABLE t1(col1 TINYINT, col2 TINYINT UNSIGNED); +INSERT INTO t1 VALUES(-128,0),(0,0),(127,255),('-128','0'),('0','0'),('127','255'),(-128.0,0.0),(0.0,0.0),(127.0,255.0); +SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2; +MOD(col1,0) +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT INTO t1 (col1) VALUES(-129); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(128); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(256); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES('-129'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES('128'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES('-1'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES('256'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES(128.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(256.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 1; +MOD(col1,0) +NULL +Warnings: +Error 1365 Division by 0 +UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0; +ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +UPDATE t1 SET col1=col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO'; +INSERT INTO t1 values (1/0,1/0); +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +set @@sql_mode='ansi,traditional'; +SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2; +MOD(col1,0) +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 values (1/0,1/0); +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +set @@sql_mode='ansi'; +INSERT INTO t1 values (1/0,1/0); +set @@sql_mode='ansi,traditional'; +INSERT IGNORE INTO t1 VALUES('-129','-1'),('128','256'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES(-129.0,-1.0),(128.0,256.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +UPDATE IGNORE t1 SET col2=1/NULL where col1=0; +SELECT * FROM t1; +col1 col2 +-128 0 +0 NULL +127 255 +-128 0 +0 NULL +127 255 +-128 0 +0 NULL +127 255 +NULL NULL +2 NULL +NULL NULL +NULL NULL +-128 0 +127 255 +-128 0 +127 255 +DROP TABLE t1; +CREATE TABLE t1(col1 SMALLINT, col2 SMALLINT UNSIGNED); +INSERT INTO t1 VALUES(-32768,0),(0,0),(32767,65535),('-32768','0'),('32767','65535'),(-32768.0,0.0),(32767.0,65535.0); +INSERT INTO t1 (col1) VALUES(-32769); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(32768); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(65536); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES('-32769'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES('32768'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES('-1'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES('65536'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES(-32769.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(32768.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(65536.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +UPDATE t1 SET col2 = col2 + 50 WHERE col2 > 0; +ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +UPDATE t1 SET col1 = col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 values (1/0,1/0); +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES('-32769','-1'),('32768','65536'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES(-32769,-1.0),(32768.0,65536.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +UPDATE IGNORE t1 SET col2=1/NULL where col1=0; +SELECT * FROM t1; +col1 col2 +-32768 0 +0 NULL +32767 65535 +-32768 0 +32767 65535 +-32768 0 +32767 65535 +2 NULL +NULL NULL +-32768 0 +32767 65535 +-32768 0 +32767 65535 +-32768 0 +32767 65535 +DROP TABLE t1; +CREATE TABLE t1 (col1 MEDIUMINT, col2 MEDIUMINT UNSIGNED); +INSERT INTO t1 VALUES(-8388608,0),(0,0),(8388607,16777215),('-8388608','0'),('8388607','16777215'),(-8388608.0,0.0),(8388607.0,16777215.0); +INSERT INTO t1 (col1) VALUES(-8388609); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(8388608); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(16777216); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES('-8388609'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES('8388608'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES('-1'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES('16777216'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES(-8388609.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(8388608.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(16777216.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +UPDATE t1 SET col2 = col2 + 50 WHERE col2 > 0; +ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 values (1/0,1/0); +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES('-8388609','-1'),('8388608','16777216'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES(-8388609.0,-1.0),(8388608.0,16777216.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +UPDATE IGNORE t1 SET col2=1/NULL where col1=0; +SELECT * FROM t1; +col1 col2 +-8388608 0 +0 NULL +8388607 16777215 +-8388608 0 +8388607 16777215 +-8388608 0 +8388607 16777215 +2 NULL +NULL NULL +-8388608 0 +8388607 16777215 +-8388608 0 +8388607 16777215 +-8388608 0 +8388607 16777215 +DROP TABLE t1; +CREATE TABLE t1 (col1 INT, col2 INT UNSIGNED); +INSERT INTO t1 VALUES(-2147483648,0),(0,0),(2147483647,4294967295),('-2147483648','0'),('2147483647','4294967295'),(-2147483648.0,0.0),(2147483647.0,4294967295.0); +INSERT INTO t1 (col1) VALUES(-2147483649); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(2147643648); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(4294967296); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES('-2147483649'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES('2147643648'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES('-1'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES('4294967296'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES(-2147483649.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(2147643648.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(4294967296.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +UPDATE t1 SET col2 =col2 + 50 WHERE col2 > 0; +ERROR 22003: Out of range value adjusted for column 'col2' at row 3 +UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 values (1/0,1/0); +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 values ('-2147483649', '-1'),('2147643648','4294967296'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 values (-2147483649.0, -1.0),(2147643648.0,4294967296.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +UPDATE IGNORE t1 SET col2=1/NULL where col1=0; +SELECT * FROM t1; +col1 col2 +-2147483648 0 +0 NULL +2147483647 4294967295 +-2147483648 0 +2147483647 4294967295 +-2147483648 0 +2147483647 4294967295 +2 NULL +NULL NULL +-2147483648 0 +2147483647 4294967295 +-2147483648 0 +2147483647 4294967295 +-2147483648 0 +2147483647 4294967295 +DROP TABLE t1; +CREATE TABLE t1 (col1 BIGINT, col2 BIGINT UNSIGNED); +INSERT INTO t1 VALUES(-9223372036854775808,0),(0,0),(9223372036854775807,18446744073709551615); +INSERT INTO t1 VALUES('-9223372036854775808','0'),('9223372036854775807','18446744073709551615'); +INSERT INTO t1 VALUES(-9223372036854774000.0,0.0),(9223372036854775700.0,1844674407370954000.0); +INSERT INTO t1 (col1) VALUES(-9223372036854775809); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(9223372036854775808); +INSERT INTO t1 (col2) VALUES(-1); +INSERT INTO t1 (col2) VALUES(18446744073709551616); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES('-9223372036854775809'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES('9223372036854775808'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES('-1'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES('18446744073709551616'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES(-9223372036854785809.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES(9223372036854785808.0); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES(-1.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES(18446744073709551616.0); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 values (1/0,1/0); +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES('-9223372036854775809','-1'),('9223372036854775808','18446744073709551616'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES(-9223372036854785809.0,-1.0),(9223372036854785808.0,18446744073709551616.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +Warning 1264 Out of range value adjusted for column 'col2' at row 2 +UPDATE IGNORE t1 SET col2=1/NULL where col1=0; +SELECT * FROM t1; +col1 col2 +-9223372036854775808 0 +0 NULL +9223372036854775807 18446744073709551615 +-9223372036854775808 0 +9223372036854775807 18446744073709551615 +-9223372036854774000 0 +9223372036854775700 1844674407370954000 +-9223372036854775808 NULL +NULL 18446744073709551615 +2 NULL +NULL NULL +-9223372036854775808 18446744073709551615 +-9223372036854775808 18446744073709551615 +-9223372036854775808 0 +9223372036854775807 18446744073709551615 +-9223372036854775808 0 +9223372036854775807 18446744073709551615 +DROP TABLE t1; +CREATE TABLE t1 (col1 NUMERIC(4,2)); +INSERT INTO t1 VALUES (10.55),(10.5555),(0),(-10.55),(-10.5555),(11),(1e+01); +Warnings: +Note 1265 Data truncated for column 'col1' at row 2 +Note 1265 Data truncated for column 'col1' at row 5 +INSERT INTO t1 VALUES ('10.55'),('10.5555'),('-10.55'),('-10.5555'),('11'),('1e+01'); +Warnings: +Note 1265 Data truncated for column 'col1' at row 2 +Note 1265 Data truncated for column 'col1' at row 4 +INSERT INTO t1 VALUES (101.55); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES (101); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES (-101.55); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES (1010.55); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES (1010); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES ('101.55'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES ('101'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES ('-101.55'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES ('-1010.55'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES ('-100E+1'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 VALUES ('-100E'); +ERROR HY000: Incorrect decimal value: '-100E' for column 'col1' at row 1 +UPDATE t1 SET col1 =col1 * 50000 WHERE col1 =11; +ERROR 22003: Out of range value adjusted for column 'col1' at row 6 +UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR HY000: Incorrect decimal value: '' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR HY000: Incorrect decimal value: '1a' for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 values (1/0); +Warnings: +Error 1365 Division by 0 +INSERT IGNORE INTO t1 VALUES(1000),(-1000); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +INSERT IGNORE INTO t1 VALUES('1000'),('-1000'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +INSERT IGNORE INTO t1 VALUES(1000.0),(-1000.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +UPDATE IGNORE t1 SET col1=1/NULL where col1=0; +SELECT * FROM t1; +col1 +10.55 +10.56 +NULL +-10.55 +-10.56 +11.00 +10.00 +10.55 +10.56 +-10.55 +-10.56 +11.00 +10.00 +2.00 +NULL +99.99 +-99.99 +99.99 +-99.99 +99.99 +-99.99 +DROP TABLE t1; +CREATE TABLE t1 (col1 FLOAT, col2 FLOAT UNSIGNED); +INSERT INTO t1 VALUES (-1.1E-37,0),(+3.4E+38,+3.4E+38); +INSERT INTO t1 VALUES ('-1.1E-37',0),('+3.4E+38','+3.4E+38'); +INSERT INTO t1 (col1) VALUES (3E-46); +INSERT INTO t1 (col1) VALUES (+3.4E+39); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES (-1.1E-3); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES ('+3.4E+39'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES ('-1.1E-3'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0; +ERROR 22003: Out of range value adjusted for column 'col1' at row 2 +UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES (1/0); +Warnings: +Error 1365 Division by 0 +INSERT IGNORE INTO t1 VALUES (+3.4E+39,-3.4E+39); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +INSERT IGNORE INTO t1 VALUES ('+3.4E+39','-3.4E+39'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +SELECT * FROM t1; +col1 col2 +-1.1e-37 0 +3.4e+38 3.4e+38 +-1.1e-37 0 +3.4e+38 3.4e+38 +0 NULL +2 NULL +NULL NULL +3.40282e+38 0 +3.40282e+38 0 +DROP TABLE t1; +CREATE TABLE t1 (col1 DOUBLE PRECISION, col2 DOUBLE PRECISION UNSIGNED); +INSERT INTO t1 VALUES (-2.2E-307,0),(2E-307,0),(+1.7E+308,+1.7E+308); +INSERT INTO t1 VALUES ('-2.2E-307',0),('-2E-307',0),('+1.7E+308','+1.7E+308'); +INSERT INTO t1 (col1) VALUES (-2.2E-330); +INSERT INTO t1 (col1) VALUES (+1.7E+309); +Got one of the listed errors +INSERT INTO t1 (col2) VALUES (-1.1E-3); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +INSERT INTO t1 (col1) VALUES ('+1.8E+309'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES ('-1.2E-3'); +ERROR 22003: Out of range value adjusted for column 'col2' at row 1 +UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0; +ERROR 22003: Out of range value adjusted for column 'col1' at row 3 +UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0; +ERROR 22012: Division by 0 +UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0; +ERROR 22012: Division by 0 +INSERT INTO t1 (col1) VALUES (''); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('a59b'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('1a'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) VALUES ('2a'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +INSERT IGNORE INTO t1 (col1) values (1/0); +Warnings: +Error 1365 Division by 0 +INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309); +ERROR 22007: Illegal double '1.9E+309' value found during parsing +INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309'); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +SELECT * FROM t1; +col1 col2 +0 0 +1e-303 0 +1.7e+308 1.7e+308 +0 0 +-2e-307 0 +1.7e+308 1.7e+308 +0 NULL +2 NULL +NULL NULL +1.79769313486232e+308 0 +DROP TABLE t1; +CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6)); +INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello '); +INSERT INTO t1 (col1) VALUES ('hellobob'); +ERROR 22001: Data too long for column 'col1' at row 1 +INSERT INTO t1 (col2) VALUES ('hellobob'); +ERROR 22001: Data too long for column 'col2' at row 1 +INSERT INTO t1 (col2) VALUES ('hello '); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he'; +ERROR 22001: Data too long for column 'col1' at row 2 +UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he'; +ERROR 22001: Data too long for column 'col2' at row 2 +INSERT IGNORE INTO t1 VALUES ('hellobob', 'hellobob'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +Warning 1265 Data truncated for column 'col2' at row 1 +UPDATE IGNORE t1 SET col2 ='hellotrudy' WHERE col2 ='he'; +Warnings: +Warning 1265 Data truncated for column 'col2' at row 2 +SELECT * FROM t1; +col1 col2 +hello hello +he hellot +hello hello +NULL hello +hello hellob +DROP TABLE t1; +CREATE TABLE t1 (col1 enum('red','blue','green')); +INSERT INTO t1 VALUES ('red'),('blue'),('green'); +INSERT INTO t1 (col1) VALUES ('yellow'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT INTO t1 (col1) VALUES ('redd'); +ERROR 01000: Data truncated for column 'col1' at row 1 +INSERT INTO t1 VALUES (''); +ERROR 01000: Data truncated for column 'col1' at row 1 +UPDATE t1 SET col1 ='yellow' WHERE col1 ='green'; +ERROR 01000: Data truncated for column 'col1' at row 3 +INSERT IGNORE INTO t1 VALUES ('yellow'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +UPDATE IGNORE t1 SET col1 ='yellow' WHERE col1 ='blue'; +Warnings: +Warning 1265 Data truncated for column 'col1' at row 2 +SELECT * FROM t1; +col1 +red + +green + +DROP TABLE t1; +CREATE TABLE t1 (col1 INT NOT NULL, col2 CHAR(5) NOT NULL, col3 DATE NOT NULL); +INSERT INTO t1 VALUES (100, 'hello', '2004-08-20'); +INSERT INTO t1 (col1,col2,col3) VALUES (101, 'hell2', '2004-08-21'); +INSERT INTO t1 (col1,col2,col3) VALUES (NULL, '', '2004-01-01'); +ERROR 23000: Column 'col1' cannot be null +INSERT INTO t1 (col1,col2,col3) VALUES (102, NULL, '2004-01-01'); +ERROR 23000: Column 'col2' cannot be null +INSERT INTO t1 VALUES (103,'',NULL); +ERROR 23000: Column 'col3' cannot be null +UPDATE t1 SET col1=NULL WHERE col1 =100; +ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 +UPDATE t1 SET col2 =NULL WHERE col2 ='hello'; +ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +UPDATE t1 SET col2 =NULL where col3 IS NOT NULL; +ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +INSERT IGNORE INTO t1 values (NULL,NULL,NULL); +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col3' at row 1 +SELECT * FROM t1; +col1 col2 col3 +100 hello 2004-08-20 +101 hell2 2004-08-21 +0 0000-00-00 +DROP TABLE t1; +CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE "t1" ( + "col1" int(11) NOT NULL default '99', + "col2" char(6) NOT NULL +) +INSERT INTO t1 VALUES (1, 'hello'); +INSERT INTO t1 (col2) VALUES ('hello2'); +INSERT INTO t1 (col2) VALUES (NULL); +ERROR 23000: Column 'col2' cannot be null +INSERT INTO t1 (col1) VALUES (2); +ERROR HY000: Field 'col2' doesn't have a default value +INSERT INTO t1 VALUES(default(col1),default(col2)); +ERROR HY000: Field 'col2' doesn't have a default value +INSERT INTO t1 (col1) SELECT 1; +ERROR HY000: Field 'col2' doesn't have a default value +INSERT INTO t1 SELECT 1,NULL; +ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +INSERT IGNORE INTO t1 values (NULL,NULL); +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col1' at row 1 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'col2' at row 1 +INSERT IGNORE INTO t1 (col1) values (3); +Warnings: +Warning 1364 Field 'col2' doesn't have a default value +INSERT IGNORE INTO t1 () values (); +Warnings: +Warning 1364 Field 'col2' doesn't have a default value +SELECT * FROM t1; +col1 col2 +1 hello +99 hello2 +0 +3 +99 +DROP TABLE t1; +set sql_mode='traditional'; +create table t1 (charcol char(255), varcharcol varchar(255), +binarycol binary(255), varbinarycol varbinary(255), tinytextcol tinytext, +tinyblobcol tinyblob); +insert into t1 (charcol) values (repeat('x',256)); +ERROR 22001: Data too long for column 'charcol' at row 1 +insert into t1 (varcharcol) values (repeat('x',256)); +ERROR 22001: Data too long for column 'varcharcol' at row 1 +insert into t1 (binarycol) values (repeat('x',256)); +ERROR 22001: Data too long for column 'binarycol' at row 1 +insert into t1 (varbinarycol) values (repeat('x',256)); +ERROR 22001: Data too long for column 'varbinarycol' at row 1 +insert into t1 (tinytextcol) values (repeat('x',256)); +ERROR 22001: Data too long for column 'tinytextcol' at row 1 +insert into t1 (tinyblobcol) values (repeat('x',256)); +ERROR 22001: Data too long for column 'tinyblobcol' at row 1 +select * from t1; +charcol varcharcol binarycol varbinarycol tinytextcol tinyblobcol +drop table t1; +set sql_mode='traditional'; +create table t1 (col1 datetime); +insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i')); +ERROR 22007: Truncated incorrect datetime value: '31.10.2004 15.30 abc' +insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); +ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_time +insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r')); +ERROR HY000: Incorrect time value: '22:22:33 AM' for function str_to_time +insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T')); +ERROR HY000: Incorrect time value: 'abc' for function str_to_time +set sql_mode=''; +insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i')); +Warnings: +Warning 1292 Truncated incorrect datetime value: '31.10.2004 15.30 abc' +insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); +Warnings: +Error 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_time +insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r')); +Warnings: +Error 1411 Incorrect time value: '22:22:33 AM' for function str_to_time +insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T')); +Warnings: +Error 1411 Incorrect time value: 'abc' for function str_to_time +insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i')); +insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r')); +insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T')); +select * from t1; +col1 +2004-10-31 15:30:00 +NULL +NULL +NULL +2004-10-31 15:30:00 +2004-12-12 11:22:33 +2004-12-12 10:22:59 +set sql_mode='traditional'; +select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') IS NULL; +count(*) +7 +Warnings: +Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_time +Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_time +Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_time +drop table t1; +create table t1 (col1 char(3), col2 integer); +insert into t1 (col1) values (cast(1000 as char(3))); +ERROR 22007: Truncated incorrect CHAR(3) value: '1000' +insert into t1 (col1) values (cast(1000E+0 as char(3))); +ERROR 22007: Truncated incorrect CHAR(3) value: '1000' +insert into t1 (col1) values (cast(1000.0 as char(3))); +ERROR 22007: Truncated incorrect CHAR(3) value: '1000.0' +insert into t1 (col2) values (cast('abc' as signed integer)); +ERROR 22007: Truncated incorrect INTEGER value: 'abc' +insert into t1 (col2) values (10E+0 + 'a'); +ERROR 22007: Truncated incorrect DOUBLE value: 'a' +insert into t1 (col2) values (cast('10a' as unsigned integer)); +ERROR 22007: Truncated incorrect INTEGER value: '10a' +insert into t1 (col2) values (cast('10' as unsigned integer)); +insert into t1 (col2) values (cast('10' as signed integer)); +insert into t1 (col2) values (10E+0 + '0 '); +select * from t1; +col1 col2 +NULL 10 +NULL 10 +NULL 10 +drop table t1; +create table t1 (col1 date, col2 datetime, col3 timestamp); +insert into t1 values (0,0,0); +ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1 +insert into t1 values (0.0,0.0,0.0); +ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1 +insert into t1 (col1) values (convert('0000-00-00',date)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +insert into t1 (col1) values (cast('0000-00-00' as date)); +ERROR 22007: Truncated incorrect datetime value: '0000-00-00' +set sql_mode='no_zero_date'; +insert into t1 values (0,0,0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1265 Data truncated for column 'col3' at row 1 +insert into t1 values (0.0,0.0,0.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col2' at row 1 +Warning 1265 Data truncated for column 'col3' at row 1 +drop table t1; +set sql_mode='traditional'; +create table t1 (col1 date); +insert ignore into t1 values ('0000-00-00'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +insert into t1 select * from t1; +ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 +insert ignore into t1 values ('0000-00-00'); +Warnings: +Warning 1265 Data truncated for column 'col1' at row 1 +insert ignore into t1 (col1) values (cast('0000-00-00' as date)); +Warnings: +Warning 1292 Truncated incorrect datetime value: '0000-00-00' +insert into t1 select * from t1; +ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 +alter table t1 modify col1 datetime; +ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col1' at row 1 +alter ignore table t1 modify col1 datetime; +Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 +Warning 1264 Out of range value adjusted for column 'col1' at row 2 +insert into t1 select * from t1; +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1 +select * from t1; +col1 +0000-00-00 00:00:00 +0000-00-00 00:00:00 +NULL +drop table t1; +create table t1 (col1 tinyint); +drop procedure if exists t1; +Warnings: +Note 1305 PROCEDURE t1 does not exist +create procedure t1 () begin declare exit handler for sqlexception +select'a'; insert into t1 values (200); end;| +call t1(); +a +a +select * from t1; +col1 +drop procedure t1; +drop table t1; +set sql_mode=@org_mode; +SET @@sql_mode = 'traditional'; +CREATE TABLE t1 (i int not null); +INSERT INTO t1 VALUES (); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT(i)); +ERROR HY000: Field 'i' doesn't have a default value +ALTER TABLE t1 ADD j int; +INSERT INTO t1 SET j = 1; +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT; +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT(i); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT,1); +ERROR HY000: Field 'i' doesn't have a default value +DROP TABLE t1; +SET @@sql_mode = ''; +CREATE TABLE t1 (i int not null); +INSERT INTO t1 VALUES (); +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT); +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT(i)); +ERROR HY000: Field 'i' doesn't have a default value +ALTER TABLE t1 ADD j int; +INSERT INTO t1 SET j = 1; +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT; +Warnings: +Warning 1364 Field 'i' doesn't have a default value +INSERT INTO t1 SET j = 1, i = DEFAULT(i); +ERROR HY000: Field 'i' doesn't have a default value +INSERT INTO t1 VALUES (DEFAULT,1); +Warnings: +Warning 1364 Field 'i' doesn't have a default value +DROP TABLE t1; +set @@sql_mode='traditional'; +create table t1(a varchar(65537)); +ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +create table t1(a varbinary(65537)); +ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +set @@sql_mode='traditional'; +create table t1(a int, b date not null); +alter table t1 modify a bigint unsigned not null; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bigint(20) unsigned NOT NULL, + `b` date NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @@sql_mode='traditional'; +create table t1 (d date); +insert into t1 values ('2000-10-00'); +ERROR 22007: Incorrect date value: '2000-10-00' for column 'd' at row 1 +insert into t1 values (1000); +ERROR 22007: Incorrect date value: '1000' for column 'd' at row 1 +insert into t1 values ('2000-10-01'); +update t1 set d = 1100; +ERROR 22007: Incorrect date value: '1100' for column 'd' at row 1 +select * from t1; +d +2000-10-01 +drop table t1; +set @@sql_mode='traditional'; +create table t1(a int, b timestamp); +alter table t1 add primary key(a); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + `b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1(a int, b timestamp default 20050102030405); +alter table t1 add primary key(a); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + `b` timestamp NOT NULL default '2005-01-02 03:04:05', + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @@sql_mode='traditional'; +create table t1(a bit(2)); +insert into t1 values(b'101'); +ERROR 22001: Data too long for column 'a' at row 1 +select * from t1; +a +drop table t1; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 8652ed89a65..14806279362 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -50,7 +50,7 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1276 Field or reference 'a' of SELECT #3 was resolved in SELECT #1 Note 1276 Field or reference 'b.a' of SELECT #3 was resolved in SELECT #1 -Note 1003 select 1 AS `1` from (select 1 AS `a`) b having ((select b.a AS `a`) = 1) +Note 1003 select 1 AS `1` from (select 1 AS `a`) `b` having ((select `b`.`a` AS `a`) = 1) SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1; 1 1 @@ -117,15 +117,17 @@ SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'a'); SELECT (SELECT 1.5,2,'a') = ROW(1.5,2,'b'); (SELECT 1.5,2,'a') = ROW(1.5,2,'b') 0 -SELECT (SELECT 1.5,2,'a') = ROW('b',2,'b'); -(SELECT 1.5,2,'a') = ROW('b',2,'b') +SELECT (SELECT 1.5,2,'a') = ROW('1.5b',2,'b'); +(SELECT 1.5,2,'a') = ROW('1.5b',2,'b') 0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '1.5b' SELECT (SELECT 'b',2,'a') = ROW(1.5,2,'a'); (SELECT 'b',2,'a') = ROW(1.5,2,'a') 0 -SELECT (SELECT 1.5,2,'a') = ROW(1.5,'c','a'); -(SELECT 1.5,2,'a') = ROW(1.5,'c','a') -0 +SELECT (SELECT 1.5,2,'a') = ROW(1.5,'2','a'); +(SELECT 1.5,2,'a') = ROW(1.5,'2','a') +1 SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a'); (SELECT 1.5,'c','a') = ROW(1.5,2,'a') 0 @@ -186,7 +188,7 @@ id select_type table type possible_keys key key_len ref rows Extra 4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL Warnings: -Note 1003 (select test.t2.a AS `a`,test.t2.b AS `b` from test.t2 where (test.t2.b = (select test.t3.a AS `a` from test.t3 order by test.t3.a desc limit 1))) union (select test.t4.a AS `a`,test.t4.b AS `b` from test.t4 where (test.t4.b = (select (max(test.t2.a) * 4) AS `max(t2.a)*4` from test.t2)) order by a) +Note 1003 (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`b` = (select `test`.`t3`.`a` AS `a` from `test`.`t3` order by 1 desc limit 1))) union (select `test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t4` where (`test`.`t4`.`b` = (select (max(`test`.`t2`.`a`) * 4) AS `max(t2.a)*4` from `test`.`t2`)) order by `a`) select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2; (select a from t3 where a<t2.a*4 order by 1 desc limit 1) a 3 1 @@ -202,7 +204,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 DERIVED t2 ALL NULL NULL NULL NULL 2 Using where 2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort Warnings: -Note 1003 select (select test.t3.a AS `a` from test.t3 where (test.t3.a < 8) order by test.t3.a desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,tt.a AS `a` from (select test.t2.a AS `a`,test.t2.b AS `b` from test.t2 where (test.t2.a > 1)) tt +Note 1003 select (select `test`.`t3`.`a` AS `a` from `test`.`t3` where (`test`.`t3`.`a` < 8) order by 1 desc limit 1) AS `(select t3.a from t3 where a<8 order by 1 desc limit 1)`,`tt`.`a` AS `a` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` > 1)) `tt` select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1); a 2 @@ -223,7 +225,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 Using where Warnings: Note 1276 Field or reference 't4.a' of SELECT #3 was resolved in SELECT #1 -Note 1003 select test.t4.b AS `b`,(select avg((test.t2.a + (select min(test.t3.a) AS `min(t3.a)` from test.t3 where (test.t3.a >= test.t4.a)))) AS `avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a))` from test.t2) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from test.t4 +Note 1003 select `test`.`t4`.`b` AS `b`,(select avg((`test`.`t2`.`a` + (select min(`test`.`t3`.`a`) AS `min(t3.a)` from `test`.`t3` where (`test`.`t3`.`a` >= `test`.`t4`.`a`)))) AS `avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a))` from `test`.`t2`) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from `test`.`t4` select * from t3 where exists (select * from t2 where t2.b=t3.a); a 7 @@ -269,7 +271,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where 2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 where <nop>((test.t3.a >= (select min(test.t2.b) from test.t2))) +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= (select min(`test`.`t2`.`b`) from `test`.`t2`))) select * from t3 where a >= all (select b from t2); a 7 @@ -313,7 +315,7 @@ NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL Warnings: Note 1276 Field or reference 't2.a' of SELECT #2 was resolved in SELECT #1 Note 1276 Field or reference 't2.a' of SELECT #3 was resolved in SELECT #1 -Note 1003 select (select test.t1.a AS `a` from test.t1 where (test.t1.a = test.t2.a) union select test.t5.a AS `a` from test.t5 where (test.t5.a = test.t2.a)) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,test.t2.a AS `a` from test.t2 +Note 1003 select (select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = `test`.`t2`.`a`) union select `test`.`t5`.`a` AS `a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`)) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2` select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; ERROR 21000: Subquery returns more than 1 row create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq)); @@ -331,7 +333,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 Using index Warnings: Note 1276 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1 -Note 1003 select test.t6.patient_uq AS `patient_uq`,test.t6.clinic_uq AS `clinic_uq` from test.t6 where exists(select 1 AS `Not_used` from test.t7 where (test.t7.uq = test.t6.clinic_uq)) +Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where exists(select 1 AS `Not_used` from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`)) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; @@ -361,12 +363,12 @@ INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1'); INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1'); EXPLAIN EXTENDED SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t8 const PRIMARY PRIMARY 35 const 1 Using index -4 SUBQUERY t8 const PRIMARY PRIMARY 35 1 Using index -2 SUBQUERY t8 const PRIMARY PRIMARY 35 const 1 -3 SUBQUERY t8 const PRIMARY PRIMARY 35 1 Using index +1 PRIMARY t8 ref PRIMARY PRIMARY 37 const 1 Using where; Using index +4 SUBQUERY t8 ref PRIMARY PRIMARY 37 1 Using where; Using index +2 SUBQUERY t8 ref PRIMARY PRIMARY 37 const 1 Using where +3 SUBQUERY t8 ref PRIMARY PRIMARY 37 1 Using where; Using index Warnings: -Note 1003 select test.t8.pseudo AS `pseudo`,(select test.t8.email AS `email` from test.t8 where (test.t8.pseudo = (select test.t8.pseudo AS `pseudo` from test.t8 where (test.t8.pseudo = _latin1'joce')))) AS `(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'))` from test.t8 where (test.t8.pseudo = (select test.t8.pseudo AS `pseudo` from test.t8 where (test.t8.pseudo = _latin1'joce'))) +Note 1003 select `test`.`t8`.`pseudo` AS `pseudo`,(select `test`.`t8`.`email` AS `email` from `test`.`t8` where (`test`.`t8`.`pseudo` = (select `test`.`t8`.`pseudo` AS `pseudo` from `test`.`t8` where (`test`.`t8`.`pseudo` = _latin1'joce')))) AS `(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'))` from `test`.`t8` where (`test`.`t8`.`pseudo` = (select `test`.`t8`.`pseudo` AS `pseudo` from `test`.`t8` where (`test`.`t8`.`pseudo` = _latin1'joce'))) SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM t8 WHERE pseudo='joce'); ERROR 21000: Operand should contain 1 column(s) @@ -390,15 +392,15 @@ INSERT INTO t1 (topic,date,pseudo) VALUES ('43506','2002-10-02','joce'),('40143','2002-08-03','joce'); EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL PRIMARY 41 NULL 2 Using where; Using index +1 SIMPLE t1 index NULL PRIMARY 43 NULL 2 Using where; Using index Warnings: -Note 1003 select distinct test.t1.date AS `date` from test.t1 where (test.t1.date = 20020803) +Note 1003 select distinct `test`.`t1`.`date` AS `date` from `test`.`t1` where (`test`.`t1`.`date` = 20020803) EXPLAIN EXTENDED SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t1 index NULL PRIMARY 41 NULL 2 Using where; Using index +2 SUBQUERY t1 index NULL PRIMARY 43 NULL 2 Using where; Using index Warnings: -Note 1003 select (select distinct test.t1.date AS `date` from test.t1 where (test.t1.date = 20020803)) AS `(SELECT DISTINCT date FROM t1 WHERE date='2002-08-03')` +Note 1003 select (select distinct `test`.`t1`.`date` AS `date` from `test`.`t1` where (`test`.`t1`.`date` = 20020803)) AS `(SELECT DISTINCT date FROM t1 WHERE date='2002-08-03')` SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; date 2002-08-03 @@ -419,7 +421,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL Warnings: -Note 1003 select 1 AS `1` from test.t1 +Note 1003 select 1 AS `1` from `test`.`t1` drop table t1; CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL auto_increment, @@ -539,13 +541,13 @@ EXPLAIN EXTENDED SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select max(test.t1.numreponse) AS `MAX(numreponse)` from test.t1 where (test.t1.numeropost = _latin1'1') +Note 1003 select max(`test`.`t1`.`numreponse`) AS `MAX(numreponse)` from `test`.`t1` where (`test`.`t1`.`numeropost` = _latin1'1') EXPLAIN EXTENDED SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select test.t1.numreponse AS `numreponse` from test.t1 where ((test.t1.numeropost = _latin1'1') and (test.t1.numreponse = 3)) +Note 1003 select `test`.`t1`.`numreponse` AS `numreponse` from `test`.`t1` where ((`test`.`t1`.`numreponse` = (select max(`test`.`t1`.`numreponse`) AS `MAX(numreponse)` from `test`.`t1` where (`test`.`t1`.`numeropost` = _latin1'1'))) and (`test`.`t1`.`numeropost` = _latin1'1')) drop table t1; CREATE TABLE t1 (a int(1)); INSERT INTO t1 VALUES (1); @@ -652,6 +654,14 @@ x 3 3 INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2; +select * from t1; +x +1 +2 +3 +3 +11 +11 INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t2)); ERROR 42S22: Unknown column 'x' in 'field list' INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); @@ -713,7 +723,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index Warnings: Note 1249 Select 2 was reduced during optimization -Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = 1) +Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = 1) SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); id 1 @@ -726,7 +736,7 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1249 Select 3 was reduced during optimization Note 1249 Select 2 was reduced during optimization -Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = (1 + 1)) +Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where (`test`.`t2`.`id` = (1 + 1)) EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL id 5 NULL 2 Using where; Using index @@ -734,7 +744,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL Warnings: -Note 1003 select test.t2.id AS `id` from test.t2 where <in_optimizer>(test.t2.id,<exists>(select 1 AS `Not_used` having (<cache>(test.t2.id) = <null_helper>(1)) union select 1 AS `Not_used` having (<cache>(test.t2.id) = <null_helper>(3)))) +Note 1003 select `test`.`t2`.`id` AS `id` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`id`,<exists>(select 1 AS `Not_used` having (<cache>(`test`.`t2`.`id`) = <null_helper>(1)) union select 1 AS `Not_used` having (<cache>(`test`.`t2`.`id`) = <null_helper>(3)))) SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 3); id SELECT * FROM t2 WHERE id IN (SELECT 5 UNION SELECT 2); @@ -860,7 +870,7 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1276 Field or reference 'a' of SELECT #2 was resolved in SELECT #1 Note 1249 Select 2 was reduced during optimization -Note 1003 select (test.t1.a + 1) AS `(select a+1)` from test.t1 +Note 1003 select (`test`.`t1`.`a` + 1) AS `(select a+1)` from `test`.`t1` select (select a+1) from t1; (select a+1) 2.5 @@ -882,7 +892,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL PRIMARY 4 NULL 4 Using index 2 DEPENDENT SUBQUERY t2 index_subquery a a 5 func 2 Using index Warnings: -Note 1003 select test.t1.a AS `a`,<in_optimizer>(test.t1.a,<exists>(<index_lookup>(<cache>(test.t1.a) in t2 on a chicking NULL))) AS `t1.a in (select t2.a from t2)` from test.t1 +Note 1003 select `test`.`t1`.`a` AS `a`,<in_optimizer>(`test`.`t1`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in t2 on a checking NULL))) AS `t1.a in (select t2.a from t2)` from `test`.`t1` CREATE TABLE t3 (a int(11) default '0'); INSERT INTO t3 VALUES (1),(2),(3); SELECT t1.a, t1.a in (select t2.a from t2,t3 where t3.a=t2.a) FROM t1; @@ -897,7 +907,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY t2 ref_or_null a a 5 func 2 Using where; Using index 2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 Using where Warnings: -Note 1003 select test.t1.a AS `a`,<in_optimizer>(test.t1.a,<exists>(select 1 AS `Not_used` from test.t2 join test.t3 where ((test.t3.a = test.t2.a) and ((<cache>(test.t1.a) = test.t2.a) or isnull(test.t2.a))) having <is_not_null_test>(test.t2.a))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from test.t1 +Note 1003 select `test`.`t1`.`a` AS `a`,<in_optimizer>(`test`.`t1`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t2`.`a`) and ((<cache>(`test`.`t1`.`a`) = `test`.`t2`.`a`) or isnull(`test`.`t2`.`a`))) having <is_not_null_test>(`test`.`t2`.`a`))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from `test`.`t1` drop table t1,t2,t3; create table t1 (a float); select 10.5 IN (SELECT * from t1 LIMIT 1); @@ -913,7 +923,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a'),(select c from t a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,2,'a') (select c from t1 where a=t2.a) 1 1 a 2 0 b -NULL NULL NULL +NULL 0 NULL select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b'),(select c from t1 where a=t2.a) from t2; a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,3,'b') (select c from t1 where a=t2.a) 1 0 a @@ -923,7 +933,7 @@ select a, (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c'),(select c from t a (select a,b,c from t1 where t1.a=t2.a) = ROW(a,4,'c') (select c from t1 where a=t2.a) 1 0 a 2 0 b -NULL NULL NULL +NULL 0 NULL drop table t1,t2; create table t1 (a int, b real, c varchar(10)); insert into t1 values (1, 1, 'a'), (2,2,'b'), (NULL, 2, 'b'); @@ -1009,19 +1019,19 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found 2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select sql_no_cache (select sql_no_cache rand() AS `RAND()` from test.t1) AS `(SELECT RAND() FROM t1)` from test.t1 +Note 1003 select sql_no_cache (select sql_no_cache rand() AS `RAND()` from `test`.`t1`) AS `(SELECT RAND() FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT ENCRYPT('test') FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found 2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select sql_no_cache (select sql_no_cache ecrypt(_latin1'test') AS `ENCRYPT('test')` from test.t1) AS `(SELECT ENCRYPT('test') FROM t1)` from test.t1 +Note 1003 select sql_no_cache (select sql_no_cache encrypt(_latin1'test') AS `ENCRYPT('test')` from `test`.`t1`) AS `(SELECT ENCRYPT('test') FROM t1)` from `test`.`t1` EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found 2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select sql_no_cache (select sql_no_cache benchmark(1,1) AS `BENCHMARK(1,1)` from test.t1) AS `(SELECT BENCHMARK(1,1) FROM t1)` from test.t1 +Note 1003 select sql_no_cache (select sql_no_cache benchmark(1,1) AS `BENCHMARK(1,1)` from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1` drop table t1; CREATE TABLE `t1` ( `mot` varchar(30) character set latin1 NOT NULL default '', @@ -1077,24 +1087,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0', - `(SELECT 1)` bigint(20) NOT NULL default '0' + `a` bigint(1) NOT NULL default '0', + `(SELECT 1)` bigint(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0', - `(SELECT a)` bigint(20) NOT NULL default '0' + `a` bigint(1) NOT NULL default '0', + `(SELECT a)` bigint(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0', - `(SELECT a+0)` bigint(20) NOT NULL default '0' + `a` bigint(1) NOT NULL default '0', + `(SELECT a+0)` bigint(3) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a; @@ -1116,7 +1126,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 UNCACHEABLE SUBQUERY t1 ALL NULL NULL NULL NULL 3 3 UNCACHEABLE SUBQUERY t1 ALL NULL NULL NULL NULL 3 Warnings: -Note 1003 select sql_no_cache test.t1.a AS `a`,(select sql_no_cache (select sql_no_cache rand() AS `rand()` from test.t1 limit 1) AS `(select rand() from t1 limit 1)` from test.t1 limit 1) AS `(select (select rand() from t1 limit 1) from t1 limit 1)` from test.t1 +Note 1003 select sql_no_cache `test`.`t1`.`a` AS `a`,(select sql_no_cache (select sql_no_cache rand() AS `rand()` from `test`.`t1` limit 1) AS `(select rand() from t1 limit 1)` from `test`.`t1` limit 1) AS `(select (select rand() from t1 limit 1) from t1 limit 1)` from `test`.`t1` drop table t1; select t1.Continent, t2.Name, t2.Population from t1 LEFT JOIN t2 ON t1.Code = t2.Country where t2.Population IN (select max(t2.Population) AS Population from t2, t1 where t2.Country = t1.Code group by Continent); ERROR 42S02: Table 'test.t1' doesn't exist @@ -1170,7 +1180,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: -Note 1003 select <in_optimizer>(0,<exists>(select 1 AS `Not_used` from test.t1 a)) AS `0 IN (SELECT 1 FROM t1 a)` +Note 1003 select <in_optimizer>(0,<exists>(select 1 AS `Not_used` from `test`.`t1` `a`)) AS `0 IN (SELECT 1 FROM t1 a)` INSERT INTO t1 (pseudo) VALUES ('test1'); SELECT 0 IN (SELECT 1 FROM t1 a); 0 IN (SELECT 1 FROM t1 a) @@ -1180,7 +1190,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE Warnings: -Note 1003 select <in_optimizer>(0,<exists>(select 1 AS `Not_used` from test.t1 a)) AS `0 IN (SELECT 1 FROM t1 a)` +Note 1003 select <in_optimizer>(0,<exists>(select 1 AS `Not_used` from `test`.`t1` `a`)) AS `0 IN (SELECT 1 FROM t1 a)` drop table t1; CREATE TABLE `t1` ( `i` int(11) NOT NULL default '0', @@ -1190,7 +1200,7 @@ INSERT INTO t1 VALUES (1); UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i)); UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i)); UPDATE t1 SET t.i=i+(SELECT MAX(i) FROM (SELECT 1) t); -ERROR 42S02: Unknown table 't' in field list +ERROR 42S22: Unknown column 't.i' in 'field list' select * from t1; i 1 @@ -1225,7 +1235,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref salary salary 5 const 1 Using where 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away Warnings: -Note 1003 select test.t1.id AS `id` from test.t1 where (test.t1.salary = (select max(test.t1.salary) AS `MAX(salary)` from test.t1)) +Note 1003 select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`salary` = (select max(`test`.`t1`.`salary`) AS `MAX(salary)` from `test`.`t1`)) drop table t1; CREATE TABLE t1 ( ID int(10) unsigned NOT NULL auto_increment, @@ -1287,7 +1297,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL PRIMARY 4 NULL 4 Using where; Using index 2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(<primary_index_lookup>(<cache>(test.t2.a) in t1 on PRIMARY))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<primary_index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on PRIMARY))) select * from t2 where t2.a in (select a from t1 where t1.b <> 30); a 2 @@ -1297,7 +1307,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL PRIMARY 4 NULL 4 Using where; Using index 2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index; Using where Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(<primary_index_lookup>(<cache>(test.t2.a) in t1 on PRIMARY where (test.t1.b <> 30)))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<primary_index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on PRIMARY where (`test`.`t1`.`b` <> 30)))) select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); a 2 @@ -1308,7 +1318,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 func 1 Using where 2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Using where; Using index Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(select 1 AS `Not_used` from test.t1 join test.t3 where ((test.t1.b = test.t3.a) and (<cache>(test.t2.a) = test.t1.a)))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))) drop table t1, t2, t3; create table t1 (a int, b int, index a (a,b)); create table t2 (a int, index a (a)); @@ -1326,7 +1336,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL a 5 NULL 4 Using where; Using index 2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 Using index Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(<index_lookup>(<cache>(test.t2.a) in t1 on a))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a))) select * from t2 where t2.a in (select a from t1 where t1.b <> 30); a 2 @@ -1336,7 +1346,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL a 5 NULL 4 Using where; Using index 2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 Using index; Using where Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(<index_lookup>(<cache>(test.t2.a) in t1 on a where (test.t1.b <> 30)))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (`test`.`t1`.`b` <> 30)))) select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); a 2 @@ -1344,10 +1354,10 @@ a explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL a 5 NULL 4 Using where; Using index -2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 Using where; Using index -2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 Using where; Using index +2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 Using index +2 DEPENDENT SUBQUERY t1 ref a a 10 func,test.t3.a 1167 Using where; Using index Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(select 1 AS `Not_used` from test.t1 join test.t3 where ((test.t1.b = test.t3.a) and (<cache>(test.t2.a) = test.t1.a)))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t1`.`b` = `test`.`t3`.`a`) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))) insert into t1 values (3,31); select * from t2 where t2.a in (select a from t1 where t1.b <> 30); a @@ -1363,7 +1373,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index NULL a 5 NULL 4 Using where; Using index 2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 Using index; Using where Warnings: -Note 1003 select test.t2.a AS `a` from test.t2 where <in_optimizer>(test.t2.a,<exists>(<index_lookup>(<cache>(test.t2.a) in t1 on a where (test.t1.b <> 30)))) +Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (`test`.`t1`.`b` <> 30)))) drop table t1, t2, t3; create table t1 (a int, b int); create table t2 (a int, b int); @@ -1420,7 +1430,7 @@ explain extended (select * from t1); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Warnings: -Note 1003 (select test.t1.s1 AS `s1` from test.t1) +Note 1003 (select `test`.`t1`.`s1` AS `s1` from `test`.`t1`) (select * from t1); s1 tttt @@ -1454,25 +1464,25 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 6 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 2 Using index Warnings: -Note 1003 select test.t1.s1 AS `s1`,not(<in_optimizer>(test.t1.s1,<exists>(<index_lookup>(<cache>(test.t1.s1) in t2 on s1 chicking NULL)))) AS `s1 NOT IN (SELECT s1 FROM t2)` from test.t1 +Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL)))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1` explain extended select s1, s1 = ANY (SELECT s1 FROM t2) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 6 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 2 Using index Warnings: -Note 1003 select test.t1.s1 AS `s1`,<in_optimizer>(test.t1.s1,<exists>(<index_lookup>(<cache>(test.t1.s1) in t2 on s1 chicking NULL))) AS `s1 = ANY (SELECT s1 FROM t2)` from test.t1 +Note 1003 select `test`.`t1`.`s1` AS `s1`,<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL))) AS `s1 = ANY (SELECT s1 FROM t2)` from `test`.`t1` explain extended select s1, s1 <> ALL (SELECT s1 FROM t2) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 6 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 2 Using index Warnings: -Note 1003 select test.t1.s1 AS `s1`,not(<in_optimizer>(test.t1.s1,<exists>(<index_lookup>(<cache>(test.t1.s1) in t2 on s1 chicking NULL)))) AS `s1 <> ALL (SELECT s1 FROM t2)` from test.t1 +Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL)))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1` explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 6 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 1 Using index; Using where Warnings: -Note 1003 select test.t1.s1 AS `s1`,not(<in_optimizer>(test.t1.s1,<exists>(<index_lookup>(<cache>(test.t1.s1) in t2 on s1 chicking NULL where (test.t2.s1 < _latin1'a2'))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from test.t1 +Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where (`test`.`t2`.`s1` < _latin1'a2'))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1` drop table t1,t2; create table t2 (a int, b int); create table t3 (a int); @@ -1487,7 +1497,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < (select max(test.t2.b) from test.t2))) +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < (select max(`test`.`t2`.`b`) from `test`.`t2`))) select * from t3 where a >= some (select b from t2); a explain extended select * from t3 where a >= some (select b from t2); @@ -1495,7 +1505,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 where <nop>((test.t3.a >= (select min(test.t2.b) from test.t2))) +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= (select min(`test`.`t2`.`b`) from `test`.`t2`))) select * from t3 where a >= all (select b from t2 group by 1); a 6 @@ -1506,7 +1516,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < <max>(select test.t2.b AS `b` from test.t2 group by test.t2.b))) +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < <max>(select `test`.`t2`.`b` AS `b` from `test`.`t2` group by 1))) select * from t3 where a >= some (select b from t2 group by 1); a explain extended select * from t3 where a >= some (select b from t2 group by 1); @@ -1514,7 +1524,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 where <nop>((test.t3.a >= <min>(select test.t2.b AS `b` from test.t2 group by test.t2.b))) +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= <min>(select `test`.`t2`.`b` AS `b` from `test`.`t2` group by 1))) select * from t3 where NULL >= any (select b from t2); a explain extended select * from t3 where NULL >= any (select b from t2); @@ -1522,7 +1532,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` select * from t3 where NULL >= any (select b from t2 group by 1); a explain extended select * from t3 where NULL >= any (select b from t2 group by 1); @@ -1530,7 +1540,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` select * from t3 where NULL >= some (select b from t2); a explain extended select * from t3 where NULL >= some (select b from t2); @@ -1538,7 +1548,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` select * from t3 where NULL >= some (select b from t2 group by 1); a explain extended select * from t3 where NULL >= some (select b from t2 group by 1); @@ -1546,7 +1556,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` insert into t2 values (2,2), (2,1), (3,3), (3,1); select * from t3 where a > all (select max(b) from t2 group by a); a @@ -1557,7 +1567,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where 2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort Warnings: -Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a <= <max>(select max(test.t2.b) AS `max(b)` from test.t2 group by test.t2.a))) +Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` <= <max>(select max(`test`.`t2`.`b`) AS `max(b)` from `test`.`t2` group by `test`.`t2`.`a`))) drop table t2, t3; CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ; INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now()); @@ -1590,6 +1600,8 @@ insert into t1 values (2); set sort_buffer_size = (select s1 from t1); ERROR 21000: Subquery returns more than 1 row do (select * from t1); +Warnings: +Error 1242 Subquery returns more than 1 row drop table t1; create table t1 (s1 char); insert into t1 values ('e'); @@ -1606,7 +1618,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION t1 system NULL NULL NULL NULL 1 NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL Warnings: -Note 1003 select test.t1.s1 AS `s1` from test.t1 +Note 1003 select `test`.`t1`.`s1` AS `s1` from `test`.`t1` drop table t1; CREATE TABLE t1 (number char(11) NOT NULL default '') ENGINE=MyISAM CHARSET=latin1; INSERT INTO t1 VALUES ('69294728265'),('18621828126'),('89356874041'),('95895001874'); @@ -1626,7 +1638,7 @@ ERROR 42S22: Unknown column 't1.s2' in 'where clause' select * from t1 where (select count(*) from t2 group by t1.s2) = 1; ERROR 42S22: Unknown column 't1.s2' in 'group statement' select count(*) from t2 group by t1.s2; -ERROR 42S02: Unknown table 't1' in group statement +ERROR 42S22: Unknown column 't1.s2' in 'group statement' drop table t1, t2; CREATE TABLE t1(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC VARCHAR(20) DEFAULT NULL,PRIMARY KEY (COLA, COLB)); CREATE TABLE t2(COLA FLOAT NOT NULL,COLB FLOAT NOT NULL,COLC CHAR(1) NOT NULL,PRIMARY KEY (COLA)); @@ -1725,14 +1737,14 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 12 Using where 2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index; Using where Warnings: -Note 1003 select test.t1.id AS `id`,test.t1.text AS `text` from test.t1 where not(<in_optimizer>(test.t1.id,<exists>(<primary_index_lookup>(<cache>(test.t1.id) in t1 on PRIMARY where (test.t1.id < 8))))) +Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `test`.`t1` where not(<in_optimizer>(`test`.`t1`.`id`,<exists>(<primary_index_lookup>(<cache>(`test`.`t1`.`id`) in t1 on PRIMARY where (`test`.`t1`.`id` < 8))))) explain extended select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY tt ALL NULL NULL NULL NULL 12 Using where -2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 7 Using where; Using index +2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 Using where; Using index Warnings: Note 1276 Field or reference 'tt.id' of SELECT #2 was resolved in SELECT #1 -Note 1003 select test.tt.id AS `id`,test.tt.text AS `text` from test.t1 tt where not(exists(select test.t1.id AS `id` from test.t1 where ((test.t1.id < 8) and ((test.t1.id = test.tt.id) or isnull(test.t1.id))) having (test.t1.id is not null))) +Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where not(exists(select `test`.`t1`.`id` AS `id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))) insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001'); create table t2 (id int not null, text varchar(20) not null default '', primary key (id)); insert into t2 (id, text) values (1, 'text1'), (2, 'text2'), (3, 'text3'), (4, 'text4'), (5, 'text5'), (6, 'text6'), (7, 'text7'), (8, 'text8'), (9, 'text9'), (10, 'text10'), (11, 'text1'), (12, 'text2'), (13, 'text3'), (14, 'text4'), (15, 'text5'), (16, 'text6'), (17, 'text7'), (18, 'text8'), (19, 'text9'), (20, 'text10'),(21, 'text1'), (22, 'text2'), (23, 'text3'), (24, 'text4'), (25, 'text5'), (26, 'text6'), (27, 'text7'), (28, 'text8'), (29, 'text9'), (30, 'text10'), (31, 'text1'), (32, 'text2'), (33, 'text3'), (34, 'text4'), (35, 'text5'), (36, 'text6'), (37, 'text7'), (38, 'text8'), (39, 'text9'), (40, 'text10'), (41, 'text1'), (42, 'text2'), (43, 'text3'), (44, 'text4'), (45, 'text5'), (46, 'text6'), (47, 'text7'), (48, 'text8'), (49, 'text9'), (50, 'text10'); @@ -1758,7 +1770,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 Using where Warnings: -Note 1003 select test.a.id AS `id`,test.a.text AS `text`,test.b.id AS `id`,test.b.text AS `text`,test.c.id AS `id`,test.c.text AS `text` from test.t1 a left join test.t2 b on(((test.a.id = test.b.id) or isnull(test.b.id))) join test.t1 c where (if(isnull(test.b.id),1000,test.b.id) = test.c.id) +Note 1003 select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`) drop table t1,t2; create table t1 (a int); insert into t1 values (1); @@ -1781,10 +1793,18 @@ SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t id c 1 1 2 0 +SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id); +id c +1 1 +2 0 SELECT t1.id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY t1.id; id c 1 1 2 0 +SELECT id, ( SELECT COUNT(t.id) FROM t2 AS t WHERE t.id = t1.id ) AS c FROM t1 LEFT JOIN t2 USING (id) ORDER BY id; +id c +1 1 +2 0 DROP TABLE t1,t2; CREATE TABLE t1 ( a int, b int ); INSERT INTO t1 VALUES (1,1),(2,2),(3,3); @@ -2260,7 +2280,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where Warnings: Note 1276 Field or reference 'up.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select test.up.a AS `a`,test.up.b AS `b` from test.t1 up where exists(select 1 AS `Not_used` from test.t1 where (test.t1.a = test.up.a)) +Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where exists(select 1 AS `Not_used` from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`)) drop table t1; CREATE TABLE t1 (t1_a int); INSERT INTO t1 VALUES (1); @@ -2797,19 +2817,19 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 Using where Warnings: -Note 1003 select test.t1.one AS `one`,test.t1.two AS `two`,<in_optimizer>((test.t1.one,test.t1.two),<exists>(select test.t2.one AS `one`,test.t2.two AS `two` from test.t2 where ((test.t2.flag = _latin1'0') and ((<cache>(test.t1.one) = test.t2.one) or isnull(test.t2.one)) and ((<cache>(test.t1.two) = test.t2.two) or isnull(test.t2.two))) having (<is_not_null_test>(test.t2.one) and <is_not_null_test>(test.t2.two)))) AS `test` from test.t1 +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where ((`test`.`t2`.`flag` = _latin1'0') and ((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)) and ((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`))) having (<is_not_null_test>(`test`.`t2`.`one`) and <is_not_null_test>(`test`.`t2`.`two`)))) AS `test` from `test`.`t1` explain extended SELECT one,two from t1 where ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = 'N'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 Using where Warnings: -Note 1003 select test.t1.one AS `one`,test.t1.two AS `two` from test.t1 where <in_optimizer>((test.t1.one,test.t1.two),<exists>(select test.t2.one AS `one`,test.t2.two AS `two` from test.t2 where ((test.t2.flag = _latin1'N') and (<cache>(test.t1.one) = test.t2.one) and (<cache>(test.t1.two) = test.t2.two)))) +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two` from `test`.`t1` where <in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where ((`test`.`t2`.`flag` = _latin1'N') and (<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) and (<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`)))) explain extended SELECT one,two,ROW(one,two) IN (SELECT one,two FROM t2 WHERE flag = '0' group by one,two) as 'test' from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort Warnings: -Note 1003 select test.t1.one AS `one`,test.t1.two AS `two`,<in_optimizer>((test.t1.one,test.t1.two),<exists>(select test.t2.one AS `one`,test.t2.two AS `two` from test.t2 where (test.t2.flag = _latin1'0') group by test.t2.one,test.t2.two having (((<cache>(test.t1.one) = test.t2.one) or isnull(test.t2.one)) and ((<cache>(test.t1.two) = test.t2.two) or isnull(test.t2.two)) and <is_not_null_test>(test.t2.one) and <is_not_null_test>(test.t2.two)))) AS `test` from test.t1 +Note 1003 select `test`.`t1`.`one` AS `one`,`test`.`t1`.`two` AS `two`,<in_optimizer>((`test`.`t1`.`one`,`test`.`t1`.`two`),<exists>(select `test`.`t2`.`one` AS `one`,`test`.`t2`.`two` AS `two` from `test`.`t2` where (`test`.`t2`.`flag` = _latin1'0') group by `test`.`t2`.`one`,`test`.`t2`.`two` having (((<cache>(`test`.`t1`.`one`) = `test`.`t2`.`one`) or isnull(`test`.`t2`.`one`)) and ((<cache>(`test`.`t1`.`two`) = `test`.`t2`.`two`) or isnull(`test`.`t2`.`two`)) and <is_not_null_test>(`test`.`t2`.`one`) and <is_not_null_test>(`test`.`t2`.`two`)))) AS `test` from `test`.`t1` DROP TABLE t1,t2; CREATE TABLE t1 (a char(5), b char(5)); INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa'); @@ -2834,3 +2854,136 @@ a 3 4 DROP TABLE t1,t2,t3; +create table t1 (df decimal(5,1)); +insert into t1 values(1.1); +insert into t1 values(2.2); +select * from t1 where df <= all (select avg(df) from t1 group by df); +df +1.1 +select * from t1 where df >= all (select avg(df) from t1 group by df); +df +2.2 +drop table t1; +create table t1 (df decimal(5,1)); +insert into t1 values(1.1); +select 1.1 * exists(select * from t1); +1.1 * exists(select * from t1) +1.1 +drop table t1; +CREATE TABLE t1 ( +grp int(11) default NULL, +a decimal(10,2) default NULL); +insert into t1 values (1, 1), (2, 2), (2, 3), (3, 4), (3, 5), (3, 6), (NULL, NULL); +select * from t1; +grp a +1 1.00 +2 2.00 +2 3.00 +3 4.00 +3 5.00 +3 6.00 +NULL NULL +select min(a) from t1 group by grp; +min(a) +NULL +1.00 +2.00 +4.00 +drop table t1; +CREATE table t1 ( c1 integer ); +INSERT INTO t1 VALUES ( 1 ); +INSERT INTO t1 VALUES ( 2 ); +INSERT INTO t1 VALUES ( 3 ); +CREATE TABLE t2 ( c2 integer ); +INSERT INTO t2 VALUES ( 1 ); +INSERT INTO t2 VALUES ( 4 ); +INSERT INTO t2 VALUES ( 5 ); +SELECT * FROM t1 LEFT JOIN t2 ON c1 = c2 WHERE c2 IN (1); +c1 c2 +1 1 +SELECT * FROM t1 LEFT JOIN t2 ON c1 = c2 +WHERE c2 IN ( SELECT c2 FROM t2 WHERE c2 IN ( 1 ) ); +c1 c2 +1 1 +DROP TABLE t1,t2; +CREATE TABLE t1 ( c1 integer ); +INSERT INTO t1 VALUES ( 1 ); +INSERT INTO t1 VALUES ( 2 ); +INSERT INTO t1 VALUES ( 3 ); +INSERT INTO t1 VALUES ( 6 ); +CREATE TABLE t2 ( c2 integer ); +INSERT INTO t2 VALUES ( 1 ); +INSERT INTO t2 VALUES ( 4 ); +INSERT INTO t2 VALUES ( 5 ); +INSERT INTO t2 VALUES ( 6 ); +CREATE TABLE t3 ( c3 integer ); +INSERT INTO t3 VALUES ( 7 ); +INSERT INTO t3 VALUES ( 8 ); +SELECT c1,c2 FROM t1 LEFT JOIN t2 ON c1 = c2 +WHERE EXISTS (SELECT c3 FROM t3 WHERE c2 IS NULL ); +c1 c2 +2 NULL +3 NULL +DROP TABLE t1,t2,t3; +CREATE TABLE `t1` ( +`itemid` bigint(20) unsigned NOT NULL auto_increment, +`sessionid` bigint(20) unsigned default NULL, +`time` int(10) unsigned NOT NULL default '0', +`type` set('A','D','E','F','G','I','L','N','U') collate latin1_general_ci NOT +NULL default '', +`data` text collate latin1_general_ci NOT NULL, +PRIMARY KEY (`itemid`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +INSERT INTO `t1` VALUES (1, 1, 1, 'D', ''); +CREATE TABLE `t2` ( +`sessionid` bigint(20) unsigned NOT NULL auto_increment, +`pid` int(10) unsigned NOT NULL default '0', +`date` int(10) unsigned NOT NULL default '0', +`ip` varchar(15) collate latin1_general_ci NOT NULL default '', +PRIMARY KEY (`sessionid`) +) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; +INSERT INTO `t2` VALUES (1, 1, 1, '10.10.10.1'); +SELECT s.ip, count( e.itemid ) FROM `t1` e JOIN t2 s ON s.sessionid = e.sessionid WHERE e.sessionid = ( SELECT sessionid FROM t2 ORDER BY sessionid DESC LIMIT 1 ) GROUP BY s.ip HAVING count( e.itemid ) >0 LIMIT 0 , 30; +ip count( e.itemid ) +10.10.10.1 1 +drop tables t1,t2; +CREATE TABLE t1 (EMPNUM CHAR(3)); +CREATE TABLE t2 (EMPNUM CHAR(3) ); +INSERT INTO t1 VALUES ('E1'),('E2'); +INSERT INTO t2 VALUES ('E1'); +DELETE FROM t1 +WHERE t1.EMPNUM NOT IN +(SELECT t2.EMPNUM +FROM t2 +WHERE t1.EMPNUM = t2.EMPNUM); +select * from t1; +EMPNUM +E1 +DROP TABLE t1,t2; +CREATE TABLE t1(select_id BIGINT, values_id BIGINT); +INSERT INTO t1 VALUES (1, 1); +CREATE TABLE t2 (select_id BIGINT, values_id BIGINT, +PRIMARY KEY(select_id,values_id)); +INSERT INTO t2 VALUES (0, 1), (0, 2), (0, 3), (1, 5); +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id IN (1, 0)); +values_id +1 +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id BETWEEN 0 AND 1); +values_id +1 +SELECT values_id FROM t1 +WHERE values_id IN (SELECT values_id FROM t2 +WHERE select_id = 0 OR select_id = 1); +values_id +1 +DROP TABLE t1, t2; +create table t1 (fld enum('0','1')); +insert into t1 values ('1'); +select * from (select max(fld) from t1) as foo; +max(fld) +1 +drop table t1; diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result index 148c670c589..bc902ea7b0f 100644 --- a/mysql-test/r/subselect2.result +++ b/mysql-test/r/subselect2.result @@ -121,11 +121,11 @@ c373e9f5ad07993f3859444553544200 Last Discussion c373e9f5ad079174ff1744455354420 EXPLAIN SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion'; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL DDOCTYPEID_IDX NULL NULL NULL 9 Using where -1 PRIMARY t4 eq_ref PRIMARY PRIMARY 32 test.t2.DOCTYPEID 1 -1 PRIMARY t1 eq_ref PRIMARY PRIMARY 32 test.t2.DOCID 1 -2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -3 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -4 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -5 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 32 func 1 Using index; Using where -6 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 32 func 1 Using index; Using where +1 PRIMARY t1 eq_ref PRIMARY PRIMARY 34 test.t2.DOCID 1 +1 PRIMARY t4 eq_ref PRIMARY PRIMARY 34 test.t2.DOCTYPEID 1 +2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +3 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +4 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +5 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where +6 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX,CMFLDRPARNT_IDX PRIMARY 34 func 1 Using index; Using where drop table t1, t2, t3, t4; diff --git a/mysql-test/r/sum_distinct-big.result b/mysql-test/r/sum_distinct-big.result new file mode 100644 index 00000000000..06bfc6b1f78 --- /dev/null +++ b/mysql-test/r/sum_distinct-big.result @@ -0,0 +1,108 @@ +using_big_test +0 +CREATE TABLE t1 (id INTEGER); +CREATE TABLE t2 (id INTEGER); +INSERT INTO t1 (id) VALUES (1), (1), (1),(1); +INSERT INTO t1 (id) SELECT id FROM t1; +/* 8 */ +INSERT INTO t1 (id) SELECT id FROM t1; +/* 12 */ +INSERT INTO t1 (id) SELECT id FROM t1; +/* 16 */ +INSERT INTO t1 (id) SELECT id FROM t1; +/* 20 */ +INSERT INTO t1 (id) SELECT id FROM t1; +/* 24 */ +INSERT INTO t1 SELECT id+1 FROM t1; +INSERT INTO t1 SELECT id+2 FROM t1; +INSERT INTO t1 SELECT id+4 FROM t1; +INSERT INTO t1 SELECT id+8 FROM t1; +INSERT INTO t1 SELECT id+16 FROM t1; +INSERT INTO t1 SELECT id+32 FROM t1; +INSERT INTO t1 SELECT id+64 FROM t1; +INSERT INTO t1 SELECT id+128 FROM t1; +INSERT INTO t1 SELECT id+256 FROM t1; +INSERT INTO t1 SELECT id+512 FROM t1; +SELECT AVG(DISTINCT id) FROM t1 GROUP BY id % 13; +AVG(DISTINCT id) +513.5000 +508.0000 +509.0000 +510.0000 +511.0000 +512.0000 +513.0000 +514.0000 +515.0000 +516.0000 +517.0000 +511.5000 +512.5000 +SELECT SUM(DISTINCT id)/COUNT(DISTINCT id) FROM t1 GROUP BY id % 13; +SUM(DISTINCT id)/COUNT(DISTINCT id) +513.50000 +508.00000 +509.00000 +510.00000 +511.00000 +512.00000 +513.00000 +514.00000 +515.00000 +516.00000 +517.00000 +511.50000 +512.50000 +INSERT INTO t1 SELECT id+1024 FROM t1; +INSERT INTO t1 SELECT id+2048 FROM t1; +INSERT INTO t1 SELECT id+4096 FROM t1; +INSERT INTO t1 SELECT id+8192 FROM t1; +INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand(); +SELECT SUM(DISTINCT id) sm FROM t1; +sm +134225920 +SELECT SUM(DISTINCT id) sm FROM t2; +sm +134225920 +SELECT SUM(DISTINCT id) sm FROM t1 group by id % 13; +sm +10327590 +10328851 +10330112 +10331373 +10332634 +10317510 +10318770 +10320030 +10321290 +10322550 +10323810 +10325070 +10326330 +SET max_heap_table_size=16384; +SHOW variables LIKE 'max_heap_table_size'; +Variable_name Value +max_heap_table_size 16384 +SELECT SUM(DISTINCT id) sm FROM t1; +sm +134225920 +SELECT SUM(DISTINCT id) sm FROM t2; +sm +134225920 +SELECT SUM(DISTINCT id) sm FROM t1 GROUP BY id % 13; +sm +10327590 +10328851 +10330112 +10331373 +10332634 +10317510 +10318770 +10320030 +10321290 +10322550 +10323810 +10325070 +10326330 +DROP TABLE t1; +DROP TABLE t2; diff --git a/mysql-test/r/sum_distinct.result b/mysql-test/r/sum_distinct.result new file mode 100644 index 00000000000..c615817f52d --- /dev/null +++ b/mysql-test/r/sum_distinct.result @@ -0,0 +1,97 @@ +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( +id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, +gender CHAR(1), +name VARCHAR(20) +); +SELECT SUM(DISTINCT LENGTH(name)) s1 FROM t1; +s1 +NULL +INSERT INTO t1 (gender, name) VALUES (NULL, NULL); +INSERT INTO t1 (gender, name) VALUES (NULL, NULL); +INSERT INTO t1 (gender, name) VALUES (NULL, NULL); +SELECT SUM(DISTINCT LENGTH(name)) s1 FROM t1; +s1 +NULL +INSERT INTO t1 (gender, name) VALUES ('F', 'Helen'), ('F', 'Anastasia'), +('F', 'Katherine'), ('F', 'Margo'), ('F', 'Magdalene'), ('F', 'Mary'); +CREATE TABLE t2 SELECT name FROM t1; +SELECT (SELECT SUM(DISTINCT LENGTH(name)) FROM t1) FROM t2; +(SELECT SUM(DISTINCT LENGTH(name)) FROM t1) +18 +18 +18 +18 +18 +18 +18 +18 +18 +DROP TABLE t2; +INSERT INTO t1 (gender, name) VALUES ('F', 'Eva'), ('F', 'Sofia'), +('F', 'Sara'), ('F', 'Golda'), ('F', 'Toba'), ('F', 'Victory'), +('F', 'Faina'), ('F', 'Miriam'), ('F', 'Beki'), ('F', 'America'), +('F', 'Susan'), ('F', 'Glory'), ('F', 'Priscilla'), ('F', 'Rosmary'), +('F', 'Rose'), ('F', 'Margareth'), ('F', 'Elizabeth'), ('F', 'Meredith'), +('F', 'Julie'), ('F', 'Xenia'), ('F', 'Zena'), ('F', 'Olga'), +('F', 'Brunhilda'), ('F', 'Nataly'), ('F', 'Lara'), ('F', 'Svetlana'), +('F', 'Grethem'), ('F', 'Irene'); +SELECT +SUM(DISTINCT LENGTH(name)) s1, +SUM(DISTINCT SUBSTRING(NAME, 1, 3)) s2, +SUM(DISTINCT LENGTH(SUBSTRING(name, 1, 4))) s3 +FROM t1; +s1 s2 s3 +42 0 7 +SELECT +SUM(DISTINCT LENGTH(g1.name)) s1, +SUM(DISTINCT SUBSTRING(g2.name, 1, 3)) s2, +SUM(DISTINCT LENGTH(SUBSTRING(g3.name, 1, 4))) s3 +FROM t1 g1, t1 g2, t1 g3; +s1 s2 s3 +42 0 7 +SELECT +SUM(DISTINCT LENGTH(g1.name)) s1, +SUM(DISTINCT SUBSTRING(g2.name, 1, 3)) s2, +SUM(DISTINCT LENGTH(SUBSTRING(g3.name, 1, 4))) s3 +FROM t1 g1, t1 g2, t1 g3 GROUP BY LENGTH(SUBSTRING(g3.name, 5, 10)); +s1 s2 s3 +42 0 NULL +42 0 7 +42 0 4 +42 0 4 +42 0 4 +42 0 4 +42 0 4 +SELECT SQL_BUFFER_RESULT +SUM(DISTINCT LENGTH(name)) s1, +SUM(DISTINCT SUBSTRING(NAME, 1, 3)) s2, +SUM(DISTINCT LENGTH(SUBSTRING(name, 1, 4))) s3 +FROM t1; +s1 s2 s3 +42 0 7 +SELECT SQL_BUFFER_RESULT +SUM(DISTINCT LENGTH(g1.name)) s1, +SUM(DISTINCT SUBSTRING(g2.name, 1, 3)) s2, +SUM(DISTINCT LENGTH(SUBSTRING(g3.name, 1, 4))) s3 +FROM t1 g1, t1 g2, t1 g3 GROUP BY LENGTH(SUBSTRING(g3.name, 5, 10)); +s1 s2 s3 +42 0 NULL +42 0 7 +42 0 4 +42 0 4 +42 0 4 +42 0 4 +42 0 4 +SET @l=1; +UPDATE t1 SET name=CONCAT(name, @l:=@l+1); +SELECT SUM(DISTINCT RIGHT(name, 1)) FROM t1; +SUM(DISTINCT RIGHT(name, 1)) +45 +SELECT SUM(DISTINCT id) FROM t1; +SUM(DISTINCT id) +703 +SELECT SUM(DISTINCT id % 11) FROM t1; +SUM(DISTINCT id % 11) +55 +DROP TABLE t1; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 26612ec81fd..b36020bc2a3 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -37,14 +37,23 @@ show create table t9; Table Create Table t9 CREATE TABLE `t9` ( `a` int(11) NOT NULL auto_increment, - `b` char(16) NOT NULL default '', - `c` int(11) NOT NULL default '0', + `b` char(16) NOT NULL, + `c` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' alter table t9 rename t8, add column d int not null; alter table t8 rename t7; rename table t7 to t9; drop table t1; +SHOW CREATE TABLE t9; +Table Create Table +t9 CREATE TABLE `t9` ( + `a` int(11) NOT NULL auto_increment, + `b` char(16) NOT NULL, + `c` int(11) NOT NULL, + `d` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' Got one of the listed errors Got one of the listed errors Got one of the listed errors @@ -58,9 +67,9 @@ show create table mysqltest.t9; Table Create Table t9 CREATE TABLE `t9` ( `a` int(11) NOT NULL auto_increment, - `b` char(16) NOT NULL default '', - `c` int(11) NOT NULL default '0', - `d` int(11) NOT NULL default '0', + `b` char(16) NOT NULL, + `c` int(11) NOT NULL, + `d` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='TEST_DIR/var/tmp/' INDEX DIRECTORY='TEST_DIR/var/run/' drop database mysqltest; @@ -68,19 +77,19 @@ create table t1 (a int not null) engine=myisam; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0' + `a` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 add b int; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` int(11) NOT NULL default '0', + `a` int(11) NOT NULL, `b` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; diff --git a/mysql-test/r/synchronization.result b/mysql-test/r/synchronization.result index ad9443c86da..0b84697066c 100644 --- a/mysql-test/r/synchronization.result +++ b/mysql-test/r/synchronization.result @@ -1,3 +1,4 @@ +drop table if exists t1; CREATE TABLE t1 (x1 int); ALTER TABLE t1 CHANGE x1 x2 int; CREATE TABLE t2 LIKE t1; diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index 141878a7bf6..d2872878cb9 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -1,3 +1,4 @@ +drop table if exists t1,t1aa,t2aa; show tables; Tables_in_db columns_priv @@ -8,6 +9,8 @@ help_keyword help_relation help_topic host +proc +procs_priv tables_priv time_zone time_zone_leap_second @@ -33,6 +36,11 @@ db CREATE TABLE `db` ( `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' @@ -53,14 +61,19 @@ host CREATE TABLE `host` ( `Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', PRIMARY KEY (`Host`,`Db`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( - `Host` varchar(60) collate utf8_bin NOT NULL default '', - `User` varchar(16) collate utf8_bin NOT NULL default '', - `Password` varchar(41) collate utf8_bin NOT NULL default '', + `Host` char(60) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Password` char(41) collate utf8_bin NOT NULL default '', `Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N', @@ -82,6 +95,11 @@ user CREATE TABLE `user` ( `Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Repl_slave_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `Repl_client_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N', + `Create_user_priv` enum('N','Y') character set utf8 NOT NULL default 'N', `ssl_type` enum('','ANY','X509','SPECIFIED') character set utf8 NOT NULL default '', `ssl_cipher` blob NOT NULL, `x509_issuer` blob NOT NULL, @@ -89,6 +107,7 @@ user CREATE TABLE `user` ( `max_questions` int(11) unsigned NOT NULL default '0', `max_updates` int(11) unsigned NOT NULL default '0', `max_connections` int(11) unsigned NOT NULL default '0', + `max_user_connections` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`Host`,`User`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' show create table func; @@ -97,7 +116,7 @@ func CREATE TABLE `func` ( `name` char(64) collate utf8_bin NOT NULL default '', `ret` tinyint(1) NOT NULL default '0', `dl` char(128) collate utf8_bin NOT NULL default '', - `type` enum('function','aggregate') character set utf8 NOT NULL default 'function', + `type` enum('function','aggregate') character set utf8 NOT NULL, PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' show create table tables_priv; @@ -109,7 +128,7 @@ tables_priv CREATE TABLE `tables_priv` ( `Table_name` char(64) collate utf8_bin NOT NULL default '', `Grantor` char(77) collate utf8_bin NOT NULL default '', `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') character set utf8 NOT NULL default '', + `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') character set utf8 NOT NULL default '', `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) @@ -126,5 +145,40 @@ columns_priv CREATE TABLE `columns_priv` ( `Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' +show create table procs_priv; +Table Create Table +procs_priv CREATE TABLE `procs_priv` ( + `Host` char(60) collate utf8_bin NOT NULL default '', + `Db` char(64) collate utf8_bin NOT NULL default '', + `User` char(16) collate utf8_bin NOT NULL default '', + `Routine_name` char(64) collate utf8_bin NOT NULL default '', + `Routine_type` enum('FUNCTION','PROCEDURE') collate utf8_bin NOT NULL, + `Grantor` char(77) collate utf8_bin NOT NULL default '', + `Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '', + `Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +show create table proc; +Table Create Table +proc CREATE TABLE `proc` ( + `db` char(64) character set utf8 collate utf8_bin NOT NULL default '', + `name` char(64) NOT NULL default '', + `type` enum('FUNCTION','PROCEDURE') NOT NULL, + `specific_name` char(64) NOT NULL default '', + `language` enum('SQL') NOT NULL default 'SQL', + `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL default 'CONTAINS_SQL', + `is_deterministic` enum('YES','NO') NOT NULL default 'NO', + `security_type` enum('INVOKER','DEFINER') NOT NULL default 'DEFINER', + `param_list` blob NOT NULL, + `returns` char(64) NOT NULL default '', + `body` longblob NOT NULL, + `definer` char(77) character set utf8 collate utf8_bin NOT NULL default '', + `created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `modified` timestamp NOT NULL default '0000-00-00 00:00:00', + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL default '', + `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', + PRIMARY KEY (`db`,`name`,`type`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' show tables; Tables_in_test diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index f08fe6ddd0f..081bd35622e 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -95,8 +95,34 @@ d show status like "created_tmp%tables"; Variable_name Value Created_tmp_disk_tables 0 -Created_tmp_tables 1 +Created_tmp_tables 2 drop table t1; +create temporary table t1 as select 'This is temp. table' A; +create view t1 as select 'This is view' A; +select * from t1; +A +This is temp. table +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `A` varchar(19) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create view t1; +View Create View +t1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`t1` AS select _latin1'This is view' AS `A` +drop view t1; +select * from t1; +A +This is temp. table +create view t1 as select 'This is view again' A; +select * from t1; +A +This is temp. table +drop table t1; +select * from t1; +A +This is view again +drop view t1; create table t1 (a int, b int, index(a), index(b)); create table t2 (c int auto_increment, d varchar(255), primary key (c)); insert into t1 values (3,1),(3,2); diff --git a/mysql-test/r/testdb_only.require b/mysql-test/r/testdb_only.require new file mode 100644 index 00000000000..e717418fdb6 --- /dev/null +++ b/mysql-test/r/testdb_only.require @@ -0,0 +1,2 @@ +Variable_name Value +use extern server NO diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result index 199b48ef1aa..df51a6aac9b 100644 --- a/mysql-test/r/timezone2.result +++ b/mysql-test/r/timezone2.result @@ -40,6 +40,12 @@ insert into t1 (i, ts) values Warnings: Warning 1299 Invalid TIMESTAMP value in column 'ts' at row 2 insert into t1 (i, ts) values +(unix_timestamp(20030330015959),20030330015959), +(unix_timestamp(20030330023000),20030330023000), +(unix_timestamp(20030330030000),20030330030000); +Warnings: +Warning 1299 Invalid TIMESTAMP value in column 'ts' at row 2 +insert into t1 (i, ts) values (unix_timestamp('2003-05-01 00:00:00'),'2003-05-01 00:00:00'); insert into t1 (i, ts) values (unix_timestamp('2003-10-26 01:00:00'),'2003-10-26 01:00:00'), @@ -54,6 +60,9 @@ i ts 1048985999 2003-03-30 00:59:59 1048986000 2003-03-30 01:00:00 1048986000 2003-03-30 01:00:00 +1048985999 2003-03-30 00:59:59 +1048986000 2003-03-30 01:00:00 +1048986000 2003-03-30 01:00:00 1051740000 2003-04-30 22:00:00 1067122800 2003-10-25 23:00:00 1067126400 2003-10-26 00:00:00 @@ -108,9 +117,9 @@ insert into t1 values ('0000-00-00 00:00:00'),('1969-12-31 23:59:59'), ('1970-01-01 00:00:00'),('1970-01-01 00:00:01'), ('2037-12-31 23:59:59'),('2038-01-01 00:00:00'); Warnings: -Warning 1264 Data truncated; out of range for column 'ts' at row 2 -Warning 1264 Data truncated; out of range for column 'ts' at row 3 -Warning 1264 Data truncated; out of range for column 'ts' at row 6 +Warning 1264 Out of range value adjusted for column 'ts' at row 2 +Warning 1264 Out of range value adjusted for column 'ts' at row 3 +Warning 1264 Out of range value adjusted for column 'ts' at row 6 select * from t1; ts 0000-00-00 00:00:00 @@ -125,9 +134,9 @@ insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 00:30:00'), ('1970-01-01 01:00:00'),('1970-01-01 01:00:01'), ('2038-01-01 00:59:59'),('2038-01-01 01:00:00'); Warnings: -Warning 1264 Data truncated; out of range for column 'ts' at row 2 -Warning 1264 Data truncated; out of range for column 'ts' at row 3 -Warning 1264 Data truncated; out of range for column 'ts' at row 6 +Warning 1264 Out of range value adjusted for column 'ts' at row 2 +Warning 1264 Out of range value adjusted for column 'ts' at row 3 +Warning 1264 Out of range value adjusted for column 'ts' at row 6 select * from t1; ts 0000-00-00 00:00:00 @@ -142,9 +151,9 @@ insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 01:00:00'), ('1970-01-01 01:30:00'),('1970-01-01 01:30:01'), ('2038-01-01 01:29:59'),('2038-01-01 01:30:00'); Warnings: -Warning 1264 Data truncated; out of range for column 'ts' at row 2 -Warning 1264 Data truncated; out of range for column 'ts' at row 3 -Warning 1264 Data truncated; out of range for column 'ts' at row 6 +Warning 1264 Out of range value adjusted for column 'ts' at row 2 +Warning 1264 Out of range value adjusted for column 'ts' at row 3 +Warning 1264 Out of range value adjusted for column 'ts' at row 6 select * from t1; ts 0000-00-00 00:00:00 diff --git a/mysql-test/r/timezone_grant.result b/mysql-test/r/timezone_grant.result index 471cacde300..3758f3c2645 100644 --- a/mysql-test/r/timezone_grant.result +++ b/mysql-test/r/timezone_grant.result @@ -20,9 +20,9 @@ convert_tz(b, 'Europe/Moscow', 'UTC') update t1, t2 set t1.b = convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC') where t1.a = t2.c and t2.d = (select max(d) from t2); select * from mysql.time_zone_name; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysql' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name' select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name; -ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysql' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name' delete from mysql.db where user like 'mysqltest\_%'; flush privileges; grant all privileges on test.t1 to mysqltest_1@localhost; @@ -36,7 +36,9 @@ set time_zone= '+00:00'; set time_zone= 'Europe/Moscow'; select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC'); convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC') -2004-12-01 09:00:00 +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '2004-11-31 12:00:00' select convert_tz(b, 'Europe/Moscow', 'UTC') from t1; convert_tz(b, 'Europe/Moscow', 'UTC') update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC') diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result new file mode 100644 index 00000000000..312a7a90fc9 --- /dev/null +++ b/mysql-test/r/trigger.result @@ -0,0 +1,740 @@ +drop table if exists t1, t2, t3; +drop view if exists v1; +drop database if exists mysqltest; +drop function if exists f1; +drop procedure if exists p1; +create table t1 (i int); +create trigger trg before insert on t1 for each row set @a:=1; +set @a:=0; +select @a; +@a +0 +insert into t1 values (1); +select @a; +@a +1 +drop trigger trg; +create trigger trg before insert on t1 for each row set @a:=new.i; +insert into t1 values (123); +select @a; +@a +123 +drop trigger trg; +drop table t1; +create table t1 (i int not null, j int); +create trigger trg before insert on t1 for each row +begin +if isnull(new.j) then +set new.j:= new.i * 10; +end if; +end| +insert into t1 (i) values (1)| +insert into t1 (i,j) values (2, 3)| +select * from t1| +i j +1 10 +2 3 +drop trigger trg| +drop table t1| +create table t1 (i int not null primary key); +create trigger trg after insert on t1 for each row +set @a:= if(@a,concat(@a, ":", new.i), new.i); +set @a:=""; +insert into t1 values (2),(3),(4),(5); +select @a; +@a +2:3:4:5 +drop trigger trg; +drop table t1; +create table t1 (aid int not null primary key, balance int not null default 0); +insert into t1 values (1, 1000), (2,3000); +create trigger trg before update on t1 for each row +begin +declare loc_err varchar(255); +if abs(new.balance - old.balance) > 1000 then +set new.balance:= old.balance; +set loc_err := concat("Too big change for aid = ", new.aid); +set @update_failed:= if(@update_failed, concat(@a, ":", loc_err), loc_err); +end if; +end| +set @update_failed:=""| +update t1 set balance=1500| +select @update_failed; +select * from t1| +@update_failed +Too big change for aid = 2 +aid balance +1 1500 +2 3000 +drop trigger trg| +drop table t1| +create table t1 (i int); +insert into t1 values (1),(2),(3),(4); +create trigger trg after update on t1 for each row +set @total_change:=@total_change + new.i - old.i; +set @total_change:=0; +update t1 set i=3; +select @total_change; +@total_change +2 +drop trigger trg; +drop table t1; +create table t1 (i int); +insert into t1 values (1),(2),(3),(4); +create trigger trg before delete on t1 for each row +set @del_sum:= @del_sum + old.i; +set @del_sum:= 0; +delete from t1 where i <= 3; +select @del_sum; +@del_sum +6 +drop trigger trg; +drop table t1; +create table t1 (i int); +insert into t1 values (1),(2),(3),(4); +create trigger trg after delete on t1 for each row set @del:= 1; +set @del:= 0; +delete from t1 where i <> 0; +select @del; +@del +1 +drop trigger trg; +drop table t1; +create table t1 (i int, j int); +create trigger trg1 before insert on t1 for each row +begin +if new.j > 10 then +set new.j := 10; +end if; +end| +create trigger trg2 before update on t1 for each row +begin +if old.i % 2 = 0 then +set new.j := -1; +end if; +end| +create trigger trg3 after update on t1 for each row +begin +if new.j = -1 then +set @fired:= "Yes"; +end if; +end| +set @fired:=""; +insert into t1 values (1,2),(2,3),(3,14); +select @fired; +@fired + +select * from t1; +i j +1 2 +2 3 +3 10 +update t1 set j= 20; +select @fired; +@fired +Yes +select * from t1; +i j +1 20 +2 -1 +3 20 +drop trigger trg1; +drop trigger trg2; +drop trigger trg3; +drop table t1; +create table t1 (id int not null primary key, data int); +create trigger t1_bi before insert on t1 for each row +set @log:= concat(@log, "(BEFORE_INSERT: new=(id=", new.id, ", data=", new.data,"))"); +create trigger t1_ai after insert on t1 for each row +set @log:= concat(@log, "(AFTER_INSERT: new=(id=", new.id, ", data=", new.data,"))"); +create trigger t1_bu before update on t1 for each row +set @log:= concat(@log, "(BEFORE_UPDATE: old=(id=", old.id, ", data=", old.data, +") new=(id=", new.id, ", data=", new.data,"))"); +create trigger t1_au after update on t1 for each row +set @log:= concat(@log, "(AFTER_UPDATE: old=(id=", old.id, ", data=", old.data, +") new=(id=", new.id, ", data=", new.data,"))"); +create trigger t1_bd before delete on t1 for each row +set @log:= concat(@log, "(BEFORE_DELETE: old=(id=", old.id, ", data=", old.data,"))"); +create trigger t1_ad after delete on t1 for each row +set @log:= concat(@log, "(AFTER_DELETE: old=(id=", old.id, ", data=", old.data,"))"); +set @log:= ""; +insert into t1 values (1, 1); +select @log; +@log +(BEFORE_INSERT: new=(id=1, data=1))(AFTER_INSERT: new=(id=1, data=1)) +set @log:= ""; +insert ignore t1 values (1, 2); +select @log; +@log +(BEFORE_INSERT: new=(id=1, data=2)) +set @log:= ""; +replace t1 values (1, 3), (2, 2); +select @log; +@log +(BEFORE_INSERT: new=(id=1, data=3))(BEFORE_UPDATE: old=(id=1, data=1) new=(id=1, data=3))(AFTER_UPDATE: old=(id=1, data=1) new=(id=1, data=3))(BEFORE_INSERT: new=(id=2, data=2))(AFTER_INSERT: new=(id=2, data=2)) +alter table t1 add ts timestamp default now(); +set @log:= ""; +replace t1 (id, data) values (1, 4); +select @log; +@log +(BEFORE_INSERT: new=(id=1, data=4))(BEFORE_DELETE: old=(id=1, data=3))(AFTER_DELETE: old=(id=1, data=3))(AFTER_INSERT: new=(id=1, data=4)) +set @log:= ""; +insert into t1 (id, data) values (1, 5), (3, 3) on duplicate key update data= data + 2; +select @log; +@log +(BEFORE_INSERT: new=(id=1, data=5))(BEFORE_UPDATE: old=(id=1, data=4) new=(id=1, data=6))(AFTER_UPDATE: old=(id=1, data=4) new=(id=1, data=6))(BEFORE_INSERT: new=(id=3, data=3))(AFTER_INSERT: new=(id=3, data=3)) +drop table t1; +create table t1 (id int primary key, data varchar(10), fk int); +create table t2 (event varchar(100)); +create table t3 (id int primary key); +create trigger t1_ai after insert on t1 for each row +insert into t2 values (concat("INSERT INTO t1 id=", new.id, " data='", new.data, "'")); +insert into t1 (id, data) values (1, "one"), (2, "two"); +select * from t1; +id data fk +1 one NULL +2 two NULL +select * from t2; +event +INSERT INTO t1 id=1 data='one' +INSERT INTO t1 id=2 data='two' +drop trigger t1_ai; +create trigger t1_bi before insert on t1 for each row +begin +if exists (select id from t3 where id=new.fk) then +insert into t2 values (concat("INSERT INTO t1 id=", new.id, " data='", new.data, "' fk=", new.fk)); +else +insert into t2 values (concat("INSERT INTO t1 FAILED id=", new.id, " data='", new.data, "' fk=", new.fk)); +set new.id= NULL; +end if; +end| +insert into t3 values (1); +insert into t1 values (4, "four", 1), (5, "five", 2); +ERROR 23000: Column 'id' cannot be null +select * from t1; +id data fk +1 one NULL +2 two NULL +4 four 1 +select * from t2; +event +INSERT INTO t1 id=1 data='one' +INSERT INTO t1 id=2 data='two' +INSERT INTO t1 id=4 data='four' fk=1 +INSERT INTO t1 FAILED id=5 data='five' fk=2 +drop table t1, t2, t3; +create table t1 (id int primary key, data varchar(10)); +create table t2 (seq int); +insert into t2 values (10); +create function f1 () returns int return (select max(seq) from t2); +create trigger t1_bi before insert on t1 for each row +begin +if new.id > f1() then +set new.id:= f1(); +end if; +end| +insert into t1 values (1, "first"); +insert into t1 values (f1(), "max"); +select * from t1; +id data +1 first +10 max +drop table t1, t2; +drop function f1; +create table t1 (id int primary key, fk_t2 int); +create table t2 (id int primary key, fk_t3 int); +create table t3 (id int primary key); +insert into t1 values (1,1), (2,1), (3,2); +insert into t2 values (1,1), (2,2); +insert into t3 values (1), (2); +create trigger t3_ad after delete on t3 for each row +delete from t2 where fk_t3=old.id; +create trigger t2_ad after delete on t2 for each row +delete from t1 where fk_t2=old.id; +delete from t3 where id = 1; +select * from t1 left join (t2 left join t3 on t2.fk_t3 = t3.id) on t1.fk_t2 = t2.id; +id fk_t2 id fk_t3 id +3 2 2 2 2 +drop table t1, t2, t3; +create table t1 (id int primary key, copy int); +create table t2 (id int primary key, data int); +insert into t2 values (1,1), (2,2); +create trigger t1_bi before insert on t1 for each row +set new.copy= (select data from t2 where id = new.id); +create trigger t1_bu before update on t1 for each row +set new.copy= (select data from t2 where id = new.id); +insert into t1 values (1,3), (2,4), (3,3); +update t1 set copy= 1 where id = 2; +select * from t1; +id copy +1 1 +2 2 +3 NULL +drop table t1, t2; +create table t1 (i int); +create table t3 (i int); +create trigger trg before insert on t1 for each row set @a:= old.i; +ERROR HY000: There is no OLD row in on INSERT trigger +create trigger trg before delete on t1 for each row set @a:= new.i; +ERROR HY000: There is no NEW row in on DELETE trigger +create trigger trg before update on t1 for each row set old.i:=1; +ERROR HY000: Updating of OLD row is not allowed in trigger +create trigger trg before delete on t1 for each row set new.i:=1; +ERROR HY000: There is no NEW row in on DELETE trigger +create trigger trg after update on t1 for each row set new.i:=1; +ERROR HY000: Updating of NEW row is not allowed in after trigger +create trigger trg before update on t1 for each row set new.j:=1; +ERROR 42S22: Unknown column 'j' in 'NEW' +create trigger trg before update on t1 for each row set @a:=old.j; +ERROR 42S22: Unknown column 'j' in 'OLD' +create trigger trg before insert on t2 for each row set @a:=1; +ERROR 42S02: Table 'test.t2' doesn't exist +create trigger trg before insert on t1 for each row set @a:=1; +create trigger trg after insert on t1 for each row set @a:=1; +ERROR HY000: Trigger already exists +create trigger trg2 before insert on t1 for each row set @a:=1; +ERROR HY000: Trigger already exists +create trigger trg before insert on t3 for each row set @a:=1; +ERROR HY000: Trigger already exists +create trigger trg2 before insert on t3 for each row set @a:=1; +drop trigger trg2; +drop trigger trg; +drop trigger trg; +ERROR HY000: Trigger does not exist +create view v1 as select * from t1; +create trigger trg before insert on v1 for each row set @a:=1; +ERROR HY000: 'test.v1' is not BASE TABLE +drop view v1; +drop table t1; +drop table t3; +create temporary table t1 (i int); +create trigger trg before insert on t1 for each row set @a:=1; +ERROR HY000: Trigger's 't1' is view or temporary table +drop table t1; +create table t1 (x1col char); +create trigger tx1 before insert on t1 for each row set new.x1col = 'x'; +insert into t1 values ('y'); +drop trigger tx1; +drop table t1; +create table t1 (i int) engine=myisam; +insert into t1 values (1), (2); +create trigger trg1 before delete on t1 for each row set @del_before:= @del_before + old.i; +create trigger trg2 after delete on t1 for each row set @del_after:= @del_after + old.i; +set @del_before:=0, @del_after:= 0; +delete from t1; +select @del_before, @del_after; +@del_before @del_after +3 3 +drop trigger trg1; +drop trigger trg2; +drop table t1; +create table t1 (a int); +create trigger trg1 before insert on t1 for each row set new.a= 10; +drop table t1; +create table t1 (a int); +insert into t1 values (); +select * from t1; +a +NULL +drop table t1; +create database mysqltest; +use mysqltest; +create table t1 (i int); +create trigger trg1 before insert on t1 for each row set @a:= 1; +drop database mysqltest; +use test; +create database mysqltest; +create table mysqltest.t1 (i int); +create trigger trg1 before insert on mysqltest.t1 for each row set @a:= 1; +ERROR HY000: Trigger in wrong schema +use mysqltest; +create trigger test.trg1 before insert on t1 for each row set @a:= 1; +ERROR HY000: Trigger in wrong schema +drop database mysqltest; +use test; +create table t1 (i int, j int default 10, k int not null, key (k)); +create table t2 (i int); +insert into t1 (i, k) values (1, 1); +insert into t2 values (1); +create trigger trg1 before update on t1 for each row set @a:= @a + new.j - old.j; +create trigger trg2 after update on t1 for each row set @b:= "Fired"; +set @a:= 0, @b:= ""; +update t1, t2 set j = j + 10 where t1.i = t2.i; +select @a, @b; +@a @b +10 Fired +insert into t1 values (2, 13, 2); +insert into t2 values (2); +set @a:= 0, @b:= ""; +update t1, t2 set j = j + 15 where t1.i = t2.i and t1.k >= 2; +select @a, @b; +@a @b +15 Fired +create trigger trg3 before delete on t1 for each row set @c:= @c + old.j; +create trigger trg4 before delete on t2 for each row set @d:= @d + old.i; +create trigger trg5 after delete on t1 for each row set @e:= "After delete t1 fired"; +create trigger trg6 after delete on t2 for each row set @f:= "After delete t2 fired"; +set @c:= 0, @d:= 0, @e:= "", @f:= ""; +delete t1, t2 from t1, t2 where t1.i = t2.i; +select @c, @d, @e, @f; +@c @d @e @f +48 3 After delete t1 fired After delete t2 fired +drop table t1, t2; +create table t1 (i int, j int default 10)| +create table t2 (i int)| +insert into t2 values (1), (2)| +create trigger trg1 before insert on t1 for each row +begin +if new.i = 1 then +set new.j := 1; +end if; +end| +create trigger trg2 after insert on t1 for each row set @a:= 1| +set @a:= 0| +insert into t1 (i) select * from t2| +select * from t1| +i j +1 1 +2 10 +select @a| +@a +1 +drop table t1, t2| +create table t1 (i int, j int, k int); +create trigger trg1 before insert on t1 for each row set new.k = new.i; +create trigger trg2 after insert on t1 for each row set @b:= "Fired"; +set @b:=""; +load data infile '../../std_data/rpl_loaddata.dat' into table t1 (@a, i); +select *, @b from t1; +i j k @b +10 NULL 10 Fired +15 NULL 15 Fired +set @b:=""; +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, j); +select *, @b from t1; +i j k @b +10 NULL 10 Fired +15 NULL 15 Fired +1 2 1 Fired +3 4 3 Fired +5 6 5 Fired +drop table t1; +create table t1 (i int, at int, k int, key(k)) engine=myisam; +create table t2 (i int); +insert into t1 values (1, 1, 1); +insert into t2 values (1), (2), (3); +create trigger ai after insert on t1 for each row set @a:= new.at; +create trigger au after update on t1 for each row set @a:= new.at; +create trigger ad after delete on t1 for each row set @a:= old.at; +alter table t1 drop column at; +select * from t1; +i k +1 1 +insert into t1 values (2, 1); +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +1 1 +2 1 +update t1 set k = 2 where i = 2; +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +1 1 +2 2 +delete from t1 where i = 2; +ERROR 42S22: Unknown column 'at' in 'OLD' +select * from t1; +i k +1 1 +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +1 1 +1 2 +insert into t1 select 3, 3; +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +1 1 +1 2 +3 3 +update t1, t2 set k = k + 10 where t1.i = t2.i; +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +1 11 +1 2 +3 3 +update t1, t2 set k = k + 10 where t1.i = t2.i and k < 3; +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +1 11 +1 12 +3 3 +delete t1, t2 from t1 straight_join t2 where t1.i = t2.i; +ERROR 42S22: Unknown column 'at' in 'OLD' +select * from t1; +i k +1 12 +3 3 +delete t2, t1 from t2 straight_join t1 where t1.i = t2.i; +ERROR 42S22: Unknown column 'at' in 'OLD' +select * from t1; +i k +3 3 +alter table t1 add primary key (i); +insert into t1 values (3, 4) on duplicate key update k= k + 10; +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +3 13 +replace into t1 values (3, 3); +ERROR 42S22: Unknown column 'at' in 'NEW' +select * from t1; +i k +3 3 +alter table t1 add ts timestamp default now(); +replace into t1 (i, k) values (3, 13); +ERROR 42S22: Unknown column 'at' in 'OLD' +select * from t1; +i k ts +drop table t1, t2; +create table t1 (i int, bt int, k int, key(k)) engine=myisam; +create table t2 (i int); +insert into t1 values (1, 1, 1), (2, 2, 2); +insert into t2 values (1), (2), (3); +create trigger bi before insert on t1 for each row set @a:= new.bt; +create trigger bu before update on t1 for each row set @a:= new.bt; +create trigger bd before delete on t1 for each row set @a:= old.bt; +alter table t1 drop column bt; +insert into t1 values (3, 3); +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +update t1 set i = 2; +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +delete from t1; +ERROR 42S22: Unknown column 'bt' in 'OLD' +select * from t1; +i k +1 1 +2 2 +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by '' enclosed by '' (i, k); +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +insert into t1 select 3, 3; +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +update t1, t2 set k = k + 10 where t1.i = t2.i; +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +update t1, t2 set k = k + 10 where t1.i = t2.i and k < 2; +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +delete t1, t2 from t1 straight_join t2 where t1.i = t2.i; +ERROR 42S22: Unknown column 'bt' in 'OLD' +select * from t1; +i k +1 1 +2 2 +delete t2, t1 from t2 straight_join t1 where t1.i = t2.i; +ERROR 42S22: Unknown column 'bt' in 'OLD' +select * from t1; +i k +1 1 +2 2 +alter table t1 add primary key (i); +drop trigger bi; +insert into t1 values (2, 4) on duplicate key update k= k + 10; +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +replace into t1 values (2, 4); +ERROR 42S22: Unknown column 'bt' in 'NEW' +select * from t1; +i k +1 1 +2 2 +alter table t1 add ts timestamp default now(); +replace into t1 (i, k) values (2, 11); +ERROR 42S22: Unknown column 'bt' in 'OLD' +select * from t1; +i k ts +1 1 0000-00-00 00:00:00 +2 2 0000-00-00 00:00:00 +drop table t1, t2; +drop function if exists bug5893; +create table t1 (col1 int, col2 int); +insert into t1 values (1, 2); +create function bug5893 () returns int return 5; +create trigger t1_bu before update on t1 for each row set new.col1= bug5893(); +drop function bug5893; +update t1 set col2 = 4; +ERROR 42000: FUNCTION test.bug5893 does not exist +drop trigger t1_bu; +drop table t1; +set sql_mode='ansi'; +create table t1 ("t1 column" int); +create trigger t1_bi before insert on t1 for each row set new."t1 column" = 5; +set sql_mode=""; +insert into t1 values (0); +create trigger t1_af after insert on t1 for each row set @a=10; +insert into t1 values (0); +select * from t1; +t1 column +5 +5 +select @a; +@a +10 +show triggers; +Trigger Event Table Statement Timing Created sql_mode +t1_bi INSERT t1 set new."t1 column" = 5 BEFORE # REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI +t1_af INSERT t1 set @a=10 AFTER # +drop table t1; +set sql_mode="traditional"; +create table t1 (a date); +insert into t1 values ('2004-01-00'); +ERROR 22007: Incorrect date value: '2004-01-00' for column 'a' at row 1 +set sql_mode=""; +create trigger t1_bi before insert on t1 for each row set new.a = '2004-01-00'; +set sql_mode="traditional"; +insert into t1 values ('2004-01-01'); +select * from t1; +a +2004-01-00 +set sql_mode=default; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` date default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show triggers; +Trigger Event Table Statement Timing Created sql_mode +t1_bi INSERT t1 set new.a = '2004-01-00' BEFORE # +drop table t1; +create table t1 (id int); +create trigger t1_ai after insert on t1 for each row flush tables; +ERROR 0A000: FLUSH is not allowed in stored function or trigger +create trigger t1_ai after insert on t1 for each row flush privileges; +ERROR 0A000: FLUSH is not allowed in stored function or trigger +create procedure p1() flush tables; +create trigger t1_ai after insert on t1 for each row call p1(); +insert into t1 values (0); +ERROR 0A000: FLUSH is not allowed in stored function or trigger +drop procedure p1; +create procedure p1() flush privileges; +insert into t1 values (0); +ERROR 0A000: FLUSH is not allowed in stored function or trigger +drop procedure p1; +drop table t1; +create table t1 (id int, data int, username varchar(16)); +insert into t1 (id, data) values (1, 0); +create trigger t1_whoupdated before update on t1 for each row +begin +declare user varchar(32); +declare i int; +select user() into user; +set NEW.username = user; +select count(*) from ((select 1) union (select 2)) as d1 into i; +end| +update t1 set data = 1; +update t1 set data = 2; +drop table t1; +create table t1 (c1 int, c2 datetime); +create trigger tr1 before insert on t1 for each row +begin +set new.c2= '2004-04-01'; +select 'hello'; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +insert into t1 (c1) values (1),(2),(3); +select * from t1; +c1 c2 +1 NULL +2 NULL +3 NULL +drop procedure if exists bug11587; +create procedure bug11587(x char(16)) +begin +select "hello"; +select "hello again"; +end| +create trigger tr1 before insert on t1 for each row +begin +call bug11587(); +set new.c2= '2004-04-02'; +end| +insert into t1 (c1) values (4),(5),(6); +ERROR 0A000: PROCEDURE test.bug11587 can't return a result set in the given context +select * from t1; +c1 c2 +1 NULL +2 NULL +3 NULL +drop procedure bug11587; +drop table t1; +create table t1 (f1 integer); +create table t2 (f2 integer); +create trigger t1_ai after insert on t1 +for each row insert into t2 values (new.f1+1); +create trigger t2_ai after insert on t2 +for each row insert into t1 values (new.f2+1); +insert into t1 values (1); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select * from t1; +f1 +1 +select * from t2; +f2 +2 +drop trigger t1_ai; +drop trigger t2_ai; +create trigger t1_bu before update on t1 +for each row insert into t1 values (2); +update t1 set f1= 10; +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select * from t1; +f1 +1 +drop trigger t1_bu; +create trigger t1_bu before update on t1 +for each row delete from t1 where f1=new.f1; +update t1 set f1= 10; +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +select * from t1; +f1 +1 +drop trigger t1_bu; +create trigger t1_bi before insert on t1 +for each row set new.f1=(select sum(f1) from t1); +insert into t1 values (3); +select * from t1; +f1 +1 +1 +drop trigger t1_bi; +drop tables t1, t2; diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result new file mode 100644 index 00000000000..5988b4f745e --- /dev/null +++ b/mysql-test/r/type_bit.result @@ -0,0 +1,555 @@ +select 0 + b'1'; +0 + b'1' +1 +select 0 + b'0'; +0 + b'0' +0 +select 0 + b'000001'; +0 + b'000001' +1 +select 0 + b'000011'; +0 + b'000011' +3 +select 0 + b'000101'; +0 + b'000101' +5 +select 0 + b'000000'; +0 + b'000000' +0 +select 0 + b'10000000'; +0 + b'10000000' +128 +select 0 + b'11111111'; +0 + b'11111111' +255 +select 0 + b'10000001'; +0 + b'10000001' +129 +select 0 + b'1000000000000000'; +0 + b'1000000000000000' +32768 +select 0 + b'1111111111111111'; +0 + b'1111111111111111' +65535 +select 0 + b'1000000000000001'; +0 + b'1000000000000001' +32769 +drop table if exists t1,t2; +create table t1 (a bit(65)); +ERROR 42000: Display width out of range for column 'a' (max = 64) +create table t1 (a bit(0)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bit(1) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a bit(64)); +insert into t1 values +(b'1111111111111111111111111111111111111111111111111111111111111111'), +(b'1000000000000000000000000000000000000000000000000000000000000000'), +(b'0000000000000000000000000000000000000000000000000000000000000001'), +(b'1010101010101010101010101010101010101010101010101010101010101010'), +(b'0101010101010101010101010101010101010101010101010101010101010101'); +select hex(a) from t1; +hex(a) +FFFFFFFFFFFFFFFF +8000000000000000 +1 +AAAAAAAAAAAAAAAA +5555555555555555 +drop table t1; +create table t1 (a bit); +insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select hex(a) from t1; +hex(a) +0 +1 +0 +1 +1 +alter table t1 add unique (a); +ERROR 23000: Duplicate entry '' for key 1 +drop table t1; +create table t1 (a bit(2)); +insert into t1 values (b'00'), (b'01'), (b'10'), (b'100'); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select a+0 from t1; +a+0 +0 +1 +2 +3 +alter table t1 add key (a); +explain select a+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 2 NULL 4 Using index +select a+0 from t1; +a+0 +0 +1 +2 +3 +drop table t1; +create table t1 (a bit(7), b bit(9), key(a, b)); +insert into t1 values +(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), +(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), +(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), +(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), +(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), +(44, 307), (68, 454), (57, 135); +explain select a+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 38 Using index +select a+0 from t1; +a+0 +0 +4 +5 +9 +23 +24 +28 +29 +30 +31 +34 +44 +49 +56 +57 +59 +60 +61 +68 +68 +75 +77 +78 +79 +87 +88 +94 +94 +104 +106 +108 +111 +116 +118 +119 +122 +123 +127 +explain select b+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 38 Using index +select b+0 from t1; +b+0 +177 +245 +178 +363 +36 +398 +499 +399 +83 +438 +202 +307 +345 +379 +135 +188 +343 +152 +206 +454 +42 +133 +123 +349 +351 +411 +46 +468 +280 +446 +67 +368 +390 +380 +368 +118 +411 +403 +explain select a+0, b+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 38 Using index +select a+0, b+0 from t1; +a+0 b+0 +0 177 +4 245 +5 178 +9 363 +23 36 +24 398 +28 499 +29 399 +30 83 +31 438 +34 202 +44 307 +49 345 +56 379 +57 135 +59 188 +60 343 +61 152 +68 206 +68 454 +75 42 +77 133 +78 123 +79 349 +87 351 +88 411 +94 46 +94 468 +104 280 +106 446 +108 67 +111 368 +116 390 +118 380 +119 368 +122 118 +123 411 +127 403 +explain select a+0, b+0 from t1 where a > 40 and b > 200 order by 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 2 NULL 27 Using where; Using index; Using filesort +select a+0, b+0 from t1 where a > 40 and b > 200 order by 1; +a+0 b+0 +44 307 +49 345 +56 379 +60 343 +68 206 +68 454 +79 349 +87 351 +88 411 +94 468 +104 280 +106 446 +111 368 +116 390 +118 380 +119 368 +123 411 +127 403 +explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 2 NULL 8 Using where; Using index; Using filesort +select a+0, b+0 from t1 where a > 40 and a < 70 order by 2; +a+0 b+0 +57 135 +61 152 +59 188 +68 206 +44 307 +60 343 +49 345 +56 379 +68 454 +set @@max_length_for_sort_data=0; +select a+0, b+0 from t1 where a > 40 and a < 70 order by 2; +a+0 b+0 +57 135 +61 152 +59 188 +68 206 +44 307 +60 343 +49 345 +56 379 +68 454 +select hex(min(a)) from t1; +hex(min(a)) +0 +select hex(min(b)) from t1; +hex(min(b)) +24 +select hex(min(a)), hex(max(a)), hex(min(b)), hex(max(b)) from t1; +hex(min(a)) hex(max(a)) hex(min(b)) hex(max(b)) +0 7F 24 1F3 +drop table t1; +create table t1 (a int not null, b bit, c bit(9), key(a, b, c)); +insert into t1 values +(4, NULL, 1), (4, 0, 3), (2, 1, 4), (1, 1, 100), (4, 0, 23), (4, 0, 54), +(56, 0, 22), (4, 1, 100), (23, 0, 1), (4, 0, 34); +select a+0, b+0, c+0 from t1; +a+0 b+0 c+0 +1 1 100 +2 1 4 +4 NULL 1 +4 0 3 +4 0 23 +4 0 34 +4 0 54 +4 1 100 +23 0 1 +56 0 22 +select hex(min(b)) from t1 where a = 4; +hex(min(b)) +0 +select hex(min(c)) from t1 where a = 4 and b = 0; +hex(min(c)) +3 +select hex(max(b)) from t1; +hex(max(b)) +1 +select a+0, b+0, c+0 from t1 where a = 4 and b = 0 limit 2; +a+0 b+0 c+0 +4 0 3 +4 0 23 +select a+0, b+0, c+0 from t1 where a = 4 and b = 1; +a+0 b+0 c+0 +4 1 100 +select a+0, b+0, c+0 from t1 where a = 4 and b = 1 and c=100; +a+0 b+0 c+0 +4 1 100 +select a+0, b+0, c+0 from t1 order by b desc; +a+0 b+0 c+0 +2 1 4 +1 1 100 +4 1 100 +4 0 3 +4 0 23 +4 0 54 +56 0 22 +23 0 1 +4 0 34 +4 NULL 1 +select a+0, b+0, c+0 from t1 order by c; +a+0 b+0 c+0 +4 NULL 1 +23 0 1 +4 0 3 +2 1 4 +56 0 22 +4 0 23 +4 0 34 +4 0 54 +1 1 100 +4 1 100 +drop table t1; +create table t1(a bit(2), b bit(2)); +insert into t1 (a) values (0x01), (0x03), (0x02); +update t1 set b= concat(a); +select a+0, b+0 from t1; +a+0 b+0 +1 1 +3 3 +2 2 +drop table t1; +create table t1 (a bit(7), key(a)); +insert into t1 values (44), (57); +select a+0 from t1; +a+0 +44 +57 +drop table t1; +create table t1 (a bit(3), b bit(12)); +insert into t1 values (7,(1<<12)-2), (0x01,0x01ff); +select hex(a),hex(b) from t1; +hex(a) hex(b) +7 FFE +1 1FF +select hex(concat(a)),hex(concat(b)) from t1; +hex(concat(a)) hex(concat(b)) +07 0FFE +01 01FF +drop table t1; +create table t1(a int, b bit not null); +alter table t1 add primary key (a); +drop table t1; +create table t1 (a bit(19), b bit(5)); +insert into t1 values (1000, 10), (3, 8), (200, 6), (2303, 2), (12345, 4), (1, 0); +select a+0, b+0 from t1; +a+0 b+0 +1000 10 +3 8 +200 6 +2303 2 +12345 4 +1 0 +alter table t1 engine=heap; +select a+0, b+0 from t1; +a+0 b+0 +1000 10 +3 8 +200 6 +2303 2 +12345 4 +1 0 +alter table t1 add key(a, b); +select a+0, b+0 from t1; +a+0 b+0 +1000 10 +3 8 +200 6 +2303 2 +12345 4 +1 0 +alter table t1 engine=myisam; +select a+0, b+0 from t1; +a+0 b+0 +1 0 +3 8 +200 6 +1000 10 +2303 2 +12345 4 +create table t2 engine=heap select * from t1; +select a+0, b+0 from t2; +a+0 b+0 +1 0 +3 8 +200 6 +1000 10 +2303 2 +12345 4 +drop table t1; +create table t1 select * from t2; +select a+0, b+0 from t1; +a+0 b+0 +1 0 +3 8 +200 6 +1000 10 +2303 2 +12345 4 +drop table t1, t2; +create table t1 (a int, b time, c tinyint, d bool, e char(10), f bit(1), +g bit(1) NOT NULL default 1, h char(1) default 'a'); +insert into t1 set a=1; +select hex(g), h from t1; +hex(g) h +1 a +drop table t1; +create table t1 (a int, b time, c tinyint, d bool, e char(10), f bit(1), +g bit(1) NOT NULL default 1); +insert into t1 set a=1; +select hex(g) from t1; +hex(g) +1 +drop table t1; +create table t1 (a int, b time, c tinyint, d bool, e char(10), f bit(1), +h char(1) default 'a') engine=myisam; +insert into t1 set a=1; +select h from t1; +h +a +drop table t1; +create table t1 (a bit(8)) engine=heap; +insert into t1 values ('1111100000'); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select a+0 from t1; +a+0 +255 +drop table t1; +create table t1 (a bit(7)); +insert into t1 values (120), (0), (111); +select a+0 from t1 union select a+0 from t1; +a+0 +120 +0 +111 +select a+0 from t1 union select NULL; +a+0 +120 +0 +111 +NULL +select NULL union select a+0 from t1; +NULL +NULL +120 +0 +111 +create table t2 select a from t1 union select a from t1; +select a+0 from t2; +a+0 +120 +0 +111 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` bit(7) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1, t2; +create table t1 (id1 int(11), b1 bit(1)); +create table t2 (id2 int(11), b2 bit(1)); +insert into t1 values (1, 1), (2, 0), (3, 1); +insert into t2 values (2, 1), (3, 0), (4, 0); +create algorithm=undefined view v1 as +select b1+0, b2+0 from t1, t2 where id1 = id2 and b1 = 0 +union +select b1+0, b2+0 from t1, t2 where id1 = id2 and b2 = 1; +select * from v1; +b1+0 b2+0 +0 1 +drop table t1, t2; +drop view v1; +create table t1(a bit(4)); +insert into t1(a) values (1), (2), (5), (4), (3); +insert into t1 select * from t1; +select a+0 from t1; +a+0 +1 +2 +5 +4 +3 +1 +2 +5 +4 +3 +drop table t1; +create table t1 (a1 int(11), b1 bit(2)); +create table t2 (a2 int(11), b2 bit(2)); +insert into t1 values (1, 1), (2, 0), (3, 1), (4, 2); +insert into t2 values (2, 1), (3, 0), (4, 1), (5, 2); +select a1, a2, b1+0, b2+0 from t1 join t2 on a1 = a2; +a1 a2 b1+0 b2+0 +2 2 0 1 +3 3 1 0 +4 4 2 1 +select a1, a2, b1+0, b2+0 from t1 join t2 on a1 = a2 order by a1; +a1 a2 b1+0 b2+0 +2 2 0 1 +3 3 1 0 +4 4 2 1 +select a1, a2, b1+0, b2+0 from t1 join t2 on b1 = b2; +a1 a2 b1+0 b2+0 +1 2 1 1 +3 2 1 1 +2 3 0 0 +1 4 1 1 +3 4 1 1 +4 5 2 2 +select sum(a1), b1+0, b2+0 from t1 join t2 on b1 = b2 group by b1 order by 1; +sum(a1) b1+0 b2+0 +2 0 0 +4 2 2 +8 1 1 diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result new file mode 100644 index 00000000000..8d9c9756a33 --- /dev/null +++ b/mysql-test/r/type_bit_innodb.result @@ -0,0 +1,404 @@ +select 0 + b'1'; +0 + b'1' +1 +select 0 + b'0'; +0 + b'0' +0 +select 0 + b'000001'; +0 + b'000001' +1 +select 0 + b'000011'; +0 + b'000011' +3 +select 0 + b'000101'; +0 + b'000101' +5 +select 0 + b'000000'; +0 + b'000000' +0 +select 0 + b'10000000'; +0 + b'10000000' +128 +select 0 + b'11111111'; +0 + b'11111111' +255 +select 0 + b'10000001'; +0 + b'10000001' +129 +select 0 + b'1000000000000000'; +0 + b'1000000000000000' +32768 +select 0 + b'1111111111111111'; +0 + b'1111111111111111' +65535 +select 0 + b'1000000000000001'; +0 + b'1000000000000001' +32769 +drop table if exists t1; +create table t1 (a bit(65)) engine=innodb; +ERROR 42000: Display width out of range for column 'a' (max = 64) +create table t1 (a bit(0)) engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bit(1) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a bit(64)) engine=innodb; +insert into t1 values +(b'1111111111111111111111111111111111111111111111111111111111111111'), +(b'1000000000000000000000000000000000000000000000000000000000000000'), +(b'0000000000000000000000000000000000000000000000000000000000000001'), +(b'1010101010101010101010101010101010101010101010101010101010101010'), +(b'0101010101010101010101010101010101010101010101010101010101010101'); +select hex(a) from t1; +hex(a) +FFFFFFFFFFFFFFFF +8000000000000000 +1 +AAAAAAAAAAAAAAAA +5555555555555555 +drop table t1; +create table t1 (a bit) engine=innodb; +insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001'); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select hex(a) from t1; +hex(a) +0 +1 +0 +1 +1 +alter table t1 add unique (a); +ERROR 23000: Duplicate entry '' for key 1 +drop table t1; +create table t1 (a bit(2)) engine=innodb; +insert into t1 values (b'00'), (b'01'), (b'10'), (b'100'); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select a+0 from t1; +a+0 +0 +1 +2 +3 +alter table t1 add key (a); +explain select a+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 2 NULL 4 Using index +select a+0 from t1; +a+0 +0 +1 +2 +3 +drop table t1; +create table t1 (a bit(7), b bit(9), key(a, b)) engine=innodb; +insert into t1 values +(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177), +(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380), +(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36), +(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499), +(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403), +(44, 307), (68, 454), (57, 135); +explain select a+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 38 Using index +select a+0 from t1; +a+0 +0 +4 +5 +9 +23 +24 +28 +29 +30 +31 +34 +44 +49 +56 +57 +59 +60 +61 +68 +68 +75 +77 +78 +79 +87 +88 +94 +94 +104 +106 +108 +111 +116 +118 +119 +122 +123 +127 +explain select b+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 38 Using index +select b+0 from t1; +b+0 +177 +245 +178 +363 +36 +398 +499 +399 +83 +438 +202 +307 +345 +379 +135 +188 +343 +152 +206 +454 +42 +133 +123 +349 +351 +411 +46 +468 +280 +446 +67 +368 +390 +380 +368 +118 +411 +403 +explain select a+0, b+0 from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 5 NULL 38 Using index +select a+0, b+0 from t1; +a+0 b+0 +0 177 +4 245 +5 178 +9 363 +23 36 +24 398 +28 499 +29 399 +30 83 +31 438 +34 202 +44 307 +49 345 +56 379 +57 135 +59 188 +60 343 +61 152 +68 206 +68 454 +75 42 +77 133 +78 123 +79 349 +87 351 +88 411 +94 46 +94 468 +104 280 +106 446 +108 67 +111 368 +116 390 +118 380 +119 368 +122 118 +123 411 +127 403 +explain select a+0, b+0 from t1 where a > 40 and b > 200 order by 1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 2 NULL 19 Using where; Using index; Using filesort +select a+0, b+0 from t1 where a > 40 and b > 200 order by 1; +a+0 b+0 +44 307 +49 345 +56 379 +60 343 +68 206 +68 454 +79 349 +87 351 +88 411 +94 468 +104 280 +106 446 +111 368 +116 390 +118 380 +119 368 +123 411 +127 403 +explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 2 NULL 8 Using where; Using index; Using filesort +select a+0, b+0 from t1 where a > 40 and a < 70 order by 2; +a+0 b+0 +57 135 +61 152 +59 188 +68 206 +44 307 +60 343 +49 345 +56 379 +68 454 +set @@max_length_for_sort_data=0; +select a+0, b+0 from t1 where a > 40 and a < 70 order by 2; +a+0 b+0 +57 135 +61 152 +59 188 +68 206 +44 307 +60 343 +49 345 +56 379 +68 454 +select hex(min(a)) from t1; +hex(min(a)) +0 +select hex(min(b)) from t1; +hex(min(b)) +24 +select hex(min(a)), hex(max(a)), hex(min(b)), hex(max(b)) from t1; +hex(min(a)) hex(max(a)) hex(min(b)) hex(max(b)) +0 7F 24 1F3 +drop table t1; +create table t1 (a int not null, b bit, c bit(9), key(a, b, c)) engine=innodb; +insert into t1 values +(4, NULL, 1), (4, 0, 3), (2, 1, 4), (1, 1, 100), (4, 0, 23), (4, 0, 54), +(56, 0, 22), (4, 1, 100), (23, 0, 1), (4, 0, 34); +select a+0, b+0, c+0 from t1; +a+0 b+0 c+0 +1 1 100 +2 1 4 +4 NULL 1 +4 0 3 +4 0 23 +4 0 34 +4 0 54 +4 1 100 +23 0 1 +56 0 22 +select hex(min(b)) from t1 where a = 4; +hex(min(b)) +0 +select hex(min(c)) from t1 where a = 4 and b = 0; +hex(min(c)) +3 +select hex(max(b)) from t1; +hex(max(b)) +1 +select a+0, b+0, c+0 from t1 where a = 4 and b = 0 limit 2; +a+0 b+0 c+0 +4 0 3 +4 0 23 +select a+0, b+0, c+0 from t1 where a = 4 and b = 1; +a+0 b+0 c+0 +4 1 100 +select a+0, b+0, c+0 from t1 where a = 4 and b = 1 and c=100; +a+0 b+0 c+0 +4 1 100 +select a+0, b+0, c+0 from t1 order by b desc; +a+0 b+0 c+0 +2 1 4 +1 1 100 +4 1 100 +4 0 3 +4 0 23 +4 0 54 +56 0 22 +23 0 1 +4 0 34 +4 NULL 1 +select a+0, b+0, c+0 from t1 order by c; +a+0 b+0 c+0 +4 NULL 1 +23 0 1 +4 0 3 +2 1 4 +56 0 22 +4 0 23 +4 0 34 +4 0 54 +1 1 100 +4 1 100 +drop table t1; +create table t1(a bit(2), b bit(2)) engine=innodb; +insert into t1 (a) values (0x01), (0x03), (0x02); +update t1 set b= concat(a); +select a+0, b+0 from t1; +a+0 b+0 +1 1 +3 3 +2 2 +drop table t1; +create table t1 (a bit(7), key(a)) engine=innodb; +insert into t1 values (44), (57); +select a+0 from t1; +a+0 +44 +57 +drop table t1; +create table t1 (a bit(3), b bit(12)) engine=innodb; +insert into t1 values (7,(1<<12)-2), (0x01,0x01ff); +select hex(a),hex(b) from t1; +hex(a) hex(b) +7 FFE +1 1FF +select hex(concat(a)),hex(concat(b)) from t1; +hex(concat(a)) hex(concat(b)) +07 0FFE +01 01FF +drop table t1; +create table t1(a int, b bit not null) engine=innodb; +alter table t1 add primary key (a); +drop table t1; +create table t1 (a bit, b bit(10)) engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bit(1) default NULL, + `b` bit(10) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t1 engine=heap; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bit(1) default NULL, + `b` bit(10) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +alter table t1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` bit(1) default NULL, + `b` bit(10) default NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 6b4b54fbb66..193ed298339 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -7,14 +7,16 @@ b text YES NULL c tinyblob YES NULL d mediumtext YES NULL e longtext YES NULL -CREATE TABLE t2 (a char(257), b varbinary(70000), c varchar(70000000)); +CREATE TABLE t2 (a char(255), b varbinary(70000), c varchar(70000000)); Warnings: -Warning 1246 Converting column 'a' from CHAR to TEXT -Warning 1246 Converting column 'b' from CHAR to BLOB -Warning 1246 Converting column 'c' from CHAR to TEXT +Note 1246 Converting column 'b' from VARBINARY to BLOB +Note 1246 Converting column 'c' from VARCHAR to TEXT +CREATE TABLE t4 (c varchar(65530) character set utf8 not null); +Warnings: +Note 1246 Converting column 'c' from VARCHAR to TEXT show columns from t2; Field Type Null Key Default Extra -a text YES NULL +a char(255) YES NULL b mediumblob YES NULL c longtext YES NULL create table t3 (a long, b long byte); @@ -24,10 +26,18 @@ t3 CREATE TABLE `t3` ( `a` mediumtext, `b` mediumblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1,t2,t3 -#; +show create TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `c` mediumtext character set utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1,t2,t3,t4; CREATE TABLE t1 (a char(257) default "hello"); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead +CREATE TABLE t2 (a char(256)); +ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead +CREATE TABLE t1 (a varchar(70000) default "hello"); +ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead CREATE TABLE t2 (a blob default "hello"); ERROR 42000: BLOB/TEXT column 'a' can't have a default value drop table if exists t1,t2; @@ -71,16 +81,16 @@ lock tables t1 READ; show full fields from t1; Field Type Collation Null Key Default Extra Privileges Comment t text latin1_swedish_ci YES NULL # -c varchar(10) latin1_swedish_ci YES NULL # +c char(10) latin1_swedish_ci YES NULL # b blob NULL YES NULL # -d varbinary(10) NULL YES NULL # +d binary(10) NULL YES NULL # lock tables t1 WRITE; show full fields from t1; Field Type Collation Null Key Default Extra Privileges Comment t text latin1_swedish_ci YES NULL # -c varchar(10) latin1_swedish_ci YES NULL # +c char(10) latin1_swedish_ci YES NULL # b blob NULL YES NULL # -d varbinary(10) NULL YES NULL # +d binary(10) NULL YES NULL # unlock tables; select t from t1 where t like "hello"; t @@ -492,7 +502,7 @@ select foobar, boggle from t1 where foobar = 'fish' and boggle = 10; foobar boggle fish 10 drop table t1; -create table t1 (id integer auto_increment unique,imagem LONGBLOB not null); +create table t1 (id integer auto_increment unique,imagem LONGBLOB not null default ''); insert into t1 (id) values (1); select charset(load_file('../../std_data/words.dat')), @@ -520,6 +530,11 @@ l longblob NULL YES NULL # drop table t1; create table t1 (id integer primary key auto_increment, txt text not null, unique index txt_index (txt (20))); insert into t1 (txt) values ('Chevy'), ('Chevy '); +ERROR 23000: Duplicate entry 'Chevy ' for key 2 +insert into t1 (txt) values ('Chevy'), ('CHEVY'); +ERROR 23000: Duplicate entry 'Chevy' for key 2 +alter table t1 drop index txt_index, add index txt_index (txt(20)); +insert into t1 (txt) values ('Chevy '); select * from t1 where txt='Chevy'; id txt 1 Chevy @@ -589,7 +604,7 @@ id txt 2 Chevy 3 Ford drop table t1; -create table t1 (id integer primary key auto_increment, txt text, unique index txt_index (txt (20))); +create table t1 (id integer primary key auto_increment, txt text, index txt_index (txt (20))); insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL); select * from t1 where txt='Chevy' or txt is NULL; id txt @@ -688,3 +703,18 @@ select max(i) from t1 where c = ''; max(i) 4 drop table t1; +create table t1 (a int, b int, c tinyblob, d int, e int); +alter table t1 add primary key (a,b,c(255),d); +alter table t1 add key (a,b,d,e); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL default '0', + `b` int(11) NOT NULL default '0', + `c` tinyblob NOT NULL, + `d` int(11) NOT NULL default '0', + `e` int(11) default NULL, + PRIMARY KEY (`a`,`b`,`c`(255),`d`), + KEY `a` (`a`,`b`,`d`,`e`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 3428b5969d9..e88eebffb55 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -99,7 +99,7 @@ DROP TABLE t1, t2, t3; CREATE TABLE t1 (y YEAR); INSERT INTO t1 VALUES ('abc'); Warnings: -Warning 1265 Data truncated for column 'y' at row 1 +Warning 1264 Out of range value adjusted for column 'y' at row 1 SELECT * FROM t1; y 0000 diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index f313a6b934b..85f899be5d8 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -52,7 +52,7 @@ t truncate table t1; insert into t1 values("2003-0303 12:13:14"); Warnings: -Warning 1264 Data truncated; out of range for column 't' at row 1 +Warning 1264 Out of range value adjusted for column 't' at row 1 select * from t1; t 0000-00-00 00:00:00 @@ -101,7 +101,7 @@ date numfacture expedition 0000-00-00 00:00:00 1212 0001-00-00 00:00:00 EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref expedition expedition 8 const 1 Using where +1 SIMPLE t1 ref expedition expedition 8 const 1 drop table t1; create table t1 (a datetime not null, b datetime not null); insert into t1 values (now(), now()); @@ -113,12 +113,12 @@ create table t1 (t datetime); insert into t1 values (20030102030460),(20030102036301),(20030102240401), (20030132030401),(20031302030401),(100001202030401); Warnings: -Warning 1265 Data truncated for column 't' at row 1 -Warning 1265 Data truncated for column 't' at row 2 -Warning 1265 Data truncated for column 't' at row 3 -Warning 1265 Data truncated for column 't' at row 4 -Warning 1265 Data truncated for column 't' at row 5 -Warning 1265 Data truncated for column 't' at row 6 +Warning 1264 Out of range value adjusted for column 't' at row 1 +Warning 1264 Out of range value adjusted for column 't' at row 2 +Warning 1264 Out of range value adjusted for column 't' at row 3 +Warning 1264 Out of range value adjusted for column 't' at row 4 +Warning 1264 Out of range value adjusted for column 't' at row 5 +Warning 1264 Out of range value adjusted for column 't' at row 6 select * from t1; t 0000-00-00 00:00:00 @@ -132,12 +132,12 @@ insert into t1 values ("2003-01-02 03:04:60"),("2003-01-02 03:63:01"),("2003-01-02 24:04:01"), ("2003-01-32 03:04:01"),("2003-13-02 03:04:01"), ("10000-12-02 03:04:00"); Warnings: -Warning 1264 Data truncated; out of range for column 't' at row 1 -Warning 1264 Data truncated; out of range for column 't' at row 2 -Warning 1264 Data truncated; out of range for column 't' at row 3 -Warning 1264 Data truncated; out of range for column 't' at row 4 -Warning 1264 Data truncated; out of range for column 't' at row 5 -Warning 1264 Data truncated; out of range for column 't' at row 6 +Warning 1264 Out of range value adjusted for column 't' at row 1 +Warning 1264 Out of range value adjusted for column 't' at row 2 +Warning 1264 Out of range value adjusted for column 't' at row 3 +Warning 1264 Out of range value adjusted for column 't' at row 4 +Warning 1264 Out of range value adjusted for column 't' at row 5 +Warning 1264 Out of range value adjusted for column 't' at row 6 select * from t1; t 0000-00-00 00:00:00 @@ -149,8 +149,8 @@ t delete from t1; insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer"); Warnings: -Warning 1264 Data truncated; out of range for column 't' at row 1 -Warning 1264 Data truncated; out of range for column 't' at row 2 +Warning 1264 Out of range value adjusted for column 't' at row 1 +Warning 1264 Out of range value adjusted for column 't' at row 2 select * from t1; t 0000-00-00 00:00:00 diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index a9dcabd121e..15f9b839994 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1, t2; SET SQL_WARNINGS=1; CREATE TABLE t1 ( id int(11) NOT NULL auto_increment, @@ -156,42 +156,62 @@ insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); insert into t1 values ("-.1"),("+.1"),(".1"); insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +insert into t1 values ("1e+4294967296"),("1e-4294967296"); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 2 +insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809"); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'a' at row 2 +Note 1265 Data truncated for column 'a' at row 3 +Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'a' at row 4 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: -Warning 1265 Data truncated for column 'a' at row 3 +Note 1265 Data truncated for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 3 select * from t1; a 0.00 --0.00 -+0.00 -01.00 -+01.00 --01.00 +0.00 +0.00 +1.00 +1.00 +-1.00 -0.10 -+0.10 0.10 -000000001.00 -+00000001.00 --00000001.00 -111111111.11 -111111111.11 +0.10 +1.00 +1.00 +-1.00 +99999999.99 +99999999.99 -11111111.11 -99999999.99 -999999999.99 -999999999.99 -999999999.99 +99999999.99 +99999999.99 +99999999.99 0.00 -99999999.99 +99999999.99 +0.00 +99999999.99 +0.00 +0.00 +0.00 123.40 12340.00 1.23 @@ -201,45 +221,46 @@ drop table t1; create table t1 (a decimal(10,2) unsigned); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 6 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 6 insert into t1 values ("-.1"),("+.1"),(".1"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: -Warning 1265 Data truncated for column 'a' at row 3 +Note 1265 Data truncated for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 3 select * from t1; a 0.00 0.00 -+0.00 -01.00 -+01.00 +0.00 +1.00 +1.00 0.00 0.00 -+0.10 0.10 -00000001.00 -+0000001.00 +0.10 +1.00 +1.00 0.00 99999999.99 99999999.99 @@ -259,32 +280,33 @@ drop table t1; create table t1 (a decimal(10,2) zerofill); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 6 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 6 insert into t1 values ("-.1"),("+.1"),(".1"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: -Warning 1265 Data truncated for column 'a' at row 3 +Note 1265 Data truncated for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 3 select * from t1; a 00000000.00 @@ -319,20 +341,27 @@ insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0); insert into t1 values (-.1),(+.1),(.1); insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values (1e+100),(1e-100),(-1e+100); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0); +Warnings: +Note 1265 Data truncated for column 'a' at row 3 +insert into t1 values (MID("987",1,2)),("987 "),("987.6e+2 "); select * from t1; a 0.00 --0.00 +0.00 0.00 1.00 1.00 @@ -343,13 +372,13 @@ a 1.00 1.00 -1.00 -111111111.11 -111111111.11 +99999999.99 +99999999.99 -11111111.11 -99999999.99 -999999999.99 -999999999.99 -999999999.99 +99999999.99 +99999999.99 +99999999.99 0.00 -99999999.99 123.40 @@ -357,44 +386,48 @@ a 1.23 1230.00 123.00 +98.00 +987.00 +98760.00 drop table t1; create table t1 (a decimal); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 7 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 6 +Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a -9999999999 -1 -+1 -01 -+0000000001 -12345678901 -99999999999 +1 +1 +1 +9999999999 +9999999999 drop table t1; create table t1 (a decimal unsigned); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 7 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a 0 0 -+1 -01 -+000000001 +1 +1 +1 1234567890 9999999999 drop table t1; create table t1 (a decimal zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 7 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a 0000000000 @@ -408,9 +441,9 @@ drop table t1; create table t1 (a decimal unsigned zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1264 Data truncated; out of range for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 7 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a 0000000000 @@ -424,19 +457,17 @@ drop table t1; create table t1(a decimal(10,0)); insert into t1 values ("1e4294967295"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 select * from t1; a -99999999999 +9999999999 delete from t1; insert into t1 values("1e4294967297"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 select * from t1; a -99999999999 +9999999999 drop table t1; CREATE TABLE t1 (a_dec DECIMAL(-1,0)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,0))' at line 1 @@ -445,75 +476,70 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE TABLE t1 (a_dec DECIMAL(-1,1)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,1))' at line 1 CREATE TABLE t1 (a_dec DECIMAL(0,11)); -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a_dec` decimal(12,11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -DROP TABLE t1; +ERROR 42000: Scale may not be larger than the precision (column 'a_dec'). create table t1(a decimal(7,3)); insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000'); select * from t1; a 1.000 -+1.000 +1.000 +-1.000 +1.000 +1.000 -1.000 -00001.000 -+0001.000 --0001.000 10.000 -+10.000 +10.000 +-10.000 +10.000 +10.000 -10.000 -00010.000 -+0010.000 --0010.000 100.000 -+100.000 +100.000 -100.000 -00100.000 -+0100.000 --0100.000 +100.000 +100.000 +-100.000 +1000.000 1000.000 -+1000.000 -1000.000 -01000.000 -+1000.000 +1000.000 +1000.000 -1000.000 -10000.000 -10000.000 +9999.999 +9999.999 -9999.999 -10000.000 -10000.000 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 drop table t1; create table t1(a decimal(7,3) unsigned); @@ -521,22 +547,22 @@ insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000 select * from t1; a 1.000 -+1.000 +1.000 0.000 -0001.000 -+001.000 +1.000 +1.000 0.000 10.000 -+10.000 +10.000 0.000 -0010.000 -+010.000 +10.000 +10.000 0.000 100.000 -+100.000 +100.000 0.000 -0100.000 -+100.000 +100.000 +100.000 0.000 1000.000 1000.000 @@ -646,3 +672,92 @@ a 9999.999 0000.000 drop table t1; +CREATE TABLE t1 +(EMPNUM CHAR(3) NOT NULL, +HOURS DECIMAL(5)); +CREATE TABLE t2 +(EMPNUM CHAR(3) NOT NULL, +HOURS BIGINT); +INSERT INTO t1 VALUES ('E1',40); +INSERT INTO t1 VALUES ('E8',NULL); +INSERT INTO t2 VALUES ('E1',40); +SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t2); +EMPNUM +E1 +SELECT EMPNUM FROM t1 WHERE HOURS IN (SELECT HOURS FROM t1); +EMPNUM +E1 +DROP TABLE t1,t2; +create table t1 (d decimal(64,0)); +insert into t1 values (1); +select * from t1; +d +1 +drop table t1; +create table t1 (d decimal(5)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `d` decimal(5,0) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (d decimal); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `d` decimal(10,0) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (d decimal(66,0)); +ERROR 42000: Too big precision 66 specified for column 'd'. Maximum is 65. +CREATE TABLE t1 (i INT, d1 DECIMAL(9,2), d2 DECIMAL(9,2)); +INSERT INTO t1 VALUES (1, 101.40, 21.40), (1, -80.00, 0.00), +(2, 0.00, 0.00), (2, -13.20, 0.00), (2, 59.60, 46.40), +(2, 30.40, 30.40), (3, 37.00, 7.40), (3, -29.60, 0.00), +(4, 60.00, 15.40), (4, -10.60, 0.00), (4, -34.00, 0.00), +(5, 33.00, 0.00), (5, -25.80, 0.00), (5, 0.00, 7.20), +(6, 0.00, 0.00), (6, -51.40, 0.00); +SELECT i, SUM(d1) AS a, SUM(d2) AS b FROM t1 GROUP BY i HAVING a <> b; +i a b +6 -51.40 0.00 +SELECT i, ROUND(SUM(d1), 2) AS a, ROUND(SUM(d2), 2) AS b FROM t1 GROUP BY i +HAVING a <> b; +i a b +6 -51.40 0.00 +drop table t1; +create table t1 (c1 varchar(100), c2 longtext); +insert into t1 set c1= 'non PS, 1.0 as constant', c2=1.0; +prepare stmt from "insert into t1 set c1='PS, 1.0 as constant ', c2=1.0"; +execute stmt; +set @a=1.0; +insert into t1 set c1='non PS, 1.0 in parameter', c2=@a; +prepare stmt from "insert into t1 set c1='PS, 1.0 in parameter ', c2=?"; +execute stmt using @a; +select * from t1; +c1 c2 +non PS, 1.0 as constant 1.0 +PS, 1.0 as constant 1.0 +non PS, 1.0 in parameter 1.0 +PS, 1.0 in parameter 1.0 +deallocate prepare stmt; +drop table t1; +create table t1 ( +strippedproductid char(15) not null default '', +zlevelprice decimal(10,2) default null, +primary key (strippedproductid) +); +create table t2 ( +productid char(15) not null default '', +zlevelprice char(21) default null, +primary key (productid) +); +insert into t1 values ('002trans','49.99'); +insert into t1 values ('003trans','39.98'); +insert into t1 values ('004trans','31.18'); +insert INTO t2 SELECT * FROM t1; +select * from t2; +productid zlevelprice +002trans 49.99 +003trans 39.98 +004trans 31.18 +drop table t1, t2; diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index ab3c441a7e2..02ba3c7ebd3 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1626,7 +1626,7 @@ create table t1 (a enum (' ','a','b') not null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` enum('','a','b') NOT NULL default '' + `a` enum('','a','b') NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a enum (' ','a','b ') not null default 'b '); @@ -1654,7 +1654,7 @@ set names latin1; create table t1 (a enum(0xE4, '1', '2') not null default 0xE4); show columns from t1; Field Type Null Key Default Extra -a enum('ä','1','2') ä +a enum('ä','1','2') NO ä show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1670,12 +1670,12 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) default '1', - `b` enum('value','öäü_value','ÊÃÕ') NOT NULL default 'value' + `b` enum('value','öäü_value','ÊÃÕ') NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 show columns from t1; Field Type Null Key Default Extra a int(11) YES 1 -b enum('value','öäü_value','ÊÃÕ') value +b enum('value','öäü_value','ÊÃÕ') NO drop table t1; CREATE TABLE t1 (c enum('a', 'A') BINARY); INSERT INTO t1 VALUES ('a'),('A'); diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 319a957498b..d243985332e 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -24,8 +24,8 @@ f1 float NULL YES NULL # f2 double NULL YES NULL # insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150); Warnings: -Warning 1264 Data truncated; out of range for column 'f1' at row 7 -Warning 1264 Data truncated; out of range for column 'f1' at row 8 +Warning 1264 Out of range value adjusted for column 'f1' at row 7 +Warning 1264 Out of range value adjusted for column 'f1' at row 8 insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150); select * from t1; f1 f2 @@ -72,7 +72,7 @@ select a from t1 order by a; a -0.010 -0.002 --0.000 +0.000 0.000 1.000 select min(a) from t1; @@ -103,7 +103,7 @@ select max(a),min(a),avg(a) from t1; max(a) min(a) avg(a) 1 1 1 drop table t1; -create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(5,6)); +create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(7,6)); show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment f float NULL YES NULL # @@ -125,7 +125,7 @@ select a from t1 order by a; a -0.010 -0.002 --0.000 +0.000 0.000 1.000 select min(a) from t1; @@ -133,17 +133,7 @@ min(a) -0.010 drop table t1; create table t1 (a float(200,100), b double(200,100)); -insert t1 values (1.0, 2.0); -select * from t1; -a b -1.000000000000000000000000000000 2.000000000000000000000000000000 -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` float(200,30) default NULL, - `b` double(200,30) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; +ERROR 42000: Too big scale 100 specified for column 'a'. Maximum is 30. create table t1 (c20 char); insert into t1 values (5000.0); Warnings: @@ -159,7 +149,7 @@ create table t1 (d1 double, d2 double unsigned); insert into t1 set d1 = -1.0; update t1 set d2 = d1; Warnings: -Warning 1264 Data truncated; out of range for column 'd2' at row 1 +Warning 1264 Out of range value adjusted for column 'd2' at row 1 select * from t1; d1 d2 -1 0 @@ -167,12 +157,12 @@ drop table t1; create table t1 (f float(4,3)); insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); Warnings: -Warning 1264 Data truncated; out of range for column 'f' at row 1 -Warning 1264 Data truncated; out of range for column 'f' at row 2 -Warning 1264 Data truncated; out of range for column 'f' at row 3 -Warning 1264 Data truncated; out of range for column 'f' at row 4 -Warning 1264 Data truncated; out of range for column 'f' at row 5 -Warning 1264 Data truncated; out of range for column 'f' at row 6 +Warning 1264 Out of range value adjusted for column 'f' at row 1 +Warning 1264 Out of range value adjusted for column 'f' at row 2 +Warning 1264 Out of range value adjusted for column 'f' at row 3 +Warning 1264 Out of range value adjusted for column 'f' at row 4 +Warning 1264 Out of range value adjusted for column 'f' at row 5 +Warning 1264 Out of range value adjusted for column 'f' at row 6 select * from t1; f -9.999 @@ -185,12 +175,12 @@ drop table if exists t1; create table t1 (f double(4,3)); insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); Warnings: -Warning 1264 Data truncated; out of range for column 'f' at row 1 -Warning 1264 Data truncated; out of range for column 'f' at row 2 -Warning 1264 Data truncated; out of range for column 'f' at row 3 -Warning 1264 Data truncated; out of range for column 'f' at row 4 -Warning 1264 Data truncated; out of range for column 'f' at row 5 -Warning 1264 Data truncated; out of range for column 'f' at row 6 +Warning 1264 Out of range value adjusted for column 'f' at row 1 +Warning 1264 Out of range value adjusted for column 'f' at row 2 +Warning 1264 Out of range value adjusted for column 'f' at row 3 +Warning 1264 Out of range value adjusted for column 'f' at row 4 +Warning 1264 Out of range value adjusted for column 'f' at row 5 +Warning 1264 Out of range value adjusted for column 'f' at row 6 select * from t1; f -9.999 diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result new file mode 100644 index 00000000000..d39d2e3401d --- /dev/null +++ b/mysql-test/r/type_newdecimal.result @@ -0,0 +1,988 @@ +drop table if exists t1; +select 1.1 IN (1.0, 1.2); +1.1 IN (1.0, 1.2) +0 +select 1.1 IN (1.0, 1.2, 1.1, 1.4, 0.5); +1.1 IN (1.0, 1.2, 1.1, 1.4, 0.5) +1 +select 1.1 IN (1.0, 1.2, NULL, 1.4, 0.5); +1.1 IN (1.0, 1.2, NULL, 1.4, 0.5) +NULL +select 0.5 IN (1.0, 1.2, NULL, 1.4, 0.5); +0.5 IN (1.0, 1.2, NULL, 1.4, 0.5) +1 +select 1 IN (1.11, 1.2, 1.1, 1.4, 1, 0.5); +1 IN (1.11, 1.2, 1.1, 1.4, 1, 0.5) +1 +select 1 IN (1.11, 1.2, 1.1, 1.4, NULL, 0.5); +1 IN (1.11, 1.2, 1.1, 1.4, NULL, 0.5) +NULL +select case 1.0 when 0.1 then "a" when 1.0 then "b" else "c" END; +case 1.0 when 0.1 then "a" when 1.0 then "b" else "c" END +b +select case 0.1 when 0.1 then "a" when 1.0 then "b" else "c" END; +case 0.1 when 0.1 then "a" when 1.0 then "b" else "c" END +a +select case 1 when 0.1 then "a" when 1.0 then "b" else "c" END; +case 1 when 0.1 then "a" when 1.0 then "b" else "c" END +b +select case 1.0 when 0.1 then "a" when 1 then "b" else "c" END; +case 1.0 when 0.1 then "a" when 1 then "b" else "c" END +b +select case 1.001 when 0.1 then "a" when 1 then "b" else "c" END; +case 1.001 when 0.1 then "a" when 1 then "b" else "c" END +c +create table t1 (a decimal(6,3)); +insert into t1 values (1.0), (NULL), (0.1); +select * from t1; +a +1.000 +NULL +0.100 +select 0.1 in (1.0, 1.2, 1.1, a, 1.4, 0.5) from t1; +0.1 in (1.0, 1.2, 1.1, a, 1.4, 0.5) +0 +NULL +1 +drop table t1; +create table t1 select if(1, 1.1, 1.2), if(0, 1.1, 1.2), if(0.1, 1.1, 1.2), if(0, 1, 1.1), if(0, NULL, 1.2), if(1, 0.22e1, 1.1), if(1E0, 1.1, 1.2); +select * from t1; +if(1, 1.1, 1.2) if(0, 1.1, 1.2) if(0.1, 1.1, 1.2) if(0, 1, 1.1) if(0, NULL, 1.2) if(1, 0.22e1, 1.1) if(1E0, 1.1, 1.2) +1.1 1.2 1.1 1.1 1.2 2.2 1.1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `if(1, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0', + `if(0, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0', + `if(0.1, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0', + `if(0, 1, 1.1)` decimal(2,1) NOT NULL default '0.0', + `if(0, NULL, 1.2)` decimal(2,1) default NULL, + `if(1, 0.22e1, 1.1)` double NOT NULL default '0', + `if(1E0, 1.1, 1.2)` decimal(2,1) NOT NULL default '0.0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select nullif(1.1, 1.1), nullif(1.1, 1.2), nullif(1.1, 0.11e1), nullif(1.0, 1), nullif(1, 1.0), nullif(1, 1.1); +select * from t1; +nullif(1.1, 1.1) nullif(1.1, 1.2) nullif(1.1, 0.11e1) nullif(1.0, 1) nullif(1, 1.0) nullif(1, 1.1) +NULL 1.1 NULL NULL NULL 1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `nullif(1.1, 1.1)` decimal(2,1) default NULL, + `nullif(1.1, 1.2)` decimal(2,1) default NULL, + `nullif(1.1, 0.11e1)` decimal(2,1) default NULL, + `nullif(1.0, 1)` decimal(2,1) default NULL, + `nullif(1, 1.0)` int(1) default NULL, + `nullif(1, 1.1)` int(1) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a decimal(4,2)); +insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select a from t1; +a +99.99 +99.99 +99.99 +99.99 +-99.99 +-99.99 +-99.99 +-99.99 +drop table t1; +create table t1 (a decimal(4,2) unsigned); +insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select a from t1; +a +99.99 +99.99 +99.99 +99.99 +0.00 +0.00 +0.00 +0.00 +drop table t1; +create table t1 (a bigint); +insert into t1 values (18446744073709551615.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (9223372036854775808.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (-18446744073709551615.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select * from t1; +a +9223372036854775807 +9223372036854775807 +-9223372036854775808 +drop table t1; +create table t1 (a bigint unsigned); +insert into t1 values (18446744073709551615.0); +insert into t1 values (9223372036854775808.0); +insert into t1 values (9999999999999999999999999.000); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (-1.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select * from t1; +a +18446744073709551615 +9223372036854775808 +18446744073709551615 +0 +drop table t1; +create table t1 (a tinyint); +insert into t1 values (18446744073709551615.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (9223372036854775808.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select * from t1; +a +127 +127 +drop table t1; +create table t1 select round(15.4,-1), truncate(-5678.123451,-3), abs(-1.1), -(-1.1); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `round(15.4,-1)` decimal(3,0) NOT NULL default '0', + `truncate(-5678.123451,-3)` decimal(4,0) NOT NULL default '0', + `abs(-1.1)` decimal(3,1) NOT NULL default '0.0', + `-(-1.1)` decimal(2,1) NOT NULL default '0.0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set session sql_mode='traditional'; +select 1e10/0e0; +1e10/0e0 +NULL +Warnings: +Error 1365 Division by 0 +create table wl1612 (col1 int, col2 decimal(38,10), col3 numeric(38,10)); +insert into wl1612 values(1,12345678901234567890.1234567890,12345678901234567890.1234567890); +select * from wl1612; +col1 col2 col3 +1 12345678901234567890.1234567890 12345678901234567890.1234567890 +insert into wl1612 values(2,01234567890123456789.0123456789,01234567890123456789.0123456789); +select * from wl1612 where col1=2; +col1 col2 col3 +2 1234567890123456789.0123456789 1234567890123456789.0123456789 +insert into wl1612 values(3,1234567890123456789012345678.0123456789,1234567890123456789012345678.0123456789); +select * from wl1612 where col1=3; +col1 col2 col3 +3 1234567890123456789012345678.0123456789 1234567890123456789012345678.0123456789 +select col1/0 from wl1612; +col1/0 +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +select col2/0 from wl1612; +col2/0 +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +select col3/0 from wl1612; +col3/0 +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +insert into wl1612 values(5,5000.0005,5000.0005); +insert into wl1612 values(6,5000.0005,5000.0005); +select sum(col2),sum(col3) from wl1612; +sum(col2) sum(col3) +1234567903703703580370380357.1491481468 1234567903703703580370380357.1491481468 +insert into wl1612 values(7,500000.000005,500000.000005); +insert into wl1612 values(8,500000.000005,500000.000005); +select sum(col2),sum(col3) from wl1612 where col1>4; +sum(col2) sum(col3) +1010000.0010100000 1010000.0010100000 +insert into wl1612 (col1, col2) values(9,1.01234567891); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +insert into wl1612 (col1, col2) values(10,1.01234567894); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +insert into wl1612 (col1, col2) values(11,1.01234567895); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +insert into wl1612 (col1, col2) values(12,1.01234567896); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +select col1,col2 from wl1612 where col1>8; +col1 col2 +9 1.0123456789 +10 1.0123456789 +11 1.0123456790 +12 1.0123456790 +insert into wl1612 (col1, col3) values(13,1.01234567891); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +insert into wl1612 (col1, col3) values(14,1.01234567894); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +insert into wl1612 (col1, col3) values(15,1.01234567895); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +insert into wl1612 (col1, col3) values(16,1.01234567896); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +select col1,col3 from wl1612 where col1>12; +col1 col3 +13 1.0123456789 +14 1.0123456789 +15 1.0123456790 +16 1.0123456790 +select col1 from wl1612 where col1>4 and col2=1.01234567891; +col1 +select col1 from wl1612 where col1>4 and col2=1.0123456789; +col1 +9 +10 +select col1 from wl1612 where col1>4 and col2<>1.0123456789; +col1 +5 +6 +7 +8 +11 +12 +select col1 from wl1612 where col1>4 and col2<1.0123456789; +col1 +select col1 from wl1612 where col1>4 and col2<=1.0123456789; +col1 +9 +10 +select col1 from wl1612 where col1>4 and col2>1.0123456789; +col1 +5 +6 +7 +8 +11 +12 +select col1 from wl1612 where col1>4 and col2>=1.0123456789; +col1 +5 +6 +7 +8 +9 +10 +11 +12 +select col1 from wl1612 where col1>4 and col2=1.012345679; +col1 +11 +12 +select col1 from wl1612 where col1>4 and col2<>1.012345679; +col1 +5 +6 +7 +8 +9 +10 +select col1 from wl1612 where col1>4 and col3=1.01234567891; +col1 +select col1 from wl1612 where col1>4 and col3=1.0123456789; +col1 +13 +14 +select col1 from wl1612 where col1>4 and col3<>1.0123456789; +col1 +5 +6 +7 +8 +15 +16 +select col1 from wl1612 where col1>4 and col3<1.0123456789; +col1 +select col1 from wl1612 where col1>4 and col3<=1.0123456789; +col1 +13 +14 +select col1 from wl1612 where col1>4 and col3>1.0123456789; +col1 +5 +6 +7 +8 +15 +16 +select col1 from wl1612 where col1>4 and col3>=1.0123456789; +col1 +5 +6 +7 +8 +13 +14 +15 +16 +select col1 from wl1612 where col1>4 and col3=1.012345679; +col1 +15 +16 +select col1 from wl1612 where col1>4 and col3<>1.012345679; +col1 +5 +6 +7 +8 +13 +14 +drop table wl1612; +select 1/3; +1/3 +0.3333 +select 0.8=0.7+0.1; +0.8=0.7+0.1 +1 +select 0.7+0.1; +0.7+0.1 +0.8 +create table wl1612_1 (col1 int); +insert into wl1612_1 values(10); +select * from wl1612_1 where 0.8=0.7+0.1; +col1 +10 +select 0.07+0.07 from wl1612_1; +0.07+0.07 +0.14 +select 0.07-0.07 from wl1612_1; +0.07-0.07 +0.00 +select 0.07*0.07 from wl1612_1; +0.07*0.07 +0.0049 +select 0.07/0.07 from wl1612_1; +0.07/0.07 +1.000000 +drop table wl1612_1; +create table wl1612_2 (col1 decimal(10,2), col2 numeric(10,2)); +insert into wl1612_2 values(1,1); +insert into wl1612_2 values(+1,+1); +insert into wl1612_2 values(+01,+01); +insert into wl1612_2 values(+001,+001); +select col1,count(*) from wl1612_2 group by col1; +col1 count(*) +1.00 4 +select col2,count(*) from wl1612_2 group by col2; +col2 count(*) +1.00 4 +drop table wl1612_2; +create table wl1612_3 (col1 decimal(10,2), col2 numeric(10,2)); +insert into wl1612_3 values('1','1'); +insert into wl1612_3 values('+1','+1'); +insert into wl1612_3 values('+01','+01'); +insert into wl1612_3 values('+001','+001'); +select col1,count(*) from wl1612_3 group by col1; +col1 count(*) +1.00 4 +select col2,count(*) from wl1612_3 group by col2; +col2 count(*) +1.00 4 +drop table wl1612_3; +select mod(234,10) ; +mod(234,10) +4 +select mod(234.567,10.555); +mod(234.567,10.555) +2.357 +select mod(-234.567,10.555); +mod(-234.567,10.555) +-2.357 +select mod(234.567,-10.555); +mod(234.567,-10.555) +2.357 +select round(15.1); +round(15.1) +15 +select round(15.4); +round(15.4) +15 +select round(15.5); +round(15.5) +16 +select round(15.6); +round(15.6) +16 +select round(15.9); +round(15.9) +16 +select round(-15.1); +round(-15.1) +-15 +select round(-15.4); +round(-15.4) +-15 +select round(-15.5); +round(-15.5) +-16 +select round(-15.6); +round(-15.6) +-16 +select round(-15.9); +round(-15.9) +-16 +select round(15.1,1); +round(15.1,1) +15.1 +select round(15.4,1); +round(15.4,1) +15.4 +select round(15.5,1); +round(15.5,1) +15.5 +select round(15.6,1); +round(15.6,1) +15.6 +select round(15.9,1); +round(15.9,1) +15.9 +select round(-15.1,1); +round(-15.1,1) +-15.1 +select round(-15.4,1); +round(-15.4,1) +-15.4 +select round(-15.5,1); +round(-15.5,1) +-15.5 +select round(-15.6,1); +round(-15.6,1) +-15.6 +select round(-15.9,1); +round(-15.9,1) +-15.9 +select round(15.1,0); +round(15.1,0) +15 +select round(15.4,0); +round(15.4,0) +15 +select round(15.5,0); +round(15.5,0) +16 +select round(15.6,0); +round(15.6,0) +16 +select round(15.9,0); +round(15.9,0) +16 +select round(-15.1,0); +round(-15.1,0) +-15 +select round(-15.4,0); +round(-15.4,0) +-15 +select round(-15.5,0); +round(-15.5,0) +-16 +select round(-15.6,0); +round(-15.6,0) +-16 +select round(-15.9,0); +round(-15.9,0) +-16 +select round(15.1,-1); +round(15.1,-1) +20 +select round(15.4,-1); +round(15.4,-1) +20 +select round(15.5,-1); +round(15.5,-1) +20 +select round(15.6,-1); +round(15.6,-1) +20 +select round(15.9,-1); +round(15.9,-1) +20 +select round(-15.1,-1); +round(-15.1,-1) +-20 +select round(-15.4,-1); +round(-15.4,-1) +-20 +select round(-15.5,-1); +round(-15.5,-1) +-20 +select round(-15.6,-1); +round(-15.6,-1) +-20 +select round(-15.91,-1); +round(-15.91,-1) +-20 +select truncate(5678.123451,0); +truncate(5678.123451,0) +5678 +select truncate(5678.123451,1); +truncate(5678.123451,1) +5678.1 +select truncate(5678.123451,2); +truncate(5678.123451,2) +5678.12 +select truncate(5678.123451,3); +truncate(5678.123451,3) +5678.123 +select truncate(5678.123451,4); +truncate(5678.123451,4) +5678.1234 +select truncate(5678.123451,5); +truncate(5678.123451,5) +5678.12345 +select truncate(5678.123451,6); +truncate(5678.123451,6) +5678.123451 +select truncate(5678.123451,-1); +truncate(5678.123451,-1) +5670 +select truncate(5678.123451,-2); +truncate(5678.123451,-2) +5600 +select truncate(5678.123451,-3); +truncate(5678.123451,-3) +5000 +select truncate(5678.123451,-4); +truncate(5678.123451,-4) +0 +select truncate(-5678.123451,0); +truncate(-5678.123451,0) +-5678 +select truncate(-5678.123451,1); +truncate(-5678.123451,1) +-5678.1 +select truncate(-5678.123451,2); +truncate(-5678.123451,2) +-5678.12 +select truncate(-5678.123451,3); +truncate(-5678.123451,3) +-5678.123 +select truncate(-5678.123451,4); +truncate(-5678.123451,4) +-5678.1234 +select truncate(-5678.123451,5); +truncate(-5678.123451,5) +-5678.12345 +select truncate(-5678.123451,6); +truncate(-5678.123451,6) +-5678.123451 +select truncate(-5678.123451,-1); +truncate(-5678.123451,-1) +-5670 +select truncate(-5678.123451,-2); +truncate(-5678.123451,-2) +-5600 +select truncate(-5678.123451,-3); +truncate(-5678.123451,-3) +-5000 +select truncate(-5678.123451,-4); +truncate(-5678.123451,-4) +0 +create table wl1612_4 (col1 int, col2 decimal(30,25), col3 numeric(30,25)); +insert into wl1612_4 values(1,0.0123456789012345678912345,0.0123456789012345678912345); +select col2/9999999999 from wl1612_4 where col1=1; +col2/9999999999 +0.00000000000123456789024691358 +select col3/9999999999 from wl1612_4 where col1=1; +col3/9999999999 +0.00000000000123456789024691358 +select 9999999999/col2 from wl1612_4 where col1=1; +9999999999/col2 +810000007209.0001 +select 9999999999/col3 from wl1612_4 where col1=1; +9999999999/col3 +810000007209.0001 +select col2*9999999999 from wl1612_4 where col1=1; +col2*9999999999 +123456789.0000000000111104321087655 +select col3*9999999999 from wl1612_4 where col1=1; +col3*9999999999 +123456789.0000000000111104321087655 +insert into wl1612_4 values(2,55555.0123456789012345678912345,55555.0123456789012345678912345); +select col2/9999999999 from wl1612_4 where col1=2; +col2/9999999999 +0.00000555550123512344024696913 +select col3/9999999999 from wl1612_4 where col1=2; +col3/9999999999 +0.00000555550123512344024696913 +select 9999999999/col2 from wl1612_4 where col1=2; +9999999999/col2 +180001.7600 +select 9999999999/col3 from wl1612_4 where col1=2; +9999999999/col3 +180001.7600 +select col2*9999999999 from wl1612_4 where col1=2; +col2*9999999999 +555550123401234.0000000000111104321087655 +select col3*9999999999 from wl1612_4 where col1=2; +col3*9999999999 +555550123401234.0000000000111104321087655 +drop table wl1612_4; +set sql_mode=''; +select 23.4 + (-41.7), 23.4 - (41.7) = -18.3; +23.4 + (-41.7) 23.4 - (41.7) = -18.3 +-18.3 1 +select -18.3=-18.3; +-18.3=-18.3 +1 +select 18.3=18.3; +18.3=18.3 +1 +select -18.3=18.3; +-18.3=18.3 +0 +select 0.8 = 0.7 + 0.1; +0.8 = 0.7 + 0.1 +1 +create procedure p1 () begin +declare v1, v2, v3, v4 decimal(16,12); declare v5 int; +set v1 = 1; set v2 = 2; set v3 = 1000000000000; set v4 = 2000000000000; set v5 = 0; +while v5 < 100000 do +set v1 = v1 + 0.000000000001; set v2 = v2 - 0.000000000001; set v3 = v3 + 1; set v4 = v4 - 1; set v5 = v5 + 1; +end while; select v1, v2, v3 * 0.000000000001, v4 * 0.000000000001; end;// +# +call p1()// +# +v1 v2 v3 * 0.000000000001 v4 * 0.000000000001 +1.000000100000 1.999999900000 1.000000100000 1.999999900000 +drop procedure p1; +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (col1 decimal(38)); +insert into t1 values (12345678901234567890123456789012345678); +select * from t1; +col1 +12345678901234567890123456789012345678 +drop table t1; +create table t1 (col1 decimal(31,30)); +insert into t1 values (0.00000000001); +select * from t1; +col1 +0.000000000010000000000000000000 +drop table t1; +select 7777777777777777777777777777777777777 * 10; +7777777777777777777777777777777777777 * 10 +77777777777777777777777777777777777770 +select .7777777777777777777777777777777777777 * +1000000000000000000; +.7777777777777777777777777777777777777 * +1000000000000000000 +777777777777777777.777777777777777777700000000000 +select .7777777777777777777777777777777777777 - 0.1; +.7777777777777777777777777777777777777 - 0.1 +0.6777777777777777777777777777777777777 +select .343434343434343434 + .343434343434343434; +.343434343434343434 + .343434343434343434 +0.686868686868686868 +select abs(9999999999999999999999); +abs(9999999999999999999999) +9999999999999999999999 +select abs(-9999999999999999999999); +abs(-9999999999999999999999) +9999999999999999999999 +select ceiling(999999999999999999); +ceiling(999999999999999999) +999999999999999999 +select ceiling(99999999999999999999); +ceiling(99999999999999999999) +99999999999999999999 +select ceiling(9.9999999999999999999); +ceiling(9.9999999999999999999) +10 +select ceiling(-9.9999999999999999999); +ceiling(-9.9999999999999999999) +-9 +select floor(999999999999999999); +floor(999999999999999999) +999999999999999999 +select floor(9999999999999999999999); +floor(9999999999999999999999) +9999999999999999999999 +select floor(9.999999999999999999999); +floor(9.999999999999999999999) +9 +select floor(-9.999999999999999999999); +floor(-9.999999999999999999999) +-10 +select floor(-999999999999999999999.999); +floor(-999999999999999999999.999) +-1000000000000000000000 +select ceiling(999999999999999999999.999); +ceiling(999999999999999999999.999) +1000000000000000000000 +select 99999999999999999999999999999999999999 mod 3; +99999999999999999999999999999999999999 mod 3 +0 +select round(99999999999999999.999); +round(99999999999999999.999) +100000000000000000 +select round(-99999999999999999.999); +round(-99999999999999999.999) +-100000000000000000 +select round(99999999999999999.999,3); +round(99999999999999999.999,3) +99999999999999999.999 +select round(-99999999999999999.999,3); +round(-99999999999999999.999,3) +-99999999999999999.999 +select truncate(99999999999999999999999999999999999999,31); +truncate(99999999999999999999999999999999999999,31) +99999999999999999999999999999999999999.000000000000000000000000000000 +select truncate(99.999999999999999999999999999999999999,31); +truncate(99.999999999999999999999999999999999999,31) +100.000000000000000000000000000000 +select truncate(99999999999999999999999999999999999999,-31); +truncate(99999999999999999999999999999999999999,-31) +99999990000000000000000000000000000000 +create table t1 as select 0.5; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `0.5` decimal(2,1) NOT NULL default '0.0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +select round(1.5),round(2.5); +round(1.5) round(2.5) +2 3 +select 0.07 * 0.07; +0.07 * 0.07 +0.0049 +set sql_mode='traditional'; +select 1E-500 = 0; +1E-500 = 0 +1 +select 1 / 1E-500; +1 / 1E-500 +NULL +Warnings: +Error 1365 Division by 0 +select 1 / 0; +1 / 0 +NULL +Warnings: +Error 1365 Division by 0 +set sql_mode='ansi,traditional'; +CREATE TABLE Sow6_2f (col1 NUMERIC(4,2)); +INSERT INTO Sow6_2f VALUES (10.55); +INSERT INTO Sow6_2f VALUES (10.5555); +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 +INSERT INTO Sow6_2f VALUES (-10.55); +INSERT INTO Sow6_2f VALUES (-10.5555); +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 +INSERT INTO Sow6_2f VALUES (11); +INSERT INTO Sow6_2f VALUES (101.55); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +UPDATE Sow6_2f SET col1 = col1 * 50 WHERE col1 = 11; +ERROR 22003: Out of range value adjusted for column 'col1' at row 5 +UPDATE Sow6_2f SET col1 = col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +SELECT MOD(col1,0) FROM Sow6_2f; +MOD(col1,0) +NULL +NULL +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT INTO Sow6_2f VALUES ('a59b'); +ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1 +drop table Sow6_2f; +select 10.3330000000000/12.34500000; +10.3330000000000/12.34500000 +0.83701903604698258 +set sql_mode=''; +select 0/0; +0/0 +NULL +select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as x; +x +999999999999999999999999999999999999999999999999999999999999999999999999999999999 +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x; +x +NULL +Warnings: +Error 1292 Truncated incorrect DECIMAL value: '' +Error 1292 Truncated incorrect DECIMAL value: '' +select 0.190287977636363637 + 0.040372670 * 0 - 0; +0.190287977636363637 + 0.040372670 * 0 - 0 +0.190287977636363637 +select -0.123 * 0; +-0.123 * 0 +0.000 +CREATE TABLE t1 (f1 DECIMAL (12,9), f2 DECIMAL(2,2)); +INSERT INTO t1 VALUES (10.5, 0); +UPDATE t1 SET f1 = 4.5; +SELECT * FROM t1; +f1 f2 +4.500000000 0.00 +DROP TABLE t1; +CREATE TABLE t1 (f1 DECIMAL (64,20), f2 DECIMAL(2,2)); +INSERT INTO t1 VALUES (9999999999999999999999999999999999, 0); +SELECT * FROM t1; +f1 f2 +9999999999999999999999999999999999.00000000000000000000 0.00 +DROP TABLE t1; +select abs(10/0); +abs(10/0) +NULL +select abs(NULL); +abs(NULL) +NULL +set @@sql_mode='traditional'; +create table t1( d1 decimal(18) unsigned, d2 decimal(20) unsigned, d3 decimal (22) unsigned); +insert into t1 values(1,-1,-1); +ERROR 22003: Out of range value adjusted for column 'd2' at row 1 +drop table t1; +create table t1 (col1 decimal(5,2), col2 numeric(5,2)); +insert into t1 values (999.999,999.999); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +insert into t1 values (-999.999,-999.999); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +select * from t1; +col1 col2 +drop table t1; +set sql_mode=''; +set @sav_dpi= @@div_precision_increment; +set @@div_precision_increment=15; +create table t1 (col1 int, col2 decimal(30,25), col3 numeric(30,25)); +insert into t1 values (1,0.0123456789012345678912345,0.0123456789012345678912345); +select col2/9999999999 from t1 where col1=1; +col2/9999999999 +0.000000000001234567890246913578 +select 9999999999/col2 from t1 where col1=1; +9999999999/col2 +810000007209.000065537105051 +select 77777777/7777777; +77777777/7777777 +10.000000900000090 +drop table t1; +set div_precision_increment= @sav_dpi; +create table t1 (a decimal(4,2)); +insert into t1 values (0.00); +select * from t1 where a > -0.00; +a +select * from t1 where a = -0.00; +a +0.00 +drop table t1; +create table t1 (col1 bigint default -9223372036854775808); +insert into t1 values (default); +select * from t1; +col1 +-9223372036854775808 +drop table t1; +select cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15)); +cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15)) +0.000000000100000 +select ln(14000) c1, convert(ln(14000),decimal(2,3)) c2, cast(ln(14000) as decimal(2,3)) c3; +c1 c2 c3 +9.5468126085974 9.547 9.547 +create table t1 (sl decimal(70,30)); +ERROR 42000: Too big precision 70 specified for column 'sl'. Maximum is 65. +create table t1 (sl decimal(32,31)); +ERROR 42000: Too big scale 31 specified for column 'sl'. Maximum is 30. +create table t1 (sl decimal(0,38)); +ERROR 42000: Too big scale 38 specified for column 'sl'. Maximum is 30. +create table t1 (sl decimal(0,30)); +ERROR 42000: Scale may not be larger than the precision (column 'sl'). +create table t1 (sl decimal(5, 5)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `sl` decimal(5,5) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (sl decimal(65, 30)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `sl` decimal(65,30) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 ( +f1 decimal unsigned not null default 17.49, +f2 decimal unsigned not null default 17.68, +f3 decimal unsigned not null default 99.2, +f4 decimal unsigned not null default 99.7, +f5 decimal unsigned not null default 104.49, +f6 decimal unsigned not null default 199.91, +f7 decimal unsigned not null default 999.9, +f8 decimal unsigned not null default 9999.99); +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Note 1265 Data truncated for column 'f2' at row 1 +Note 1265 Data truncated for column 'f3' at row 1 +Note 1265 Data truncated for column 'f4' at row 1 +Note 1265 Data truncated for column 'f5' at row 1 +Note 1265 Data truncated for column 'f6' at row 1 +Note 1265 Data truncated for column 'f7' at row 1 +Note 1265 Data truncated for column 'f8' at row 1 +insert into t1 (f1) values (1); +select * from t1; +f1 f2 f3 f4 f5 f6 f7 f8 +1 18 99 100 104 200 1000 10000 +drop table t1; +create table t1 ( +f0 decimal (30,30) zerofill not null DEFAULT 0, +f1 decimal (0,0) zerofill not null default 0); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f0` decimal(30,30) unsigned zerofill NOT NULL default '0.000000000000000000000000000000', + `f1` decimal(10,0) unsigned zerofill NOT NULL default '0000000000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index 90207f39417..1342603f755 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -21,10 +21,10 @@ time_field time, date_time datetime, blob_col blob, tinyblob_col tinyblob, -mediumblob_col mediumblob not null, -longblob_col longblob not null, -options enum('one','two','tree') not null, -flags set('one','two','tree') not null, +mediumblob_col mediumblob not null default '', +longblob_col longblob not null default '', +options enum('one','two','tree') not null , +flags set('one','two','tree') not null default '', PRIMARY KEY (auto), KEY (utiny), KEY (tiny), @@ -40,30 +40,30 @@ KEY (options,flags) ); show full fields from t1; Field Type Collation Null Key Default Extra Privileges Comment -auto int(5) unsigned NULL PRI NULL auto_increment # -string varchar(10) latin1_swedish_ci YES hello # -tiny tinyint(4) NULL MUL 0 # -short smallint(6) NULL MUL 1 # -medium mediumint(8) NULL MUL 0 # -long_int int(11) NULL 0 # -longlong bigint(13) NULL MUL 0 # -real_float float(13,1) NULL MUL 0.0 # +auto int(5) unsigned NULL NO PRI NULL auto_increment # +string char(10) latin1_swedish_ci YES hello # +tiny tinyint(4) NULL NO MUL 0 # +short smallint(6) NULL NO MUL 1 # +medium mediumint(8) NULL NO MUL 0 # +long_int int(11) NULL NO 0 # +longlong bigint(13) NULL NO MUL 0 # +real_float float(13,1) NULL NO MUL 0.0 # real_double double(16,4) NULL YES NULL # -utiny tinyint(3) unsigned NULL MUL 0 # -ushort smallint(5) unsigned zerofill NULL MUL 00000 # -umedium mediumint(8) unsigned NULL MUL 0 # -ulong int(11) unsigned NULL MUL 0 # -ulonglong bigint(13) unsigned NULL MUL 0 # +utiny tinyint(3) unsigned NULL NO MUL 0 # +ushort smallint(5) unsigned zerofill NULL NO MUL 00000 # +umedium mediumint(8) unsigned NULL NO MUL 0 # +ulong int(11) unsigned NULL NO MUL 0 # +ulonglong bigint(13) unsigned NULL NO MUL 0 # time_stamp timestamp NULL YES CURRENT_TIMESTAMP # date_field date NULL YES NULL # time_field time NULL YES NULL # date_time datetime NULL YES NULL # blob_col blob NULL YES NULL # tinyblob_col tinyblob NULL YES NULL # -mediumblob_col mediumblob NULL # -longblob_col longblob NULL # -options enum('one','two','tree') latin1_swedish_ci MUL one # -flags set('one','two','tree') latin1_swedish_ci # +mediumblob_col mediumblob NULL NO # +longblob_col longblob NULL NO # +options enum('one','two','tree') latin1_swedish_ci NO MUL # +flags set('one','two','tree') latin1_swedish_ci NO # show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 auto A 0 NULL NULL BTREE @@ -87,42 +87,44 @@ DROP INDEX test ON t1; insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one'); insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one'); insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); +Warnings: +Warning 1265 Data truncated for column 'string' at row 1 insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); Warnings: -Warning 1264 Data truncated; out of range for column 'utiny' at row 1 -Warning 1264 Data truncated; out of range for column 'ushort' at row 1 -Warning 1264 Data truncated; out of range for column 'umedium' at row 1 -Warning 1264 Data truncated; out of range for column 'ulong' at row 1 +Warning 1264 Out of range value adjusted for column 'utiny' at row 1 +Warning 1264 Out of range value adjusted for column 'ushort' at row 1 +Warning 1264 Out of range value adjusted for column 'umedium' at row 1 +Warning 1264 Out of range value adjusted for column 'ulong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'flags' at row 1 insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); Warnings: Warning 1265 Data truncated for column 'string' at row 1 -Warning 1264 Data truncated; out of range for column 'tiny' at row 1 -Warning 1264 Data truncated; out of range for column 'short' at row 1 -Warning 1264 Data truncated; out of range for column 'medium' at row 1 -Warning 1264 Data truncated; out of range for column 'long_int' at row 1 -Warning 1264 Data truncated; out of range for column 'utiny' at row 1 -Warning 1264 Data truncated; out of range for column 'ushort' at row 1 -Warning 1264 Data truncated; out of range for column 'umedium' at row 1 -Warning 1264 Data truncated; out of range for column 'ulong' at row 1 +Warning 1264 Out of range value adjusted for column 'tiny' at row 1 +Warning 1264 Out of range value adjusted for column 'short' at row 1 +Warning 1264 Out of range value adjusted for column 'medium' at row 1 +Warning 1264 Out of range value adjusted for column 'long_int' at row 1 +Warning 1264 Out of range value adjusted for column 'utiny' at row 1 +Warning 1264 Out of range value adjusted for column 'ushort' at row 1 +Warning 1264 Out of range value adjusted for column 'umedium' at row 1 +Warning 1264 Out of range value adjusted for column 'ulong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); Warnings: -Warning 1264 Data truncated; out of range for column 'tiny' at row 1 -Warning 1264 Data truncated; out of range for column 'short' at row 1 -Warning 1264 Data truncated; out of range for column 'medium' at row 1 -Warning 1264 Data truncated; out of range for column 'long_int' at row 1 -Warning 1264 Data truncated; out of range for column 'utiny' at row 1 -Warning 1264 Data truncated; out of range for column 'ushort' at row 1 -Warning 1264 Data truncated; out of range for column 'umedium' at row 1 +Warning 1264 Out of range value adjusted for column 'tiny' at row 1 +Warning 1264 Out of range value adjusted for column 'short' at row 1 +Warning 1264 Out of range value adjusted for column 'medium' at row 1 +Warning 1264 Out of range value adjusted for column 'long_int' at row 1 +Warning 1264 Out of range value adjusted for column 'utiny' at row 1 +Warning 1264 Out of range value adjusted for column 'ushort' at row 1 +Warning 1264 Out of range value adjusted for column 'umedium' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 (tiny) values (1); select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; auto string tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000) date_field time_field date_time blob_col tinyblob_col mediumblob_col longblob_col 10 1 1 1 1 1 1 1.0 1.0000 1 00001 1 1 1 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1 1 1 11 2 2 2 2 2 2 2.0 2.0000 2 00002 2 2 2 0 NULL NULL NULL NULL NULL 2 2 -12 0.33 3 3 3 3 3 3.0 3.0000 3 00003 3 3 3 0 1997-03-03 10:10:10 1997-03-03 10:10:10 3 +12 0.33333333 3 3 3 3 3 3.0 3.0000 3 00003 3 3 3 0 1997-03-03 10:10:10 1997-03-03 10:10:10 3 13 -1 -1 -1 -1 -1 -1 -1.0 -1.0000 0 00000 0 0 18446744073709551615 0 1997-08-07 08:07:06 1997-04-03 09:08:07 -1 -1 -1 -1 14 -429496729 -128 -32768 -8388608 -2147483648 -4294967295 -4294967296.0 -4294967295.0000 0 00000 0 0 18446744069414584321 0 0000-00-00 00:00:00 0000-00-00 00:00:00 -4294967295 -4294967295 -4294967295 -4294967295 15 4294967295 127 32767 8388607 2147483647 4294967295 4294967296.0 4294967295.0000 255 65535 16777215 4294967295 4294967295 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4294967295 4294967295 4294967295 4294967295 @@ -131,7 +133,7 @@ ALTER TABLE t1 add new_field char(10) default "new" not null, change blob_col new_blob_col varchar(20), change date_field date_field char(10), -alter column string set default "new default", +alter column string set default "newdefault", alter short drop default, DROP INDEX utiny, DROP INDEX ushort, @@ -174,7 +176,7 @@ Warning 1265 Data truncated for column 'new_field' at row 7 select * from t2; auto string mediumblob_col new_field 1 2 2 ne -2 0.33 ne +2 0.33333333 ne 3 -1 -1 ne 4 -429496729 -4294967295 ne 5 4294967295 4294967295 ne @@ -208,56 +210,56 @@ Warning 1265 Data truncated for column 'options' at row 6 update t2 set string="changed" where auto=16; show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment -auto int(5) unsigned NULL MUL NULL auto_increment # -string varchar(10) latin1_swedish_ci YES new defaul # -tiny tinyint(4) NULL MUL 0 # -short smallint(6) NULL MUL 0 # -medium mediumint(8) NULL MUL 0 # -long_int int(11) NULL 0 # -longlong bigint(13) NULL MUL 0 # -real_float float(13,1) NULL MUL 0.0 # +auto int(5) unsigned NULL NO MUL NULL auto_increment # +string char(10) latin1_swedish_ci YES newdefault # +tiny tinyint(4) NULL NO MUL 0 # +short smallint(6) NULL NO MUL 0 # +medium mediumint(8) NULL NO MUL 0 # +long_int int(11) NULL NO 0 # +longlong bigint(13) NULL NO MUL 0 # +real_float float(13,1) NULL NO MUL 0.0 # real_double double(16,4) NULL YES NULL # -utiny tinyint(3) unsigned NULL 0 # -ushort smallint(5) unsigned zerofill NULL 00000 # -umedium mediumint(8) unsigned NULL MUL 0 # -ulong int(11) unsigned NULL MUL 0 # -ulonglong bigint(13) unsigned NULL MUL 0 # +utiny tinyint(3) unsigned NULL NO 0 # +ushort smallint(5) unsigned zerofill NULL NO 00000 # +umedium mediumint(8) unsigned NULL NO MUL 0 # +ulong int(11) unsigned NULL NO MUL 0 # +ulonglong bigint(13) unsigned NULL NO MUL 0 # time_stamp timestamp NULL YES CURRENT_TIMESTAMP # -date_field varchar(10) latin1_swedish_ci YES NULL # +date_field char(10) latin1_swedish_ci YES NULL # time_field time NULL YES NULL # date_time datetime NULL YES NULL # new_blob_col varchar(20) latin1_swedish_ci YES NULL # tinyblob_col tinyblob NULL YES NULL # -mediumblob_col mediumblob NULL # -options enum('one','two','tree') latin1_swedish_ci MUL one # -flags set('one','two','tree') latin1_swedish_ci # -new_field varchar(10) latin1_swedish_ci new # +mediumblob_col mediumblob NULL NO # +options enum('one','two','tree') latin1_swedish_ci NO MUL # +flags set('one','two','tree') latin1_swedish_ci NO # +new_field char(10) latin1_swedish_ci NO new # show full columns from t2; Field Type Collation Null Key Default Extra Privileges Comment -auto int(5) unsigned NULL 0 # -string varchar(10) latin1_swedish_ci YES new defaul # -tiny tinyint(4) NULL 0 # -short smallint(6) NULL 0 # -medium mediumint(8) NULL 0 # -long_int int(11) NULL 0 # -longlong bigint(13) NULL 0 # -real_float float(13,1) NULL 0.0 # +auto int(5) unsigned NULL NO 0 # +string char(10) latin1_swedish_ci YES newdefault # +tiny tinyint(4) NULL NO 0 # +short smallint(6) NULL NO 0 # +medium mediumint(8) NULL NO 0 # +long_int int(11) NULL NO 0 # +longlong bigint(13) NULL NO 0 # +real_float float(13,1) NULL NO 0.0 # real_double double(16,4) NULL YES NULL # -utiny tinyint(3) unsigned NULL 0 # -ushort smallint(5) unsigned zerofill NULL 00000 # -umedium mediumint(8) unsigned NULL 0 # -ulong int(11) unsigned NULL 0 # -ulonglong bigint(13) unsigned NULL 0 # +utiny tinyint(3) unsigned NULL NO 0 # +ushort smallint(5) unsigned zerofill NULL NO 00000 # +umedium mediumint(8) unsigned NULL NO 0 # +ulong int(11) unsigned NULL NO 0 # +ulonglong bigint(13) unsigned NULL NO 0 # time_stamp timestamp NULL YES 0000-00-00 00:00:00 # -date_field varchar(10) latin1_swedish_ci YES NULL # +date_field char(10) latin1_swedish_ci YES NULL # time_field time NULL YES NULL # date_time datetime NULL YES NULL # new_blob_col varchar(20) latin1_swedish_ci YES NULL # tinyblob_col tinyblob NULL YES NULL # -mediumblob_col mediumblob NULL # -options enum('one','two','tree') latin1_swedish_ci one # -flags set('one','two','tree') latin1_swedish_ci # -new_field varchar(10) latin1_swedish_ci new # +mediumblob_col mediumblob NULL NO # +options enum('one','two','tree') latin1_swedish_ci NO one # +flags set('one','two','tree') latin1_swedish_ci NO # +new_field char(10) latin1_swedish_ci NO new # select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null))); auto auto 16 16 @@ -265,23 +267,27 @@ select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and not (t1.string<=>t2. auto auto 16 16 drop table t2; -create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, "a" as t2, repeat("a",256) as t3, binary repeat("b",256) as t4 from t1; +create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1; show full columns from t2; Field Type Collation Null Key Default Extra Privileges Comment -auto bigint(17) unsigned NULL PRI 0 # -t1 bigint(1) NULL 0 # -t2 char(1) latin1_swedish_ci # -t3 longtext latin1_swedish_ci # -t4 longblob NULL # -select * from t2; -auto t1 t2 t3 t4 -11 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -12 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -13 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -14 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -15 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -16 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -17 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +auto bigint(12) unsigned NULL NO PRI 0 # +t1 bigint(1) NULL NO 0 # +t2 varchar(1) latin1_swedish_ci NO # +t3 varchar(256) latin1_swedish_ci NO # +t4 varbinary(256) NULL NO # +t5 longtext latin1_swedish_ci NO # +t6 longblob NULL NO # +t7 char(0) latin1_swedish_ci NO # +t8 binary(0) NULL NO # +select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2; +t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 drop table t1,t2; create table t1 (c int); insert into t1 values(1),(2); @@ -293,7 +299,7 @@ show full columns from t3; Field Type Collation Null Key Default Extra Privileges Comment c1 int(11) NULL YES NULL # c2 int(11) NULL YES NULL # -const bigint(1) NULL 0 # +const bigint(1) NULL NO 0 # drop table t1,t2,t3; create table t1 ( myfield INT NOT NULL, UNIQUE INDEX (myfield), unique (myfield), index(myfield)); drop table t1; @@ -305,16 +311,32 @@ select t1.id as id_A, t2.id as id_B from t1 left join t2 using ( id ); id_A id_B 1 1 2 NULL +select t1.id as id_A, t2.id as id_B from t1 left join t2 on (t1.id = t2.id); +id_A id_B +1 1 +2 NULL create table t3 (id_A integer unsigned not null, id_B integer unsigned null ); insert into t3 select t1.id as id_A, t2.id as id_B from t1 left join t2 using ( id ); select * from t3; id_A id_B 1 1 2 NULL +delete from t3; +insert into t3 select t1.id as id_A, t2.id as id_B from t1 left join t2 on (t1.id = t2.id); +select * from t3; +id_A id_B +1 1 +2 NULL drop table t3; create table t3 select t1.id as id_A, t2.id as id_B from t1 left join t2 using ( id ); select * from t3; id_A id_B 1 1 2 NULL +drop table t3; +create table t3 select t1.id as id_A, t2.id as id_B from t1 left join t2 on (t1.id = t2.id); +select * from t3; +id_A id_B +1 1 +2 NULL drop table t1,t2,t3; diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 5aedefda283..fdda4aca25c 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -3,7 +3,7 @@ create table t1 (a set (' ','a','b') not null); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` set('','a','b') NOT NULL default '' + `a` set('','a','b') NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a set (' ','a','b ') not null default 'b '); diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 025cf2a57f1..442435b0459 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -26,9 +26,9 @@ t insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); Warnings: Warning 1265 Data truncated for column 't' at row 1 -Warning 1264 Data truncated; out of range for column 't' at row 2 -Warning 1264 Data truncated; out of range for column 't' at row 3 -Warning 1264 Data truncated; out of range for column 't' at row 4 +Warning 1264 Out of range value adjusted for column 't' at row 2 +Warning 1264 Out of range value adjusted for column 't' at row 3 +Warning 1264 Out of range value adjusted for column 't' at row 4 Warning 1265 Data truncated for column 't' at row 6 select * from t1; t diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index c0396e4640d..61ed6bbabf3 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -35,6 +35,10 @@ UPDATE t1 SET value="my value" WHERE id="myKey"; SELECT stamp FROM t1 WHERE id="myKey"; stamp 1999-04-02 00:00:00 +UPDATE t1 SET id="myKey" WHERE value="my value"; +SELECT stamp FROM t1 WHERE id="myKey"; +stamp +1999-04-02 00:00:00 drop table t1; create table t1 (a timestamp); insert into t1 values (now()); @@ -95,6 +99,14 @@ drop table t1; create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6), t8 timestamp(8), t10 timestamp(10), t12 timestamp(12), t14 timestamp(14)); +Warnings: +Warning 1287 'TIMESTAMP(2)' is deprecated; use 'TIMESTAMP' instead +Warning 1287 'TIMESTAMP(4)' is deprecated; use 'TIMESTAMP' instead +Warning 1287 'TIMESTAMP(6)' is deprecated; use 'TIMESTAMP' instead +Warning 1287 'TIMESTAMP(8)' is deprecated; use 'TIMESTAMP' instead +Warning 1287 'TIMESTAMP(10)' is deprecated; use 'TIMESTAMP' instead +Warning 1287 'TIMESTAMP(12)' is deprecated; use 'TIMESTAMP' instead +Warning 1287 'TIMESTAMP(14)' is deprecated; use 'TIMESTAMP' instead insert t1 values (0,0,0,0,0,0,0), ("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result index d8edf9085b7..0474f3a24f4 100644 --- a/mysql-test/r/type_uint.result +++ b/mysql-test/r/type_uint.result @@ -4,10 +4,10 @@ create table t1 (this int unsigned); insert into t1 values (1); insert into t1 values (-1); Warnings: -Warning 1264 Data truncated; out of range for column 'this' at row 1 +Warning 1264 Out of range value adjusted for column 'this' at row 1 insert into t1 values ('5000000000'); Warnings: -Warning 1265 Data truncated for column 'this' at row 1 +Warning 1264 Out of range value adjusted for column 'this' at row 1 select * from t1; this 1 diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result new file mode 100644 index 00000000000..e3b12cc36e3 --- /dev/null +++ b/mysql-test/r/type_varchar.result @@ -0,0 +1,417 @@ +drop table if exists t1, t2; +create table t1 (v varchar(30), c char(3), e enum('abc','def','ghi'), t text); +truncate table vchar; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `v` varchar(30) default NULL, + `c` char(3) default NULL, + `e` enum('abc','def','ghi') default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table vchar; +Table Create Table +vchar CREATE TABLE `vchar` ( + `v` varchar(30) default NULL, + `c` char(3) default NULL, + `e` enum('abc','def','ghi') default NULL, + `t` text +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values ('abc', 'de', 'ghi', 'jkl'); +insert into t1 values ('abc ', 'de ', 'ghi', 'jkl '); +insert into t1 values ('abc ', 'd ', 'ghi', 'jkl '); +insert into vchar values ('abc', 'de', 'ghi', 'jkl'); +insert into vchar values ('abc ', 'de ', 'ghi', 'jkl '); +insert into vchar values ('abc ', 'd ', 'ghi', 'jkl '); +select length(v),length(c),length(e),length(t) from t1; +length(v) length(c) length(e) length(t) +3 2 3 3 +4 2 3 4 +7 1 3 7 +select length(v),length(c),length(e),length(t) from vchar; +length(v) length(c) length(e) length(t) +3 2 3 3 +3 2 3 4 +3 1 3 7 +alter table vchar add i int; +show create table vchar; +Table Create Table +vchar CREATE TABLE `vchar` ( + `v` varchar(30) default NULL, + `c` char(3) default NULL, + `e` enum('abc','def','ghi') default NULL, + `t` text, + `i` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select length(v),length(c),length(e),length(t) from vchar; +length(v) length(c) length(e) length(t) +3 2 3 3 +3 2 3 4 +3 1 3 7 +drop table t1, vchar; +create table t1 (v varchar(20)); +insert into t1 values('a '); +select v='a' from t1; +v='a' +1 +select binary v='a' from t1; +binary v='a' +0 +select binary v='a ' from t1; +binary v='a ' +1 +insert into t1 values('a'); +alter table t1 add primary key (v); +ERROR 23000: Duplicate entry 'a' for key 1 +drop table t1; +create table t1 (v varbinary(20)); +insert into t1 values('a'); +insert into t1 values('a '); +alter table t1 add primary key (v); +drop table t1; +create table t1 (v varchar(254), index (v)); +insert into t1 values ("This is a test "); +insert into t1 values ("Some sample data"); +insert into t1 values (" garbage "); +insert into t1 values (" This is a test "); +insert into t1 values ("This is a test"); +insert into t1 values ("Hello world"); +insert into t1 values ("Foo bar"); +insert into t1 values ("This is a test"); +insert into t1 values ("MySQL varchar test"); +insert into t1 values ("test MySQL varchar"); +insert into t1 values ("This is a long string to have some random length data included"); +insert into t1 values ("Short string"); +insert into t1 values ("VSS"); +insert into t1 values ("Some samples"); +insert into t1 values ("Bar foo"); +insert into t1 values ("Bye"); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 257 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 257 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 257 NULL 2 Using where; Using index +alter table t1 change v v varchar(255); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 258 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL 2 Using where; Using index +alter table t1 change v v varchar(256); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 259 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 259 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 259 NULL 2 Using where; Using index +alter table t1 change v v varchar(257); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 260 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 260 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 260 NULL 2 Using where; Using index +alter table t1 change v v varchar(258); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 261 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 261 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 261 NULL 2 Using where; Using index +alter table t1 change v v varchar(259); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 262 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 262 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 262 NULL 2 Using where; Using index +alter table t1 change v v varchar(258); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 261 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 261 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 261 NULL 2 Using where; Using index +alter table t1 change v v varchar(257); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 260 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 260 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 260 NULL 2 Using where; Using index +alter table t1 change v v varchar(256); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 259 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 259 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 259 NULL 2 Using where; Using index +alter table t1 change v v varchar(255); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 258 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 258 NULL 2 Using where; Using index +alter table t1 change v v varchar(254); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 257 NULL 3 Using where; Using index +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 257 const 3 Using where; Using index +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 257 NULL 2 Using where; Using index +alter table t1 change v v varchar(253); +alter table t1 change v v varchar(254), drop key v; +alter table t1 change v v varchar(300), add key (v(10)); +select * from t1 where v like 'This is a test' order by v; +v +This is a test +This is a test +select * from t1 where v='This is a test' order by v; +v +This is a test +This is a test +This is a test +select * from t1 where v like 'S%' order by v; +v +Short string +Some sample data +Some samples +explain select * from t1 where v like 'This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL 4 Using where; Using filesort +explain select * from t1 where v='This is a test' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref v v 13 const 4 Using where +explain select * from t1 where v like 'S%' order by v; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range v v 13 NULL 2 Using where; Using filesort +drop table t1; +create table t1 (pkcol varchar(16), othercol varchar(16), primary key (pkcol)); +insert into t1 values ('test', 'something'); +update t1 set othercol='somethingelse' where pkcol='test'; +select * from t1; +pkcol othercol +test somethingelse +drop table t1; +create table t1 (a int, b varchar(12)); +insert into t1 values (1, 'A'), (22, NULL); +create table t2 (a int); +insert into t2 values (22), (22); +select t1.a, t1.b, min(t1.b) from t1 inner join t2 ON t2.a = t1.a +group by t1.b, t1.a; +a b min(t1.b) +22 NULL NULL +drop table t1, t2; +create table t1 (f1 varchar(65500)); +create index index1 on t1(f1(10)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` varchar(65500) default NULL, + KEY `index1` (`f1`(10)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify f1 varchar(255); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` varchar(255) default NULL, + KEY `index1` (`f1`(10)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 modify f1 tinytext; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` tinytext, + KEY `index1` (`f1`(10)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 1b5fa69d713..eb129e32983 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -88,7 +88,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 UNION t2 ALL NULL NULL NULL NULL 4 Using filesort NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Using filesort Warnings: -Note 1003 (select test.t1.a AS `a`,test.t1.b AS `b` from test.t1 limit 2) union all (select test.t2.a AS `a`,test.t2.b AS `b` from test.t2 order by test.t2.a limit 1) order by b desc +Note 1003 (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` limit 2) union all (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`a` limit 1) order by `b` desc (select sql_calc_found_rows a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 2; a b 1 a @@ -430,7 +430,7 @@ drop temporary table t1; create table t1 select a from t1 union select a from t2; ERROR HY000: You can't specify target table 't1' for update in FROM clause select a from t1 union select a from t2 order by t2.a; -ERROR 42S02: Unknown table 't2' in order clause +ERROR 42S22: Unknown column 't2.a' in 'order clause' drop table t1,t2; select length(version()) > 1 as `*` UNION select 2; * @@ -480,7 +480,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 UNION t2 const PRIMARY PRIMARY 4 const 1 NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Warnings: -Note 1003 (select test.t1.a AS `a`,test.t1.b AS `b` from test.t1 where (test.t1.a = 1)) union (select test.t2.a AS `a`,test.t2.b AS `b` from test.t2 where (test.t2.a = 1)) +Note 1003 (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a` = 1)) union (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` = 1)) (select * from t1 where a=5) union (select * from t2 where a=1); a b 1 10 @@ -543,7 +543,7 @@ aa show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(2) NOT NULL default '' + `a` varchar(2) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT 12 as a UNION select "aa" as a; @@ -554,7 +554,7 @@ aa show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` binary(20) NOT NULL default '' + `a` varbinary(20) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT 12 as a UNION select 12.2 as a; @@ -565,7 +565,7 @@ a show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` double(53,1) NOT NULL default '0.0' + `a` decimal(3,1) NOT NULL default '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t2 (it1 tinyint, it2 tinyint not null, i int not null, ib bigint, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob, tx text); @@ -788,11 +788,11 @@ create table t3 select * from t2 union select * from t1; select * from t3; d 1.234567800 -100000000.0 +100000000.000000000 show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `d` decimal(10,9) default NULL + `d` decimal(18,9) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2,t3; create table t1 select 1 union select -1; @@ -812,7 +812,7 @@ create table t1 select _latin2"test" union select _latin2"testt" ; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` char(5) character set latin2 NOT NULL default '' + `test` varchar(5) character set latin2 NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (s char(200)); @@ -851,27 +851,27 @@ count(*) 26 show status like 'Slow_queries'; Variable_name Value -Slow_queries 0 +Slow_queries 1 select count(*) from t1 where b=13; count(*) 10 show status like 'Slow_queries'; Variable_name Value -Slow_queries 1 +Slow_queries 3 select count(*) from t1 where b=13 union select count(*) from t1 where a=7; count(*) 10 26 show status like 'Slow_queries'; Variable_name Value -Slow_queries 2 +Slow_queries 5 select count(*) from t1 where a=7 union select count(*) from t1 where b=13; count(*) 26 10 show status like 'Slow_queries'; Variable_name Value -Slow_queries 3 +Slow_queries 7 flush status; select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6); a @@ -1056,7 +1056,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `test` char(4) NOT NULL default '' + `test` varchar(4) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select count(*) from t1; count(*) @@ -1114,7 +1114,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a collate latin1_german1_ci` char(1) character set latin1 collate latin1_german1_ci default NULL + `a collate latin1_german1_ci` varchar(1) character set latin1 collate latin1_german1_ci default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as @@ -1123,7 +1123,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(1) character set latin1 collate latin1_german1_ci default NULL + `a` varchar(1) character set latin1 collate latin1_german1_ci default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as @@ -1133,7 +1133,7 @@ create table t1 as show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` char(1) character set latin1 collate latin1_german1_ci default NULL + `a` varchar(1) character set latin1 collate latin1_german1_ci default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; drop table t2; @@ -1226,7 +1226,7 @@ drop table t2; create table t2 select a from t1 union select a from t1; show columns from t2; Field Type Null Key Default Extra -a char(1) +a varchar(1) NO drop table t2; create table t2 select a from t1 union select c from t1; ERROR HY000: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation 'UNION' @@ -1235,6 +1235,23 @@ show columns from t2; Field Type Null Key Default Extra a varchar(3) YES NULL drop table t2, t1; +create table t1 (a varchar(5)); +create table t2 select * from t1 union select 'abcdefghijkl'; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` varchar(12) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select row_format from information_schema.TABLES where table_schema="test" and table_name="t2"; +row_format +Dynamic +alter table t2 ROW_FORMAT=fixed; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` varchar(12) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED +drop table t1,t2; CREATE TABLE t1 (a mediumtext); CREATE TABLE t2 (b varchar(20)); INSERT INTO t1 VALUES ('a'),('b'); diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index e35d4e29fe4..42fb8064044 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -58,7 +58,7 @@ ushows int(10) unsigned DEFAULT '0' NOT NULL, clicks int(10) unsigned DEFAULT '0' NOT NULL, iclicks int(10) unsigned DEFAULT '0' NOT NULL, uclicks int(10) unsigned DEFAULT '0' NOT NULL, -ts timestamp(14), +ts timestamp, PRIMARY KEY (place_id,ts) ); INSERT INTO t1 (place_id,shows,ishows,ushows,clicks,iclicks,uclicks,ts) @@ -75,7 +75,7 @@ client varchar(255) NOT NULL default '', replyto varchar(255) NOT NULL default '', subject varchar(100) NOT NULL default '', timestamp int(10) unsigned NOT NULL default '0', -tstamp timestamp(14) NOT NULL, +tstamp timestamp NOT NULL, status int(3) NOT NULL default '0', type varchar(15) NOT NULL default '', assignment int(10) unsigned NOT NULL default '0', diff --git a/mysql-test/r/user_limits.result b/mysql-test/r/user_limits.result new file mode 100644 index 00000000000..a94eb4616d1 --- /dev/null +++ b/mysql-test/r/user_limits.result @@ -0,0 +1,96 @@ +drop table if exists t1; +create table t1 (i int); +delete from mysql.user where user like 'mysqltest\_%'; +delete from mysql.db where user like 'mysqltest\_%'; +delete from mysql.tables_priv where user like 'mysqltest\_%'; +delete from mysql.columns_priv where user like 'mysqltest\_%'; +flush privileges; +grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 2; +flush user_resources; +select * from t1; +i +select * from t1; +i +select * from t1; +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_questions' resource (current value: 2) +select * from t1; +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_questions' resource (current value: 2) +drop user mysqltest_1@localhost; +grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 2; +flush user_resources; +select * from t1; +i +select * from t1; +i +select * from t1; +i +delete from t1; +delete from t1; +delete from t1; +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_updates' resource (current value: 2) +select * from t1; +i +delete from t1; +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_updates' resource (current value: 2) +select * from t1; +i +drop user mysqltest_1@localhost; +grant usage on *.* to mysqltest_1@localhost with max_connections_per_hour 2; +flush user_resources; +select * from t1; +i +select * from t1; +i +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_connections_per_hour' resource (current value: 2) +select * from t1; +i +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_connections_per_hour' resource (current value: 2) +drop user mysqltest_1@localhost; +flush privileges; +grant usage on *.* to mysqltest_1@localhost with max_user_connections 2; +flush user_resources; +select * from t1; +i +select * from t1; +i +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: 2) +select * from t1; +i +grant usage on *.* to mysqltest_1@localhost with max_user_connections 3; +flush user_resources; +select * from t1; +i +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: 3) +drop user mysqltest_1@localhost; +select @@session.max_user_connections, @@global.max_user_connections; +@@session.max_user_connections @@global.max_user_connections +0 0 +set session max_user_connections= 2; +ERROR HY000: Variable 'max_user_connections' is a GLOBAL variable and should be set with SET GLOBAL +set global max_user_connections= 2; +select @@session.max_user_connections, @@global.max_user_connections; +@@session.max_user_connections @@global.max_user_connections +2 2 +grant usage on *.* to mysqltest_1@localhost; +flush user_resources; +select @@session.max_user_connections, @@global.max_user_connections; +@@session.max_user_connections @@global.max_user_connections +2 2 +select * from t1; +i +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User mysqltest_1 already has more than 'max_user_connections' active connections +grant usage on *.* to mysqltest_1@localhost with max_user_connections 3; +flush user_resources; +select @@session.max_user_connections, @@global.max_user_connections; +@@session.max_user_connections @@global.max_user_connections +3 2 +connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); +ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: 3) +set global max_user_connections= 0; +drop user mysqltest_1@localhost; +drop table t1; diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 06a2a846a0e..0e9692523ef 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -6,20 +6,27 @@ INSERT INTO t1 VALUES(@`a b`); set @var1= "';aaa"; SET @var2=char(ascii('a')); insert into t1 values (@var1),(@var2); -show binlog events from 79; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 79 User var 1 79 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci -master-bin.000001 120 Query 1 120 use `test`; INSERT INTO t1 VALUES(@`a b`) -master-bin.000001 184 User var 1 184 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci -master-bin.000001 226 User var 1 226 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci -master-bin.000001 264 Query 1 264 use `test`; insert into t1 values (@var1),(@var2) +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 98 User var 1 139 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci +master-bin.000001 139 Query 1 231 use `test`; INSERT INTO t1 VALUES(@`a b`) +master-bin.000001 231 User var 1 273 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci +master-bin.000001 273 User var 1 311 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci +master-bin.000001 311 Query 1 411 use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +ROLLBACK; SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`; use test; SET TIMESTAMP=10000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; INSERT INTO t1 VALUES(@`a b`); SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`; SET @`var2`:=_latin1 0x61 COLLATE `latin1_swedish_ci`; SET TIMESTAMP=10000; insert into t1 values (@var1),(@var2); +ROLLBACK; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; drop table t1; diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 58b785d1432..acdc793fb69 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -23,7 +23,11 @@ i @vv1:=if(sv1.i,1,0) @vv2:=if(sv2.i,1,0) @vv3:=if(sv3.i,1,0) @vv1+@vv2+@vv3 2 1 0 0 1 explain select * from t1 where i=@vv1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref i i 4 const 1 Using where +1 SIMPLE t1 ref i i 4 const 1 +select @vv1,i,v from t1 where i=@vv1; +@vv1 i v +1 1 1 +1 1 3 explain select * from t1 where @vv1:=@vv1+1 and i=@vv1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where @@ -32,7 +36,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index NULL i 4 NULL 3 Using where; Using index explain select * from t1 where i=@vv1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref i i 4 const 1 Using where +1 SIMPLE t1 ref i i 4 const 1 drop table t1,t2; set @a=0,@b=0; select @a:=10, @b:=1, @a > @b, @a < @b; @@ -178,7 +182,7 @@ coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4) set session @honk=99; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@honk=99' at line 1 set one_shot @honk=99; -ERROR HY000: The SET ONE_SHOT syntax is reserved for purposes internal to the MySQL server +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server select @@local.max_allowed_packet; @@local.max_allowed_packet # @@ -203,3 +207,44 @@ select @@global.version; select @@session.VERSION; @@session.VERSION # +set @first_var= NULL; +create table t1 select @first_var; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `@first_var` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @first_var= cast(NULL as signed integer); +create table t1 select @first_var; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `@first_var` bigint(20) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @first_var= NULL; +create table t1 select @first_var; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `@first_var` bigint(20) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @first_var= concat(NULL); +create table t1 select @first_var; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `@first_var` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @first_var=1; +set @first_var= cast(NULL as CHAR); +create table t1 select @first_var; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `@first_var` longtext +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/varbinary.result b/mysql-test/r/varbinary.result index ab5779859ae..e55e6b35915 100644 --- a/mysql-test/r/varbinary.result +++ b/mysql-test/r/varbinary.result @@ -15,7 +15,7 @@ explain extended select * from t1 where UNIQ=0x38afba1d73e6a18a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 const UNIQ UNIQ 8 const 1 Warnings: -Note 1003 select test.t1.ID AS `ID`,test.t1.UNIQ AS `UNIQ` from test.t1 where (test.t1.UNIQ = 4084688022709641610) +Note 1003 select `test`.`t1`.`ID` AS `ID`,`test`.`t1`.`UNIQ` AS `UNIQ` from `test`.`t1` where (`test`.`t1`.`UNIQ` = 4084688022709641610) drop table t1; select x'hello'; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'x'hello'' at line 1 diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 14260cd04f9..a7c96d89f0d 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1,8 +1,30 @@ drop table if exists t1,t2; -set @`test`=1,@TEST=3,@select=2,@t5=1.23456; -select @test,@`select`,@TEST,@not_used; -@test @`select` @TEST @not_used -1 2 3 NULL +set @`test`=1; +select @test, @`test`, @TEST, @`TEST`, @"teSt"; +@test @`test` @TEST @`TEST` @"teSt" +1 1 1 1 1 +set @TEST=2; +select @test, @`test`, @TEST, @`TEST`, @"teSt"; +@test @`test` @TEST @`TEST` @"teSt" +2 2 2 2 2 +set @"tEST"=3; +select @test, @`test`, @TEST, @`TEST`, @"teSt"; +@test @`test` @TEST @`TEST` @"teSt" +3 3 3 3 3 +set @`TeST`=4; +select @test, @`test`, @TEST, @`TEST`, @"teSt"; +@test @`test` @TEST @`TEST` @"teSt" +4 4 4 4 4 +select @`teST`:=5; +@`teST`:=5 +5 +select @test, @`test`, @TEST, @`TEST`, @"teSt"; +@test @`test` @TEST @`TEST` @"teSt" +5 5 5 5 5 +set @select=2,@t5=1.23456; +select @`select`,@not_used; +@`select` @not_used +2 NULL set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL; select @test_int,@test_double,@test_string,@test_string2,@select; @test_int @test_double @test_string @test_string2 @select @@ -95,30 +117,34 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1003 select sql_no_cache 345 AS `@@IDENTITY`,last_insert_id() AS `last_insert_id()`,345 AS `@@identity` set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF", big_tables="ON"; -set global concurrent_insert=ON; +set global concurrent_insert=2; show variables like 'concurrent_insert'; Variable_name Value -concurrent_insert ON +concurrent_insert 2 set global concurrent_insert=1; show variables like 'concurrent_insert'; Variable_name Value -concurrent_insert ON +concurrent_insert 1 set global concurrent_insert=0; show variables like 'concurrent_insert'; Variable_name Value -concurrent_insert OFF -set global concurrent_insert=OFF; -show variables like 'concurrent_insert'; -Variable_name Value -concurrent_insert OFF +concurrent_insert 0 set global concurrent_insert=DEFAULT; -show variables like 'concurrent_insert'; +select @@concurrent_insert; +@@concurrent_insert +1 +set global timed_mutexes=ON; +show variables like 'timed_mutexes'; +Variable_name Value +timed_mutexes ON +set global timed_mutexes=0; +show variables like 'timed_mutexes'; Variable_name Value -concurrent_insert ON +timed_mutexes OFF set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE"; show local variables like 'storage_engine'; Variable_name Value -storage_engine HEAP +storage_engine MEMORY show global variables like 'storage_engine'; Variable_name Value storage_engine MERGE @@ -230,7 +256,7 @@ set storage_engine=MERGE, big_tables=2; ERROR 42000: Variable 'big_tables' can't be set to the value of '2' show local variables like 'storage_engine'; Variable_name Value -storage_engine HEAP +storage_engine MEMORY set SESSION query_cache_size=10000; ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL set GLOBAL storage_engine=DEFAULT; @@ -257,8 +283,6 @@ select @@global.sql_auto_is_null; ERROR HY000: Variable 'sql_auto_is_null' is a SESSION variable set myisam_max_sort_file_size=100; ERROR HY000: Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL -set myisam_max_extra_sort_file_size=100; -ERROR HY000: Variable 'myisam_max_extra_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL set @@SQL_WARNINGS=NULL; ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NULL' set autocommit=1; @@ -314,11 +338,6 @@ select @@max_user_connections; @@max_user_connections 100 set global max_write_lock_count=100; -set global myisam_max_extra_sort_file_size=100; -select @@myisam_max_extra_sort_file_size; -@@myisam_max_extra_sort_file_size -100 -set global myisam_max_sort_file_size=100; set myisam_sort_buffer_size=100; set net_buffer_length=100; set net_read_timeout=100; @@ -346,6 +365,8 @@ set sql_buffer_result=1; set sql_log_bin=1; set sql_log_off=1; set sql_log_update=1; +Warnings: +Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored set sql_low_priority_updates=1; set sql_max_join_size=200; select @@sql_max_join_size,@@max_join_size; @@ -472,14 +493,15 @@ t1 CREATE TABLE `t1` ( `c5` bigint(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -set @arg00= 8, @arg01= 8.8, @arg02= 'a string'; -create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3; +set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0; +create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) default NULL, - `c2` double default NULL, - `c3` longtext + `c2` decimal(65,30) default NULL, + `c3` longtext, + `c4` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7; @@ -491,3 +513,27 @@ SHOW VARIABLES LIKE 'table_cache'; Variable_name Value table_cache 1 SET GLOBAL table_cache=DEFAULT; +create table t1 (a int); +select a into @x from t1; +Warnings: +Warning 1329 No data to FETCH +show warnings; +Level Code Message +Warning 1329 No data to FETCH +drop table t1; +set @@warning_count=1; +ERROR HY000: Variable 'warning_count' is a read only variable +set @@global.error_count=1; +ERROR HY000: Variable 'error_count' is a read only variable +set @@max_heap_table_size= 4294967296; +select @@max_heap_table_size > 0; +@@max_heap_table_size > 0 +1 +set global max_heap_table_size= 4294967296; +select @@max_heap_table_size > 0; +@@max_heap_table_size > 0 +1 +set @@max_heap_table_size= 4294967296; +select @@max_heap_table_size > 0; +@@max_heap_table_size > 0 +1 diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result new file mode 100644 index 00000000000..09393135fc6 --- /dev/null +++ b/mysql-test/r/view.result @@ -0,0 +1,2137 @@ +drop table if exists t1,t2,t9,`t1a``b`,v1,v2,v3,v4,v5,v6; +drop view if exists t1,t2,`t1a``b`,v1,v2,v3,v4,v5,v6; +drop database if exists mysqltest; +use test; +create view v1 (c,d) as select a,b from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +create temporary table t1 (a int, b int); +create view v1 (c) as select b+1 from t1; +ERROR HY000: View's SELECT refers to a temporary table 't1' +drop table t1; +create table t1 (a int, b int); +insert into t1 values (1,2), (1,3), (2,4), (2,5), (3,10); +create view v1 (c,d) as select a,b+@@global.max_user_connections from t1; +ERROR HY000: View's SELECT contains a variable or parameter +create view v1 (c) as select b+1 from t1; +select c from v1; +c +3 +4 +5 +6 +11 +create temporary table t1 (a int, b int); +select * from t1; +a b +select c from v1; +c +3 +4 +5 +6 +11 +show create table v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1` +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1` +show create view t1; +ERROR HY000: 'test.t1' is not VIEW +drop table t1; +select a from v1; +ERROR 42S22: Unknown column 'a' in 'field list' +select v1.a from v1; +ERROR 42S22: Unknown column 'v1.a' in 'field list' +select b from v1; +ERROR 42S22: Unknown column 'b' in 'field list' +select v1.b from v1; +ERROR 42S22: Unknown column 'v1.b' in 'field list' +explain extended select c from v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1` +create algorithm=temptable view v2 (c) as select b+1 from t1; +show create view v2; +View Create View +v2 CREATE ALGORITHM=TEMPTABLE VIEW `test`.`v2` AS select (`test`.`t1`.`b` + 1) AS `c` from `test`.`t1` +select c from v2; +c +3 +4 +5 +6 +11 +explain extended select c from v2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 +2 DERIVED t1 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 select `v2`.`c` AS `c` from `test`.`v2` +create view v3 (c) as select a+1 from v1; +ERROR 42S22: Unknown column 'a' in 'field list' +create view v3 (c) as select b+1 from v1; +ERROR 42S22: Unknown column 'b' in 'field list' +create view v3 (c) as select c+1 from v1; +select c from v3; +c +4 +5 +6 +7 +12 +explain extended select c from v3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 select ((`test`.`t1`.`b` + 1) + 1) AS `c` from `test`.`t1` +create algorithm=temptable view v4 (c) as select c+1 from v2; +select c from v4; +c +4 +5 +6 +7 +12 +explain extended select c from v4; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 +2 DERIVED <derived3> ALL NULL NULL NULL NULL 5 +3 DERIVED t1 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 select `v4`.`c` AS `c` from `test`.`v4` +create view v5 (c) as select c+1 from v2; +select c from v5; +c +4 +5 +6 +7 +12 +explain extended select c from v5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 +3 DERIVED t1 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 select (`v2`.`c` + 1) AS `c` from `test`.`v2` +create algorithm=temptable view v6 (c) as select c+1 from v1; +select c from v6; +c +4 +5 +6 +7 +12 +explain extended select c from v6; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 +2 DERIVED t1 ALL NULL NULL NULL NULL 5 +Warnings: +Note 1003 select `v6`.`c` AS `c` from `test`.`v6` +show tables; +Tables_in_test +t1 +v1 +v2 +v3 +v4 +v5 +v6 +show full tables; +Tables_in_test Table_type +t1 BASE TABLE +v1 VIEW +v2 VIEW +v3 VIEW +v4 VIEW +v5 VIEW +v6 VIEW +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MyISAM 10 Fixed 5 9 45 # 1024 0 NULL # # NULL latin1_swedish_ci NULL +v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +v2 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +v3 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +v4 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +v5 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +v6 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL VIEW +drop view v1,v2,v3,v4,v5,v6; +create view v1 (c,d,e,f) as select a,b, +a in (select a+2 from t1), a = all (select a from t1) from t1; +create view v2 as select c, d from v1; +select * from v1; +c d e f +1 2 0 0 +1 3 0 0 +2 4 0 0 +2 5 0 0 +3 10 1 0 +select * from v2; +c d +1 2 +1 3 +2 4 +2 5 +3 10 +create view v1 (c,d,e,f) as select a,b, a in (select a+2 from t1), a = all (select a from t1) from t1; +ERROR 42S01: Table 'v1' already exists +create or replace view v1 (c,d,e,f) as select a,b, a in (select a+2 from t1), a = all (select a from t1) from t1; +drop view v2; +alter view v2 as select c, d from v1; +ERROR 42S02: Table 'test.v2' doesn't exist +create or replace view v2 as select c, d from v1; +alter view v1 (c,d) as select a,max(b) from t1 group by a; +select * from v1; +c d +1 3 +2 5 +3 10 +select * from v2; +c d +1 3 +2 5 +3 10 +drop view v100; +ERROR 42S02: Unknown table 'test.v100' +drop view t1; +ERROR HY000: 'test.t1' is not VIEW +drop table v1; +ERROR 42S02: Unknown table 'v1' +drop view v1,v2; +drop table t1; +create table t1 (a int); +insert into t1 values (1), (2), (3); +create view v1 (a) as select a+1 from t1; +create view v2 (a) as select a-1 from t1; +drop view v1, v2; +drop table t1; +create table t1 (a int); +insert into t1 values (1), (2), (3), (1), (2), (3); +create view v1 as select distinct a from t1; +select * from v1; +a +1 +2 +3 +explain select * from v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 +2 DERIVED t1 ALL NULL NULL NULL NULL 6 Using temporary +select * from t1; +a +1 +2 +3 +1 +2 +3 +drop view v1; +drop table t1; +create table t1 (a int); +create view v1 as select distinct a from t1 WITH CHECK OPTION; +ERROR HY000: CHECK OPTION on non-updatable view 'test.v1' +create view v1 as select a from t1 WITH CHECK OPTION; +create view v2 as select a from t1 WITH CASCADED CHECK OPTION; +create view v3 as select a from t1 WITH LOCAL CHECK OPTION; +drop view v3 RESTRICT; +drop view v2 CASCADE; +drop view v1; +drop table t1; +create table t1 (a int, b int); +insert into t1 values (1,2), (1,3), (2,4), (2,5), (3,10); +create view v1 (c) as select b+1 from t1; +select test.c from v1 test; +c +3 +4 +5 +6 +11 +create algorithm=temptable view v2 (c) as select b+1 from t1; +select test.c from v2 test; +c +3 +4 +5 +6 +11 +select test1.* from v1 test1, v2 test2 where test1.c=test2.c; +c +3 +4 +5 +6 +11 +select test2.* from v1 test1, v2 test2 where test1.c=test2.c; +c +3 +4 +5 +6 +11 +drop table t1; +drop view v1,v2; +create table t1 (a int); +insert into t1 values (1), (2), (3), (4); +create view v1 as select a+1 from t1 order by 1 desc limit 2; +select * from v1; +a+1 +5 +4 +explain select * from v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 4 Using filesort +drop view v1; +drop table t1; +create table t1 (a int); +insert into t1 values (1), (2), (3), (4); +create view v1 as select a+1 from t1; +create table t2 select * from v1; +show columns from t2; +Field Type Null Key Default Extra +a+1 bigint(12) YES NULL +select * from t2; +a+1 +2 +3 +4 +5 +drop view v1; +drop table t1,t2; +create table t1 (a int, b int, primary key(a)); +insert into t1 values (10,2), (20,3), (30,4), (40,5), (50,10); +create view v1 (a,c) as select a, b+1 from t1; +create algorithm=temptable view v2 (a,c) as select a, b+1 from t1; +update v1 set c=a+c; +ERROR HY000: Column 'c' is not updatable +update v2 set a=a+c; +ERROR HY000: The target table v2 of the UPDATE is not updatable +update v1 set a=a+c; +select * from v1; +a c +13 3 +24 4 +35 5 +46 6 +61 11 +select * from t1; +a b +13 2 +24 3 +35 4 +46 5 +61 10 +drop table t1; +drop view v1,v2; +create table t1 (a int, b int, primary key(a)); +insert into t1 values (10,2), (20,3), (30,4), (40,5), (50,10); +create table t2 (x int); +insert into t2 values (10), (20); +create view v1 (a,c) as select a, b+1 from t1; +create algorithm=temptable view v2 (a,c) as select a, b+1 from t1; +update t2,v1 set v1.c=v1.a+v1.c where t2.x=v1.a; +ERROR HY000: Column 'c' is not updatable +update t2,v2 set v2.a=v2.v2.a+c where t2.x=v2.a; +ERROR HY000: The target table v2 of the UPDATE is not updatable +update t2,v1 set v1.a=v1.a+v1.c where t2.x=v1.a; +select * from v1; +a c +13 3 +24 4 +30 5 +40 6 +50 11 +select * from t1; +a b +13 2 +24 3 +30 4 +40 5 +50 10 +drop table t1,t2; +drop view v1,v2; +create table t1 (a int, b int, primary key(b)); +insert into t1 values (1,20), (2,30), (3,40), (4,50), (5,100); +create view v1 (c) as select b from t1 where a<3; +select * from v1; +c +20 +30 +explain extended select * from v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +Warnings: +Note 1003 select `test`.`t1`.`b` AS `c` from `test`.`t1` where (`test`.`t1`.`a` < 3) +update v1 set c=c+1; +select * from t1; +a b +1 21 +2 31 +3 40 +4 50 +5 100 +create view v2 (c) as select b from t1 where a>=3; +select * from v1, v2; +c c +21 40 +31 40 +21 50 +31 50 +21 100 +31 100 +drop view v1, v2; +drop table t1; +create table t1 (a int, b int, primary key(a)); +insert into t1 values (1,2), (2,3), (3,4), (4,5), (5,10); +create view v1 (a,c) as select a, b+1 from t1; +create algorithm=temptable view v2 (a,c) as select a, b+1 from t1; +delete from v2 where c < 4; +ERROR HY000: The target table v2 of the DELETE is not updatable +delete from v1 where c < 4; +select * from v1; +a c +2 4 +3 5 +4 6 +5 11 +select * from t1; +a b +2 3 +3 4 +4 5 +5 10 +drop table t1; +drop view v1,v2; +create table t1 (a int, b int, primary key(a)); +insert into t1 values (1,2), (2,3), (3,4), (4,5), (5,10); +create table t2 (x int); +insert into t2 values (1), (2), (3), (4); +create view v1 (a,c) as select a, b+1 from t1; +create algorithm=temptable view v2 (a,c) as select a, b+1 from t1; +delete v2 from t2,v2 where t2.x=v2.a; +ERROR HY000: The target table v2 of the DELETE is not updatable +delete v1 from t2,v1 where t2.x=v1.a; +select * from v1; +a c +5 11 +select * from t1; +a b +5 10 +drop table t1,t2; +drop view v1,v2; +create table t1 (a int, b int, c int, primary key(a,b)); +insert into t1 values (10,2,-1), (20,3,-2), (30,4,-3), (40,5,-4), (50,10,-5); +create view v1 (x,y) as select a, b from t1; +create view v2 (x,y) as select a, c from t1; +set updatable_views_with_limit=NO; +update v1 set x=x+1; +update v2 set x=x+1; +update v1 set x=x+1 limit 1; +update v2 set x=x+1 limit 1; +ERROR HY000: The target table v2 of the UPDATE is not updatable +set updatable_views_with_limit=YES; +update v1 set x=x+1 limit 1; +update v2 set x=x+1 limit 1; +Warnings: +Note 1355 View being updated does not have complete key of underlying table in it +set updatable_views_with_limit=DEFAULT; +show variables like "updatable_views_with_limit"; +Variable_name Value +updatable_views_with_limit YES +select * from t1; +a b c +15 2 -1 +22 3 -2 +32 4 -3 +42 5 -4 +52 10 -5 +drop table t1; +drop view v1,v2; +create table t1 (a int, b int, c int, primary key(a,b)); +insert into t1 values (10,2,-1), (20,3,-2); +create view v1 (x,y,z) as select c, b, a from t1; +create view v2 (x,y) as select b, a from t1; +create view v3 (x,y,z) as select b, a, b from t1; +create view v4 (x,y,z) as select c+1, b, a from t1; +create algorithm=temptable view v5 (x,y,z) as select c, b, a from t1; +insert into v3 values (-60,4,30); +ERROR HY000: The target table v3 of the INSERT is not updatable +insert into v4 values (-60,4,30); +ERROR HY000: The target table v4 of the INSERT is not updatable +insert into v5 values (-60,4,30); +ERROR HY000: The target table v5 of the INSERT is not updatable +insert into v1 values (-60,4,30); +insert into v1 (z,y,x) values (50,6,-100); +insert into v2 values (5,40); +select * from t1; +a b c +10 2 -1 +20 3 -2 +30 4 -60 +50 6 -100 +40 5 NULL +drop table t1; +drop view v1,v2,v3,v4,v5; +create table t1 (a int, b int, c int, primary key(a,b)); +insert into t1 values (10,2,-1), (20,3,-2); +create table t2 (a int, b int, c int, primary key(a,b)); +insert into t2 values (30,4,-60); +create view v1 (x,y,z) as select c, b, a from t1; +create view v2 (x,y) as select b, a from t1; +create view v3 (x,y,z) as select b, a, b from t1; +create view v4 (x,y,z) as select c+1, b, a from t1; +create algorithm=temptable view v5 (x,y,z) as select c, b, a from t1; +insert into v3 select c, b, a from t2; +ERROR HY000: The target table v3 of the INSERT is not updatable +insert into v4 select c, b, a from t2; +ERROR HY000: The target table v4 of the INSERT is not updatable +insert into v5 select c, b, a from t2; +ERROR HY000: The target table v5 of the INSERT is not updatable +insert into v1 select c, b, a from t2; +insert into v1 (z,y,x) select a+20,b+2,-100 from t2; +insert into v2 select b+1, a+10 from t2; +select * from t1; +a b c +10 2 -1 +20 3 -2 +30 4 -60 +50 6 -100 +40 5 NULL +drop table t1, t2; +drop view v1,v2,v3,v4,v5; +create table t1 (a int, primary key(a)); +insert into t1 values (1), (2), (3); +create view v1 (x) as select a from t1 where a > 1; +select t1.a, v1.x from t1 left join v1 on (t1.a= v1.x); +a x +1 NULL +2 2 +3 3 +drop table t1; +drop view v1; +create table t1 (a int, primary key(a)); +insert into t1 values (1), (2), (3), (200); +create view v1 (x) as select a from t1 where a > 1; +create view v2 (y) as select x from v1 where x < 100; +select * from v2; +y +2 +3 +drop table t1; +drop view v1,v2; +create table t1 (a int, primary key(a)); +insert into t1 values (1), (2), (3), (200); +create ALGORITHM=TEMPTABLE view v1 (x) as select a from t1; +create view v2 (y) as select x from v1; +update v2 set y=10 where y=2; +ERROR HY000: The target table v2 of the UPDATE is not updatable +drop table t1; +drop view v1,v2; +create table t1 (a int not null auto_increment, b int not null, primary key(a), unique(b)); +create view v1 (x) as select b from t1; +insert into v1 values (1); +select last_insert_id(); +last_insert_id() +0 +insert into t1 (b) values (2); +select last_insert_id(); +last_insert_id() +2 +select * from t1; +a b +1 1 +2 2 +drop view v1; +drop table t1; +set sql_mode='ansi'; +create table t1 ("a*b" int); +create view v1 as select "a*b" from t1; +show create view v1; +View Create View +v1 CREATE VIEW "test"."v1" AS select "test"."t1"."a*b" AS "a*b" from "test"."t1" +drop view v1; +drop table t1; +set sql_mode=default; +create table t1 (t_column int); +create view v1 as select 'a'; +select * from v1, t1; +a t_column +drop view v1; +drop table t1; +create table `t1a``b` (col1 char(2)); +create view v1 as select * from `t1a``b`; +select * from v1; +col1 +describe v1; +Field Type Null Key Default Extra +col1 char(2) YES NULL +drop view v1; +drop table `t1a``b`; +create table t1 (col1 char(5),col2 char(5)); +create view v1 as select * from t1; +drop table t1; +create table t1 (col1 char(5),newcol2 char(5)); +insert into v1 values('a','aa'); +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) +drop table t1; +select * from v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) +drop view v1; +create view v1 (a,a) as select 'a','a'; +ERROR 42S21: Duplicate column name 'a' +drop procedure if exists p1; +create procedure p1 () begin declare v int; create view v1 as select v; end;// +call p1(); +ERROR HY000: View's SELECT contains a variable or parameter +drop procedure p1; +create table t1 (col1 int,col2 char(22)); +insert into t1 values(5,'Hello, world of views'); +create view v1 as select * from t1; +create view v2 as select * from v1; +update v2 set col2='Hello, view world'; +select * from t1; +col1 col2 +5 Hello, view world +drop view v2, v1; +drop table t1; +create table t1 (a int, b int); +create view v1 as select a, sum(b) from t1 group by a; +select b from v1 use index (some_index) where b=1; +ERROR 42000: Key column 'some_index' doesn't exist in table +drop view v1; +drop table t1; +create table t1 (col1 char(5),col2 char(5)); +create view v1 (col1,col2) as select col1,col2 from t1; +insert into v1 values('s1','p1'),('s1','p2'),('s1','p3'),('s1','p4'),('s2','p1'),('s3','p2'),('s4','p4'); +select distinct first.col2 from t1 first where first.col2 in (select second.col2 from t1 second where second.col1<>first.col1); +col2 +p1 +p2 +p4 +select distinct first.col2 from v1 first where first.col2 in (select second.col2 from t1 second where second.col1<>first.col1); +col2 +p1 +p2 +p4 +drop view v1; +drop table t1; +create table t1 (a int); +create view v1 as select a from t1; +insert into t1 values (1); +SET @v0 = '2'; +PREPARE stmt FROM 'UPDATE v1 SET a = ?'; +EXECUTE stmt USING @v0; +DEALLOCATE PREPARE stmt; +SET @v0 = '3'; +PREPARE stmt FROM 'insert into v1 values (?)'; +EXECUTE stmt USING @v0; +DEALLOCATE PREPARE stmt; +SET @v0 = '4'; +PREPARE stmt FROM 'insert into v1 (a) values (?)'; +EXECUTE stmt USING @v0; +DEALLOCATE PREPARE stmt; +select * from t1; +a +2 +3 +4 +drop view v1; +drop table t1; +CREATE VIEW v02 AS SELECT * FROM DUAL; +ERROR HY000: No tables used +SHOW TABLES; +Tables_in_test +CREATE VIEW v1 AS SELECT EXISTS (SELECT 1 UNION SELECT 2); +select * from v1; +EXISTS (SELECT 1 UNION SELECT 2) +1 +drop view v1; +create table t1 (col1 int,col2 char(22)); +create view v1 as select * from t1; +create index i1 on v1 (col1); +ERROR HY000: 'test.v1' is not BASE TABLE +drop view v1; +drop table t1; +CREATE VIEW v1 (f1,f2,f3,f4) AS SELECT connection_id(), pi(), current_user(), version(); +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select sql_no_cache connection_id() AS `f1`,pi() AS `f2`,current_user() AS `f3`,version() AS `f4` +drop view v1; +create table t1 (s1 int); +create table t2 (s2 int); +insert into t1 values (1), (2); +insert into t2 values (2), (3); +create view v1 as select * from t1,t2 union all select * from t1,t2; +select * from v1; +s1 s2 +1 2 +2 2 +1 3 +2 3 +1 2 +2 2 +1 3 +2 3 +drop view v1; +drop tables t1, t2; +create table t1 (col1 int); +insert into t1 values (1); +create view v1 as select count(*) from t1; +insert into t1 values (null); +select * from v1; +count(*) +2 +drop view v1; +drop table t1; +create table t1 (a int); +create table t2 (a int); +create view v1 as select a from t1; +create view v2 as select a from t2 where a in (select a from v1); +show create view v2; +View Create View +v2 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v2` AS select `test`.`t2`.`a` AS `a` from `test`.`t2` where `a` in (select `v1`.`a` AS `a` from `test`.`v1`) +drop view v2, v1; +drop table t1, t2; +CREATE VIEW `v 1` AS select 5 AS `5`; +show create view `v 1`; +View Create View +v 1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v 1` AS select 5 AS `5` +drop view `v 1`; +create database mysqltest; +create table mysqltest.t1 (a int, b int); +create view mysqltest.v1 as select a from mysqltest.t1; +alter view mysqltest.v1 as select b from mysqltest.t1; +alter view mysqltest.v1 as select a from mysqltest.t1; +drop database mysqltest; +CREATE TABLE t1 (c1 int not null auto_increment primary key, c2 varchar(20), fulltext(c2)); +insert into t1 (c2) VALUES ('real Beer'),('Water'),('Kossu'),('Coca-Cola'),('Vodka'),('Wine'),('almost real Beer'); +select * from t1 WHERE match (c2) against ('Beer'); +c1 c2 +1 real Beer +7 almost real Beer +CREATE VIEW v1 AS SELECT * from t1 WHERE match (c2) against ('Beer'); +select * from v1; +c1 c2 +1 real Beer +7 almost real Beer +drop view v1; +drop table t1; +create table t1 (a int); +insert into t1 values (1),(1),(2),(2),(3),(3); +create view v1 as select a from t1; +select distinct a from v1; +a +1 +2 +3 +select distinct a from v1 limit 2; +a +1 +2 +select distinct a from t1 limit 2; +a +1 +2 +prepare stmt1 from "select distinct a from v1 limit 2"; +execute stmt1; +a +1 +2 +execute stmt1; +a +1 +2 +deallocate prepare stmt1; +drop view v1; +drop table t1; +create table t1 (tg_column bigint); +create view v1 as select count(tg_column) as vg_column from t1; +select avg(vg_column) from v1; +avg(vg_column) +0.0000 +drop view v1; +drop table t1; +create table t1 (col1 bigint not null, primary key (col1)); +create table t2 (col1 bigint not null, key (col1)); +create view v1 as select * from t1; +create view v2 as select * from t2; +insert into v1 values (1); +insert into v2 values (1); +create view v3 (a,b) as select v1.col1 as a, v2.col1 as b from v1, v2 where v1.col1 = v2.col1; +select * from v3; +a b +1 1 +show create view v3; +View Create View +v3 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v3` AS select `v1`.`col1` AS `a`,`v2`.`col1` AS `b` from (`test`.`v1` join `test`.`v2`) where (`v1`.`col1` = `v2`.`col1`) +drop view v3, v2, v1; +drop table t2, t1; +create function `f``1` () returns int return 5; +create view v1 as select test.`f``1` (); +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select sql_no_cache `test`.`f``1`() AS `test.``f````1`` ()` +select * from v1; +test.`f``1` () +5 +drop view v1; +drop function `f``1`; +create function x () returns int return 5; +create view v1 as select x (); +select * from v1; +x () +5 +drop view v1; +drop function x; +create table t2 (col1 char collate latin1_german2_ci); +create view v2 as select col1 collate latin1_german1_ci from t2; +show create view v2; +View Create View +v2 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v2` AS select (`test`.`t2`.`col1` collate latin1_german1_ci) AS `col1 collate latin1_german1_ci` from `test`.`t2` +show create view v2; +View Create View +v2 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v2` AS select (`test`.`t2`.`col1` collate latin1_german1_ci) AS `col1 collate latin1_german1_ci` from `test`.`t2` +drop view v2; +drop table t2; +create table t1 (a int); +insert into t1 values (1), (2); +create view v1 as select 5 from t1 order by 1; +select * from v1; +5 +5 +5 +drop view v1; +drop table t1; +create function x1 () returns int return 5; +create table t1 (s1 int); +create view v1 as select x1() from t1; +drop function x1; +select * from v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment +t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL +v1 NULL NULL NULL NULL NULL NULL # NULL NULL NULL # # NULL NULL NULL NULL View 'test.v1' references invalid table(s) or column(s) or function(s) +drop view v1; +drop table t1; +create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select 99999999999999999999999999999999999999999999999999999 AS `col1` +drop view v1; +create table tü (cü char); +create view vü as select cü from tü; +insert into vü values ('ü'); +select * from vü; +cü +ü +drop view vü; +drop table tü; +create table t1 (a int, b int); +insert into t1 values (1,2), (1,3), (2,4), (2,5), (3,10); +create view v1(c) as select a+1 from t1 where b >= 4; +select c from v1 where exists (select * from t1 where a=2 and b=c); +c +4 +drop view v1; +drop table t1; +create view v1 as select cast(1 as char(3)); +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select cast(1 as char(3) charset latin1) AS `cast(1 as char(3))` +select * from v1; +cast(1 as char(3)) +1 +drop view v1; +create view v1 as select 'a',1; +create view v2 as select * from v1 union all select * from v1; +create view v3 as select * from v2 where 1 = (select `1` from v2); +create view v4 as select * from v3; +select * from v4; +ERROR 21000: Subquery returns more than 1 row +drop view v4, v3, v2, v1; +create view v1 as select 5 into @w; +ERROR HY000: View's SELECT contains a 'INTO' clause +create view v1 as select 5 into outfile 'ttt'; +ERROR HY000: View's SELECT contains a 'INTO' clause +create table t1 (a int); +create view v1 as select a from t1 procedure analyse(); +ERROR HY000: View's SELECT contains a 'PROCEDURE' clause +drop table t1; +create table t1 (s1 int, primary key (s1)); +create view v1 as select * from t1; +insert into v1 values (1) on duplicate key update s1 = 7; +insert into v1 values (1) on duplicate key update s1 = 7; +select * from t1; +s1 +7 +drop view v1; +drop table t1; +create table t1 (col1 int); +create table t2 (col1 int); +create view v1 as select * from t1; +create view v2 as select * from v1; +create view v3 as select v2.col1 from v2,t2 where v2.col1 = t2.col1; +update v2 set col1 = (select max(col1) from v1); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +update v2 set col1 = (select max(col1) from t1); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +update v2 set col1 = (select max(col1) from v2); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +update v2,t2 set v2.col1 = (select max(col1) from v1) where v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +update t1,t2 set t1.col1 = (select max(col1) from v1) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +update v1,t2 set v1.col1 = (select max(col1) from v1) where v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v1' for update in FROM clause +update t2,v2 set v2.col1 = (select max(col1) from v1) where v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update t2,t1 set t1.col1 = (select max(col1) from v1) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update t2,v1 set v1.col1 = (select max(col1) from v1) where v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update v2,t2 set v2.col1 = (select max(col1) from t1) where v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +update v1,t2 set v1.col1 = (select max(col1) from t1) where v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v1' for update in FROM clause +update t2,v2 set v2.col1 = (select max(col1) from t1) where v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update t2,t1 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update t2,v1 set v1.col1 = (select max(col1) from t1) where v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update v2,t2 set v2.col1 = (select max(col1) from v2) where v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +update t1,t2 set t1.col1 = (select max(col1) from v2) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +update v1,t2 set v1.col1 = (select max(col1) from v2) where v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v1' for update in FROM clause +update t2,v2 set v2.col1 = (select max(col1) from v2) where v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update t2,t1 set t1.col1 = (select max(col1) from v2) where t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update t2,v1 set v1.col1 = (select max(col1) from v2) where v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't2' for update in FROM clause +update v3 set v3.col1 = (select max(col1) from v1); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +update v3 set v3.col1 = (select max(col1) from t1); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +update v3 set v3.col1 = (select max(col1) from v2); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +update v3 set v3.col1 = (select max(col1) from v3); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +delete from v2 where col1 = (select max(col1) from v1); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +delete from v2 where col1 = (select max(col1) from t1); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +delete from v2 where col1 = (select max(col1) from v2); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +delete v2 from v2,t2 where (select max(col1) from v1) > 0 and v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +delete t1 from t1,t2 where (select max(col1) from v1) > 0 and t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +delete v1 from v1,t2 where (select max(col1) from v1) > 0 and v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v1' for update in FROM clause +delete v2 from v2,t2 where (select max(col1) from t1) > 0 and v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +delete t1 from t1,t2 where (select max(col1) from t1) > 0 and t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +delete v1 from v1,t2 where (select max(col1) from t1) > 0 and v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v1' for update in FROM clause +delete v2 from v2,t2 where (select max(col1) from v2) > 0 and v2.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +delete t1 from t1,t2 where (select max(col1) from v2) > 0 and t1.col1 = t2.col1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +delete v1 from v1,t2 where (select max(col1) from v2) > 0 and v1.col1 = t2.col1; +ERROR HY000: You can't specify target table 'v1' for update in FROM clause +insert into v2 values ((select max(col1) from v1)); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +insert into t1 values ((select max(col1) from v1)); +ERROR HY000: You can't specify target table 't1' for update in FROM clause +insert into v2 values ((select max(col1) from v1)); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +insert into v2 values ((select max(col1) from t1)); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +insert into t1 values ((select max(col1) from t1)); +ERROR HY000: You can't specify target table 't1' for update in FROM clause +insert into v2 values ((select max(col1) from t1)); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +insert into v2 values ((select max(col1) from v2)); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +insert into t1 values ((select max(col1) from v2)); +ERROR HY000: You can't specify target table 't1' for update in FROM clause +insert into v2 values ((select max(col1) from v2)); +ERROR HY000: You can't specify target table 'v2' for update in FROM clause +insert into v3 (col1) values ((select max(col1) from v1)); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +insert into v3 (col1) values ((select max(col1) from t1)); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +insert into v3 (col1) values ((select max(col1) from v2)); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +insert into v3 (col1) values ((select CONVERT_TZ('20050101000000','UTC','MET') from v2)); +ERROR HY000: You can't specify target table 'v3' for update in FROM clause +insert into v3 (col1) values ((select CONVERT_TZ('20050101000000','UTC','MET') from t2)); +insert into mysql.time_zone values ('', (select CONVERT_TZ('20050101000000','UTC','MET') from t2)); +ERROR 23000: Column 'Use_leap_seconds' cannot be null +create algorithm=temptable view v4 as select * from t1; +insert into t1 values (1),(2),(3); +insert into t1 (col1) values ((select max(col1) from v4)); +select * from t1; +col1 +NULL +1 +2 +3 +3 +drop view v4,v3,v2,v1; +drop table t1,t2; +create table t1 (s1 int); +create view v1 as select * from t1; +handler v1 open as xx; +ERROR HY000: 'test.v1' is not BASE TABLE +drop view v1; +drop table t1; +create table t1(a int); +insert into t1 values (0), (1), (2), (3); +create table t2 (a int); +insert into t2 select a from t1 where a > 1; +create view v1 as select a from t1 where a > 1; +select * from t1 left join (t2 as t, v1) on v1.a=t1.a; +a a a +0 NULL NULL +1 NULL NULL +2 2 2 +2 3 2 +3 2 3 +3 3 3 +select * from t1 left join (t2 as t, t2) on t2.a=t1.a; +a a a +0 NULL NULL +1 NULL NULL +2 2 2 +2 3 2 +3 2 3 +3 3 3 +drop view v1; +drop table t1, t2; +create table t1 (s1 char); +create view v1 as select s1 collate latin1_german1_ci as s1 from t1; +insert into v1 values ('a'); +select * from v1; +s1 +a +update v1 set s1='b'; +select * from v1; +s1 +b +update v1,t1 set v1.s1='c' where t1.s1=v1.s1; +select * from v1; +s1 +c +prepare stmt1 from "update v1,t1 set v1.s1=? where t1.s1=v1.s1"; +set @arg='d'; +execute stmt1 using @arg; +select * from v1; +s1 +d +set @arg='e'; +execute stmt1 using @arg; +select * from v1; +s1 +e +deallocate prepare stmt1; +drop view v1; +drop table t1; +create table t1 (a int); +create table t2 (a int); +create view v1 as select * from t1; +lock tables t1 read, v1 read; +select * from v1; +a +select * from t2; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +drop view v1; +drop table t1, t2; +create table t1 (a int); +create view v1 as select * from t1 where a < 2 with check option; +insert into v1 values(1); +insert into v1 values(3); +ERROR HY000: CHECK OPTION failed 'test.v1' +insert ignore into v1 values (2),(3),(0); +Warnings: +Error 1369 CHECK OPTION failed 'test.v1' +Error 1369 CHECK OPTION failed 'test.v1' +select * from t1; +a +1 +0 +delete from t1; +insert into v1 SELECT 1; +insert into v1 SELECT 3; +ERROR HY000: CHECK OPTION failed 'test.v1' +create table t2 (a int); +insert into t2 values (2),(3),(0); +insert ignore into v1 SELECT a from t2; +Warnings: +Error 1369 CHECK OPTION failed 'test.v1' +Error 1369 CHECK OPTION failed 'test.v1' +select * from t1; +a +1 +0 +update v1 set a=-1 where a=0; +update v1 set a=2 where a=1; +ERROR HY000: CHECK OPTION failed 'test.v1' +select * from t1; +a +1 +-1 +update v1 set a=0 where a=0; +insert into t2 values (1); +update v1,t2 set v1.a=v1.a-1 where v1.a=t2.a; +select * from t1; +a +0 +-1 +update v1 set a=a+1; +update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a; +Warnings: +Error 1369 CHECK OPTION failed 'test.v1' +select * from t1; +a +1 +1 +drop view v1; +drop table t1, t2; +create table t1 (a int); +create view v1 as select * from t1 where a < 2 with check option; +create view v2 as select * from v1 where a > 0 with local check option; +create view v3 as select * from v1 where a > 0 with cascaded check option; +insert into v2 values (1); +insert into v3 values (1); +insert into v2 values (0); +ERROR HY000: CHECK OPTION failed 'test.v2' +insert into v3 values (0); +ERROR HY000: CHECK OPTION failed 'test.v3' +insert into v2 values (2); +insert into v3 values (2); +ERROR HY000: CHECK OPTION failed 'test.v3' +select * from t1; +a +1 +1 +2 +drop view v3,v2,v1; +drop table t1; +create table t1 (a int, primary key (a)); +create view v1 as select * from t1 where a < 2 with check option; +insert into v1 values (1) on duplicate key update a=2; +insert into v1 values (1) on duplicate key update a=2; +ERROR HY000: CHECK OPTION failed 'test.v1' +insert ignore into v1 values (1) on duplicate key update a=2; +Warnings: +Error 1369 CHECK OPTION failed 'test.v1' +select * from t1; +a +1 +drop view v1; +drop table t1; +create table t1 (s1 int); +create view v1 as select * from t1; +create view v2 as select * from v1; +alter view v1 as select * from v2; +ERROR 42S02: Table 'test.v1' doesn't exist +alter view v1 as select * from v1; +ERROR 42000: Not unique table/alias: 'v1' +create or replace view v1 as select * from v2; +ERROR 42S02: Table 'test.v1' doesn't exist +create or replace view v1 as select * from v1; +ERROR 42000: Not unique table/alias: 'v1' +drop view v2,v1; +drop table t1; +create table t1 (a int); +create view v1 as select * from t1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` +alter algorithm=undefined view v1 as select * from t1 with check option; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` WITH CASCADED CHECK OPTION +alter algorithm=merge view v1 as select * from t1 with cascaded check option; +show create view v1; +View Create View +v1 CREATE ALGORITHM=MERGE VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` WITH CASCADED CHECK OPTION +alter algorithm=temptable view v1 as select * from t1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=TEMPTABLE VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` +drop view v1; +drop table t1; +create table t1 (s1 int); +create table t2 (s1 int); +create view v2 as select * from t2 where s1 in (select s1 from t1); +insert into v2 values (5); +insert into t1 values (5); +select * from v2; +s1 +5 +update v2 set s1 = 0; +select * from v2; +s1 +select * from t2; +s1 +0 +alter view v2 as select * from t2 where s1 in (select s1 from t1) with check option; +insert into v2 values (5); +update v2 set s1 = 1; +ERROR HY000: CHECK OPTION failed 'test.v2' +insert into t1 values (1); +update v2 set s1 = 1; +select * from v2; +s1 +1 +select * from t2; +s1 +0 +1 +prepare stmt1 from "select * from v2;"; +execute stmt1; +s1 +1 +insert into t1 values (0); +execute stmt1; +s1 +0 +1 +deallocate prepare stmt1; +drop view v2; +drop table t1, t2; +create table t1 (t time); +create view v1 as select substring_index(t,':',2) as t from t1; +insert into t1 (t) values ('12:24:10'); +select substring_index(t,':',2) from t1; +substring_index(t,':',2) +12:24 +select substring_index(t,':',2) from v1; +substring_index(t,':',2) +12:24 +drop view v1; +drop table t1; +create table t1 (s1 tinyint); +create view v1 as select * from t1 where s1 <> 0 with local check option; +create view v2 as select * from v1 with cascaded check option; +insert into v2 values (0); +ERROR HY000: CHECK OPTION failed 'test.v2' +drop view v2, v1; +drop table t1; +create table t1 (s1 int); +create view v1 as select * from t1 where s1 < 5 with check option; +insert ignore into v1 values (6); +ERROR HY000: CHECK OPTION failed 'test.v1' +insert ignore into v1 values (6),(3); +Warnings: +Error 1369 CHECK OPTION failed 'test.v1' +select * from t1; +s1 +3 +drop view v1; +drop table t1; +create table t1 (s1 tinyint); +create trigger t1_bi before insert on t1 for each row set new.s1 = 500; +create view v1 as select * from t1 where s1 <> 127 with check option; +insert into v1 values (0); +ERROR HY000: CHECK OPTION failed 'test.v1' +select * from v1; +s1 +select * from t1; +s1 +drop trigger t1_bi; +drop view v1; +drop table t1; +create table t1 (s1 tinyint); +create view v1 as select * from t1 where s1 <> 0; +create view v2 as select * from v1 where s1 <> 1 with cascaded check option; +insert into v2 values (0); +ERROR HY000: CHECK OPTION failed 'test.v2' +select * from v2; +s1 +select * from t1; +s1 +drop view v2, v1; +drop table t1; +create table t1 (a int, b char(10)); +create view v1 as select * from t1 where a != 0 with check option; +load data infile '../../std_data/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +ERROR HY000: CHECK OPTION failed 'test.v1' +select * from t1; +a b +1 row 1 +2 row 2 +select * from v1; +a b +1 row 1 +2 row 2 +delete from t1; +load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Error 1369 CHECK OPTION failed 'test.v1' +Warning 1264 Out of range value adjusted for column 'a' at row 4 +Error 1369 CHECK OPTION failed 'test.v1' +select * from t1; +a b +1 row 1 +2 row 2 +3 row 3 +select * from v1; +a b +1 row 1 +2 row 2 +3 row 3 +drop view v1; +drop table t1; +create table t1 (a text, b text); +create view v1 as select * from t1 where a <> 'Field A' with check option; +load data infile '../../std_data/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; +ERROR HY000: CHECK OPTION failed 'test.v1' +select concat('|',a,'|'), concat('|',b,'|') from t1; +concat('|',a,'|') concat('|',b,'|') +select concat('|',a,'|'), concat('|',b,'|') from v1; +concat('|',a,'|') concat('|',b,'|') +delete from t1; +load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; +Warnings: +Error 1369 CHECK OPTION failed 'test.v1' +Warning 1261 Row 2 doesn't contain data for all columns +select concat('|',a,'|'), concat('|',b,'|') from t1; +concat('|',a,'|') concat('|',b,'|') +|Field 1| |Field 2' +Field 3,'Field 4| +|Field 5' ,'Field 6| NULL +|Field 6| | 'Field 7'| +select concat('|',a,'|'), concat('|',b,'|') from v1; +concat('|',a,'|') concat('|',b,'|') +|Field 1| |Field 2' +Field 3,'Field 4| +|Field 5' ,'Field 6| NULL +|Field 6| | 'Field 7'| +drop view v1; +drop table t1; +create table t1 (s1 smallint); +create view v1 as select * from t1 where 20 < (select (s1) from t1); +insert into v1 values (30); +ERROR HY000: The target table v1 of the INSERT is not updatable +create view v2 as select * from t1; +create view v3 as select * from t1 where 20 < (select (s1) from v2); +insert into v3 values (30); +ERROR HY000: The target table v3 of the INSERT is not updatable +create view v4 as select * from v2 where 20 < (select (s1) from t1); +insert into v4 values (30); +ERROR HY000: You can't specify target table 'v4' for update in FROM clause +drop view v4, v3, v2, v1; +drop table t1; +create table t1 (a int); +create view v1 as select * from t1; +check table t1,v1; +Table Op Msg_type Msg_text +test.t1 check status OK +test.v1 check status OK +check table v1,t1; +Table Op Msg_type Msg_text +test.v1 check status OK +test.t1 check status OK +drop table t1; +check table v1; +Table Op Msg_type Msg_text +test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s) +drop view v1; +create table t1 (a int); +create table t2 (a int); +create table t3 (a int); +insert into t1 values (1), (2), (3); +insert into t2 values (1), (3); +insert into t3 values (1), (2), (4); +create view v3 (a,b) as select t1.a as a, t2.a as b from t1 left join t2 on (t1.a=t2.a); +select * from t3 left join v3 on (t3.a = v3.a); +a a b +1 1 1 +2 2 NULL +4 NULL NULL +explain extended select * from t3 left join v3 on (t3.a = v3.a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `b` from `test`.`t3` left join (`test`.`t1` left join `test`.`t2` on((`test`.`t1`.`a` = `test`.`t2`.`a`))) on((`test`.`t3`.`a` = `test`.`t1`.`a`)) where 1 +create view v1 (a) as select a from t1; +create view v2 (a) as select a from t2; +create view v4 (a,b) as select v1.a as a, v2.a as b from v1 left join v2 on (v1.a=v2.a); +select * from t3 left join v4 on (t3.a = v4.a); +a a b +1 1 1 +2 2 NULL +4 NULL NULL +explain extended select * from t3 left join v4 on (t3.a = v4.a); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 3 +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 +Warnings: +Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `b` from `test`.`t3` left join (`test`.`t1` left join (`test`.`t2`) on((`test`.`t1`.`a` = `test`.`t2`.`a`))) on((`test`.`t3`.`a` = `test`.`t1`.`a`)) where 1 +prepare stmt1 from "select * from t3 left join v4 on (t3.a = v4.a);"; +execute stmt1; +a a b +1 1 1 +2 2 NULL +4 NULL NULL +execute stmt1; +a a b +1 1 1 +2 2 NULL +4 NULL NULL +deallocate prepare stmt1; +drop view v4,v3,v2,v1; +drop tables t1,t2,t3; +create table t1 (a int, primary key (a), b int); +create table t2 (a int, primary key (a)); +insert into t1 values (1,100), (2,200); +insert into t2 values (1), (3); +create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; +update v3 set a= 10 where a=1; +select * from t1; +a b +10 100 +2 200 +select * from t2; +a +1 +3 +create view v2 (a,b) as select t1.b as a, t2.a as b from t1, t2; +set updatable_views_with_limit=NO; +update v2 set a= 10 where a=200 limit 1; +ERROR HY000: The target table t1 of the UPDATE is not updatable +set updatable_views_with_limit=DEFAULT; +select * from v3; +a b +2 1 +10 1 +2 3 +10 3 +select * from v2; +a b +100 1 +200 1 +100 3 +200 3 +set @a= 10; +set @b= 100; +prepare stmt1 from "update v3 set a= ? where a=?"; +execute stmt1 using @a,@b; +select * from v3; +a b +2 1 +10 1 +2 3 +10 3 +set @a= 300; +set @b= 10; +execute stmt1 using @a,@b; +select * from v3; +a b +2 1 +300 1 +2 3 +300 3 +deallocate prepare stmt1; +drop view v3,v2; +drop tables t1,t2; +create table t1 (a int, primary key (a), b int); +create table t2 (a int, primary key (a), b int); +insert into t2 values (1000, 2000); +create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; +insert into v3 values (1,2); +ERROR HY000: Can not insert into join view 'test.v3' without fields list +insert into v3 select * from t2; +ERROR HY000: Can not insert into join view 'test.v3' without fields list +insert into v3(a,b) values (1,2); +ERROR HY000: Can not modify more than one base table through a join view 'test.v3' +insert into v3(a,b) select * from t2; +ERROR HY000: Can not modify more than one base table through a join view 'test.v3' +insert into v3(a) values (1); +insert into v3(b) values (10); +insert into v3(a) select a from t2; +insert into v3(b) select b from t2; +Warnings: +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 +insert into v3(a) values (1) on duplicate key update a=a+10000+VALUES(a); +select * from t1; +a b +10002 NULL +10 NULL +1000 NULL +select * from t2; +a b +1000 2000 +10 NULL +2000 NULL +0 NULL +delete from v3; +ERROR HY000: Can not delete from join view 'test.v3' +delete v3,t1 from v3,t1; +ERROR HY000: Can not delete from join view 'test.v3' +delete t1,v3 from t1,v3; +ERROR HY000: Can not delete from join view 'test.v3' +delete from t1; +prepare stmt1 from "insert into v3(a) values (?);"; +set @a= 100; +execute stmt1 using @a; +set @a= 300; +execute stmt1 using @a; +deallocate prepare stmt1; +prepare stmt1 from "insert into v3(a) select ?;"; +set @a= 101; +execute stmt1 using @a; +set @a= 301; +execute stmt1 using @a; +deallocate prepare stmt1; +select * from v3; +a b +100 1000 +101 1000 +300 1000 +301 1000 +100 10 +101 10 +300 10 +301 10 +100 2000 +101 2000 +300 2000 +301 2000 +100 0 +101 0 +300 0 +301 0 +drop view v3; +drop tables t1,t2; +create table t1(f1 int); +create view v1 as select f1 from t1; +select * from v1 where F1 = 1; +f1 +drop view v1; +drop table t1; +create table t1(c1 int); +create table t2(c2 int); +insert into t1 values (1),(2),(3); +insert into t2 values (1); +SELECT c1 FROM t1 WHERE c1 IN (SELECT c2 FROM t2); +c1 +1 +SELECT c1 FROM t1 WHERE EXISTS (SELECT c2 FROM t2 WHERE c2 = c1); +c1 +1 +create view v1 as SELECT c1 FROM t1 WHERE c1 IN (SELECT c2 FROM t2); +create view v2 as SELECT c1 FROM t1 WHERE EXISTS (SELECT c2 FROM t2 WHERE c2 = c1); +select * from v1; +c1 +1 +select * from v2; +c1 +1 +select * from (select c1 from v2) X; +c1 +1 +drop view v2, v1; +drop table t1, t2; +CREATE TABLE t1 (C1 INT, C2 INT); +CREATE TABLE t2 (C2 INT); +CREATE VIEW v1 AS SELECT C2 FROM t2; +CREATE VIEW v2 AS SELECT C1 FROM t1 LEFT OUTER JOIN v1 USING (C2); +SELECT * FROM v2; +C1 +drop view v2, v1; +drop table t1, t2; +create table t1 (col1 char(5),col2 int,col3 int); +insert into t1 values ('one',10,25), ('two',10,50), ('two',10,50), ('one',20,25), ('one',30,25); +create view v1 as select * from t1; +select col1,group_concat(col2,col3) from t1 group by col1; +col1 group_concat(col2,col3) +one 1025,2025,3025 +two 1050,1050 +select col1,group_concat(col2,col3) from v1 group by col1; +col1 group_concat(col2,col3) +one 1025,2025,3025 +two 1050,1050 +drop view v1; +drop table t1; +create table t1 (s1 int, s2 char); +create view v1 as select s1, s2 from t1; +select s2 from v1 vq1 where 2 = (select count(*) from v1 vq2 having vq1.s2 = vq2.s2); +ERROR 42S22: Unknown column 'vq2.s2' in 'having clause' +select s2 from v1 vq1 where 2 = (select count(*) aa from v1 vq2 having vq1.s2 = aa); +s2 +drop view v1; +drop table t1; +CREATE TABLE t1 (a1 int); +CREATE TABLE t2 (a2 int); +INSERT INTO t1 VALUES (1), (2), (3), (4); +INSERT INTO t2 VALUES (1), (2), (3); +CREATE VIEW v1(a,b) AS SELECT a1,a2 FROM t1 JOIN t2 ON a1=a2 WHERE a1>1; +SELECT * FROM v1; +a b +2 2 +3 3 +CREATE TABLE t3 SELECT * FROM v1; +SELECT * FROM t3; +a b +2 2 +3 3 +DROP VIEW v1; +DROP TABLE t1,t2,t3; +create table t1 (a int); +create table t2 like t1; +create table t3 like t1; +create view v1 as select t1.a x, t2.a y from t1 join t2 where t1.a=t2.a; +insert into t3 select x from v1; +insert into t2 select x from v1; +drop view v1; +drop table t1,t2,t3; +CREATE TABLE t1 (col1 int PRIMARY KEY, col2 varchar(10)); +INSERT INTO t1 VALUES(1,'trudy'); +INSERT INTO t1 VALUES(2,'peter'); +INSERT INTO t1 VALUES(3,'sanja'); +INSERT INTO t1 VALUES(4,'monty'); +INSERT INTO t1 VALUES(5,'david'); +INSERT INTO t1 VALUES(6,'kent'); +INSERT INTO t1 VALUES(7,'carsten'); +INSERT INTO t1 VALUES(8,'ranger'); +INSERT INTO t1 VALUES(10,'matt'); +CREATE TABLE t2 (col1 int, col2 int, col3 char(1)); +INSERT INTO t2 VALUES (1,1,'y'); +INSERT INTO t2 VALUES (1,2,'y'); +INSERT INTO t2 VALUES (2,1,'n'); +INSERT INTO t2 VALUES (3,1,'n'); +INSERT INTO t2 VALUES (4,1,'y'); +INSERT INTO t2 VALUES (4,2,'n'); +INSERT INTO t2 VALUES (4,3,'n'); +INSERT INTO t2 VALUES (6,1,'n'); +INSERT INTO t2 VALUES (8,1,'y'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT a.col1,a.col2,b.col2,b.col3 +FROM t1 a LEFT JOIN t2 b ON a.col1=b.col1 +WHERE b.col2 IS NULL OR +b.col2=(SELECT MAX(col2) FROM t2 b WHERE b.col1=a.col1); +col1 col2 col2 col3 +1 trudy 2 y +2 peter 1 n +3 sanja 1 n +4 monty 3 n +5 david NULL NULL +6 kent 1 n +7 carsten NULL NULL +8 ranger 1 y +10 matt NULL NULL +SELECT a.col1,a.col2,b.col2,b.col3 +FROM v1 a LEFT JOIN t2 b ON a.col1=b.col1 +WHERE b.col2 IS NULL OR +b.col2=(SELECT MAX(col2) FROM t2 b WHERE b.col1=a.col1); +col1 col2 col2 col3 +1 trudy 2 y +2 peter 1 n +3 sanja 1 n +4 monty 3 n +5 david NULL NULL +6 kent 1 n +7 carsten NULL NULL +8 ranger 1 y +10 matt NULL NULL +CREATE VIEW v2 AS SELECT * FROM t2; +SELECT a.col1,a.col2,b.col2,b.col3 +FROM v2 b RIGHT JOIN v1 a ON a.col1=b.col1 +WHERE b.col2 IS NULL OR +b.col2=(SELECT MAX(col2) FROM v2 b WHERE b.col1=a.col1); +col1 col2 col2 col3 +1 trudy 2 y +2 peter 1 n +3 sanja 1 n +4 monty 3 n +5 david NULL NULL +6 kent 1 n +7 carsten NULL NULL +8 ranger 1 y +10 matt NULL NULL +SELECT a.col1,a.col2,b.col2,b.col3 +FROM v2 b RIGHT JOIN v1 a ON a.col1=b.col1 +WHERE a.col1 IN (1,5,9) AND +(b.col2 IS NULL OR +b.col2=(SELECT MAX(col2) FROM v2 b WHERE b.col1=a.col1)); +col1 col2 col2 col3 +1 trudy 2 y +5 david NULL NULL +CREATE VIEW v3 AS SELECT * FROM t1 WHERE col1 IN (1,5,9); +SELECT a.col1,a.col2,b.col2,b.col3 +FROM v2 b RIGHT JOIN v3 a ON a.col1=b.col1 +WHERE b.col2 IS NULL OR +b.col2=(SELECT MAX(col2) FROM v2 b WHERE b.col1=a.col1); +col1 col2 col2 col3 +1 trudy 2 y +5 david NULL NULL +DROP VIEW v1,v2,v3; +DROP TABLE t1,t2; +create table t1 as select 1 A union select 2 union select 3; +create table t2 as select * from t1; +create view v1 as select * from t1 where a in (select * from t2); +select * from v1 A, v1 B where A.a = B.a; +A A +1 1 +2 2 +3 3 +create table t3 as select a a,a b from t2; +create view v2 as select * from t3 where +a in (select * from t1) or b in (select * from t2); +select * from v2 A, v2 B where A.a = B.b; +a b a b +1 1 1 1 +2 2 2 2 +3 3 3 3 +drop view v1, v2; +drop table t1, t2, t3; +CREATE TABLE t1 (a int); +CREATE TABLE t2 (b int); +INSERT INTO t1 VALUES (1), (2), (3), (4); +INSERT INTO t2 VALUES (4), (2); +CREATE VIEW v1 AS SELECT * FROM t1,t2 WHERE t1.a=t2.b; +SELECT * FROM v1; +a b +2 2 +4 4 +CREATE VIEW v2 AS SELECT * FROM v1; +SELECT * FROM v2; +a b +2 2 +4 4 +DROP VIEW v2,v1; +DROP TABLE t1, t2; +create table t1 (a int); +create view v1 as select sum(a) from t1 group by a; +create procedure p1() +begin +select * from v1; +end// +call p1(); +sum(a) +call p1(); +sum(a) +drop procedure p1; +drop view v1; +drop table t1; +CREATE TABLE t1(a char(2) primary key, b char(2)); +CREATE TABLE t2(a char(2), b char(2), index i(a)); +INSERT INTO t1 VALUES ('a','1'), ('b','2'); +INSERT INTO t2 VALUES ('a','5'), ('a','6'), ('b','5'), ('b','6'); +CREATE VIEW v1 AS +SELECT t1.b as c, t2.b as d FROM t1,t2 WHERE t1.a=t2.a; +SELECT d, c FROM v1 ORDER BY d,c; +d c +5 1 +5 2 +6 1 +6 2 +DROP VIEW v1; +DROP TABLE t1, t2; +create table t1 (s1 int); +create view v1 as select sum(distinct s1) from t1; +select * from v1; +sum(distinct s1) +NULL +drop view v1; +create view v1 as select avg(distinct s1) from t1; +select * from v1; +avg(distinct s1) +NULL +drop view v1; +drop table t1; +create view v1 as select cast(1 as decimal); +select * from v1; +cast(1 as decimal) +1.00 +drop view v1; +create table t1(f1 int); +create table t2(f2 int); +insert into t1 values(1),(2),(3); +insert into t2 values(1),(2),(3); +create view v1 as select * from t1,t2 where f1=f2; +create table t3 (f1 int, f2 int); +insert into t3 select * from v1 order by 1; +select * from t3; +f1 f2 +1 1 +2 2 +3 3 +drop view v1; +drop table t1,t2,t3; +create view v1 as select '\\','\\shazam'; +select * from v1; +\ \shazam +\ \shazam +drop view v1; +create view v1 as select '\'','\shazam'; +select * from v1; +' shazam +' shazam +drop view v1; +create view v1 as select 'k','K'; +select * from v1; +k My_exp_K +k K +drop view v1; +create table t1 (s1 int); +create view v1 as select s1, 's1' from t1; +select * from v1; +s1 My_exp_s1 +drop view v1; +create view v1 as select 's1', s1 from t1; +select * from v1; +My_exp_s1 s1 +drop view v1; +create view v1 as select 's1', s1, 1 as My_exp_s1 from t1; +select * from v1; +My_exp_1_s1 s1 My_exp_s1 +drop view v1; +create view v1 as select 1 as My_exp_s1, 's1', s1 from t1; +select * from v1; +My_exp_s1 My_exp_1_s1 s1 +drop view v1; +create view v1 as select 1 as s1, 's1', 's1' from t1; +select * from v1; +s1 My_exp_s1 My_exp_1_s1 +drop view v1; +create view v1 as select 's1', 's1', 1 as s1 from t1; +select * from v1; +My_exp_1_s1 My_exp_s1 s1 +drop view v1; +create view v1 as select s1, 's1', 's1' from t1; +select * from v1; +s1 My_exp_s1 My_exp_1_s1 +drop view v1; +create view v1 as select 's1', 's1', s1 from t1; +select * from v1; +My_exp_1_s1 My_exp_s1 s1 +drop view v1; +create view v1 as select 1 as s1, 's1', s1 from t1; +ERROR 42S21: Duplicate column name 's1' +create view v1 as select 's1', s1, 1 as s1 from t1; +ERROR 42S21: Duplicate column name 's1' +drop table t1; +create view v1(k, K) as select 1,2; +ERROR 42S21: Duplicate column name 'K' +create view v1 as SELECT TIME_FORMAT(SEC_TO_TIME(3600),'%H:%i') as t; +select * from v1; +t +01:00 +drop view v1; +create table t1 (a timestamp default now()); +create table t2 (b timestamp default now()); +create view v1 as select a,b,t1.a < now() from t1,t2 where t1.a < now(); +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select sql_no_cache `test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b`,(`test`.`t1`.`a` < now()) AS `t1.a < now()` from (`test`.`t1` join `test`.`t2`) where (`test`.`t1`.`a` < now()) +drop view v1; +drop table t1, t2; +CREATE TABLE t1 ( a varchar(50) ); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = CURRENT_USER(); +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select sql_no_cache `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = current_user()) +DROP VIEW v1; +CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = VERSION(); +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = version()) +DROP VIEW v1; +CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = DATABASE(); +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select sql_no_cache `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = database()) +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (col1 time); +CREATE TABLE t2 (col1 time); +CREATE VIEW v1 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t1; +CREATE VIEW v2 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t2; +CREATE VIEW v3 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t1; +CREATE VIEW v4 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t2; +CREATE VIEW v5 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t1; +CREATE VIEW v6 AS SELECT CONVERT_TZ(col1,'GMT','MET') FROM t2; +DROP TABLE t1; +CHECK TABLE v1, v2, v3, v4, v5, v6; +Table Op Msg_type Msg_text +test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s) +test.v2 check status OK +test.v3 check error View 'test.v3' references invalid table(s) or column(s) or function(s) +test.v4 check status OK +test.v5 check error View 'test.v5' references invalid table(s) or column(s) or function(s) +test.v6 check status OK +drop view v1, v2, v3, v4, v5, v6; +drop table t2; +drop function if exists f1; +drop function if exists f2; +CREATE TABLE t1 (col1 time); +CREATE TABLE t2 (col1 time); +CREATE TABLE t3 (col1 time); +create function f1 () returns int return (select max(col1) from t1); +create function f2 () returns int return (select max(col1) from t2); +CREATE VIEW v1 AS SELECT f1() FROM t3; +CREATE VIEW v2 AS SELECT f2() FROM t3; +CREATE VIEW v3 AS SELECT f1() FROM t3; +CREATE VIEW v4 AS SELECT f2() FROM t3; +CREATE VIEW v5 AS SELECT f1() FROM t3; +CREATE VIEW v6 AS SELECT f2() FROM t3; +drop function f1; +CHECK TABLE v1, v2, v3, v4, v5, v6; +Table Op Msg_type Msg_text +test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s) +test.v2 check status OK +test.v3 check error View 'test.v3' references invalid table(s) or column(s) or function(s) +test.v4 check status OK +test.v5 check error View 'test.v5' references invalid table(s) or column(s) or function(s) +test.v6 check status OK +create function f1 () returns int return (select max(col1) from t1); +DROP TABLE t1; +CHECK TABLE v1, v2, v3, v4, v5, v6; +Table Op Msg_type Msg_text +test.v1 check error Table 'test.t1' doesn't exist +test.v2 check status OK +test.v3 check error Table 'test.t1' doesn't exist +test.v4 check status OK +test.v5 check error Table 'test.t1' doesn't exist +test.v6 check status OK +drop function f1; +drop function f2; +drop view v1, v2, v3, v4, v5, v6; +drop table t2,t3; +create table t1 (f1 date); +insert into t1 values ('2005-01-01'),('2005-02-02'); +create view v1 as select * from t1; +select * from v1 where f1='2005.02.02'; +f1 +2005-02-02 +select * from v1 where '2005.02.02'=f1; +f1 +2005-02-02 +drop view v1; +drop table t1; +CREATE VIEW v1 AS SELECT ENCRYPT("dhgdhgd"); +SELECT * FROM v1; +drop view v1; +CREATE VIEW v1 AS SELECT SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1); +SELECT * FROM v1; +SUBSTRING_INDEX("dkjhgd:kjhdjh", ":", 1) +dkjhgd +drop view v1; +create table t1 (s1 int); +create view v1 as select var_samp(s1) from t1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `test`.`v1` AS select var_samp(`test`.`t1`.`s1`) AS `var_samp(s1)` from `test`.`t1` +drop view v1; +drop table t1; +set sql_mode='strict_all_tables'; +CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL) ENGINE = INNODB; +CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1; +CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2; +INSERT INTO t1 (col1) VALUES(12); +ERROR HY000: Field 'col2' doesn't have a default value +INSERT INTO v1 (vcol1) VALUES(12); +ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default value +INSERT INTO v2 (vcol1) VALUES(12); +ERROR HY000: Field of view 'test.v2' underlying table doesn't have a default value +set sql_mode=default; +drop view v2,v1; +drop table t1; +create table t1 (f1 int); +insert into t1 values (1); +create view v1 as select f1 from t1; +select f1 as alias from v1; +alias +1 +drop view v1; +drop table t1; +CREATE TABLE t1 (s1 int, s2 int); +INSERT INTO t1 VALUES (1,2); +CREATE VIEW v1 AS SELECT s2 AS s1, s1 AS s2 FROM t1; +SELECT * FROM v1; +s1 s2 +2 1 +CREATE PROCEDURE p1 () SELECT * FROM v1; +CALL p1(); +s1 s2 +2 1 +ALTER VIEW v1 AS SELECT s1 AS s1, s2 AS s2 FROM t1; +CALL p1(); +s1 s2 +1 2 +DROP VIEW v1; +CREATE VIEW v1 AS SELECT s2 AS s1, s1 AS s2 FROM t1; +CALL p1(); +s1 s2 +2 1 +DROP PROCEDURE p1; +DROP VIEW v1; +DROP TABLE t1; +create table t1 (f1 int, f2 int); +create view v1 as select f1 as f3, f2 as f1 from t1; +insert into t1 values (1,3),(2,1),(3,2); +select * from v1 order by f1; +f3 f1 +2 1 +3 2 +1 3 +drop view v1; +drop table t1; +CREATE TABLE t1 (f1 char) ENGINE = innodb; +INSERT INTO t1 VALUES ('A'); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES('B'); +SELECT * FROM v1; +f1 +A +B +SELECT * FROM t1; +f1 +A +B +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 ( bug_table_seq INTEGER NOT NULL); +CREATE OR REPLACE VIEW v1 AS SELECT * from t1; +DROP PROCEDURE IF EXISTS p1; +Warnings: +Note 1305 PROCEDURE p1 does not exist +CREATE PROCEDURE p1 ( ) +BEGIN +DO (SELECT @next := IFNULL(max(bug_table_seq),0) + 1 FROM v1); +INSERT INTO t1 VALUES (1); +END // +CALL p1(); +DROP PROCEDURE p1; +DROP VIEW v1; +DROP TABLE t1; +create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime); +create view v1 as select * from t1; +desc v1; +Field Type Null Key Default Extra +f1 tinyint(1) YES NULL +f2 char(1) YES NULL +f3 varchar(1) YES NULL +f4 geometry YES NULL +f5 datetime YES NULL +drop view v1; +drop table t1; +create table t1(f1 datetime); +insert into t1 values('2005.01.01 12:0:0'); +create view v1 as select f1, subtime(f1, '1:1:1') as sb from t1; +select * from v1; +f1 sb +2005-01-01 12:00:00 2005-01-01 10:58:59 +drop view v1; +drop table t1; +CREATE TABLE t1 ( +aid int PRIMARY KEY, +fn varchar(20) NOT NULL, +ln varchar(20) NOT NULL +); +CREATE TABLE t2 ( +aid int NOT NULL, +pid int NOT NULL +); +INSERT INTO t1 VALUES(1,'a','b'), (2,'c','d'); +INSERT INTO t2 values (1,1), (2,1), (2,2); +CREATE VIEW v1 AS SELECT t1.*,t2.pid FROM t1,t2 WHERE t1.aid = t2.aid; +SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2 +WHERE t1.aid = t2.aid GROUP BY pid; +pid GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) +1 a b,c d +2 c d +SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM v1 GROUP BY pid; +pid GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) +1 a b,c d +2 c d +DROP VIEW v1; +DROP TABLE t1,t2; +CREATE TABLE t1 (id int PRIMARY KEY, f varchar(255)); +CREATE VIEW v1 AS SELECT id, f FROM t1 WHERE id <= 2; +INSERT INTO t1 VALUES (2, 'foo2'); +INSERT INTO t1 VALUES (1, 'foo1'); +SELECT * FROM v1; +id f +1 foo1 +2 foo2 +SELECT * FROM v1; +id f +1 foo1 +2 foo2 +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (pk int PRIMARY KEY, b int); +CREATE TABLE t2 (pk int PRIMARY KEY, fk int, INDEX idx(fk)); +CREATE TABLE t3 (pk int PRIMARY KEY, fk int, INDEX idx(fk)); +CREATE TABLE t4 (pk int PRIMARY KEY, fk int, INDEX idx(fk)); +CREATE TABLE t5 (pk int PRIMARY KEY, fk int, INDEX idx(fk)); +CREATE VIEW v1 AS +SELECT t1.pk as a FROM t1,t2,t3,t4,t5 +WHERE t1.b IS NULL AND +t1.pk=t2.fk AND t2.pk=t3.fk AND t3.pk=t4.fk AND t4.pk=t5.fk; +SELECT a FROM v1; +a +DROP VIEW v1; +DROP TABLE t1,t2,t3,t4,t5; +create view v1 as select timestampdiff(day,'1997-01-01 00:00:00','1997-01-02 00:00:00') as f1; +select * from v1; +f1 +1 +drop view v1; +create table t1(a int); +create procedure p1() create view v1 as select * from t1; +drop table t1; +call p1(); +ERROR 42S02: Table 'test.t1' doesn't exist +call p1(); +ERROR 42S02: Table 'test.t1' doesn't exist +drop procedure p1; +create table t1 (f1 int); +create table t2 (f1 int); +insert into t1 values (1); +insert into t2 values (2); +create view v1 as select * from t1 union select * from t2 union all select * from t2; +select * from v1; +f1 +1 +2 +2 +drop view v1; +drop table t1,t2; +CREATE TEMPORARY TABLE t1 (a int); +CREATE FUNCTION f1 () RETURNS int RETURN (SELECT COUNT(*) FROM t1); +CREATE VIEW v1 AS SELECT f1(); +ERROR HY000: View's SELECT refers to a temporary table 't1' +DROP FUNCTION f1; +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1 (f4 CHAR(5)); +CREATE VIEW v1 AS SELECT * FROM t1; +DESCRIBE v1; +Field Type Null Key Default Extra +f4 char(5) YES NULL +ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); +DESCRIBE v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) +DROP TABLE t1; +DROP VIEW v1; diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result new file mode 100644 index 00000000000..71f0f28e59f --- /dev/null +++ b/mysql-test/r/view_grant.result @@ -0,0 +1,304 @@ +grant create view on test.* to test@localhost; +show grants for test@localhost; +Grants for test@localhost +GRANT USAGE ON *.* TO 'test'@'localhost' +GRANT CREATE VIEW ON `test`.* TO 'test'@'localhost' +revoke create view on test.* from test@localhost; +show grants for test@localhost; +Grants for test@localhost +GRANT USAGE ON *.* TO 'test'@'localhost' +create database mysqltest; +create table mysqltest.t1 (a int, b int); +create table mysqltest.t2 (a int, b int); +grant select on mysqltest.t1 to mysqltest_1@localhost; +grant create view,select on test.* to mysqltest_1@localhost; +create view v1 as select * from mysqltest.t1; +alter view v1 as select * from mysqltest.t1; +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1' +create or replace view v1 as select * from mysqltest.t1; +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1' +create view mysqltest.v2 as select * from mysqltest.t1; +ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2' +create view v2 as select * from mysqltest.t2; +ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 't2' +grant create view,drop,select on test.* to mysqltest_1@localhost; +use test; +alter view v1 as select * from mysqltest.t1; +create or replace view v1 as select * from mysqltest.t1; +revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; +revoke all privileges on test.* from mysqltest_1@localhost; +drop database mysqltest; +drop view test.v1; +create database mysqltest; +create table mysqltest.t1 (a int, b int); +create view mysqltest.v1 (c,d) as select a+1,b+1 from mysqltest.t1; +grant select (c) on mysqltest.v1 to mysqltest_1@localhost; +select c from mysqltest.v1; +c +select d from mysqltest.v1; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'v1' +revoke all privileges on mysqltest.v1 from mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int, b int); +create algorithm=temptable view mysqltest.v1 (c,d) as select a+1,b+1 from mysqltest.t1; +grant select (c) on mysqltest.v1 to mysqltest_1@localhost; +select c from mysqltest.v1; +c +select d from mysqltest.v1; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'v1' +revoke all privileges on mysqltest.v1 from mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int, b int); +create table mysqltest.t2 (a int, b int); +create view mysqltest.v1 (c,d) as select a+1,b+1 from mysqltest.t1; +create algorithm=temptable view mysqltest.v2 (c,d) as select a+1,b+1 from mysqltest.t1; +create view mysqltest.v3 (c,d) as select a+1,b+1 from mysqltest.t2; +create algorithm=temptable view mysqltest.v4 (c,d) as select a+1,b+1 from mysqltest.t2; +grant select on mysqltest.v1 to mysqltest_1@localhost; +grant select on mysqltest.v2 to mysqltest_1@localhost; +grant select on mysqltest.v3 to mysqltest_1@localhost; +grant select on mysqltest.v4 to mysqltest_1@localhost; +select c from mysqltest.v1; +c +select c from mysqltest.v2; +c +select c from mysqltest.v3; +c +select c from mysqltest.v4; +c +show columns from mysqltest.v1; +Field Type Null Key Default Extra +c bigint(12) YES NULL +d bigint(12) YES NULL +show columns from mysqltest.v2; +Field Type Null Key Default Extra +c bigint(12) YES NULL +d bigint(12) YES NULL +explain select c from mysqltest.v1; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +show create view mysqltest.v1; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +explain select c from mysqltest.v2; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +show create view mysqltest.v2; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2' +explain select c from mysqltest.v3; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +show create view mysqltest.v3; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v3' +explain select c from mysqltest.v4; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +show create view mysqltest.v4; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4' +grant select on mysqltest.t1 to mysqltest_1@localhost; +explain select c from mysqltest.v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +show create view mysqltest.v1; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +explain select c from mysqltest.v2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table +show create view mysqltest.v2; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2' +explain select c from mysqltest.v3; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +show create view mysqltest.v3; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v3' +explain select c from mysqltest.v4; +ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table +show create view mysqltest.v4; +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4' +grant show view on mysqltest.* to mysqltest_1@localhost; +explain select c from mysqltest.v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 0 const row not found +show create view mysqltest.v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED VIEW `mysqltest`.`v1` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` +explain select c from mysqltest.v2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table +show create view mysqltest.v2; +View Create View +v2 CREATE ALGORITHM=TEMPTABLE VIEW `mysqltest`.`v2` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` +explain select c from mysqltest.v3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 system NULL NULL NULL NULL 0 const row not found +show create view mysqltest.v3; +View Create View +v3 CREATE ALGORITHM=UNDEFINED VIEW `mysqltest`.`v3` AS select (`mysqltest`.`t2`.`a` + 1) AS `c`,(`mysqltest`.`t2`.`b` + 1) AS `d` from `mysqltest`.`t2` +explain select c from mysqltest.v4; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found +2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table +show create view mysqltest.v4; +View Create View +v4 CREATE ALGORITHM=TEMPTABLE VIEW `mysqltest`.`v4` AS select (`mysqltest`.`t2`.`a` + 1) AS `c`,(`mysqltest`.`t2`.`b` + 1) AS `d` from `mysqltest`.`t2` +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +delete from mysql.user where user='mysqltest_1'; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int, b int, primary key(a)); +insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10); +create table mysqltest.t2 (x int); +insert into mysqltest.t2 values (3), (4), (5), (6); +create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1; +create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1; +create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1; +grant update (a) on mysqltest.v2 to mysqltest_1@localhost; +grant update on mysqltest.v1 to mysqltest_1@localhost; +grant select on mysqltest.* to mysqltest_1@localhost; +use mysqltest; +update t2,v1 set v1.a=v1.a+v1.c where t2.x=v1.c; +select * from t1; +a b +13 2 +24 3 +35 4 +46 5 +50 10 +update v1 set a=a+c; +select * from t1; +a b +16 2 +28 3 +40 4 +52 5 +61 10 +update t2,v2 set v2.a=v2.a+v2.c where t2.x=v2.c; +select * from t1; +a b +16 2 +31 3 +44 4 +57 5 +61 10 +update v2 set a=a+c; +select * from t1; +a b +18 2 +34 3 +48 4 +62 5 +71 10 +update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c; +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2' +update v2 set c=a+c; +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2' +update t2,v3 set v3.a=v3.a+v3.c where t2.x=v3.c; +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'v3' +update v3 set a=a+c; +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'v3' +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int, b int, primary key(a)); +insert into mysqltest.t1 values (1,2), (2,3), (3,4), (4,5), (5,10); +create table mysqltest.t2 (x int); +insert into mysqltest.t2 values (3), (4), (5), (6); +create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1; +create view mysqltest.v2 (a,c) as select a, b+1 from mysqltest.t1; +grant delete on mysqltest.v1 to mysqltest_1@localhost; +grant select on mysqltest.* to mysqltest_1@localhost; +use mysqltest; +delete from v1 where c < 4; +select * from t1; +a b +2 3 +3 4 +4 5 +5 10 +delete v1 from t2,v1 where t2.x=v1.c; +select * from t1; +a b +5 10 +delete v2 from t2,v2 where t2.x=v2.c; +ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v2' +delete from v2 where c < 4; +ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v2' +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int, b int, primary key(a)); +insert into mysqltest.t1 values (1,2), (2,3); +create table mysqltest.t2 (x int, y int); +insert into mysqltest.t2 values (3,4); +create view mysqltest.v1 (a,c) as select a, b from mysqltest.t1; +create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1; +grant insert on mysqltest.v1 to mysqltest_1@localhost; +grant select on mysqltest.* to mysqltest_1@localhost; +use mysqltest; +insert into v1 values (5,6); +select * from t1; +a b +1 2 +2 3 +5 6 +insert into v1 select x,y from t2; +select * from t1; +a b +1 2 +2 3 +5 6 +3 4 +insert into v2 values (5,6); +ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'v2' +insert into v2 select x,y from t2; +ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'v2' +use test; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; +drop database mysqltest; +create database mysqltest; +create table mysqltest.t1 (a int, b int); +create table mysqltest.t2 (a int, b int); +grant update on mysqltest.t1 to mysqltest_1@localhost; +grant update(b) on mysqltest.t2 to mysqltest_1@localhost; +grant create view,update on test.* to mysqltest_1@localhost; +create view v1 as select * from mysqltest.t1; +create view v2 as select b from mysqltest.t2; +create view mysqltest.v1 as select * from mysqltest.t1; +ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +create view v3 as select a from mysqltest.t2; +ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 't2' +create table mysqltest.v3 (b int); +grant create view on mysqltest.v3 to mysqltest_1@localhost; +drop table mysqltest.v3; +create view mysqltest.v3 as select b from mysqltest.t2; +grant create view, update on mysqltest.v3 to mysqltest_1@localhost; +drop view mysqltest.v3; +create view mysqltest.v3 as select b from mysqltest.t2; +grant create view, update, insert on mysqltest.v3 to mysqltest_1@localhost; +drop view mysqltest.v3; +create view mysqltest.v3 as select b from mysqltest.t2; +ERROR 42000: create view command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 'v3' +create table mysqltest.v3 (b int); +grant select(b) on mysqltest.v3 to mysqltest_1@localhost; +drop table mysqltest.v3; +create view mysqltest.v3 as select b from mysqltest.t2; +ERROR 42000: create view command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 'v3' +create view v4 as select b+1 from mysqltest.t2; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't2' +grant create view,update,select on test.* to mysqltest_1@localhost; +create view v4 as select b+1 from mysqltest.t2; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't2' +grant update,select(b) on mysqltest.t2 to mysqltest_1@localhost; +create view v4 as select b+1 from mysqltest.t2; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; +drop database mysqltest; +drop view v1,v2,v4; +create database mysqltest; +create table mysqltest.t1 (a int); +grant all privileges on mysqltest.* to mysqltest_1@localhost; +use mysqltest; +create view v1 as select * from t1; +revoke all privileges on mysqltest.* from mysqltest_1@localhost; +drop database mysqltest; diff --git a/mysql-test/r/view_query_cache.result b/mysql-test/r/view_query_cache.result new file mode 100644 index 00000000000..e6c2c0152f3 --- /dev/null +++ b/mysql-test/r/view_query_cache.result @@ -0,0 +1,126 @@ +drop table if exists t1,t2,v1,v2,v3; +drop view if exists t1,t2,v1,v2,v3; +set GLOBAL query_cache_size=1355776; +flush status; +create table t1 (a int, b int); +create view v1 (c,d) as select sql_no_cache a,b from t1; +create view v2 (c,d) as select a+rand(),b from t1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from v1; +c d +select * from v2; +c d +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from v1; +c d +select * from v2; +c d +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop view v1,v2; +set query_cache_type=demand; +flush status; +create view v1 (c,d) as select sql_cache a,b from t1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from v1; +c d +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a b +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from v1; +c d +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1; +a b +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +drop view v1; +set query_cache_type=default; +drop table t1; +create table t1 (a int); +insert into t1 values (1), (2), (3); +create view v1 as select a from t1 where a > 1; +select * from v1; +a +2 +3 +alter view v1 as select a from t1 where a > 2; +select * from v1; +a +3 +drop view v1; +select * from v1; +ERROR 42S02: Table 'test.v1' doesn't exist +drop table t1; +create table t1 (a int, primary key (a), b int); +create table t2 (a int, primary key (a), b int); +insert into t2 values (1000, 2000); +create view v3 (a,b) as select t1.a as a, t2.a as b from t1, t2; +select * from v3; +a b +drop view v3; +drop table t1, t2; +set GLOBAL query_cache_size=default; diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index e97b309547a..fd516996ae8 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -31,19 +31,19 @@ Error 1064 You have an error in your SQL syntax; check the manual that correspon insert into t1 values (1); insert into t1 values ("hej"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 insert into t1 values ("hej"),("då"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 set SQL_WARNINGS=1; insert into t1 values ("hej"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 insert into t1 values ("hej"),("då"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 drop table t1; set SQL_WARNINGS=0; drop temporary table if exists not_exists; @@ -70,13 +70,13 @@ drop table t1; create table t1(a tinyint, b int not null, c date, d char(5)); load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 3 Warning 1265 Data truncated for column 'c' at row 4 Warning 1261 Row 5 doesn't contain data for all columns Warning 1265 Data truncated for column 'b' at row 6 Warning 1262 Row 7 was truncated; it contained more data than there were input columns -Warning 1264 Data truncated; out of range for column 'a' at row 8 +Warning 1264 Out of range value adjusted for column 'a' at row 8 select @@warning_count; @@warning_count 7 @@ -84,11 +84,11 @@ drop table t1; create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 -Warning 1264 Data truncated; out of range for column 'b' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'b' at row 2 Warning 1265 Data truncated for column 'c' at row 2 -Warning 1264 Data truncated; out of range for column 'a' at row 3 -Warning 1264 Data truncated; out of range for column 'b' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'b' at row 3 Warning 1265 Data truncated for column 'c' at row 3 alter table t1 modify c char(4); Warnings: @@ -97,7 +97,7 @@ Warning 1265 Data truncated for column 'c' at row 2 alter table t1 add d char(2); update t1 set a=NULL where a=10; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 update t1 set c='mysql ab' where c='test'; Warnings: Warning 1265 Data truncated for column 'c' at row 4 @@ -113,14 +113,16 @@ Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 3 -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 4 Warning 1265 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); Warnings: +Warning 1364 Field 'a' doesn't have a default value Warning 1265 Data truncated for column 'b' at row 1 set sql_warnings=1; insert into t2(b) values('mysqlab'); Warnings: +Warning 1364 Field 'a' doesn't have a default value Warning 1265 Data truncated for column 'b' at row 1 set sql_warnings=0; drop table t1, t2; @@ -183,44 +185,44 @@ create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); update t1 set a='abc'; Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -Warning 1265 Data truncated for column 'a' at row 3 -Warning 1265 Data truncated for column 'a' at row 4 -Warning 1265 Data truncated for column 'a' at row 5 -Warning 1265 Data truncated for column 'a' at row 6 -Warning 1265 Data truncated for column 'a' at row 7 -Warning 1265 Data truncated for column 'a' at row 8 -Warning 1265 Data truncated for column 'a' at row 9 -Warning 1265 Data truncated for column 'a' at row 10 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +Warning 1264 Out of range value adjusted for column 'a' at row 5 +Warning 1264 Out of range value adjusted for column 'a' at row 6 +Warning 1264 Out of range value adjusted for column 'a' at row 7 +Warning 1264 Out of range value adjusted for column 'a' at row 8 +Warning 1264 Out of range value adjusted for column 'a' at row 9 +Warning 1264 Out of range value adjusted for column 'a' at row 10 show warnings limit 2, 1; Level Code Message -Warning 1265 Data truncated for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 3 show warnings limit 0, 10; Level Code Message -Warning 1265 Data truncated for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 -Warning 1265 Data truncated for column 'a' at row 3 -Warning 1265 Data truncated for column 'a' at row 4 -Warning 1265 Data truncated for column 'a' at row 5 -Warning 1265 Data truncated for column 'a' at row 6 -Warning 1265 Data truncated for column 'a' at row 7 -Warning 1265 Data truncated for column 'a' at row 8 -Warning 1265 Data truncated for column 'a' at row 9 -Warning 1265 Data truncated for column 'a' at row 10 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +Warning 1264 Out of range value adjusted for column 'a' at row 5 +Warning 1264 Out of range value adjusted for column 'a' at row 6 +Warning 1264 Out of range value adjusted for column 'a' at row 7 +Warning 1264 Out of range value adjusted for column 'a' at row 8 +Warning 1264 Out of range value adjusted for column 'a' at row 9 +Warning 1264 Out of range value adjusted for column 'a' at row 10 show warnings limit 9, 1; Level Code Message -Warning 1265 Data truncated for column 'a' at row 10 +Warning 1264 Out of range value adjusted for column 'a' at row 10 show warnings limit 10, 1; Level Code Message show warnings limit 9, 2; Level Code Message -Warning 1265 Data truncated for column 'a' at row 10 +Warning 1264 Out of range value adjusted for column 'a' at row 10 show warnings limit 0, 0; Level Code Message show warnings limit 1; Level Code Message -Warning 1265 Data truncated for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 show warnings limit 0; Level Code Message show warnings limit 1, 0; diff --git a/mysql-test/r/xa.result b/mysql-test/r/xa.result new file mode 100644 index 00000000000..f3d7e151628 --- /dev/null +++ b/mysql-test/r/xa.result @@ -0,0 +1,47 @@ +drop table if exists t1, t2; +create table t1 (a int) engine=innodb; +xa start 'test1'; +insert t1 values (10); +xa end 'test1'; +xa prepare 'test1'; +xa rollback 'test1'; +select * from t1; +a +xa start 'test2'; +xa start 'test-bad'; +ERROR XAE07: XAER_RMFAIL: The command cannot be executed in the ACTIVE state +insert t1 values (20); +xa prepare 'test2'; +ERROR XAE07: XAER_RMFAIL: The command cannot be executed in the ACTIVE state +xa end 'test2'; +xa prepare 'test2'; +xa commit 'test2'; +select * from t1; +a +20 +xa start 'testa','testb'; +insert t1 values (30); +xa end 'testa','testb'; +xa start 'testa','testb'; +ERROR XAE08: XAER_DUPID: The XID already exists +xa start 0x7465737462, 0x2030405060, 0xb; +insert t1 values (40); +xa end 'testb',' 0@P`',11; +xa prepare 'testb',0x2030405060,11; +xa recover; +formatID gtrid_length bqual_length data +11 5 5 testb 0@P` +xa prepare 'testa','testb'; +xa recover; +formatID gtrid_length bqual_length data +11 5 5 testb 0@P` +1 5 5 testatestb +xa commit 'testb',0x2030405060,11; +ERROR XAE04: XAER_NOTA: Unknown XID +xa rollback 'testa','testb'; +xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +select * from t1; +a +20 +drop table t1; |