1*4520Snw141292 2*4520Snw141292#pragma ident "%Z%%M% %I% %E% SMI" 3*4520Snw141292 4*4520Snw141292# 2001 September 15 5*4520Snw141292# 6*4520Snw141292# The author disclaims copyright to this source code. In place of 7*4520Snw141292# a legal notice, here is a blessing: 8*4520Snw141292# 9*4520Snw141292# May you do good and not evil. 10*4520Snw141292# May you find forgiveness for yourself and forgive others. 11*4520Snw141292# May you share freely, never taking more than you give. 12*4520Snw141292# 13*4520Snw141292#*********************************************************************** 14*4520Snw141292# This file implements regression tests for SQLite library. 15*4520Snw141292# 16*4520Snw141292# This file implements tests for the special processing associated 17*4520Snw141292# with INTEGER PRIMARY KEY columns. 18*4520Snw141292# 19*4520Snw141292# $Id: intpkey.test,v 1.14 2003/06/15 23:42:25 drh Exp $ 20*4520Snw141292 21*4520Snw141292set testdir [file dirname $argv0] 22*4520Snw141292source $testdir/tester.tcl 23*4520Snw141292 24*4520Snw141292# Create a table with a primary key and a datatype other than 25*4520Snw141292# integer 26*4520Snw141292# 27*4520Snw141292do_test intpkey-1.0 { 28*4520Snw141292 execsql { 29*4520Snw141292 CREATE TABLE t1(a TEXT PRIMARY KEY, b, c); 30*4520Snw141292 } 31*4520Snw141292} {} 32*4520Snw141292 33*4520Snw141292# There should be an index associated with the primary key 34*4520Snw141292# 35*4520Snw141292do_test intpkey-1.1 { 36*4520Snw141292 execsql { 37*4520Snw141292 SELECT name FROM sqlite_master 38*4520Snw141292 WHERE type='index' AND tbl_name='t1'; 39*4520Snw141292 } 40*4520Snw141292} {{(t1 autoindex 1)}} 41*4520Snw141292 42*4520Snw141292# Now create a table with an integer primary key and verify that 43*4520Snw141292# there is no associated index. 44*4520Snw141292# 45*4520Snw141292do_test intpkey-1.2 { 46*4520Snw141292 execsql { 47*4520Snw141292 DROP TABLE t1; 48*4520Snw141292 CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c); 49*4520Snw141292 SELECT name FROM sqlite_master 50*4520Snw141292 WHERE type='index' AND tbl_name='t1'; 51*4520Snw141292 } 52*4520Snw141292} {} 53*4520Snw141292 54*4520Snw141292# Insert some records into the new table. Specify the primary key 55*4520Snw141292# and verify that the key is used as the record number. 56*4520Snw141292# 57*4520Snw141292do_test intpkey-1.3 { 58*4520Snw141292 execsql { 59*4520Snw141292 INSERT INTO t1 VALUES(5,'hello','world'); 60*4520Snw141292 } 61*4520Snw141292 db last_insert_rowid 62*4520Snw141292} {5} 63*4520Snw141292do_test intpkey-1.4 { 64*4520Snw141292 execsql { 65*4520Snw141292 SELECT * FROM t1; 66*4520Snw141292 } 67*4520Snw141292} {5 hello world} 68*4520Snw141292do_test intpkey-1.5 { 69*4520Snw141292 execsql { 70*4520Snw141292 SELECT rowid, * FROM t1; 71*4520Snw141292 } 72*4520Snw141292} {5 5 hello world} 73*4520Snw141292 74*4520Snw141292# Attempting to insert a duplicate primary key should give a constraint 75*4520Snw141292# failure. 76*4520Snw141292# 77*4520Snw141292do_test intpkey-1.6 { 78*4520Snw141292 set r [catch {execsql { 79*4520Snw141292 INSERT INTO t1 VALUES(5,'second','entry'); 80*4520Snw141292 }} msg] 81*4520Snw141292 lappend r $msg 82*4520Snw141292} {1 {PRIMARY KEY must be unique}} 83*4520Snw141292do_test intpkey-1.7 { 84*4520Snw141292 execsql { 85*4520Snw141292 SELECT rowid, * FROM t1; 86*4520Snw141292 } 87*4520Snw141292} {5 5 hello world} 88*4520Snw141292do_test intpkey-1.8 { 89*4520Snw141292 set r [catch {execsql { 90*4520Snw141292 INSERT INTO t1 VALUES(6,'second','entry'); 91*4520Snw141292 }} msg] 92*4520Snw141292 lappend r $msg 93*4520Snw141292} {0 {}} 94*4520Snw141292do_test intpkey-1.8.1 { 95*4520Snw141292 db last_insert_rowid 96*4520Snw141292} {6} 97*4520Snw141292do_test intpkey-1.9 { 98*4520Snw141292 execsql { 99*4520Snw141292 SELECT rowid, * FROM t1; 100*4520Snw141292 } 101*4520Snw141292} {5 5 hello world 6 6 second entry} 102*4520Snw141292 103*4520Snw141292# A ROWID is automatically generated for new records that do not specify 104*4520Snw141292# the integer primary key. 105*4520Snw141292# 106*4520Snw141292do_test intpkey-1.10 { 107*4520Snw141292 execsql { 108*4520Snw141292 INSERT INTO t1(b,c) VALUES('one','two'); 109*4520Snw141292 SELECT b FROM t1 ORDER BY b; 110*4520Snw141292 } 111*4520Snw141292} {hello one second} 112*4520Snw141292 113*4520Snw141292# Try to change the ROWID for the new entry. 114*4520Snw141292# 115*4520Snw141292do_test intpkey-1.11 { 116*4520Snw141292 execsql { 117*4520Snw141292 UPDATE t1 SET a=4 WHERE b='one'; 118*4520Snw141292 SELECT * FROM t1; 119*4520Snw141292 } 120*4520Snw141292} {4 one two 5 hello world 6 second entry} 121*4520Snw141292 122*4520Snw141292# Make sure SELECT statements are able to use the primary key column 123*4520Snw141292# as an index. 124*4520Snw141292# 125*4520Snw141292do_test intpkey-1.12 { 126*4520Snw141292 execsql { 127*4520Snw141292 SELECT * FROM t1 WHERE a==4; 128*4520Snw141292 } 129*4520Snw141292} {4 one two} 130*4520Snw141292 131*4520Snw141292# Try to insert a non-integer value into the primary key field. This 132*4520Snw141292# should result in a data type mismatch. 133*4520Snw141292# 134*4520Snw141292do_test intpkey-1.13.1 { 135*4520Snw141292 set r [catch {execsql { 136*4520Snw141292 INSERT INTO t1 VALUES('x','y','z'); 137*4520Snw141292 }} msg] 138*4520Snw141292 lappend r $msg 139*4520Snw141292} {1 {datatype mismatch}} 140*4520Snw141292do_test intpkey-1.13.2 { 141*4520Snw141292 set r [catch {execsql { 142*4520Snw141292 INSERT INTO t1 VALUES('','y','z'); 143*4520Snw141292 }} msg] 144*4520Snw141292 lappend r $msg 145*4520Snw141292} {1 {datatype mismatch}} 146*4520Snw141292do_test intpkey-1.14 { 147*4520Snw141292 set r [catch {execsql { 148*4520Snw141292 INSERT INTO t1 VALUES(3.4,'y','z'); 149*4520Snw141292 }} msg] 150*4520Snw141292 lappend r $msg 151*4520Snw141292} {1 {datatype mismatch}} 152*4520Snw141292do_test intpkey-1.15 { 153*4520Snw141292 set r [catch {execsql { 154*4520Snw141292 INSERT INTO t1 VALUES(-3,'y','z'); 155*4520Snw141292 }} msg] 156*4520Snw141292 lappend r $msg 157*4520Snw141292} {0 {}} 158*4520Snw141292do_test intpkey-1.16 { 159*4520Snw141292 execsql {SELECT * FROM t1} 160*4520Snw141292} {-3 y z 4 one two 5 hello world 6 second entry} 161*4520Snw141292 162*4520Snw141292#### INDICES 163*4520Snw141292# Check to make sure indices work correctly with integer primary keys 164*4520Snw141292# 165*4520Snw141292do_test intpkey-2.1 { 166*4520Snw141292 execsql { 167*4520Snw141292 CREATE INDEX i1 ON t1(b); 168*4520Snw141292 SELECT * FROM t1 WHERE b=='y' 169*4520Snw141292 } 170*4520Snw141292} {-3 y z} 171*4520Snw141292do_test intpkey-2.1.1 { 172*4520Snw141292 execsql { 173*4520Snw141292 SELECT * FROM t1 WHERE b=='y' AND rowid<0 174*4520Snw141292 } 175*4520Snw141292} {-3 y z} 176*4520Snw141292do_test intpkey-2.1.2 { 177*4520Snw141292 execsql { 178*4520Snw141292 SELECT * FROM t1 WHERE b=='y' AND rowid<0 AND rowid>=-20 179*4520Snw141292 } 180*4520Snw141292} {-3 y z} 181*4520Snw141292do_test intpkey-2.1.3 { 182*4520Snw141292 execsql { 183*4520Snw141292 SELECT * FROM t1 WHERE b>='y' 184*4520Snw141292 } 185*4520Snw141292} {-3 y z} 186*4520Snw141292do_test intpkey-2.1.4 { 187*4520Snw141292 execsql { 188*4520Snw141292 SELECT * FROM t1 WHERE b>='y' AND rowid<10 189*4520Snw141292 } 190*4520Snw141292} {-3 y z} 191*4520Snw141292 192*4520Snw141292do_test intpkey-2.2 { 193*4520Snw141292 execsql { 194*4520Snw141292 UPDATE t1 SET a=8 WHERE b=='y'; 195*4520Snw141292 SELECT * FROM t1 WHERE b=='y'; 196*4520Snw141292 } 197*4520Snw141292} {8 y z} 198*4520Snw141292do_test intpkey-2.3 { 199*4520Snw141292 execsql { 200*4520Snw141292 SELECT rowid, * FROM t1; 201*4520Snw141292 } 202*4520Snw141292} {4 4 one two 5 5 hello world 6 6 second entry 8 8 y z} 203*4520Snw141292do_test intpkey-2.4 { 204*4520Snw141292 execsql { 205*4520Snw141292 SELECT rowid, * FROM t1 WHERE b<'second' 206*4520Snw141292 } 207*4520Snw141292} {5 5 hello world 4 4 one two} 208*4520Snw141292do_test intpkey-2.4.1 { 209*4520Snw141292 execsql { 210*4520Snw141292 SELECT rowid, * FROM t1 WHERE 'second'>b 211*4520Snw141292 } 212*4520Snw141292} {5 5 hello world 4 4 one two} 213*4520Snw141292do_test intpkey-2.4.2 { 214*4520Snw141292 execsql { 215*4520Snw141292 SELECT rowid, * FROM t1 WHERE 8>rowid AND 'second'>b 216*4520Snw141292 } 217*4520Snw141292} {4 4 one two 5 5 hello world} 218*4520Snw141292do_test intpkey-2.4.3 { 219*4520Snw141292 execsql { 220*4520Snw141292 SELECT rowid, * FROM t1 WHERE 8>rowid AND 'second'>b AND 0<rowid 221*4520Snw141292 } 222*4520Snw141292} {4 4 one two 5 5 hello world} 223*4520Snw141292do_test intpkey-2.5 { 224*4520Snw141292 execsql { 225*4520Snw141292 SELECT rowid, * FROM t1 WHERE b>'a' 226*4520Snw141292 } 227*4520Snw141292} {5 5 hello world 4 4 one two 6 6 second entry 8 8 y z} 228*4520Snw141292do_test intpkey-2.6 { 229*4520Snw141292 execsql { 230*4520Snw141292 DELETE FROM t1 WHERE rowid=4; 231*4520Snw141292 SELECT * FROM t1 WHERE b>'a'; 232*4520Snw141292 } 233*4520Snw141292} {5 hello world 6 second entry 8 y z} 234*4520Snw141292do_test intpkey-2.7 { 235*4520Snw141292 execsql { 236*4520Snw141292 UPDATE t1 SET a=-4 WHERE rowid=8; 237*4520Snw141292 SELECT * FROM t1 WHERE b>'a'; 238*4520Snw141292 } 239*4520Snw141292} {5 hello world 6 second entry -4 y z} 240*4520Snw141292do_test intpkey-2.7 { 241*4520Snw141292 execsql { 242*4520Snw141292 SELECT * FROM t1 243*4520Snw141292 } 244*4520Snw141292} {-4 y z 5 hello world 6 second entry} 245*4520Snw141292 246*4520Snw141292# Do an SQL statement. Append the search count to the end of the result. 247*4520Snw141292# 248*4520Snw141292proc count sql { 249*4520Snw141292 set ::sqlite_search_count 0 250*4520Snw141292 return [concat [execsql $sql] $::sqlite_search_count] 251*4520Snw141292} 252*4520Snw141292 253*4520Snw141292# Create indices that include the integer primary key as one of their 254*4520Snw141292# columns. 255*4520Snw141292# 256*4520Snw141292do_test intpkey-3.1 { 257*4520Snw141292 execsql { 258*4520Snw141292 CREATE INDEX i2 ON t1(a); 259*4520Snw141292 } 260*4520Snw141292} {} 261*4520Snw141292do_test intpkey-3.2 { 262*4520Snw141292 count { 263*4520Snw141292 SELECT * FROM t1 WHERE a=5; 264*4520Snw141292 } 265*4520Snw141292} {5 hello world 0} 266*4520Snw141292do_test intpkey-3.3 { 267*4520Snw141292 count { 268*4520Snw141292 SELECT * FROM t1 WHERE a>4 AND a<6; 269*4520Snw141292 } 270*4520Snw141292} {5 hello world 2} 271*4520Snw141292do_test intpkey-3.4 { 272*4520Snw141292 count { 273*4520Snw141292 SELECT * FROM t1 WHERE b>='hello' AND b<'hello2'; 274*4520Snw141292 } 275*4520Snw141292} {5 hello world 3} 276*4520Snw141292do_test intpkey-3.5 { 277*4520Snw141292 execsql { 278*4520Snw141292 CREATE INDEX i3 ON t1(c,a); 279*4520Snw141292 } 280*4520Snw141292} {} 281*4520Snw141292do_test intpkey-3.6 { 282*4520Snw141292 count { 283*4520Snw141292 SELECT * FROM t1 WHERE c=='world'; 284*4520Snw141292 } 285*4520Snw141292} {5 hello world 3} 286*4520Snw141292do_test intpkey-3.7 { 287*4520Snw141292 execsql {INSERT INTO t1 VALUES(11,'hello','world')} 288*4520Snw141292 count { 289*4520Snw141292 SELECT * FROM t1 WHERE c=='world'; 290*4520Snw141292 } 291*4520Snw141292} {5 hello world 11 hello world 5} 292*4520Snw141292do_test intpkey-3.8 { 293*4520Snw141292 count { 294*4520Snw141292 SELECT * FROM t1 WHERE c=='world' AND a>7; 295*4520Snw141292 } 296*4520Snw141292} {11 hello world 5} 297*4520Snw141292do_test intpkey-3.9 { 298*4520Snw141292 count { 299*4520Snw141292 SELECT * FROM t1 WHERE 7<a; 300*4520Snw141292 } 301*4520Snw141292} {11 hello world 1} 302*4520Snw141292 303*4520Snw141292# Test inequality constraints on integer primary keys and rowids 304*4520Snw141292# 305*4520Snw141292do_test intpkey-4.1 { 306*4520Snw141292 count { 307*4520Snw141292 SELECT * FROM t1 WHERE 11=rowid 308*4520Snw141292 } 309*4520Snw141292} {11 hello world 0} 310*4520Snw141292do_test intpkey-4.2 { 311*4520Snw141292 count { 312*4520Snw141292 SELECT * FROM t1 WHERE 11=rowid AND b=='hello' 313*4520Snw141292 } 314*4520Snw141292} {11 hello world 0} 315*4520Snw141292do_test intpkey-4.3 { 316*4520Snw141292 count { 317*4520Snw141292 SELECT * FROM t1 WHERE 11=rowid AND b=='hello' AND c IS NOT NULL; 318*4520Snw141292 } 319*4520Snw141292} {11 hello world 0} 320*4520Snw141292do_test intpkey-4.4 { 321*4520Snw141292 count { 322*4520Snw141292 SELECT * FROM t1 WHERE rowid==11 323*4520Snw141292 } 324*4520Snw141292} {11 hello world 0} 325*4520Snw141292do_test intpkey-4.5 { 326*4520Snw141292 count { 327*4520Snw141292 SELECT * FROM t1 WHERE oid==11 AND b=='hello' 328*4520Snw141292 } 329*4520Snw141292} {11 hello world 0} 330*4520Snw141292do_test intpkey-4.6 { 331*4520Snw141292 count { 332*4520Snw141292 SELECT * FROM t1 WHERE a==11 AND b=='hello' AND c IS NOT NULL; 333*4520Snw141292 } 334*4520Snw141292} {11 hello world 0} 335*4520Snw141292 336*4520Snw141292do_test intpkey-4.7 { 337*4520Snw141292 count { 338*4520Snw141292 SELECT * FROM t1 WHERE 8<rowid; 339*4520Snw141292 } 340*4520Snw141292} {11 hello world 1} 341*4520Snw141292do_test intpkey-4.8 { 342*4520Snw141292 count { 343*4520Snw141292 SELECT * FROM t1 WHERE 8<rowid AND 11>=oid; 344*4520Snw141292 } 345*4520Snw141292} {11 hello world 1} 346*4520Snw141292do_test intpkey-4.9 { 347*4520Snw141292 count { 348*4520Snw141292 SELECT * FROM t1 WHERE 11<=_rowid_ AND 12>=a; 349*4520Snw141292 } 350*4520Snw141292} {11 hello world 1} 351*4520Snw141292do_test intpkey-4.10 { 352*4520Snw141292 count { 353*4520Snw141292 SELECT * FROM t1 WHERE 0>=_rowid_; 354*4520Snw141292 } 355*4520Snw141292} {-4 y z 1} 356*4520Snw141292do_test intpkey-4.11 { 357*4520Snw141292 count { 358*4520Snw141292 SELECT * FROM t1 WHERE a<0; 359*4520Snw141292 } 360*4520Snw141292} {-4 y z 1} 361*4520Snw141292do_test intpkey-4.12 { 362*4520Snw141292 count { 363*4520Snw141292 SELECT * FROM t1 WHERE a<0 AND a>10; 364*4520Snw141292 } 365*4520Snw141292} {1} 366*4520Snw141292 367*4520Snw141292# Make sure it is OK to insert a rowid of 0 368*4520Snw141292# 369*4520Snw141292do_test intpkey-5.1 { 370*4520Snw141292 execsql { 371*4520Snw141292 INSERT INTO t1 VALUES(0,'zero','entry'); 372*4520Snw141292 } 373*4520Snw141292 count { 374*4520Snw141292 SELECT * FROM t1 WHERE a=0; 375*4520Snw141292 } 376*4520Snw141292} {0 zero entry 0} 377*4520Snw141292do_test intpkey=5.2 { 378*4520Snw141292 execsql { 379*4520Snw141292 SELECT rowid, a FROM t1 380*4520Snw141292 } 381*4520Snw141292} {-4 -4 0 0 5 5 6 6 11 11} 382*4520Snw141292 383*4520Snw141292# Test the ability of the COPY command to put data into a 384*4520Snw141292# table that contains an integer primary key. 385*4520Snw141292# 386*4520Snw141292do_test intpkey-6.1 { 387*4520Snw141292 set f [open ./data1.txt w] 388*4520Snw141292 puts $f "20\tb-20\tc-20" 389*4520Snw141292 puts $f "21\tb-21\tc-21" 390*4520Snw141292 puts $f "22\tb-22\tc-22" 391*4520Snw141292 close $f 392*4520Snw141292 execsql { 393*4520Snw141292 COPY t1 FROM 'data1.txt'; 394*4520Snw141292 SELECT * FROM t1 WHERE a>=20; 395*4520Snw141292 } 396*4520Snw141292} {20 b-20 c-20 21 b-21 c-21 22 b-22 c-22} 397*4520Snw141292do_test intpkey-6.2 { 398*4520Snw141292 execsql { 399*4520Snw141292 SELECT * FROM t1 WHERE b=='hello' 400*4520Snw141292 } 401*4520Snw141292} {5 hello world 11 hello world} 402*4520Snw141292do_test intpkey-6.3 { 403*4520Snw141292 execsql { 404*4520Snw141292 DELETE FROM t1 WHERE b='b-21'; 405*4520Snw141292 SELECT * FROM t1 WHERE b=='b-21'; 406*4520Snw141292 } 407*4520Snw141292} {} 408*4520Snw141292do_test intpkey-6.4 { 409*4520Snw141292 execsql { 410*4520Snw141292 SELECT * FROM t1 WHERE a>=20 411*4520Snw141292 } 412*4520Snw141292} {20 b-20 c-20 22 b-22 c-22} 413*4520Snw141292 414*4520Snw141292# Do an insert of values with the columns specified out of order. 415*4520Snw141292# 416*4520Snw141292do_test intpkey-7.1 { 417*4520Snw141292 execsql { 418*4520Snw141292 INSERT INTO t1(c,b,a) VALUES('row','new',30); 419*4520Snw141292 SELECT * FROM t1 WHERE rowid>=30; 420*4520Snw141292 } 421*4520Snw141292} {30 new row} 422*4520Snw141292do_test intpkey-7.2 { 423*4520Snw141292 execsql { 424*4520Snw141292 SELECT * FROM t1 WHERE rowid>20; 425*4520Snw141292 } 426*4520Snw141292} {22 b-22 c-22 30 new row} 427*4520Snw141292 428*4520Snw141292# Do an insert from a select statement. 429*4520Snw141292# 430*4520Snw141292do_test intpkey-8.1 { 431*4520Snw141292 execsql { 432*4520Snw141292 CREATE TABLE t2(x INTEGER PRIMARY KEY, y, z); 433*4520Snw141292 INSERT INTO t2 SELECT * FROM t1; 434*4520Snw141292 SELECT rowid FROM t2; 435*4520Snw141292 } 436*4520Snw141292} {-4 0 5 6 11 20 22 30} 437*4520Snw141292do_test intpkey-8.2 { 438*4520Snw141292 execsql { 439*4520Snw141292 SELECT x FROM t2; 440*4520Snw141292 } 441*4520Snw141292} {-4 0 5 6 11 20 22 30} 442*4520Snw141292 443*4520Snw141292do_test intpkey-9.1 { 444*4520Snw141292 execsql { 445*4520Snw141292 UPDATE t1 SET c='www' WHERE c='world'; 446*4520Snw141292 SELECT rowid, a, c FROM t1 WHERE c=='www'; 447*4520Snw141292 } 448*4520Snw141292} {5 5 www 11 11 www} 449*4520Snw141292 450*4520Snw141292 451*4520Snw141292# Check insert of NULL for primary key 452*4520Snw141292# 453*4520Snw141292do_test intpkey-10.1 { 454*4520Snw141292 execsql { 455*4520Snw141292 DROP TABLE t2; 456*4520Snw141292 CREATE TABLE t2(x INTEGER PRIMARY KEY, y, z); 457*4520Snw141292 INSERT INTO t2 VALUES(NULL, 1, 2); 458*4520Snw141292 SELECT * from t2; 459*4520Snw141292 } 460*4520Snw141292} {1 1 2} 461*4520Snw141292do_test intpkey-10.2 { 462*4520Snw141292 execsql { 463*4520Snw141292 INSERT INTO t2 VALUES(NULL, 2, 3); 464*4520Snw141292 SELECT * from t2 WHERE x=2; 465*4520Snw141292 } 466*4520Snw141292} {2 2 3} 467*4520Snw141292do_test intpkey-10.3 { 468*4520Snw141292 execsql { 469*4520Snw141292 INSERT INTO t2 SELECT NULL, z, y FROM t2; 470*4520Snw141292 SELECT * FROM t2; 471*4520Snw141292 } 472*4520Snw141292} {1 1 2 2 2 3 3 2 1 4 3 2} 473*4520Snw141292 474*4520Snw141292# This tests checks to see if a floating point number can be used 475*4520Snw141292# to reference an integer primary key. 476*4520Snw141292# 477*4520Snw141292do_test intpkey-11.1 { 478*4520Snw141292 execsql { 479*4520Snw141292 SELECT b FROM t1 WHERE a=2.0+3.0; 480*4520Snw141292 } 481*4520Snw141292} {hello} 482*4520Snw141292do_test intpkey-11.1 { 483*4520Snw141292 execsql { 484*4520Snw141292 SELECT b FROM t1 WHERE a=2.0+3.5; 485*4520Snw141292 } 486*4520Snw141292} {} 487*4520Snw141292 488*4520Snw141292integrity_check intpkey-12.1 489*4520Snw141292 490*4520Snw141292finish_test 491