Hi,
24.09.2007 14:53,, Kern Sibbald wrote::
> Hello,
>
> On Monday 24 September 2007 13:57, Chris Howells wrote:
>> Kern Sibbald wrote:
>>> 4. The errors you guys are seeing is because batch insert is turned on
Again, it may be turned on, but the config.out told me it was off.
This might be a misunderstanding on my part, as I don't know if
FreeBSDs ports mechanism leaves the config.log lying around, so it
might be an artifact of an earlier install.
>>> but something went wrong in creating the batch table. I suspect that you
>>> have not setup the correct permissions on MySQL that allows the user you
>>> are running with (normally "bacula") to create tables. However, if that
>>> is the case, there *should* be an error message that is printed -- I
>>> don't imagine that error path has been tested though. Something to be
>>> investigated more.
>> I had a problem with bacula backups failing with a similar error. I
>> eventually debugged it to be a problem with MySQL not allowing the
>> creation of temporary tables. So 'CREATE TABLE blah' worked, but 'CREATE
>> TEMPORARY TABLE blah' didn't. Very weird I thought!
>
> Yes, more fine grained than I would have expected.
In my case - or rather, my customers - I just ensured that I could do
the following:
lehmann$xxx [~] mysql -u bacula -p bacula
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 160929
Server version: 5.1.21-beta FreeBSD port: mysql-server-5.1.21
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create temporary table test_xxx(id int unsigned);
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
lehmann$xxx [~]
Which seems a good indication that the bacula user may create
temporary tables.
...
>
> This pretty much confirms that most of the problems are probably due to MySQL
> (or OS) misconfiguration.
Well, not in this case :-(
> I'm still concerned about the lack of decent
> error messages for the create temp table failure, which appears to be a
> Bacula problem ...
Could it be this function:
bool my_batch_start(JCR *jcr, B_DB *mdb)
{
bool ok;
db_lock(mdb);
ok = db_sql_query(mdb,
" CREATE TEMPORARY TABLE batch "
" (fileindex integer, "
" jobid integer, "
" path blob, "
" name blob, "
" lstat tinyblob, "
" md5 tinyblob) ",NULL, NULL);
db_unlock(mdb);
return ok;
}
from cats/sql_create.c
No explicit error checking here. In the places it's called, I see
error checking and I notice that at debug level 100 the creation of
the batch table should be logged.
I would thus suggest to run the DIR with logging at level >= 100 and
tracing enabled, and then see if it tries to create the batch table,
and what it reports about it.
By the way - the code above is from the current svn repository,
version 5635.
Let's see if we can analyze this...
Arno
> Many thanks.
>
> Kern
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Bacula-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel
--
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel