PK +3 Test2.javapackage com.doc.samples; import java.sql.*; import java.io.*; public class Test2 { public static void main(String[] Args) { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection conn; conn = DriverManager.getConnection("jdbc:mysql://localhost/test?profileSQL=true&maxQuerySizeToLog=500","root","sales1"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("select * from persons where docwho like 'M%' or docwho = '1234567890 x' or docwho = '2_34567890 x' or docwho = '3_34567890 x' or docwho = '4_34567890 x' or docwho = '5_34567890 x' or docwho = '6_34567890 x' or docwho = '7_34567890 x' or docwho = '8_34567890 x' or docwho = '9_34567890 x' or docwho = 'A_34567890 x' or docwho = '21_4567890 x' or docwho = '22_4567890 x' or docwho = '23_4567890 x' or docwho = '24_4567890 x' or docwho = '25_4567890 x' or docwho = '26_4567890 x' or docwho = '27_4567890 x' or docwho = '28_4567890 x' or docwho = '29_4567890 x' or docwho = '30_4567890 x' or docwho = '31_4567890 x' or docwho = '32_4567890 x' or docwho = '33_4567890 x' or docwho = '34_4567890 x' or docwho = '35_4567890 x' or docwho = '36_4567890 x' or docwho = '37_4567890 x' or docwho = '38_4567890 x' or docwho = '39_4567890 x' or docwho = '40_4567890 x' or docwho = '40_4567890 x' or docwho = '41_4567890 x' or docwho = '42_4567890 x' or docwho = '43_4567890 x' or docwho = '44_4567890 x' or docwho = '45_4567890 x' or docwho = '46_4567890 x' or docwho = '47_4567890 x'"); while (rs.next()) { System.out.println(rs.getString(1)); } System.out.println("END OF DATA" ); rs.close(); stmt.close(); conn.close(); } catch (SQLException ex) { System.out.println("SQLException: " + ex.getMessage()); System.out.println("SQLState: " + ex.getSQLState()); System.out.println("VendorError: " + ex.getErrorCode()); ex.printStackTrace(); } catch(Exception ex) { ex.printStackTrace(); } } }PK e+3b?= = load_table.sqlUSE test; DROP TABLE IF EXISTS persons; CREATE TABLE persons ( persons_id INT PRIMARY KEY AUTO_INCREMENT, fam VARCHAR(25) NOT NULL, name VARCHAR(25) NOT NULL, birthday DATETIME DEFAULT NULL, docdate DATETIME DEFAULT NULL, rnn BIGINT DEFAULT NULL, addr VARCHAR(250) DEFAULT NULL, docnmb VARCHAR(20) DEFAULT NULL, docwho VARCHAR(100) DEFAULT NULL, email VARCHAR(100) DEFAULT NULL, otch VARCHAR(25) DEFAULT NULL, tels VARCHAR(100) DEFAULT NULL ) TYPE = InnoDB; INSERT INTO persons (persons_id, fam, name, birthday, docdate, rnn, addr, docnmb, docwho, email, otch, tels) VALUES (1211,'Person','111','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','Otch',''), (1212,'Person','222','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1213,'Person','333','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1214,'Person','444','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1215,'Person','555','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','Otch',''), (1216,'Person','777','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1217,'Person','888','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','BI2',''), (1218,'Person','NNNN','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1219,'Auto','Off','1967-01-01 00:00:00','1996-04-01 00:00:00',600000000000,'1','00000000','MVD','pvnhome@yandex.kz','1',''), (1220,'Auto','Off',NULL,NULL,NULL,'','','','pvnhome@yandex.kz','1',''); INSERT INTO persons (persons_id, fam, name, birthday, docdate, rnn, addr, docnmb, docwho, email, otch, tels) VALUES (1221,'Person','111','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','Otch',''), (1222,'Person','222','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1223,'Person','333','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1224,'Person','444','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1225,'Person','555','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','Otch',''), (1226,'Person','777','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1227,'Person','888','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','BI2',''), (1228,'Person','NNNN','2004-01-01 00:00:00','2004-01-01 00:00:00',0,'','','','','',''), (1229,'Auto','Off','1967-01-01 00:00:00','1996-04-01 00:00:00',600000000000,'1','00000000','MVD','pvnhome@yandex.kz','1',''), (1230,'Auto','Off',NULL,NULL,NULL,'','','','pvnhome@yandex.kz','1',''); PK +344 Test2.class.x $-. /0 /1234 56 789 :; <= >? <@ ABC <D :D 7DEF -G H I JK LM N O PQ !PRS()VCodeLineNumberTablemain([Ljava/lang/String;)V SourceFile Test2.java %&com.mysql.jdbc.DriverT UV WXAjdbc:mysql://localhost/test?profileSQL=true&maxQuerySizeToLog=500rootsales1Y Z[\ ]^>select * from persons where docwho like 'M%' or docwho = '1234567890 x' or docwho = '2_34567890 x' or docwho = '3_34567890 x' or docwho = '4_34567890 x' or docwho = '5_34567890 x' or docwho = '6_34567890 x' or docwho = '7_34567890 x' or docwho = '8_34567890 x' or docwho = '9_34567890 x' or docwho = 'A_34567890 x' or docwho = '21_4567890 x' or docwho = '22_4567890 x' or docwho = '23_4567890 x' or docwho = '24_4567890 x' or docwho = '25_4567890 x' or docwho = '26_4567890 x' or docwho = '27_4567890 x' or docwho = '28_4567890 x' or docwho = '29_4567890 x' or docwho = '30_4567890 x' or docwho = '31_4567890 x' or docwho = '32_4567890 x' or docwho = '33_4567890 x' or docwho = '34_4567890 x' or docwho = '35_4567890 x' or docwho = '36_4567890 x' or docwho = '37_4567890 x' or docwho = '38_4567890 x' or docwho = '39_4567890 x' or docwho = '40_4567890 x' or docwho = '40_4567890 x' or docwho = '41_4567890 x' or docwho = '42_4567890 x' or docwho = '43_4567890 x' or docwho = '44_4567890 x' or docwho = '45_4567890 x' or docwho = '46_4567890 x' or docwho = '47_4567890 x'_ `ab cde fg hij kl END OF DATA m&java/sql/SQLExceptionjava/lang/StringBufferSQLException: no pq rqSQLState: sqVendorError: tu nv w&java/lang/Exceptioncom/doc/samples/Test2java/lang/Objectjava/lang/ClassforName%(Ljava/lang/String;)Ljava/lang/Class; newInstance()Ljava/lang/Object;java/sql/DriverManager getConnectionM(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;java/sql/ConnectioncreateStatement()Ljava/sql/Statement;java/sql/Statement executeQuery((Ljava/lang/String;)Ljava/sql/ResultSet;java/sql/ResultSetnext()Zjava/lang/SystemoutLjava/io/PrintStream; getString(I)Ljava/lang/String;java/io/PrintStreamprintln(Ljava/lang/String;)Vcloseappend,(Ljava/lang/String;)Ljava/lang/StringBuffer; getMessage()Ljava/lang/String;toString getSQLState getErrorCode()I(I)Ljava/lang/StringBuffer;printStackTrace!#$%&'*( )*'/WL+ M, N-  - -,+dL Y+ Y+ Y++ L+"VYV!(R #,<DJPV*Y Z"v#$%*')++,PK +3kZʤ Results.txtC:\j2sdk1.4.2_08\source>java com.doc.samples.Test2 - Profiler Event: [QUERY] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-i d: 0, message: SET NAMES latin1 - Profiler Event: [FETCH] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 10 ms, connection-id: 0, statement-id: 999, resultset- id: 0 - Profiler Event: [QUERY] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-i d: 0, message: SET character_set_results = NULL - Profiler Event: [FETCH] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-i d: 0 - Profiler Event: [QUERY] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 1, resultset-id: 1, message: SHOW VARIABLES - Profiler Event: [FETCH] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 10 ms, connection-id: 0, statement-id: 1, resultset-id : 1 - Profiler Event: [WARN] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 1, resultset-id: 1, message: The following query was executed with a bad index, use 'EXPLAIN' fo r more details: SHOW VARIABLES Full stack trace of location where event occurred: ** BEGIN NESTED EXCEPTION ** java.lang.Throwable STACKTRACE: java.lang.Throwable at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1774) at com.mysql.jdbc.Connection.execSQL(Connection.java:2972) at com.mysql.jdbc.Connection.execSQL(Connection.java:2902) at com.mysql.jdbc.Statement.executeQuery(Statement.java:822) at com.mysql.jdbc.Connection.loadServerVariables(Connection.java:3927) at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3 715) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2557) at com.mysql.jdbc.Connection.(Connection.java:1474) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :264) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.doc.samples.Test2.main(Test2.java:16) ** END NESTED EXCEPTION ** - Profiler Event: [QUERY] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 2, resultset-id: 2, message: SHOW COLLATION - Profiler Event: [FETCH] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 10 ms, connection-id: 0, statement-id: 2, resultset-id : 2 - Profiler Event: [WARN] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 2, resultset-id: 2, message: The following query was executed with a bad index, use 'EXPLAIN' fo r more details: SHOW COLLATION Full stack trace of location where event occurred: ** BEGIN NESTED EXCEPTION ** java.lang.Throwable STACKTRACE: java.lang.Throwable at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1774) at com.mysql.jdbc.Connection.execSQL(Connection.java:2972) at com.mysql.jdbc.Connection.execSQL(Connection.java:2902) at com.mysql.jdbc.Statement.executeQuery(Statement.java:822) at com.mysql.jdbc.Connection.buildCollationMapping(Connection.java:1587) at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:3 717) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2557) at com.mysql.jdbc.Connection.(Connection.java:1474) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :264) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at com.doc.samples.Test2.main(Test2.java:16) ** END NESTED EXCEPTION ** - Profiler Event: [QUERY] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-i d: 0, message: SET autocommit=1 - Profiler Event: [FETCH] at at java.sql.DriverManager.getConnection(DriverMa nager.java:512) duration: 0 ms, connection-id: 0, statement-id: 999, resultset-i d: 0 - Profiler Event: [QUERY] at at com.doc.samples.Test2.main(Test2.java:20) dur ation: 10 ms, connection-id: 0, statement-id: 3, resultset-id: 3, message: selec t * from persons where docwho like 'M%' or docwho = '1234567890 x' or do cwho = '2_34567890 x' or docwho = '3_34567890 x' or docwho = '4_ 34567890 x' or docwho = '5_34567890 x' or docwho = '6_34567890 x' or docwho = '7_34567890 x' or docwho = '8_34567890 x' or docwho = '9_34567890 ... (truncated) - Profiler Event: [FETCH] at at com.doc.samples.Test2.main(Test2.java:20) dur ation: 0 ms, connection-id: 0, statement-id: 3, resultset-id: 3 - Profiler Event: [WARN] at at com.doc.samples.Test2.main(Test2.java:20) dur ation: 10 ms, connection-id: 0, statement-id: 3, resultset-id: 3, message: The f ollowing query was executed with a bad index, use 'EXPLAIN' for more details: se lect * from persons where docwho like 'M%' or docwho = '1234567890 x' or docwho = '2_34567890 x' or docwho = '3_34567890 x' or docwho = '4_34567890 x' or docwho = '5_34567890 x' or docwho = '6_3456789 0 x' or docwho = '7_34567890 x' or docwho = '8_34567890 x' or docwho = '9_34567890 ... (truncated) Full stack trace of location where event occurred: ** BEGIN NESTED EXCEPTION ** java.lang.Throwable STACKTRACE: java.lang.Throwable at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1774) at com.mysql.jdbc.Connection.execSQL(Connection.java:2972) at com.mysql.jdbc.Connection.execSQL(Connection.java:2902) at com.mysql.jdbc.Statement.executeQuery(Statement.java:822) at com.doc.samples.Test2.main(Test2.java:20) ** END NESTED EXCEPTION ** 9 19 29 119 129 219 229 1219 1229 END OF DATA C:\j2sdk1.4.2_08\source>PK +3  Test2.javaPK e+3b?= =  load_table.sqlPK +344  v Test2.classPK +3kZʤ  8Results.txtPKT