Package com.mysql.jdbc

Examples of com.mysql.jdbc.NonRegisteringDriver


    checkBug32216("www.mysql.com", null, "my_database");
  }

  private void checkBug32216(String host, String port, String dbname)
      throws SQLException {
    NonRegisteringDriver driver = new NonRegisteringDriver();

    StringBuffer url = new StringBuffer("jdbc:mysql://");
    url.append(host);

    if (port != null) {
      url.append(':');
      url.append(port);
    }

    url.append('/');
    url.append(dbname);

    Properties result = driver.parseURL(url.toString(), new Properties());

    assertEquals("hostname not equal", host,
        result.getProperty(Driver.HOST_PROPERTY_KEY));
    if (port != null) {
      assertEquals("port not equal", port,
View Full Code Here


  }

  public void testBug48486() throws Exception {

    Properties props = new NonRegisteringDriver().parseURL(dbUrl, null);
    String host = props.getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY,
        "localhost");
    String port = props.getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY,
        "3306");
View Full Code Here

        ForcedLoadBalanceStrategy.class.getName());
    props.setProperty("loadBalanceBlacklistTimeout", "5000");
    props.setProperty("loadBalancePingTimeout", "100");
    props.setProperty("loadBalanceValidateConnectionOnSwapServer", "true");

    String portNumber = new NonRegisteringDriver().parseURL(dbUrl, null)
        .getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);

    if (portNumber == null) {
      portNumber = "3306";
    }
View Full Code Here

    Properties props = new Properties();
    props.setProperty("loadBalanceStrategy",
        CountingReBalanceStrategy.class.getName());
    props.setProperty("loadBalanceAutoCommitStatementThreshold", "3");

    String portNumber = new NonRegisteringDriver().parseURL(dbUrl, null)
        .getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);

    if (portNumber == null) {
      portNumber = "3306";
    }
View Full Code Here

  public void testBug56429() throws Exception {
    Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);
    props.setProperty("autoReconnect", "true");
    props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");

    Properties urlProps = new NonRegisteringDriver().parseURL(
        BaseTestCase.dbUrl, null);

    String host = urlProps.getProperty(Driver.HOST_PROPERTY_KEY);
    String port = urlProps.getProperty(Driver.PORT_PROPERTY_KEY);
View Full Code Here

  public void testBug58706() throws Exception {
    Properties props = new Driver().parseURL(BaseTestCase.dbUrl, null);
    props.setProperty("autoReconnect", "true");
    props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");

    Properties urlProps = new NonRegisteringDriver().parseURL(this.dbUrl,
        null);

    String host = urlProps.getProperty(Driver.HOST_PROPERTY_KEY);
    String port = urlProps.getProperty(Driver.PORT_PROPERTY_KEY);
View Full Code Here

          && (versionNumObj.toString().indexOf("cluster") != -1)) {
        Connection clusterConn = null;
        Statement clusterStmt = null;

        try {
          clusterConn = new NonRegisteringDriver().connect(url, null);

          clusterStmt = clusterConn.createStatement();
          clusterStmt
              .executeQuery("DROP TABLE IF EXISTS testClusterConn");
          clusterStmt
View Full Code Here

    Properties props = new Properties();

    props.setProperty(NonRegisteringDriver.PROPERTIES_TRANSFORM_KEY,
        transformClassName);

    NonRegisteringDriver driver = new NonRegisteringDriver();

    Properties transformedProps = driver
        .parseURL(BaseTestCase.dbUrl, props);

    assertTrue("albequerque".equals(transformedProps
        .getProperty(NonRegisteringDriver.HOST_PROPERTY_KEY)));
  }
View Full Code Here

  }

  public void testBug51776() throws Exception {

    Properties props = new Properties();
    NonRegisteringDriver d = new NonRegisteringDriver();
    this.copyBasePropertiesIntoProps(props, d);
    props.setProperty("socketFactory", "testsuite.UnreliableSocketFactory");
    Properties parsed = d.parseURL(BaseTestCase.dbUrl, props);
    String db = parsed
        .getProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY);
    String port = parsed
        .getProperty(NonRegisteringDriver.PORT_PROPERTY_KEY);
    String host = getPortFreeHostname(props, d);
View Full Code Here

   *
   * @throws Exception
   *             if the test fails.
   */
  public void testBug22628() throws Exception {
    DriverPropertyInfo[] dpi = new NonRegisteringDriver().getPropertyInfo(
        "jdbc:mysql://bogus:9999", new Properties());

    boolean foundHost = false;
    boolean foundPort = false;

View Full Code Here

TOP

Related Classes of com.mysql.jdbc.NonRegisteringDriver

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.