Package com.mysql.jdbc.profiler

Examples of com.mysql.jdbc.profiler.ProfilerEvent


            fieldInfo.isBinary() || fieldInfo.isBlob(),
            fieldInfo.isOpaqueBinary()),
        MysqlDefs.typeToName(fieldInfo.getMysqlType()),
        convertibleTypesBuf.toString()});
       
    this.eventSink.consumeEvent(new ProfilerEvent(ProfilerEvent.TYPE_WARN,
        "", (this.owningStatement == null) ? "N/A"
            : this.owningStatement.currentCatalog,
        this.connectionId, (this.owningStatement == null) ? (-1)
            : this.owningStatement.getId(), this.resultId, System
            .currentTimeMillis(), 0, Constants.MILLIS_I18N, null,
View Full Code Here


       
        // Report on result set closed by driver instead of application
       
        if (!calledExplicitly) {   
          this.eventSink
              .consumeEvent(new ProfilerEvent(
                  ProfilerEvent.TYPE_WARN,
                  "",
                  (this.owningStatement == null) ? "N/A"
                      : this.owningStatement.currentCatalog,
                  this.connectionId,
                  (this.owningStatement == null) ? (-1)
                      : this.owningStatement.getId(),
                  this.resultId,
                  System.currentTimeMillis(),
                  0,
                  Constants.MILLIS_I18N,
                  null,
                  this.pointOfOrigin,
                  Messages
                      .getString("ResultSet.ResultSet_implicitly_closed_by_driver"))); //$NON-NLS-1$
        }

        if (this.rowData instanceof RowDataStatic) {
         
          // Report on possibly too-large result sets
         
          if (this.rowData.size() > this.connection
              .getResultSetSizeThreshold()) {
            this.eventSink
                .consumeEvent(new ProfilerEvent(
                    ProfilerEvent.TYPE_WARN,
                    "",
                    (this.owningStatement == null) ? Messages
                        .getString("ResultSet.N/A_159")
                        : this.owningStatement.currentCatalog, //$NON-NLS-1$
                    this.connectionId,
                    (this.owningStatement == null) ? (-1)
                        : this.owningStatement.getId(),
                    this.resultId,
                    System.currentTimeMillis(),
                    0,
                    Constants.MILLIS_I18N,
                    null,
                    this.pointOfOrigin,
                    Messages
                        .getString(
                            "ResultSet.Too_Large_Result_Set",
                            new Object[] {
                                new Integer(
                                    this.rowData
                                        .size()),
                                new Integer(
                                    this.connection
                                        .getResultSetSizeThreshold()) })));
          }
         
          if (!isLast() && !isAfterLast() && (this.rowData.size() != 0)) {

            this.eventSink
                .consumeEvent(new ProfilerEvent(
                    ProfilerEvent.TYPE_WARN,
                    "",
                    (this.owningStatement == null) ? Messages
                        .getString("ResultSet.N/A_159")
                        : this.owningStatement.currentCatalog, //$NON-NLS-1$
                    this.connectionId,
                    (this.owningStatement == null) ? (-1)
                        : this.owningStatement.getId(),
                    this.resultId,
                    System.currentTimeMillis(),
                    0,
                    Constants.MILLIS_I18N,
                    null,
                    this.pointOfOrigin,
                    Messages
                        .getString(
                            "ResultSet.Possible_incomplete_traversal_of_result_set", //$NON-NLS-1$
                            new Object[] {
                                new Integer(
                                    getRow()),
                                new Integer(
                                    this.rowData
                                        .size()) })));
          }
        }

        //
        // Report on any columns that were selected but
        // not referenced
        //
       
        if (this.columnUsed.length > 0 && !this.rowData.wasEmpty()) {
          StringBuffer buf = new StringBuffer(
              Messages
                  .getString("ResultSet.The_following_columns_were_never_referenced")); //$NON-NLS-1$

          boolean issueWarn = false;

          for (int i = 0; i < this.columnUsed.length; i++) {
            if (!this.columnUsed[i]) {
              if (!issueWarn) {
                issueWarn = true;
              } else {
                buf.append(", ");
              }

              buf.append(this.fields[i].getFullName());
            }
          }

          if (issueWarn) {
            this.eventSink.consumeEvent(new ProfilerEvent(
                ProfilerEvent.TYPE_WARN, "",
                (this.owningStatement == null) ? "N/A"
                    : this.owningStatement.currentCatalog,
                this.connectionId,
                (this.owningStatement == null) ? (-1)
View Full Code Here

            ProfilerEventHandler eventSink = ProfilerEventHandlerFactory
            .getInstance(conn);

            eventSink
            .consumeEvent(new ProfilerEvent(
                ProfilerEvent.TYPE_WARN,
                "", //$NON-NLS-1$
                this.owner.owningStatement == null ? "N/A" : this.owner.owningStatement.currentCatalog, //$NON-NLS-1$
                this.owner.connectionId,
                this.owner.owningStatement == null ? -1
View Full Code Here

TOP

Related Classes of com.mysql.jdbc.profiler.ProfilerEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.