empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franci...@apache.org
Subject svn commit: r1070218 - /incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
Date Sun, 13 Feb 2011 12:11:52 GMT
Author: francisdb
Date: Sun Feb 13 12:11:52 2011
New Revision: 1070218

URL: http://svn.apache.org/viewvc?rev=1070218&view=rev
Log:
EMPIREDB-101 Create DDL Script on MySQL should state CREATE DATABASE IF NOT EXISTS

Modified:
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java?rev=1070218&r1=1070217&r2=1070218&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
Sun Feb 13 12:11:52 2011
@@ -462,7 +462,7 @@ public class DBDatabaseDriverMySQL exten
             if (StringUtils.isValid(databaseName)==false)
                 return error(Errors.InvalidProperty, "databaseName");
             // Create Database
-            script.addStmt("CREATE DATABASE " + databaseName + " CHARACTER SET " + characterSet);
+            script.addStmt("CREATE DATABASE IF NOT EXISTS " + databaseName + " CHARACTER
SET " + characterSet);
             script.addStmt("USE " + databaseName);
             // appendDDLStmt(db, "SET DATEFORMAT ymd", buf);
             // Sequence Table



Mime
View raw message