summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
index 675b170..4198bfc 100644
--- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
@@ -2182,18 +2182,18 @@ void tst_QSqlDatabase::oci_synonymstest()
QSqlQuery q(db);
QString creator(qTableName("CREATOR")), appuser(qTableName("APPUSER")), table1(qTableName("TABLE1"));
// QVERIFY_SQL(q, exec("drop public synonym "+table1));
- QVERIFY_SQL(q, exec(QLatin1String("create user "+creator+" identified by "+creator+" default tablespace users temporary tablespace temp")));
- QVERIFY_SQL(q, exec(QLatin1String("grant CONNECT to "+creator)));
- QVERIFY_SQL(q, exec(QLatin1String("grant RESOURCE to "+creator)));
+ QVERIFY_SQL(q, exec(QString("create user %1 identified by %2 default tablespace users temporary tablespace temp").arg(creator).arg(creator)));
+ QVERIFY_SQL(q, exec(QString("grant CONNECT to %1").arg(creator)));
+ QVERIFY_SQL(q, exec(QString("grant RESOURCE to %1").arg(creator)));
QSqlDatabase db2=db.cloneDatabase(db, QLatin1String("oci_synonymstest"));
db2.close();
QVERIFY_SQL(db2, open(creator,creator));
QSqlQuery q2(db2);
- QVERIFY_SQL(q2, exec("create table "+table1+"(id int primary key)"));
- QVERIFY_SQL(q, exec(QLatin1String("create user "+appuser+" identified by "+appuser+" default tablespace users temporary tablespace temp")));
- QVERIFY_SQL(q, exec(QLatin1String("grant CREATE ANY SYNONYM to "+appuser)));
- QVERIFY_SQL(q, exec(QLatin1String("grant CONNECT to "+appuser)));
- QVERIFY_SQL(q2, exec(QLatin1String("grant select, insert, update, delete on "+table1+" to "+appuser)));
+ QVERIFY_SQL(q2, exec(QString("create table %1(id int primary key)").arg(table1)));
+ QVERIFY_SQL(q, exec(QString("create user %1 identified by %2 default tablespace users temporary tablespace temp").arg(appuser).arg(appuser)));
+ QVERIFY_SQL(q, exec(QString("grant CREATE ANY SYNONYM to %1").arg(appuser)));
+ QVERIFY_SQL(q, exec(QString("grant CONNECT to %1").arg(appuser)));
+ QVERIFY_SQL(q2, exec(QString("grant select, insert, update, delete on %1 to %2").arg(table1).arg(appuser)));
QSqlDatabase db3=db.cloneDatabase(db, QLatin1String("oci_synonymstest2"));
db3.close();
QVERIFY_SQL(db3, open(appuser,appuser));