List:Commits« Previous MessageNext Message »
From:eherman Date:January 17 2006 3:36am
Subject:Connector/MXJ commit: r14 - in trunk/connector-mxj: . commercial commercial/4-1-13 commercial/5-0-16 commercial/5-0-17 commercial/5-0-18 commercial/5-...
View as plain text  
Added:
   trunk/connector-mxj/commercial/4-1-13/Mac_OS_X-ppc/
   trunk/connector-mxj/commercial/5-0-16/Mac_OS_X-ppc/
   trunk/connector-mxj/commercial/5-0-17/Mac_OS_X-ppc/
   trunk/connector-mxj/commercial/5-0-18/
   trunk/connector-mxj/commercial/5-0-18/Linux-i386/
   trunk/connector-mxj/commercial/5-0-18/Linux-i386/mysqld
   trunk/connector-mxj/commercial/5-0-18/Linux-i386/version.txt
   trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/
   trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/mysqld
   trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/version.txt
   trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/
   trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/mysqld
   trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/version.txt
   trunk/connector-mxj/commercial/5-0-18/Win-x86/
   trunk/connector-mxj/commercial/5-0-18/Win-x86/version.txt
   trunk/connector-mxj/commercial/5-0-18/com/
   trunk/connector-mxj/commercial/5-0-18/com/mysql/
   trunk/connector-mxj/commercial/5-0-18/com/mysql/management/
   trunk/connector-mxj/commercial/5-0-18/com/mysql/management/MySQL_Help.txt
   trunk/connector-mxj/commercial/5-0-18/data_dir.jar
   trunk/connector-mxj/commercial/5-0-18/share_dir.jar
   trunk/connector-mxj/commercial/5-0-18/win_share_dir.jar
   trunk/connector-mxj/resources/4-1-13/Mac_OS_X-ppc/
   trunk/connector-mxj/resources/5-0-12/Mac_OS_X-ppc/
   trunk/connector-mxj/resources/5-0-16/Mac_OS_X-ppc/
   trunk/connector-mxj/resources/5-0-17/Mac_OS_X-ppc/
   trunk/connector-mxj/resources/5-0-18/
   trunk/connector-mxj/resources/5-0-18/Linux-i386/
   trunk/connector-mxj/resources/5-0-18/Linux-i386/mysqld
   trunk/connector-mxj/resources/5-0-18/Linux-i386/version.txt
   trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/
   trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/mysqld
   trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/version.txt
   trunk/connector-mxj/resources/5-0-18/SunOS-sparc/
   trunk/connector-mxj/resources/5-0-18/SunOS-sparc/mysqld
   trunk/connector-mxj/resources/5-0-18/SunOS-sparc/version.txt
   trunk/connector-mxj/resources/5-0-18/Win-x86/
   trunk/connector-mxj/resources/5-0-18/Win-x86/version.txt
   trunk/connector-mxj/resources/5-0-18/com/
   trunk/connector-mxj/resources/5-0-18/com/mysql/
   trunk/connector-mxj/resources/5-0-18/com/mysql/management/
   trunk/connector-mxj/resources/5-0-18/com/mysql/management/MySQL_Help.txt
   trunk/connector-mxj/resources/5-0-18/data_dir.jar
   trunk/connector-mxj/resources/5-0-18/share_dir.jar
   trunk/connector-mxj/resources/5-0-18/win_share_dir.jar
   trunk/connector-mxj/resources/5-0-3/Mac_OS_X-ppc/
Removed:
   trunk/connector-mxj/commercial/4-1-13/Mac OS X-ppc/
   trunk/connector-mxj/commercial/5-0-16/Mac OS X-ppc/
   trunk/connector-mxj/commercial/5-0-17/Mac OS X-ppc/
   trunk/connector-mxj/resources/4-1-13/Mac OS X-ppc/
   trunk/connector-mxj/resources/5-0-12/Mac OS X-ppc/
   trunk/connector-mxj/resources/5-0-16/Mac OS X-ppc/
   trunk/connector-mxj/resources/5-0-17/Mac OS X-ppc/
   trunk/connector-mxj/resources/5-0-3/Mac OS X-ppc/
Modified:
   trunk/connector-mxj/CHANGES
   trunk/connector-mxj/_dev_notes.txt
   trunk/connector-mxj/build.xml
   trunk/connector-mxj/src/com/mysql/management/HelpOptionsParser.java
   trunk/connector-mxj/src/com/mysql/management/HelpOptionsParserTest.java
   trunk/connector-mxj/src/com/mysql/management/MysqldResource.java
   trunk/connector-mxj/src/com/mysql/management/MysqldResourceI.java
   trunk/connector-mxj/src/com/mysql/management/MysqldResourceTest.java
Log:


Modified: trunk/connector-mxj/CHANGES
===================================================================
--- trunk/connector-mxj/CHANGES	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/CHANGES	2006-01-17 03:19:41 UTC (rev 14)
@@ -1,9 +1,14 @@
 # Changelog
 # $Id: CHANGES,v 1.14 2005/10/25 19:11:16 eherman Exp $
 
+
+2006-01-16 - swapped out the mysqld binaries for MySQL v5.0.18
+           - "platform" directories replace spaces with underscores
+           - help parsing test reflects current help options
+
 5-0-0
 
-2005-12-09 - wapped out the mysqld binaries for MySQL v5.0.16
+2005-12-09 - swapped out the mysqld binaries for MySQL v5.0.16
 
 2005-10-25 - altered examples and tests to use new Connector/J 5.0 URL syntax for
              for launching Connector/MXJ ("jdbc:mysql:mxj://")

Modified: trunk/connector-mxj/_dev_notes.txt
===================================================================
--- trunk/connector-mxj/_dev_notes.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/_dev_notes.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -46,9 +46,9 @@
 
 download the various MySQLs
 * mysql-5.0.XY-win32
-* mysql-standard-5.0.XY-linux-i686
-* mysql-standard-5.0.XY-osx10.3-powerpc
-* mysql-standard-5.0.XY-solaris9-sparc
+* mysql-max-5.0.XY-linux-i686
+* mysql-max-5.0.XY-osx10.3-powerpc
+* mysql-max-5.0.XY-solaris9-sparc
 
 * mysql-pro-noinstall-5.0.XY-win32.zip
 * mysql-pro-5.0.XY-linux-i686
@@ -68,6 +68,13 @@
 use the "scripts/mysql_install_db" to create the "data" and "share" directories.
 (use your platform of course, but it is trickier on windows)
 
+cd (max)
+./bin/mysql --no-defaults --verbose --help > $WORKSPACE/resources/5-0-XY/com/mysql/management/MySQL_Help.txt
+cd ..
+cd (pro)
+./bin/mysql --no-defaults --verbose --help > $WORKSPACE/commercial/5-0-XY/com/mysql/management/MySQL_Help.txt
+
+
 Create the "data_dir.jar":
 cd data
 jar cvf $WORKSPACE/resources/5-0-XY/data_dir.jar *
@@ -78,18 +85,15 @@
 jar cvf $WORKSPACE/resources/5-0-XY/share_dir.jar share
 
 Create the "win_share_dir.jar" (eliminate the "mysql" sub-dir)
