1# The include statement below is a temp one for tests that are yet to
2#be ported to run with InnoDB,
3#but needs to be kept for tests that would need MyISAM in future.
4--source include/force_myisam_default.inc
5
6#
7# Run the Cluster/J JPA JUnit tests from MTR
8#
9--source include/have_ndb.inc
10--source include/have_big5.inc
11--source include/have_utf8.inc
12--source include/have_sjis.inc
13--source include/not_embedded.inc
14--source suite/ndb/include/have_clusterj.inc
15--source suite/ndb/include/have_clusterj_jpa.inc
16--source suite/ndb/include/have_openjpa.inc
17--source suite/ndb/include/have_connectorj.inc
18--source suite/ndb/include/have_java.inc
19
20# workaround for http://issues.apache.org/jira/browse/OPENJPA-1224
21# OpenJPA MySQL BigDecimal ignoring Precision/Scale column Annotation when generating tables
22# fixed in only 1.3.0 and 2.0.0
23
24drop table if exists decimaltypes;
25create table decimaltypes (
26 id int not null primary key,
27 decimal_null_hash decimal(10,5),
28 decimal_null_btree decimal(10,5),
29 decimal_null_both decimal(10,5),
30 decimal_null_none decimal(10,5)
31) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
32
33--let JAVA_CLASSPATH=$CLUSTERJ_JPA_JAR
34--let JAVA_CLASSPATH_1=$CLUSTERJ_JPA_TEST_JAR
35--let JAVA_CLASSPATH_2=$CLUSTERJ_TEST_JAR
36# MTR_CLASSPATH automatically added to JAVA_CLASSPATH
37--let JAVA_JVM_OPTS= -ea -Xcheck:jni -Dclusterj.properties=$MYSQLTEST_VARDIR/tmp/clusterj.properties
38--let JAVA_JVM_OPTS_1= -Djava.library.path="$NDBCLIENT_LIB_DIR"
39--let JAVA_JVM_OPTS_2= -Dopenjpa.ConnectionDriverName="com.mysql.jdbc.Driver"
40--let JAVA_JVM_OPTS_3= -Dopenjpa.ConnectionURL="jdbc:mysql://localhost:$MASTER_MYPORT/test" -Dopenjpa.ConnectionUserName="root"
41--let JAVA_JVM_OPTS_4= -Dopenjpa.ndb.connectString="$NDB_CONNECTSTRING"
42--let JAVA_JVM_OPTS_5= -Dcom.mysql.clusterj.jpa.PersistenceUnit="enhance"
43--let JAVA_JVM_OPTS_6= -Dopenjpa.jdbc.SynchronizeMappings="buildSchema(ForeignKeys=true,SchemaAction='add,deleteTableContents')"
44--let JAVA_JVM_OPTS_7= -Dopenjpa.jdbc.DBDictionary="mysql(TableType=ndbcluster)"
45--let JAVA_CLASS= testsuite.clusterj.AllTests
46--let JAVA_ARGUMENTS= $CLUSTERJ_JPA_TEST_JAR
47
48--source suite/ndb/include/run_java.inc
49
50drop table if exists T_Basic;
51drop table if exists longlongstringpk;
52drop table if exists charsetlatin1;
53drop table if exists longintstringpk;
54drop table if exists longlongstringfk;
55drop table if exists longintstringfk;
56drop table if exists a;
57drop table if exists b0;
58drop table if exists blobtypes;
59drop table if exists decimaltypes;
60drop table if exists bigintegertypes;
61drop table if exists timestamptypes;
62drop table if exists timetypes;
63drop table if exists datetypes;
64drop table if exists datetimetypes;
65drop table if exists OPENJPA_SEQUENCE_TABLE;
66drop table if exists shortpk;
67drop table if exists bytepk;
68
69exit;
70