From: Eric Bollengier Date: Tue, 23 Feb 2010 17:04:46 +0000 (+0100) Subject: Fix problem with MySQL with big Base jobs (temporary fix for 5.0.1) X-Git-Tag: Release-5.0.1~3^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=13cd6e25d5a87db2df5322e17cc1af91c6a8f98c;p=bacula%2Fbacula Fix problem with MySQL with big Base jobs (temporary fix for 5.0.1) --- diff --git a/bacula/src/cats/sql_create.c b/bacula/src/cats/sql_create.c index a106fe888e..ae1affbfb6 100644 --- a/bacula/src/cats/sql_create.c +++ b/bacula/src/cats/sql_create.c @@ -1237,6 +1237,15 @@ bool db_create_base_file_list(JCR *jcr, B_DB *mdb, char *jobids) if (!db_sql_query(mdb, mdb->cmd, NULL, NULL)) { goto bail_out; } + /* Quick and dirty fix for MySQL and Bacula 5.0.1 */ +#ifdef HAVE_MYSQL + Mmsg(mdb->cmd, + "CREATE INDEX basefile%lld_idx ON basefile%lld (Path(255), Name(255))", + (uint64_t) jcr->JobId, (uint64_t) jcr->JobId); + if (!db_sql_query(mdb, mdb->cmd, NULL, NULL)) { + goto bail_out; + } +#endif Mmsg(buf, select_recent_version[db_type], jobids, jobids); Mmsg(mdb->cmd, "CREATE TEMPORARY TABLE new_basefile%lld AS "