@Override public synchronized void setVersion(String mysqlVersionString) { setVersion(true, mysqlVersionString); }
public synchronized void setVersion(String mysqlVersionString) { setVersion(true, mysqlVersionString); }
public void testVersion() { assertEquals(MysqldResourceI.DEFAULT_VERSION, mysqldResource .getVersion()); mysqldResource.setVersion(5, 11, 42); assertEquals("5.11.42", mysqldResource.getVersion()); }
public void testVersion() { assertNotNull(mysqldResource.getVersion()); assertTrue(mysqldResource.getVersion().indexOf("5") >= 0); mysqldResource.setVersion("5.11.42"); assertEquals("5.11.42", mysqldResource.getVersion()); }
public MysqldResource(File baseDir, File dataDir, String mysqlVersionString, boolean guessArch, PrintStream out, PrintStream err, Utils util, String binDir) { this.out = out; this.err = err; this.utils = util; this.binDir = binDir; this.optionParser = new HelpOptionsParser(err, utils); this.killDelay = 30000; this.baseDir = utils.files().validCononicalDir(baseDir, utils.files().tmp(MYSQL_C_MXJ)); this.dataDir = utils.files().validCononicalDir(dataDir, new File(this.baseDir, DATA)); String className = utils.str().shortClassName(getClass()); this.pidFile = utils.files().cononical( new File(this.dataDir, className + ".pid")); this.portFile = new File(dataDir, "port"); setVersion(false, mysqlVersionString); this.msgPrefix = "[" + utils.str().shortClassName(getClass()) + "] "; this.options = new HashMap(); this.setShell(null); setOsAndArch(System.getProperty(Platform.OS_NAME), guessArch, System .getProperty(Platform.OS_ARCH)); this.completionListensers = new ArrayList(); initTrace(); }
MysqldResource(File pBaseDir, File pDataDir, String pMysqlVersionString, PrintStream pOut, PrintStream pErr, Utils pUtils) { this.out = (pOut != null) ? pOut : System.out; this.err = (pErr != null) ? pErr : System.err; this.utils = (pUtils != null) ? pUtils : new Utils(); this.platformProperties = utils.streams().loadProperties( PLATFORM_MAP_PROPERTIES, pErr); this.connectorMxjProperties = utils.streams().loadProperties( CONNECTOR_MXJ_PROPERTIES, pErr); this.baseDir = utils.files().validCononicalDir(pBaseDir, utils.files().tmp(MYSQL_C_MXJ)); this.dataDir = utils.files().validCononicalDir(pDataDir, new File(baseDir, DATA)); this.optionParser = new HelpOptionsParser(err, utils); this.killDelay = getKillDelyFromProperties(connectorMxjProperties); this.windowsKillCommand = getWindowsKillCommand(connectorMxjProperties); String className = utils.str().shortClassName(getClass()); this.pidFile = utils.files().cononical( new File(dataDir, className + ".pid")); this.portFile = new File(dataDir, className + ".port"); setVersion(false, pMysqlVersionString); this.msgPrefix = "[" + className + "] "; this.options = new HashMap(); setShell(null); setOsAndArch(System.getProperty(Platform.OS_NAME), System .getProperty(Platform.OS_ARCH)); this.completionListensers = new ArrayList(); initTrace(); }