From 8a72d9ff9fd6d4648aa6ffc4fcdc06c2f842a241 Mon Sep 17 00:00:00 2001 From: Eduard von Feek Date: Fri, 23 Aug 2013 18:35:57 +0200 Subject: [PATCH] * changed keyword from "type" to "engine" * changed from MyISAM to InnoDB * fixed property "platform" from "oracle10g" to "mysql" --- .../batch/core/schema-mysql.sql | 6 +++--- .../src/main/sql/mysql.properties | 6 +++--- spring-batch-core/src/main/sql/mysql.vpp | 2 +- .../main/resources/business-schema-mysql.sql | 21 ++++++++++--------- .../src/main/sql/mysql.properties | 4 ++-- spring-batch-samples/src/main/sql/mysql.vpp | 2 +- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-mysql.sql b/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-mysql.sql index 8af26c229..5d24ab343 100644 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-mysql.sql +++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-mysql.sql @@ -76,9 +76,9 @@ CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ENGINE=InnoDB; -CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID BIGINT NOT NULL) ENGINE=MYISAM; +CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID BIGINT NOT NULL) ENGINE=InnoDB; INSERT INTO BATCH_STEP_EXECUTION_SEQ values(0); -CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID BIGINT NOT NULL) ENGINE=MYISAM; +CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID BIGINT NOT NULL) ENGINE=InnoDB; INSERT INTO BATCH_JOB_EXECUTION_SEQ values(0); -CREATE TABLE BATCH_JOB_SEQ (ID BIGINT NOT NULL) ENGINE=MYISAM; +CREATE TABLE BATCH_JOB_SEQ (ID BIGINT NOT NULL) ENGINE=InnoDB; INSERT INTO BATCH_JOB_SEQ values(0); diff --git a/spring-batch-core/src/main/sql/mysql.properties b/spring-batch-core/src/main/sql/mysql.properties index 470ca6bc1..9dc34ec8e 100644 --- a/spring-batch-core/src/main/sql/mysql.properties +++ b/spring-batch-core/src/main/sql/mysql.properties @@ -1,8 +1,8 @@ -platform=oracle10g +platform=mysql # SQL language oddities BIGINT = BIGINT -IDENTITY = -GENERATED = +IDENTITY = +GENERATED = VOODOO = ENGINE=InnoDB IFEXISTSBEFORE = IF EXISTS DOUBLE = DOUBLE PRECISION diff --git a/spring-batch-core/src/main/sql/mysql.vpp b/spring-batch-core/src/main/sql/mysql.vpp index fd65fad6e..b9d80b890 100644 --- a/spring-batch-core/src/main/sql/mysql.vpp +++ b/spring-batch-core/src/main/sql/mysql.vpp @@ -1,4 +1,4 @@ -#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT NOT NULL) ENGINE=MYISAM; +#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT NOT NULL) ENGINE=InnoDB; INSERT INTO ${name} values(0); #end #macro (notnull $name $type)MODIFY COLUMN ${name} ${type} NOT NULL#end diff --git a/spring-batch-samples/src/main/resources/business-schema-mysql.sql b/spring-batch-samples/src/main/resources/business-schema-mysql.sql index 99fd85c65..7f098b787 100644 --- a/spring-batch-samples/src/main/resources/business-schema-mysql.sql +++ b/spring-batch-samples/src/main/resources/business-schema-mysql.sql @@ -1,4 +1,5 @@ -- Autogenerated: do not edit this file +-- You might need to remove this section the first time you run against a clean database DROP TABLE IF EXISTS BATCH_STAGING_SEQ ; DROP TABLE IF EXISTS TRADE_SEQ ; DROP TABLE IF EXISTS CUSTOMER_SEQ ; @@ -12,11 +13,11 @@ DROP TABLE IF EXISTS ERROR_LOG ; -- Autogenerated: do not edit this file -CREATE TABLE CUSTOMER_SEQ (ID BIGINT NOT NULL) type=MYISAM; +CREATE TABLE CUSTOMER_SEQ (ID BIGINT NOT NULL) engine=InnoDB; INSERT INTO CUSTOMER_SEQ values(5); -CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT NOT NULL) type=MYISAM; +CREATE TABLE BATCH_STAGING_SEQ (ID BIGINT NOT NULL) engine=InnoDB; INSERT INTO BATCH_STAGING_SEQ values(0); -CREATE TABLE TRADE_SEQ (ID BIGINT NOT NULL) type=MYISAM; +CREATE TABLE TRADE_SEQ (ID BIGINT NOT NULL) engine=InnoDB; INSERT INTO TRADE_SEQ values(0); CREATE TABLE BATCH_STAGING ( @@ -24,7 +25,7 @@ CREATE TABLE BATCH_STAGING ( JOB_ID BIGINT NOT NULL, VALUE BLOB NOT NULL, PROCESSED CHAR(1) NOT NULL -) type=InnoDB; +) engine=InnoDB; CREATE TABLE TRADE ( ID BIGINT NOT NULL PRIMARY KEY , @@ -33,14 +34,14 @@ CREATE TABLE TRADE ( QUANTITY BIGINT , PRICE DECIMAL(8,2) , CUSTOMER VARCHAR(45) -) type=InnoDB; +) engine=InnoDB; CREATE TABLE CUSTOMER ( ID BIGINT NOT NULL PRIMARY KEY , VERSION BIGINT , NAME VARCHAR(45) , CREDIT DECIMAL(10,2) -) type=InnoDB; +) engine=InnoDB; INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (1, 0, 'customer1', 100000); INSERT INTO CUSTOMER (ID, VERSION, NAME, CREDIT) VALUES (2, 0, 'customer2', 100000); @@ -54,7 +55,7 @@ CREATE TABLE PLAYERS ( POS VARCHAR(10) , YEAR_OF_BIRTH BIGINT NOT NULL, YEAR_DRAFTED BIGINT NOT NULL -) type=InnoDB; +) engine=InnoDB; CREATE TABLE GAMES ( PLAYER_ID CHAR(8) NOT NULL, @@ -72,7 +73,7 @@ CREATE TABLE GAMES ( RECEPTIONS BIGINT , RECEPTIONS_YARDS BIGINT , TOTAL_TD BIGINT -) type=InnoDB; +) engine=InnoDB; CREATE TABLE PLAYER_SUMMARY ( ID CHAR(8) NOT NULL, @@ -87,10 +88,10 @@ CREATE TABLE PLAYER_SUMMARY ( RECEPTIONS BIGINT NOT NULL , RECEPTIONS_YARDS BIGINT NOT NULL , TOTAL_TD BIGINT NOT NULL -) type=InnoDB; +) engine=InnoDB; CREATE TABLE ERROR_LOG ( JOB_NAME CHAR(20) , STEP_NAME CHAR(20) , MESSAGE VARCHAR(300) NOT NULL -) type=InnoDB; +) engine=InnoDB; diff --git a/spring-batch-samples/src/main/sql/mysql.properties b/spring-batch-samples/src/main/sql/mysql.properties index 763b6442f..e498ef01b 100644 --- a/spring-batch-samples/src/main/sql/mysql.properties +++ b/spring-batch-samples/src/main/sql/mysql.properties @@ -1,9 +1,9 @@ -platform=oracle10g +platform=mysql # SQL language oddities BIGINT = BIGINT IDENTITY = GENERATED = -VOODOO = type=InnoDB +VOODOO = engine=InnoDB IFEXISTSBEFORE = IF EXISTS DOUBLE = DOUBLE PRECISION DECIMAL = DECIMAL diff --git a/spring-batch-samples/src/main/sql/mysql.vpp b/spring-batch-samples/src/main/sql/mysql.vpp index 9897be54e..cd2e6103d 100644 --- a/spring-batch-samples/src/main/sql/mysql.vpp +++ b/spring-batch-samples/src/main/sql/mysql.vpp @@ -1,3 +1,3 @@ -#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT NOT NULL) type=MYISAM; +#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT NOT NULL) engine=InnoDB; INSERT INTO ${name} values(${value}); #end