Changed MySql engines to all be InnoDB
InnoDB is the only option for transactional tables in MySql. This change makes all the table definitions consistent (there previously were a few that were MyISAM). BATCH-2373
This commit is contained in:
@@ -80,7 +80,7 @@ CREATE TABLE BATCH_STEP_EXECUTION_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=MYISAM;
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO BATCH_STEP_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_STEP_EXECUTION_SEQ);
|
||||
|
||||
@@ -88,7 +88,7 @@ CREATE TABLE BATCH_JOB_EXECUTION_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=MYISAM;
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO BATCH_JOB_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_EXECUTION_SEQ);
|
||||
|
||||
@@ -96,6 +96,6 @@ CREATE TABLE BATCH_JOB_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=MYISAM;
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO BATCH_JOB_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_SEQ);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#macro (sequence $name $value)CREATE TABLE ${name} (ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint ${name}_UN unique (UNIQUE_KEY)) ENGINE=MYISAM;
|
||||
constraint ${name}_UN unique (UNIQUE_KEY)) ENGINE=InnoDB;
|
||||
INSERT INTO ${name} (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from ${name});
|
||||
#end
|
||||
#macro (notnull $name $type)MODIFY COLUMN ${name} ${type} NOT NULL#end
|
||||
|
||||
@@ -86,11 +86,11 @@ CREATE SEQUENCE BATCH_JOB_SEQ;</programlisting>
|
||||
<para>Many database vendors don't support sequences. In these cases,
|
||||
work-arounds are used, such as the following for MySQL:</para>
|
||||
|
||||
<programlisting language="sql">CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID BIGINT NOT NULL) type=MYISAM;
|
||||
<programlisting language="sql">CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID BIGINT NOT NULL) type=InnoDB;
|
||||
INSERT INTO BATCH_STEP_EXECUTION_SEQ values(0);
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID BIGINT NOT NULL) type=MYISAM;
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID BIGINT NOT NULL) type=InnoDB;
|
||||
INSERT INTO BATCH_JOB_EXECUTION_SEQ values(0);
|
||||
CREATE TABLE BATCH_JOB_SEQ (ID BIGINT NOT NULL) type=MYISAM;
|
||||
CREATE TABLE BATCH_JOB_SEQ (ID BIGINT NOT NULL) type=InnoDB;
|
||||
INSERT INTO BATCH_JOB_SEQ values(0);</programlisting>
|
||||
|
||||
<para>In the above case, a table is used in place of each sequence. The
|
||||
|
||||
Reference in New Issue
Block a user