-cd share
-cd mysql 
-mv * ..
-cd ..
-rmdir mysql
-cd ..
+mv share/mysql/* share/
+rmdir share/mysql
 jar cvf $WORKSPACE/resources/5-0-XY/win_share_dir.jar share
 
 copy the *dir.jar files to the "commercial" directory as well
  (this should be removed as the duplication does not really help the build process)
 
 Update the default version in MysqldResourceI
+rm -rf /tmp/test-c.mxj
 re-run tests
 
 

Modified: trunk/connector-mxj/build.xml
===================================================================
--- trunk/connector-mxj/build.xml	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/build.xml	2006-01-17 03:19:41 UTC (rev 14)
@@ -22,7 +22,7 @@
 <project name="MySQL JMX" basedir="." default="usage">
 	<description>A JMX Wrapper for MySQL</description>
 
-	<property name="mxj-version" value="5-0-0" />
+	<property name="mxj-version" value="5-0-1" />
 
 	<property name="src" location="src" />
 	<property name="misc" location="misc" />
@@ -175,7 +175,7 @@
 		<jar destfile="${stage-cmxj}/connector-mxj.jar">
 			<fileset dir="${build}" />
 			<fileset dir="${resources}">
-				<include name="5-0-17/**" />
+				<include name="5-0-18/**" />
 				<include name="kill.exe" />
 			</fileset>
 		</jar>
@@ -243,7 +243,7 @@
 		</copy>
 		<copy todir="${stage-cmxj}/resources">
 			<fileset dir="${resources}">
-				<include name="5-0-17/**" />
+				<include name="5-0-18/**" />
 				<include name="kill.exe" />
 			</fileset>
 		</copy>

Copied: trunk/connector-mxj/commercial/4-1-13/Mac_OS_X-ppc (from rev 4, trunk/connector-mxj/commercial/4-1-13/Mac OS X-ppc)

Copied: trunk/connector-mxj/commercial/5-0-16/Mac_OS_X-ppc (from rev 9, trunk/connector-mxj/commercial/5-0-16/Mac OS X-ppc)

Copied: trunk/connector-mxj/commercial/5-0-17/Mac_OS_X-ppc (from rev 13, trunk/connector-mxj/commercial/5-0-17/Mac OS X-ppc)

Added: trunk/connector-mxj/commercial/5-0-18/Linux-i386/mysqld
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/commercial/5-0-18/Linux-i386/mysqld
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/commercial/5-0-18/Linux-i386/version.txt
===================================================================
--- trunk/connector-mxj/commercial/5-0-18/Linux-i386/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/commercial/5-0-18/Linux-i386/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-pro-5.0.18-linux-i686/bin/mysqld

Added: trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/mysqld
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/mysqld
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/version.txt
===================================================================
--- trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/commercial/5-0-18/Mac_OS_X-ppc/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-pro-5.0.18-osx10.3-powerpc/bin/mysqld

Added: trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/mysqld
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/mysqld
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/version.txt
===================================================================
--- trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/commercial/5-0-18/SunOS-sparc/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-pro-5.0.18-solaris9-sparc/bin/mysqld

Added: trunk/connector-mxj/commercial/5-0-18/Win-x86/version.txt
===================================================================
--- trunk/connector-mxj/commercial/5-0-18/Win-x86/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/commercial/5-0-18/Win-x86/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-pro-5.0.18-win32/bin/mysqld-nt.exe

Added: trunk/connector-mxj/commercial/5-0-18/com/mysql/management/MySQL_Help.txt
===================================================================
--- trunk/connector-mxj/commercial/5-0-18/com/mysql/management/MySQL_Help.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/commercial/5-0-18/com/mysql/management/MySQL_Help.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1,162 @@
+./bin/mysql  Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using  EditLine wrapper
+Copyright (C) 2002 MySQL AB
+This software comes with ABSOLUTELY NO WARRANTY. This is commercial software,
+please see the file MySQLEULA.txt for details
+Usage: ./bin/mysql [OPTIONS] [database]
+  -?, --help          Display this help and exit.
+  -I, --help          Synonym for -?
+  --auto-rehash       Enable automatic rehashing. One doesn't need to use
+                      'rehash' to get table and field completion, but startup
+                      and reconnecting may take a longer time. Disable with
+                      --disable-auto-rehash.
+  -A, --no-auto-rehash 
+                      No automatic rehashing. One has to use 'rehash' to get
+                      table and field completion. This gives a quicker start of
+                      mysql and disables rehashing on reconnect. WARNING:
+                      options deprecated; use --disable-auto-rehash instead.
+  -B, --batch         Don't use history file. Disable interactive behavior.
+                      (Enables --silent)
+  --character-sets-dir=name 
+                      Directory where character sets are.
+  --default-character-set=name 
+                      Set the default character set.
+  -C, --compress      Use compression in server/client protocol.
+  -#, --debug[=#]     This is a non-debug version. Catch this and exit
+  -D, --database=name Database to use.
+  --delimiter=name    Delimiter to be used.
+  -e, --execute=name  Execute command and quit. (Disables --force and history
+                      file)
+  -E, --vertical      Print the output of a query (rows) vertically.
+  -f, --force         Continue even if we get an sql error.
+  -g, --no-named-commands 
+                      Named commands are disabled. Use \* form only, or use
+                      named commands only in the beginning of a line ending
+                      with a semicolon (;) Since version 10.9 the client now
+                      starts with this option ENABLED by default! Disable with
+                      '-G'. Long format commands still work from the first
+                      line. WARNING: option deprecated; use
+                      --disable-named-commands instead.
+  -G, --named-commands 
+                      Enable named commands. Named commands mean this program's
+                      internal commands; see mysql> help . When enabled, the
+                      named commands can be used from any line of the query,
+                      otherwise only from the first line, before an enter.
+                      Disable with --disable-named-commands. This option is
+                      disabled by default.
+  -i, --ignore-spaces Ignore space after function names.
+  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
+  -b, --no-beep       Turn off beep on error.
+  -h, --host=name     Connect to host.
+  -H, --html          Produce HTML output.
+  -X, --xml           Produce XML output
+  --line-numbers      Write line numbers for errors.
+  -L, --skip-line-numbers 
+                      Don't write line number for errors. WARNING: -L is
+                      deprecated, use long version of this option instead.
+  --no-pager          Disable pager and print to stdout. See interactive help
+                      (\h) also. WARNING: option deprecated; use
+                      --disable-pager instead.
+  --no-tee            Disable outfile. See interactive help (\h) also. WARNING:
+                      option deprecated; use --disable-tee instead
+  -n, --unbuffered    Flush buffer after each query.
+  --column-names      Write column names in results.
+  -N, --skip-column-names 
+                      Don't write column names in results. WARNING: -N is
+                      deprecated, use long version of this options instead.
+  -O, --set-variable=name 
+                      Change the value of a variable. Please note that this
+                      option is deprecated; you can set variables directly with
+                      --variable-name=value.
+  --sigint-ignore     Ignore SIGINT (CTRL-C)
+  -o, --one-database  Only update the default database. This is useful for
+                      skipping updates to other database in the update log.
+  --pager[=name]      Pager to use to display results. If you don't supply an
+                      option the default pager is taken from your ENV variable
+                      PAGER. Valid pagers are less, more, cat [> filename],
+                      etc. See interactive help (\h) also. This option does not
+                      work in batch mode.
+  -p, --password[=name] 
+                      Password to use when connecting to server. If password is
+                      not given it's asked from the tty.
+  -P, --port=#        Port number to use for connection.
+  --prompt=name       Set the mysql prompt to this value.
+  --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
+  -q, --quick         Don't cache result, print it row by row. This may slow
+                      down the server if the output is suspended. Doesn't use
+                      history file.
+  -r, --raw           Write fields without conversion. Used with --batch.
+  --reconnect         Reconnect if the connection is lost. Disable with
+                      --disable-reconnect. This option is enabled by default.
+  -s, --silent        Be more silent. Print results with a tab as separator,
+                      each row on new line.
+  -S, --socket=name   Socket file to use for connection.
+  -t, --table         Output in table format.
+  -T, --debug-info    Print some debug info at exit.
+  --tee=name          Append everything into outfile. See interactive help (\h)
+                      also. Does not work in batch mode.
+  -u, --user=name     User for login if not current user.
+  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
+  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
+  -v, --verbose       Write more. (-v -v -v gives the table output format).
+  -V, --version       Output version information and exit.
+  -w, --wait          Wait and retry if connection is down.
+  --connect_timeout=# Number of seconds before connection timeout.
+  --max_allowed_packet=# 
+                      Max packet length to send to, or receive from server
+  --net_buffer_length=# 
+                      Buffer for TCP/IP and socket communication
+  --select_limit=#    Automatic limit for SELECT when using --safe-updates
+  --max_join_size=#   Automatic limit for rows in a join when using
+                      --safe-updates
+  --secure-auth       Refuse client connecting to server if it uses old
+                      (pre-4.1.1) protocol
+  --show-warnings     Show warnings after every statement.
+
+Default options are read from the following files in the given order:
+/etc/my.cnf ~/.my.cnf 
+The following groups are read: mysql client
+The following options may be given as the first argument:
+--print-defaults	Print the program argument list and exit
+--no-defaults		Don't read default options from any options file
+--defaults-file=#	Only read default options from the given file #
+--defaults-extra-file=# Read this file after the global files are read
+
+Variables (--variable-name=value)
+and boolean options {FALSE|TRUE}  Value (after reading options)
+--------------------------------- -----------------------------
+auto-rehash                       TRUE
+character-sets-dir                (No default value)
+default-character-set             latin1
+compress                          FALSE
+database                          (No default value)
+delimiter                         ;
+vertical                          FALSE
+force                             FALSE
+named-commands                    FALSE
+local-infile                      FALSE
+no-beep                           FALSE
+host                              (No default value)
+html                              FALSE
+xml                               FALSE
+line-numbers                      TRUE
+unbuffered                        FALSE
+column-names                      TRUE
+sigint-ignore                     FALSE
+port                              0
+prompt                            mysql> 
+quick                             FALSE
+raw                               FALSE
+reconnect                         TRUE
+socket                            (No default value)
+table                             FALSE
+debug-info                        FALSE
+user                              (No default value)
+safe-updates                      FALSE
+i-am-a-dummy                      FALSE
+connect_timeout                   0
+max_allowed_packet                16777216
+net_buffer_length                 16384
+select_limit                      1000
+max_join_size                     1000000
+secure-auth                       FALSE
+show-warnings                     FALSE

Added: trunk/connector-mxj/commercial/5-0-18/data_dir.jar
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/commercial/5-0-18/data_dir.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/commercial/5-0-18/share_dir.jar
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/commercial/5-0-18/share_dir.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/commercial/5-0-18/win_share_dir.jar
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/commercial/5-0-18/win_share_dir.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Copied: trunk/connector-mxj/resources/4-1-13/Mac_OS_X-ppc (from rev 4, trunk/connector-mxj/resources/4-1-13/Mac OS X-ppc)

Copied: trunk/connector-mxj/resources/5-0-12/Mac_OS_X-ppc (from rev 4, trunk/connector-mxj/resources/5-0-12/Mac OS X-ppc)

Copied: trunk/connector-mxj/resources/5-0-16/Mac_OS_X-ppc (from rev 9, trunk/connector-mxj/resources/5-0-16/Mac OS X-ppc)

Copied: trunk/connector-mxj/resources/5-0-17/Mac_OS_X-ppc (from rev 13, trunk/connector-mxj/resources/5-0-17/Mac OS X-ppc)

Added: trunk/connector-mxj/resources/5-0-18/Linux-i386/mysqld
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/Linux-i386/mysqld
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/resources/5-0-18/Linux-i386/version.txt
===================================================================
--- trunk/connector-mxj/resources/5-0-18/Linux-i386/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/resources/5-0-18/Linux-i386/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-max-5.0.18-linux-i686/bin/mysqld

Added: trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/mysqld
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/mysqld
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/version.txt
===================================================================
--- trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/resources/5-0-18/Mac_OS_X-ppc/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-max-5.0.18-osx10.3-powerpc/bin/mysqld

Added: trunk/connector-mxj/resources/5-0-18/SunOS-sparc/mysqld
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/SunOS-sparc/mysqld
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/resources/5-0-18/SunOS-sparc/version.txt
===================================================================
--- trunk/connector-mxj/resources/5-0-18/SunOS-sparc/version.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/resources/5-0-18/SunOS-sparc/version.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1 @@
+mysql-max-5.0.18-solaris9-sparc/bin/mysqld

Added: trunk/connector-mxj/resources/5-0-18/Win-x86/version.txt
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/Win-x86/version.txt
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/resources/5-0-18/com/mysql/management/MySQL_Help.txt
===================================================================
--- trunk/connector-mxj/resources/5-0-18/com/mysql/management/MySQL_Help.txt	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/resources/5-0-18/com/mysql/management/MySQL_Help.txt	2006-01-17 03:19:41 UTC (rev 14)
@@ -0,0 +1,162 @@
+./bin/mysql  Ver 14.12 Distrib 5.0.18, for pc-linux-gnu (i686) using readline 5.0
+Copyright (C) 2002 MySQL AB
+This software comes with ABSOLUTELY NO WARRANTY. This is free software,
+and you are welcome to modify and redistribute it under the GPL license
+Usage: ./bin/mysql [OPTIONS] [database]
+  -?, --help          Display this help and exit.
+  -I, --help          Synonym for -?
+  --auto-rehash       Enable automatic rehashing. One doesn't need to use
+                      'rehash' to get table and field completion, but startup
+                      and reconnecting may take a longer time. Disable with
+                      --disable-auto-rehash.
+  -A, --no-auto-rehash 
+                      No automatic rehashing. One has to use 'rehash' to get
+                      table and field completion. This gives a quicker start of
+                      mysql and disables rehashing on reconnect. WARNING:
+                      options deprecated; use --disable-auto-rehash instead.
+  -B, --batch         Don't use history file. Disable interactive behavior.
+                      (Enables --silent)
+  --character-sets-dir=name 
+                      Directory where character sets are.
+  --default-character-set=name 
+                      Set the default character set.
+  -C, --compress      Use compression in server/client protocol.
+  -#, --debug[=#]     This is a non-debug version. Catch this and exit
+  -D, --database=name Database to use.
+  --delimiter=name    Delimiter to be used.
+  -e, --execute=name  Execute command and quit. (Disables --force and history
+                      file)
+  -E, --vertical      Print the output of a query (rows) vertically.
+  -f, --force         Continue even if we get an sql error.
+  -g, --no-named-commands 
+                      Named commands are disabled. Use \* form only, or use
+                      named commands only in the beginning of a line ending
+                      with a semicolon (;) Since version 10.9 the client now
+                      starts with this option ENABLED by default! Disable with
+                      '-G'. Long format commands still work from the first
+                      line. WARNING: option deprecated; use
+                      --disable-named-commands instead.
+  -G, --named-commands 
+                      Enable named commands. Named commands mean this program's
+                      internal commands; see mysql> help . When enabled, the
+                      named commands can be used from any line of the query,
+                      otherwise only from the first line, before an enter.
+                      Disable with --disable-named-commands. This option is
+                      disabled by default.
+  -i, --ignore-spaces Ignore space after function names.
+  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.
+  -b, --no-beep       Turn off beep on error.
+  -h, --host=name     Connect to host.
+  -H, --html          Produce HTML output.
+  -X, --xml           Produce XML output
+  --line-numbers      Write line numbers for errors.
+  -L, --skip-line-numbers 
+                      Don't write line number for errors. WARNING: -L is
+                      deprecated, use long version of this option instead.
+  --no-pager          Disable pager and print to stdout. See interactive help
+                      (\h) also. WARNING: option deprecated; use
+                      --disable-pager instead.
+  --no-tee            Disable outfile. See interactive help (\h) also. WARNING:
+                      option deprecated; use --disable-tee instead
+  -n, --unbuffered    Flush buffer after each query.
+  --column-names      Write column names in results.
+  -N, --skip-column-names 
+                      Don't write column names in results. WARNING: -N is
+                      deprecated, use long version of this options instead.
+  -O, --set-variable=name 
+                      Change the value of a variable. Please note that this
+                      option is deprecated; you can set variables directly with
+                      --variable-name=value.
+  --sigint-ignore     Ignore SIGINT (CTRL-C)
+  -o, --one-database  Only update the default database. This is useful for
+                      skipping updates to other database in the update log.
+  --pager[=name]      Pager to use to display results. If you don't supply an
+                      option the default pager is taken from your ENV variable
+                      PAGER. Valid pagers are less, more, cat [> filename],
+                      etc. See interactive help (\h) also. This option does not
+                      work in batch mode.
+  -p, --password[=name] 
+                      Password to use when connecting to server. If password is
+                      not given it's asked from the tty.
+  -P, --port=#        Port number to use for connection.
+  --prompt=name       Set the mysql prompt to this value.
+  --protocol=name     The protocol of connection (tcp,socket,pipe,memory).
+  -q, --quick         Don't cache result, print it row by row. This may slow
+                      down the server if the output is suspended. Doesn't use
+                      history file.
+  -r, --raw           Write fields without conversion. Used with --batch.
+  --reconnect         Reconnect if the connection is lost. Disable with
+                      --disable-reconnect. This option is enabled by default.
+  -s, --silent        Be more silent. Print results with a tab as separator,
+                      each row on new line.
+  -S, --socket=name   Socket file to use for connection.
+  -t, --table         Output in table format.
+  -T, --debug-info    Print some debug info at exit.
+  --tee=name          Append everything into outfile. See interactive help (\h)
+                      also. Does not work in batch mode.
+  -u, --user=name     User for login if not current user.
+  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.
+  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.
+  -v, --verbose       Write more. (-v -v -v gives the table output format).
+  -V, --version       Output version information and exit.
+  -w, --wait          Wait and retry if connection is down.
+  --connect_timeout=# Number of seconds before connection timeout.
+  --max_allowed_packet=# 
+                      Max packet length to send to, or receive from server
+  --net_buffer_length=# 
+                      Buffer for TCP/IP and socket communication
+  --select_limit=#    Automatic limit for SELECT when using --safe-updates
+  --max_join_size=#   Automatic limit for rows in a join when using
+                      --safe-updates
+  --secure-auth       Refuse client connecting to server if it uses old
+                      (pre-4.1.1) protocol
+  --show-warnings     Show warnings after every statement.
+
+Default options are read from the following files in the given order:
+/etc/my.cnf ~/.my.cnf 
+The following groups are read: mysql client
+The following options may be given as the first argument:
+--print-defaults	Print the program argument list and exit
+--no-defaults		Don't read default options from any options file
+--defaults-file=#	Only read default options from the given file #
+--defaults-extra-file=# Read this file after the global files are read
+
+Variables (--variable-name=value)
+and boolean options {FALSE|TRUE}  Value (after reading options)
+--------------------------------- -----------------------------
+auto-rehash                       TRUE
+character-sets-dir                (No default value)
+default-character-set             latin1
+compress                          FALSE
+database                          (No default value)
+delimiter                         ;
+vertical                          FALSE
+force                             FALSE
+named-commands                    FALSE
+local-infile                      FALSE
+no-beep                           FALSE
+host                              (No default value)
+html                              FALSE
+xml                               FALSE
+line-numbers                      TRUE
+unbuffered                        FALSE
+column-names                      TRUE
+sigint-ignore                     FALSE
+port                              0
+prompt                            mysql> 
+quick                             FALSE
+raw                               FALSE
+reconnect                         TRUE
+socket                            (No default value)
+table                             FALSE
+debug-info                        FALSE
+user                              (No default value)
+safe-updates                      FALSE
+i-am-a-dummy                      FALSE
+connect_timeout                   0
+max_allowed_packet                16777216
+net_buffer_length                 16384
+select_limit                      1000
+max_join_size                     1000000
+secure-auth                       FALSE
+show-warnings                     FALSE

Added: trunk/connector-mxj/resources/5-0-18/data_dir.jar
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/data_dir.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/resources/5-0-18/share_dir.jar
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/share_dir.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/connector-mxj/resources/5-0-18/win_share_dir.jar
===================================================================
(Binary files differ)


Property changes on: trunk/connector-mxj/resources/5-0-18/win_share_dir.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Copied: trunk/connector-mxj/resources/5-0-3/Mac_OS_X-ppc (from rev 4, trunk/connector-mxj/resources/5-0-3/Mac OS X-ppc)

Modified: trunk/connector-mxj/src/com/mysql/management/HelpOptionsParser.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/HelpOptionsParser.java	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/src/com/mysql/management/HelpOptionsParser.java	2006-01-17 03:19:41 UTC (rev 14)
@@ -116,7 +116,10 @@
         if (dividerPos == -1) {
             throw new RuntimeException("Can not parse: <" + help + ">");
         }
-        help = help.substring(start, stop);
-        return help + System.getProperty("line.separator");
+        if (stop < start) {
+        	stop = help.length();
+        }
+        String options = help.substring(start, stop);
+        return options + System.getProperty("line.separator");
     }
 }
\ No newline at end of file

Modified: trunk/connector-mxj/src/com/mysql/management/HelpOptionsParserTest.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/HelpOptionsParserTest.java	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/src/com/mysql/management/HelpOptionsParserTest.java	2006-01-17 03:19:41 UTC (rev 14)
@@ -34,41 +34,43 @@
  */
 public class HelpOptionsParserTest extends TestCase {
 
-    public void testOptionParser() throws Exception {
+	public void testOptionParser() throws Exception {
 
-        String resourceVersionDir = MysqldResourceI.DEFAULT_VERSION.replaceAll(
-                "\\.", "-");
-        assertEquals("5-0-17", resourceVersionDir);
-        String sampleHelp = resourceVersionDir
-                + "/com/mysql/management/MySQL_Help.txt";
+		String resourceVersionDir = MysqldResourceI.DEFAULT_VERSION.replaceAll(
+				"\\.", "-");
+		assertEquals("5-0-18", resourceVersionDir);
+		String sampleHelp = resourceVersionDir
+				+ "/com/mysql/management/MySQL_Help.txt";
 
-        ClassLoader cl = getClass().getClassLoader();
-        InputStream is = cl.getResourceAsStream(sampleHelp);
-        String help = new Streams().readString(is);
-        is.close();
+		ClassLoader cl = getClass().getClassLoader();
+		InputStream is = cl.getResourceAsStream(sampleHelp);
+		String help = new Streams().readString(is);
+		is.close();
 
-        HelpOptionsParser parser = new HelpOptionsParser(System.err,
-                new Utils());
-        Map parsed = parser.getOptionsFromHelp(help);
-        assertEquals("/usr/local/mysql/", parsed.get(MysqldResourceI.BASEDIR));
-        assertEquals("FALSE", parsed.get("bdb"));
-        // assertEquals("(No default value)", parsed.get("time-format"));
-        assertTrue(parsed.containsKey("time_format"));
-        assertEquals("", parsed.get("time_format"));
-    }
+		HelpOptionsParser parser = new HelpOptionsParser(System.err,
+				new Utils());
+		Map parsed = parser.getOptionsFromHelp(help);
+		assertEquals("TRUE", parsed.get("auto-rehash"));
+		// assertEquals("/usr/local/mysql/",
+		// parsed.get(MysqldResourceI.BASEDIR));
+		// assertEquals("FALSE", parsed.get("bdb"));
+		// assertEquals("(No default value)", parsed.get("time-format"));
+		// assertTrue(parsed.containsKey("time_format"));
+		// assertEquals("", parsed.get("time_format"));
+	}
 
-    public void testTrimOptionsErrorMsg() {
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        HelpOptionsParser parser = new HelpOptionsParser(new PrintStream(out),
-                new Utils());
-        Exception expected = null;
-        try {
-            parser.trimToOptions("bogus");
-        } catch (Exception e) {
-            expected = e;
-        }
-        assertNotNull(expected);
-        String errMsg = new String(out.toByteArray());
-        assertTrue(errMsg.indexOf("bogus") >= 0);
-    }
+	public void testTrimOptionsErrorMsg() {
+		ByteArrayOutputStream out = new ByteArrayOutputStream();
+		HelpOptionsParser parser = new HelpOptionsParser(new PrintStream(out),
+				new Utils());
+		Exception expected = null;
+		try {
+			parser.trimToOptions("bogus");
+		} catch (Exception e) {
+			expected = e;
+		}
+		assertNotNull(expected);
+		String errMsg = new String(out.toByteArray());
+		assertTrue(errMsg.indexOf("bogus") >= 0);
+	}
 }
