From e90ad7f666de54ac3cc68485b1a3715fb920930b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 10 Apr 2010 12:16:58 +0200 Subject: [PATCH] Revert "First version of Ingres Batch Insert code." This reverts commit 65e9ccf4e2ede3aed10c5f769e3f86544143a8d2. --- bacula/src/cats/ingres.c | 48 ++++++++-------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/bacula/src/cats/ingres.c b/bacula/src/cats/ingres.c index 3f82cc32c2..1d307167a3 100755 --- a/bacula/src/cats/ingres.c +++ b/bacula/src/cats/ingres.c @@ -656,56 +656,26 @@ bail_out: } #ifdef HAVE_BATCH_FILE_INSERT + int my_ingres_batch_start(JCR *jcr, B_DB *mdb) { - bool ok; - - db_lock(mdb); - ok = db_sql_query(mdb, - "DECLARE GLOBAL TEMPORARY TABLE batch (" - "FileIndex integer," - "JobId integer," - "Path varchar(256)," - "Name varchar(256)," - "LStat varchar(256)," - "MD5 varchar(256))" - " ON COMMIT PRESERVE ROWS WITH NORECOVERY",NULL, NULL); - db_unlock(mdb); - return ok; + //TODO! + return ING_ERROR; } +/* set error to something to abort operation */ int my_ingres_batch_end(JCR *jcr, B_DB *mdb, const char *error) { - if (mdb) { - mdb->status = 0; - } - return true; + //TODO! + return ING_ERROR; } int my_ingres_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) { - size_t len; - const char *digest; - char ed1[50]; - - mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1); - db_escape_string(jcr, mdb, mdb->esc_name, mdb->fname, mdb->fnl); - - mdb->esc_path = check_pool_memory_size(mdb->esc_path, mdb->pnl*2+1); - db_escape_string(jcr, mdb, mdb->esc_path, mdb->path, mdb->pnl); - - if (ar->Digest == NULL || ar->Digest[0] == 0) { - digest = "0"; - } else { - digest = ar->Digest; - } - - len = Mmsg(mdb->cmd, "INSERT INTO batch VALUES (%u,%s,'%s','%s','%s','%s')", - ar->FileIndex, edit_int64(ar->JobId,ed1), mdb->esc_path, - mdb->esc_name, ar->attr, digest); - - return INSERT_DB(jcr, mdb, mdb->cmd); + //TODO! + return ING_ERROR; } + #endif /* HAVE_BATCH_FILE_INSERT */ /* -- 2.39.5