Summary: 272 instances, 190 unique Text Count // TODO: better exception, should introduce a new exception class for auth? 2 registerOutParameter(parameterIndex, sqlType); // TODO is that correct that we ignore scale? 1 // TODO this method is specific to CSPS and a native protocol; must be unified with SSPS via message builder 1 DEFAULT_MYSQL_TYPES.put(Float.class, MysqlType.FLOAT); // TODO check; was Types.FLOAT but should be Types.REAL to map to SQL FLOAT 1 batchedStatement = /* FIXME -if we ever care about folks proxying our JdbcConnection */ 1 selectedTz = TimeZone.getTimeZone(ZoneId.of(connectionTimeZone)); // TODO use ZoneId.of(String zoneId, Map aliasMap) for custom abbreviations support 1 return XA_OK; // TODO: Check for read-only 1 if (!this.treatUtilDateAsTimestamp.getValue()) { // TODO is it needed at all? 1 binding.parameterType = MysqlType.BLOB; // TODO use length to find the right BLOB type 1 // TODO how to handle executeTopLevelOnly in such case ? 2 // TODO: make sure this is correct 1 // TODO: Do this with less memory allocation 1 // TODO release resources of nextResultset, close streamer 1 if (this.isClosed && !allowedOnClosedConnection(method) && method.getExceptionTypes().length > 0) { // TODO remove method.getExceptionTypes().length ? 1 // TODO: implement remaining types when server is ready 1 // TODO: we should examine the call flow here, we shouldn't have to know about the socket connection but this should be address in a wider scope. 1 case Types.NVARCHAR: // TODO check that it's correct 1 private NativeMessageBuilder commandBuilder = new NativeMessageBuilder(); // TODO use shared builder 3 // TODO should not throw SQLException 1 throw new RuntimeException(e); // FIXME: Need to evolve interface 1 // TODO do something with notices, expose them to client 1 // TODO MYSQLCONNJ-437 1 public NativePacketPayload sendExecutePacket(NativePacketPayload packet, String queryAsString) { // TODO queryAsString should be shared instead of passed 1 setValue(parameterIndex, parameterAsBytes, MysqlType.VARCHAR); // TODO was Types.NVARCHAR 1 // TODO: Validate the hosts list: there can't be any two hosts with same host:port. 2 // TODO Remove this after DBMD isn't using ByteArrayRow results. 1 // TODO we always check initial value here, whatever the setupServerForTruncationChecks() does for writes. 1 case Types.NCHAR: // TODO check that it's correct 1 // TODO why doing this? 1 setValue(parameterIndex, StringUtils.fixDecimalExponent(String.valueOf(x)), MysqlType.FLOAT); // TODO check; was Types.FLOAT but should be Types.REAL to map to SQL FLOAT 1 // TODO: figure out ranges in detail and test them 1 public static final String SYSP_testsuite_disable_multihost_tests /* */ = "com.mysql.cj.testsuite.disable.multihost.tests"; // TODO should be more specific for different types of multi-host configs 1 // TODO adjust nanos to decimal numbers 1 // TODO Is it true? DatabaseMetaData.supportsANSI92EntryLevelSQL() returns true... 1 // FIXME: can't break interface at this point 1 // TODO: we need to propagate the appropriate encoding here? it's ascii but it might not *always* be a superset encoding?? 1 setValue(parameterIndex, bOut.toByteArray(), MysqlType.BINARY); // TODO VARBINARY ? 1 this.bindValues[parameterIndex].setMysqlType(MysqlType.TEXT); // TODO was Types.CLOB, check; use length to find right TEXT type 2 // TODO: verify quoting rules 3 // TODO: Figure out how this is relevant for X Protocol client Session 1 * TODO: Required by JDBC spec 1 // FIXME: Let MySQL do this, however requires lightweight parsing of statement 1 // TODO Implement with I_S 5 // TODO use MysqlTypes here ? 1 // TODO custom properties? 1 * Protocol: no concrete type on the wire TODO: really? 1 // FIXME: Create warnings if can't create results of the given type or concurrency 1 // TODO There is something strange here: 1 fields[5] = new Field("", "TYPE_NAME", this.metadataCollationIndex, this.metadataEncoding, MysqlType.CHAR, 16); // TODO why is it 16 bytes long? we have longer types specifications 1 // TODO should not be protocol-specific 1 // TODO: longlong 2 // TODO pure "TEXT" is not allowed as a type, server requires the length specification 1 // FIXME: Needs to use identifiers for column/table names 4 binding.parameterType = MysqlType.BINARY; // TODO VARBINARY ? 1 // TODO: does this support placeholders? how do we prevent it? 1 // TODO check next types 1 // TODO scale is unavailable from X Protocol 2 // TODO FLOAT(p) [UNSIGNED] [ZEROFILL]. If p is from 0 to 24, the data type becomes FLOAT with no M or D values. If p is from 25 to 53, the data type becomes DOUBLE with no M or D values. 1 this.rowsAffected = ((XSessionStateChanged) notice).getValue().getVUnsignedInt(); // TODO: handle > 2^63-1? 1 // TODO: charset 1 this.messageToProtocolEntityFactory.put(ColumnMetaData.class, new FieldFactory("latin1")); // TODO configure metadata character set from server session 1 // TODO: check for same GTRID, but different BQUALs...MySQL doesn't allow this yet 1 throw new RuntimeException(e); // FIXME: Need to evolve public interface 2 // TODO add support for "ping", "list_clients", "kill_client" and "ensure_collection" commands 1 case Types.LONGNVARCHAR: // TODO check that it's correct 1 //TODO should not be protocol-specific 9 // TODO unit test 1 this.bindValues[parameterIndex].setMysqlType(MysqlType.TEXT); // TODO was Types.CLOB 1 // TODO do we need different types of physical connections? 1 // TODO charset? 1 || interfaceClassName.equals("java.sql.Wrapper")); // TODO check other interfaces 1 // TODO this is a temporary workaround until Bug#71143 "Calling ResultSet.updateRow should not set all field values in UPDATE" is fixed. 1 // TODO: use standard decoders with Java 6+ 1 // TODO should also check that the table has a DbObjectType.COLLECTION type 1 // TODO do we need to remove next properties (as it was before)? 1 // TODO MySQL has a CONVERT() function, is it irrelevant here? 1 protected NativeMessageBuilder commandBuilder = new NativeMessageBuilder(); // TODO use shared builder 3 return null; // TODO: ? JsonValueLiteral.NULL; 1 // TODO this method should be unified with AbstractQueryBindings.streamToBytes() 1 private Row next; // TODO document 1 case DECIMAL: // TODO is it right? DECIMAL isn't a floating-point number... 1 GEOMETRY("GEOMETRY", Types.BINARY, null, 0, MysqlType.IS_NOT_DECIMAL, 65535L, ""), // TODO check precision, it isn't well documented, only mentioned that WKB format is represented by BLOB 1 // FIXME: Can't break interface atm, we'll get the exception later when you try and do something useful with a closed statement... 2 // TODO: Does it's own typical exception wrapping, could be instrumented with different catch method 3 // TODO we need to consider lower_case_table_names server variable for some cases 1 // TODO Exception: If the REAL_AS_FLOAT SQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE. 1 this.bindValues[parameterIndex].setMysqlType(MysqlType.BINARY); // TODO VARBINARY ? 1 // TODO Turn this feature back on as soon as the server bug is fixed. Consider making it version specific. 2 // TODO check MySQL > 8.0.1 for built in solution, like passing ifExists to dropView 2 || interfaceClassName.equals("java.sql.Wrapper") || interfaceClassName.equals("java.sql.PreparedStatement")); // TODO check other interfaces 1 if (notice.getScope() != Frame.Scope.GLOBAL) { // TODO should we handle global notices somehow? What frame types are applicable there? 1 while (prot == null && (this.queueTimeout == 0 || System.currentTimeMillis() < start + this.queueTimeout)) { // TODO how to avoid endless loop? 1 // TODO this is not the right place for this code, should be in protocol 1 // TODO Adjust for pseudo-boolean ? 1 // TODO we have to keep add(DbDoc document) method because the DbDoc does extend the TreeMap, 1 setValue(parameterIndex, bOut.toByteArray(), MysqlType.BINARY); // TODO VARBINARY ? 1 Messages.getString("ConnectionProperties.reportMetricsIntervalMillis"), "3.1.2", CATEGORY_DEBUGING_PROFILING, 11, 0, Integer.MAX_VALUE), // TODO currently is not used !!! 1 // TODO setup all required server session states 1 private static final long POLL_TIMEOUT = 100; // TODO expose via connection property 1 * TODO: 7 throw new FeatureNotAvailableException("TODO: "); 1 return GEOMETRY; // TODO think about different MysqlTypes for Spatial Data Types 2 // TODO what's the purpose of this variable? 1 case Types.SQLXML: // TODO check that it's correct 1 // TODO: Too expensive to convert from other charset to ASCII here? UTF-8 (e.g.) doesn't need any conversion before being sent to the decoder 7 // TODO Find a clever way to generate both maps with a single set of input pairs. 1 setSerializableObject(parameterIndex, parameterObj); // TODO maybe default to error? 1 ColumnDefinition metadata, ProtocolEntityFactory resultSetFactory, String queryAsString) { // TODO queryAsString should be shared instead of passed 1 // TODO CHAR_OCTET_LENGTH the maximum length of binary and character based columns. For any other datatype the returned value is a NULL 1 case Types.JAVA_OBJECT: // TODO check that it's correct 1 case Types.DATALINK: // TODO check that it's correct 1 // TODO: Cache this for lifetime of XAConnection 2 // TODO this and other multi-host connection specific methods should be moved to special interface 1 // TODO: Decide whether we need to intercept exceptions at this level 3 // TODO Auto-generated method stub 14 setValue(parameterIndex, parameterWithQuotes, MysqlType.BINARY); // TODO VARBINARY ? 1 BIT("BIT", Types.BIT, Boolean.class, 0, MysqlType.IS_DECIMAL, 1L, "[(M)]"), // TODO maybe precision=8 ? 1 // TODO: this method should not be used in user-level APIs 1 // TODO charset? 1 prot = this.idleProtocols.poll(); // TODO endless lock ? 1 case Types.CLOB: // TODO check that it's correct 1 registerOutParameter(parameterIndex, mysqlType); // TODO is that correct that we ignore scale? 1 // TODO: need column context 5 return s.length() == DATE_BUF_LEN && s.charAt(4) == '-' && s.charAt(7) == '-'; // TODO also check proper date parts ranges 1 // TODO this works for tables too 1 // TODO parse complex names like [NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE collation_name] 1 * TODO: add support for pre-allocated buffer for large packets (if there's a demonstrable perf improvement) 1 // TODO: support custom character set 1 setValue(parameterIndex, parameterAsBytes, MysqlType.BINARY); // TODO VARBINARY ? 1 //this.protocol = null; // TODO actually we shouldn't remove protocol instance because some it's methods can be called after closing socket 1 this.lastInsertId = ((XSessionStateChanged) notice).getValue().getVUnsignedInt(); // TODO: handle > 2^63-1? 1 // TODO: charset 1 // TODO add missed types (aliases) 1 binding.parameterType = MysqlType.FLOAT; // TODO check; was Types.FLOAT but should be Types.REAL to map to SQL FLOAT 1 // TODO decide how to safely use the shared this.sendPacket 1 // TODO Field sets binary and blob flags if the length of BIT field is > 1; is it needed at all? 1 // TODO other types: LocalDate... 1 case Types.BLOB: // TODO check that it's correct 1 this.bindValues[i].setMysqlType(MysqlType.TEXT); // TODO was Types.CLOB 1 // TODO: Investigate using NIO to do this faster 1 // TODO don't send 'SET SESSION time_zone' if time_zone is already equal to the selectedTz (but it requires time zone detection) 1 // FIXME: Have this passed in instead 4 // TODO: do we need to really do anything special with JSON? just return correct stuff with getObject() I guess 1 // TODO: this becomes moot when DBMD results aren't built from ByteArrayRow 1 // TODO: encoding for all this? 2 int millis = 5000; // TODO expose via properties ? 1 // FIXME: Won't work for Non-MYSQL SQLXMLs 1 // TODO which database to use, from connection or from statement? 1 // TODO: FIXME: Issue warning when asked for updatable result set, but result set is not updatable 1 this.bindValues[parameterIndex].setMysqlType(MysqlType.BLOB); // TODO use length to find the right BLOB type 1 // TODO unify with AbstractQueryBindings.hexEscapeBlock() 1 // TODO: put this in CharsetMapping.. 1 throw new WrongArgumentException("TODO: unknown field type: " + type); 2 // TODO: charset mess here 1 // TODO modify for multi-host connections 1 // TODO close socket? 2 e.printStackTrace(); // TODO log error normally instead of sysout 1 this.bindValues[parameterIndex].setMysqlType(MysqlType.TEXT); // TODO was Types.NCLOB; use length to find right TEXT type 1 public static final String SYSP_testsuite_loadstoreperf_tabletype /* */ = "com.mysql.cj.testsuite.loadstoreperf.tabletype"; // TODO document allowed types 1 case Types.NCLOB: // TODO check that it's correct 1 // TODO check bounds 1 ((PreparedQuery) this.query).getQueryBindings().getBindValues()[getCoreParameterIndex(parameterIndex)].setMysqlType(MysqlType.VARCHAR); // TODO was Types.DATALINK 1 // TODO ((NameCallback) c).setName(user); 1 // TODO: optimization possibilities include using int/long if the digits is < X and scale = 0 1 } // TODO Log "Compression negotiation failed. Connection will proceed uncompressed." 2 // TODO: better messaging 2 //TODO: expose this via ServerVersion so calls look like x.getServerVersion().meetsMinimum(major, minor, subminor) 1 // TODO If MySQL server run with the MAXDB SQL mode enabled, TIMESTAMP is identical with DATETIME. If this mode is enabled at the time that a table is created, TIMESTAMP columns are created as DATETIME columns. 1 // TODO is it really no-op? 1 ((PreparedQuery) this.query).getQueryBindings().getBindValues()[getCoreParameterIndex(parameterIndex)].setMysqlType(MysqlType.TEXT); // TODO was Types.CLOB 1 // TODO: encoding (character_set_client?) 2 // TODO check that "if the value is SQL NULL, the value returned is null" is correctly implemented 1 // TODO souldn't we also clear warnings from _server_ ? 1 private String currUser = null, currPassword = null, currDatabase = null; // TODO remove these variables after implementing mysql_reset_connection() in reset() method 1 // TODO consider to handle additional List addedRows along with fetchedRows 1 // FIXME: What about no table? 1 // TODO ((PasswordCallback) c).setPassword(password.toCharArray()); 1 // TODO: Do this without copying byte[]s by maintaining some end pointer on the original data 1 // TODO: Make fetch size configurable 1 if (s.charAt(0) == '-' // TODO shouldn't we check the length as well? 2 // TODO: Check if this branch is needed for 5.7 server (maybe refactor hasTableTypes) 1 // TODO: can use a simple default for this as we don't need metadata. need to prevent against exceptions though 1 // TODO improve message 2 // String primaryDb = getDatabase(primaryCatalog, primarySchema); // TODO not needed? 1 // TODO put notices somewhere like it's done eg. in readStatementExecuteOk(): builder.addNotice(this.reader.read(Frame.class)); 1 // TODO charset (Bug#41172 ?) 1 registerOutParameter(parameterIndex, mysqlType); // TODO is that correct that we ignore typeName? 1 protected static int maxBufferSize = 65535; // TODO find a way to use actual (not default) value 1 throw new RuntimeException(e); // TODO: FIXME: Need to evolve public interface 5 // TODO: >> serverName. Is this of any use in our X Protocol exchange? Should be defined to be blank or something. 2