\ No newline at end of file

Modified: trunk/connector-mxj/src/com/mysql/management/MysqldResource.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/MysqldResource.java	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/src/com/mysql/management/MysqldResource.java	2006-01-17 03:19:41 UTC (rev 14)
@@ -345,10 +345,14 @@
         if (osName.indexOf("Win") != -1) {
             osName = "Win";
         }
-        this.osName = osName;
-        this.osArch = osArch;
+        this.osName = stripUnwantedChars(osName);
+        this.osArch = stripUnwantedChars(osArch);
     }
 
+	String stripUnwantedChars(String str) {
+		return str.replace(' ', '_').replace('/', '_').replace('\\', '_');
+	}
+
     /** called from option parser as well */
     synchronized Shell exec(String threadName, Map mysqldArgs,
             PrintStream outStream, PrintStream errStream, boolean withListeners) {

Modified: trunk/connector-mxj/src/com/mysql/management/MysqldResourceI.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/MysqldResourceI.java	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/src/com/mysql/management/MysqldResourceI.java	2006-01-17 03:19:41 UTC (rev 14)
@@ -25,7 +25,7 @@
  */
 public interface MysqldResourceI {
     public static final String PORT = "port";
-    public static final String DEFAULT_VERSION = "5.0.17";
+    public static final String DEFAULT_VERSION = "5.0.18";
     public static final String PID_FILE = "pid-file";
     public static final String BASEDIR = "basedir";
     public static final String DATADIR = "datadir";

Modified: trunk/connector-mxj/src/com/mysql/management/MysqldResourceTest.java
===================================================================
--- trunk/connector-mxj/src/com/mysql/management/MysqldResourceTest.java	2005-12-26 11:59:04 UTC (rev 13)
+++ trunk/connector-mxj/src/com/mysql/management/MysqldResourceTest.java	2006-01-17 03:19:41 UTC (rev 14)
@@ -44,331 +44,345 @@
  */
 public class MysqldResourceTest extends QuietTestCase {
 
-    private MysqldResource mysqldResource;
-    private TestFileUtil fileUtil;
-    private TestUtil testUtil;
-    private Utils utils;
-    private File baseDir;
+	private MysqldResource mysqldResource;
 
-    protected void setUp() {
-        super.setUp();
-        testUtil = new TestUtil();
-        fileUtil = new TestFileUtil();
-        utils = new Utils(fileUtil, new Shell.Factory(), new Streams(),
-                new Threads(), new Str());
+	private TestFileUtil fileUtil;
 
-        baseDir = new File(fileUtil.testDir(), "MRTest");
-        fileUtil.deleteTree(baseDir);
-        if (baseDir.exists()) {
-            warn("residual files");
-        }
+	private TestUtil testUtil;
 
-        mysqldResource = new MysqldResource(baseDir, System.out, System.err,
-                utils);
-        mysqldResource.setKillDelay(10000);
-    }
+	private Utils utils;
 
-    protected void tearDown() {
-        utils.threads().pause(50);
-        try {
-            if (mysqldResource.isRunning()) {
-                mysqldResource.shutdown();
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        fileUtil.deleteTree(baseDir);
-        super.tearDown();
-    }
+	private File baseDir;
 
-    private void setSystemPropertiesToWinNT() {
-        mysqldResource.setOsAndArch("Windows NT", "x86");
-        assertTrue(mysqldResource.isWindows());
-    }
+	protected void setUp() {
+		super.setUp();
+		testUtil = new TestUtil();
+		fileUtil = new TestFileUtil();
+		utils = new Utils(fileUtil, new Shell.Factory(), new Streams(),
+				new Threads(), new Str());
 
-    private void setSytemPropertiesToLinux() {
-        mysqldResource.setOsAndArch("Linux", "i386");
-        assertFalse(mysqldResource.isWindows());
-    }
+		baseDir = new File(fileUtil.testDir(), "MRTest");
+		fileUtil.deleteTree(baseDir);
+		if (baseDir.exists()) {
+			warn("residual files");
+		}
 
-    public void testLaunch() throws Exception {
-        Map args = new HashMap();
-        String port = "" + testUtil.testPort();
-        args.put(MysqldResourceI.PORT, port);
-        String url = "jdbc:mysql://localhost:" + port + "/test";
-        String threadName = "testLaunch";
-        assertFalse("mysqld should not be running", mysqldResource.isRunning());
+		mysqldResource = new MysqldResource(baseDir, System.out, System.err,
+				utils);
+		mysqldResource.setKillDelay(10000);
+	}
 
-        mysqldResource.start(threadName, args);
-        Shell s1 = mysqldResource.getShell();
+	protected void tearDown() {
+		utils.threads().pause(50);
+		try {
+			if (mysqldResource.isRunning()) {
+				mysqldResource.shutdown();
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		fileUtil.deleteTree(baseDir);
+		super.tearDown();
+	}
 
-        /* this asserts the thread starts */
-        assertRunning();
+	private void setSystemPropertiesToWinNT() {
+		mysqldResource.setOsAndArch("Windows NT", "x86");
+		assertTrue(mysqldResource.isWindows());
+	}
 
-        /* pause for mysqld to bind to port */
-        for (int i = 0; i < 100 && !mysqldResource.isReadyForConnections(); i++) {
-            utils.threads().pause(25);
-        }
+	private void setSytemPropertiesToLinux() {
+		mysqldResource.setOsAndArch("Linux", "i386");
+		assertFalse(mysqldResource.isWindows());
+	}
 
-        testUtil.assertConnectViaJDBC(url, true);
-        mysqldResource.start(threadName, args);
-        Shell s2 = mysqldResource.getShell();
-        assertEquals(s1, s2);
-        assertTrue(s1.isDaemon());
-        assertRunningThenShutdown();
-    }
+	public void testLaunch() throws Exception {
+		Map args = new HashMap();
+		String port = "" + testUtil.testPort();
+		args.put(MysqldResourceI.PORT, port);
+		String url = "jdbc:mysql://localhost:" + port + "/test";
+		String threadName = "testLaunch";
+		assertFalse("mysqld should not be running", mysqldResource.isRunning());
 
-    public void testUseDatabase() throws Exception {
-        String url = "jdbc:mysql://localhost:" + testUtil.testPort() + "/test";
-        String threadName = "testLaunch";
-        assertFalse("mysqld should not be running", mysqldResource.isRunning());
+		mysqldResource.start(threadName, args);
+		Shell s1 = mysqldResource.getShell();
 
-        startMysql(threadName);
-        Shell s1 = mysqldResource.getShell();
+		/* this asserts the thread starts */
+		assertRunning();
 
-        /* this asserts the thread starts */
-        assertRunning();
+		/* pause for mysqld to bind to port */
+		for (int i = 0; i < 100 && !mysqldResource.isReadyForConnections(); i++) {
+			utils.threads().pause(25);
+		}
 
-        /* pause for mysqld to bind to port */
-        for (int i = 0; i < 100 && !mysqldResource.isReadyForConnections(); i++) {
-            utils.threads().pause(25);
-        }
+		testUtil.assertConnectViaJDBC(url, true);
+		mysqldResource.start(threadName, args);
+		Shell s2 = mysqldResource.getShell();
+		assertEquals(s1, s2);
+		assertTrue(s1.isDaemon());
+		assertRunningThenShutdown();
+	}
 
-        testUtil.assertConnectViaJDBC(url);
+	public void testUseDatabase() throws Exception {
+		String url = "jdbc:mysql://localhost:" + testUtil.testPort() + "/test";
+		String threadName = "testLaunch";
+		assertFalse("mysqld should not be running", mysqldResource.isRunning());
 
-        mysqldResource.start(threadName, new HashMap());
-        Shell s2 = mysqldResource.getShell();
-        assertEquals(s1, s2);
-        assertTrue(s1.isDaemon());
-        assertRunningThenShutdown();
-    }
+		startMysql(threadName);
+		Shell s1 = mysqldResource.getShell();
 
-    private void startMysql(String threadName) {
-        Map map = new HashMap();
-        map.put(MysqldResourceI.PORT, "" + testUtil.testPort());
-        mysqldResource.start(threadName, map);
-    }
+		/* this asserts the thread starts */
+		assertRunning();
 
-    public void testGetFileName() {
-        File mysqld = mysqldResource.getMysqldFilePointer();
-        assertNotNull(mysqld);
-        String name = mysqld.getPath();
-        assertTrue(name, name.indexOf("mysqld") > 0);
-    }
+		/* pause for mysqld to bind to port */
+		for (int i = 0; i < 100 && !mysqldResource.isReadyForConnections(); i++) {
+			utils.threads().pause(25);
+		}
 
-    public void testWindowsFileName() {
-        setSystemPropertiesToWinNT();
-        String resourceName = mysqldResource.getResourceName();
-        String fileName = mysqldResource.getMysqldFilePointer().getName();
-        assertTrue(resourceName.indexOf("-nt.exe") > 0);
-        assertTrue(fileName.indexOf("-nt.exe") > 0);
-    }
+		testUtil.assertConnectViaJDBC(url);
 
-    private void checkMysqldFile() {
-        File mysqld = mysqldResource.makeMysqld();
-        assertTrue(mysqld.exists());
-        assertTrue(mysqld.length() > 100);
-    }
+		mysqldResource.start(threadName, new HashMap());
+		Shell s2 = mysqldResource.getShell();
+		assertEquals(s1, s2);
+		assertTrue(s1.isDaemon());
+		assertRunningThenShutdown();
+	}
 
-    public void testGetMysqldNative() {
-        checkMysqldFile();
-    }
+	private void startMysql(String threadName) {
+		Map map = new HashMap();
+		map.put(MysqldResourceI.PORT, "" + testUtil.testPort());
+		mysqldResource.start(threadName, map);
+	}
 
-    public void testGetMysqldWinNT() {
-        setSystemPropertiesToWinNT();
-        checkMysqldFile();
-    }
+	public void testGetFileName() {
+		File mysqld = mysqldResource.getMysqldFilePointer();
+		assertNotNull(mysqld);
+		String name = mysqld.getPath();
+		assertTrue(name, name.indexOf("mysqld") > 0);
+	}
 
-    public void testGetMysqldLinux() {
-        setSytemPropertiesToLinux();
-        checkMysqldFile();
-        assertTrue(fileUtil.madeExecutable(mysqldResource
-                .getMysqldFilePointer()));
-    }
+	public void testWindowsFileName() {
+		setSystemPropertiesToWinNT();
+		String resourceName = mysqldResource.getResourceName();
+		String fileName = mysqldResource.getMysqldFilePointer().getName();
+		assertTrue(resourceName.indexOf("-nt.exe") > 0);
+		assertTrue(fileName.indexOf("-nt.exe") > 0);
+	}
 
-    public void testUnknownOs() {
-        mysqldResource.setOsAndArch("bogus", "x86");
-        Exception expected = null;
-        try {
-            mysqldResource.makeMysqld();
-        } catch (MissingResourceException e) {
-            expected = e;
-        }
-        assertNotNull("" + mysqldResource.getMysqldFilePointer(), expected);
-        assertTrue(expected.getMessage().indexOf("bogus") > 0);
-    }
+	public void testUglyPlatformName() {
+		assertEquals("a_b_c_d", mysqldResource.stripUnwantedChars("a b/c\\d"));
+		mysqldResource.setOsAndArch("Bogus OS W/ Spaces", "\\Arch in Space");
+		String resourceName = mysqldResource.getResourceName();
+		assertTrue(resourceName.indexOf(' ') == -1);
+		assertTrue(resourceName.indexOf('\\') == -1);
+		String expected = "Bogus_OS_W__Spaces-_Arch_in_Space";
+		assertTrue(resourceName.indexOf(expected) >= -1);
+	}
 
-    public void testCreateDbFiles() {
-        File dataDir = new File(mysqldResource.getBaseDir(), "test-data");
-        File dbDataDir = new File(dataDir, "mysql");
-        File host_frm = new File(dbDataDir, "host.frm");
-        assertEquals(false, host_frm.exists());
-        assertEquals(false, dataDir.exists());
+	private void checkMysqldFile() {
+		File mysqld = mysqldResource.makeMysqld();
+		assertTrue(mysqld.exists());
+		assertTrue(mysqld.length() > 100);
+	}
 
-        Map args = new HashMap();
-        args.put("datadir", dataDir.getPath());
+	public void testGetMysqldNative() {
+		checkMysqldFile();
+	}
 
-        File data = mysqldResource.dataDir(args);
-        mysqldResource.ensureEssentialFilesExist(data);
-        assertEquals(dataDir, data);
+	public void testGetMysqldWinNT() {
+		setSystemPropertiesToWinNT();
+		checkMysqldFile();
+	}
 
-        assertTrue(host_frm.exists());
-    }
+	public void testGetMysqldLinux() {
+		setSytemPropertiesToLinux();
+		checkMysqldFile();
+		assertTrue(fileUtil.madeExecutable(mysqldResource
+				.getMysqldFilePointer()));
+	}
 
-    private void assertRunningThenShutdown() {
-        assertRunning();
-        mysqldResource.shutdown();
-        assertNotRunning();
-    }
+	public void testUnknownOs() {
+		mysqldResource.setOsAndArch("bogus", "x86");
+		Exception expected = null;
+		try {
+			mysqldResource.makeMysqld();
+		} catch (MissingResourceException e) {
+			expected = e;
+		}
+		assertNotNull("" + mysqldResource.getMysqldFilePointer(), expected);
+		assertTrue(expected.getMessage().indexOf("bogus") > 0);
+	}
 
-    private void assertNotRunning() {
-        for (int i = 0; i < 500; i++) {
-            if (!mysqldResource.isRunning())
-                break;
-            utils.threads().pause(25);
-        }
-        assertFalse("mysqld should not be running", mysqldResource.isRunning());
-    }
+	public void testCreateDbFiles() {
+		File dataDir = new File(mysqldResource.getBaseDir(), "test-data");
+		File dbDataDir = new File(dataDir, "mysql");
+		File host_frm = new File(dbDataDir, "host.frm");
+		assertEquals(false, host_frm.exists());
+		assertEquals(false, dataDir.exists());
 
-    private void assertRunning() {
-        for (int i = 0; i < 500; i++) {
-            if (mysqldResource.isRunning())
-                break;
-            utils.threads().pause(25);
-        }
-        assertTrue("mysqld should be running", mysqldResource.isRunning());
-    }
+		Map args = new HashMap();
+		args.put("datadir", dataDir.getPath());
 
-    public void testServerOptions() {
-        Map optionsMap = mysqldResource.getServerOptions();
-        String expectedBaseDir = mysqldResource.getBaseDir().getPath();
-        assertEquals(expectedBaseDir, optionsMap.get(MysqldResourceI.BASEDIR));
-    }
+		File data = mysqldResource.dataDir(args);
+		mysqldResource.ensureEssentialFilesExist(data);
+		assertEquals(dataDir, data);
 
-    public void testTestReporting() {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        PrintStream captured = new PrintStream(baos);
-        mysqldResource = new MysqldResource(baseDir, captured, captured, utils);
+		assertTrue(host_frm.exists());
+	}
 
-        mysqldResource.reportIfNoPidfile(true);
-        captured.flush();
-        assertEquals("", new String(baos.toByteArray()));
+	private void assertRunningThenShutdown() {
+		assertRunning();
+		mysqldResource.shutdown();
+		assertNotRunning();
+	}
 
-        mysqldResource.reportIfNoPidfile(false);
-        captured.flush();
-        String output = new String(baos.toByteArray());
-        testUtil.assertContainsIgnoreCase(output, "pid-file not found");
-        testUtil.assertContainsIgnoreCase(output, baseDir.toString());
-    }
+	private void assertNotRunning() {
+		for (int i = 0; i < 500; i++) {
+			if (!mysqldResource.isRunning())
+				break;
+			utils.threads().pause(25);
+		}
+		assertFalse("mysqld should not be running", mysqldResource.isRunning());
+	}
 
-    public void testForceKill() {
-        startMysql("killMe");
-        assertTrue(mysqldResource.isRunning());
-        mysqldResource.issueForceKill();
-        assertFalse(mysqldResource.isRunning());
-    }
+	private void assertRunning() {
+		for (int i = 0; i < 500; i++) {
+			if (mysqldResource.isRunning())
+				break;
+			utils.threads().pause(25);
+		}
+		assertTrue("mysqld should be running", mysqldResource.isRunning());
+	}
 
-    public void testDestroyShell() {
-        /** TODO: improve this test */
-        startMysql("DestroyMe");
-        assertTrue(mysqldResource.isRunning());
-        mysqldResource.destroyShell();
-        if (mysqldResource.isRunning()) {
-            new MysqldResource(fileUtil.nullFile()).shutdown();
-        }
-    }
+	public void testServerOptions() {
+		Map optionsMap = mysqldResource.getServerOptions();
+		String expectedBaseDir = mysqldResource.getBaseDir().getPath();
+		assertEquals(expectedBaseDir, optionsMap.get(MysqldResourceI.BASEDIR));
+	}
 
-    public void testVersion() {
-        assertEquals(MysqldResourceI.DEFAULT_VERSION, mysqldResource
-                .getVersion());
-        mysqldResource.setVersion(5, 11, 42);
-        assertEquals("5.11.42", mysqldResource.getVersion());
-    }
+	public void testTestReporting() {
+		ByteArrayOutputStream baos = new ByteArrayOutputStream();
+		PrintStream captured = new PrintStream(baos);
+		mysqldResource = new MysqldResource(baseDir, captured, captured, utils);
 
-    public void testNoPidFile() {
-        assertEquals(mysqldResource.pid(), "No PID");
-        startMysql("pid file");
-        assertTrue(Integer.parseInt(mysqldResource.pid()) > 0);
-    }
+		mysqldResource.reportIfNoPidfile(true);
+		captured.flush();
+		assertEquals("", new String(baos.toByteArray()));
 
-    public void testTestFinalize() throws Throwable {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        PrintStream captured = new PrintStream(baos);
+		mysqldResource.reportIfNoPidfile(false);
+		captured.flush();
+		String output = new String(baos.toByteArray());
+		testUtil.assertContainsIgnoreCase(output, "pid-file not found");
+		testUtil.assertContainsIgnoreCase(output, baseDir.toString());
+	}
 
-        mysqldResource = new MysqldResource(fileUtil.testDir(), captured,
-                captured, utils);
-        mysqldResource.finalize();
-        captured.flush();
-        String output = new String(baos.toByteArray());
-        assertEquals("", output);
+	public void testForceKill() {
+		startMysql("killMe");
+		assertTrue(mysqldResource.isRunning());
+		mysqldResource.issueForceKill();
+		assertFalse(mysqldResource.isRunning());
+	}
 
-        PrintStream devNull = new NullPrintStream();
-        String[] none = new String[0];
-        mysqldResource.setShell(new Shell.Default(none, "bogus", devNull,
-                devNull));
+	public void testDestroyShell() {
+		/** TODO: improve this test */
+		startMysql("DestroyMe");
+		assertTrue(mysqldResource.isRunning());
+		mysqldResource.destroyShell();
+		if (mysqldResource.isRunning()) {
+			new MysqldResource(fileUtil.nullFile()).shutdown();
+		}
+	}
 
-        mysqldResource.finalize();
-        captured.flush();
-        output = new String(baos.toByteArray());
-        testUtil.assertContainsIgnoreCase(output, "MysqldResource.initTrace");
-    }
+	public void testVersion() {
+		assertEquals(MysqldResourceI.DEFAULT_VERSION, mysqldResource
+				.getVersion());
+		mysqldResource.setVersion(5, 11, 42);
+		assertEquals("5.11.42", mysqldResource.getVersion());
+	}
 
-    public void testUsage() {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        PrintStream captured = new PrintStream(baos);
-        TeeOutputStream newOut = new TeeOutputStream(System.out, captured);
-        PrintStream stdout = System.out;
-        System.setOut(new PrintStream(newOut));
-        try {
-            MysqldResource.main(new String[] { "--help" });
-        } finally {
-            System.setOut(stdout);
-        }
-        assertTrue(baos.toString().indexOf("Usage") >= 0);
-    }
+	public void testNoPidFile() {
+		assertEquals(mysqldResource.pid(), "No PID");
+		startMysql("pid file");
+		assertTrue(Integer.parseInt(mysqldResource.pid()) > 0);
+	}
 
-    public void testJarName() {
-        setSystemPropertiesToWinNT();
-        assertEquals("win_share_dir.jar", mysqldResource.shareJar());
-        setSytemPropertiesToLinux();
-        assertEquals("share_dir.jar", mysqldResource.shareJar());
-    }
+	public void testTestFinalize() throws Throwable {
+		ByteArrayOutputStream baos = new ByteArrayOutputStream();
+		PrintStream captured = new PrintStream(baos);
 
-    public void testValidBaseDir() throws Exception {
-        File defaultBaseDir = fileUtil.tmp("mysql-c.mxj");
-        assertEquals(defaultBaseDir, mysqldResource.validBaseDir(null));
-        assertEquals(defaultBaseDir, mysqldResource.validBaseDir(fileUtil
-                .nullFile()));
-        
-        File foo = new File(fileUtil.testDir(), "junkFile.txt");
-        foo.deleteOnExit();
-        FileOutputStream fos = new FileOutputStream(foo);
-        PrintStream ps = new PrintStream(fos);
-        ps.println("junk");
-        ps.close();
+		mysqldResource = new MysqldResource(fileUtil.testDir(), captured,
+				captured, utils);
+		mysqldResource.finalize();
+		captured.flush();
+		String output = new String(baos.toByteArray());
+		assertEquals("", output);
 
-        IllegalArgumentException iae = null;
-        try {
-            mysqldResource.validBaseDir(foo);
-        } catch (IllegalArgumentException e) {
-            iae = e;
-        }
-        assertNotNull(iae);
-        testUtil.assertContainsIgnoreCase(iae.getMessage(), "directory");
-    }
+		PrintStream devNull = new NullPrintStream();
+		String[] none = new String[0];
+		mysqldResource.setShell(new Shell.Default(none, "bogus", devNull,
+				devNull));
 
-    // -------------------
-    private static class TestFileUtil extends Files {
-        private List execFiles = new ArrayList();
+		mysqldResource.finalize();
+		captured.flush();
+		output = new String(baos.toByteArray());
+		testUtil.assertContainsIgnoreCase(output, "MysqldResource.initTrace");
+	}
 
-        public void addExecutableRights(File mysqld, PrintStream out,
-                PrintStream err) {
-            execFiles.add(mysqld);
-            super.addExecutableRights(mysqld, out, err);
-        }
+	public void testUsage() {
+		ByteArrayOutputStream baos = new ByteArrayOutputStream();
+		PrintStream captured = new PrintStream(baos);
+		TeeOutputStream newOut = new TeeOutputStream(System.out, captured);
+		PrintStream stdout = System.out;
+		System.setOut(new PrintStream(newOut));
+		try {
+			MysqldResource.main(new String[] { "--help" });
+		} finally {
+			System.setOut(stdout);
+		}
+		assertTrue(baos.toString().indexOf("Usage") >= 0);
+	}
 
-        public boolean madeExecutable(File file) {
-            return execFiles.contains(file);
-        }
-    }
+	public void testJarName() {
+		setSystemPropertiesToWinNT();
+		assertEquals("win_share_dir.jar", mysqldResource.shareJar());
+		setSytemPropertiesToLinux();
+		assertEquals("share_dir.jar", mysqldResource.shareJar());
+	}
+
+	public void testValidBaseDir() throws Exception {
+		File defaultBaseDir = fileUtil.tmp("mysql-c.mxj");
+		assertEquals(defaultBaseDir, mysqldResource.validBaseDir(null));
+		assertEquals(defaultBaseDir, mysqldResource.validBaseDir(fileUtil
+				.nullFile()));
+
+		File foo = new File(fileUtil.testDir(), "junkFile.txt");
+		foo.deleteOnExit();
+		FileOutputStream fos = new FileOutputStream(foo);
+		PrintStream ps = new PrintStream(fos);
+		ps.println("junk");
+		ps.close();
+
+		IllegalArgumentException expected = null;
+		try {
+			mysqldResource.validBaseDir(foo);
+		} catch (IllegalArgumentException e) {
+			expected = e;
+		}
+		assertNotNull(expected);
+		testUtil.assertContainsIgnoreCase(expected.getMessage(), "directory");
+	}
+
+	// -------------------
+	private static class TestFileUtil extends Files {
+		private List execFiles = new ArrayList();
+
+		public void addExecutableRights(File mysqld, PrintStream out,
+				PrintStream err) {
+			execFiles.add(mysqld);
+			super.addExecutableRights(mysqld, out, err);
+		}
+
+		public boolean madeExecutable(File file) {
+			return execFiles.contains(file);
+		}
+	}
 }
\ No newline at end of file

Thread
Connector/MXJ commit: r14 - in trunk/connector-mxj: . commercial commercial/4-1-13 commercial/5-0-16 commercial/5-0-17 commercial/5-0-18 commercial/5-...eherman17 Jan