Mailing List Archive

hotcopy not working with MariaDB
Hello,

I would like to backup our Trac 1.2.5 installation with the following
command:

sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup

I get the following result:

*Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'system WHERE name = 'trachours.db_version'' at
line 1")*

We have the following setup:

Trac 1.2.5
Database: MariaDB
Host: Ubuntu 20.04

Does anyone have an idea of how to solve this?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/337044f1-75f0-4870-906f-527209001eb0n%40googlegroups.com.
Re: hotcopy not working with MariaDB [ In reply to ]
Hi Andreas,

best guess here is that your db version doesnt work with the code. I guess
it would be helpful for the devs if you provide the mariadb version you are
running on the machine.
If i remember correct mariadb had some changes from 10.3 to a higher
version regarding syntax.

cheers

Markus

Am Mi., 6. März 2024 um 14:28 Uhr schrieb Andreas <muffelmuff@gmail.com>:

> Hello,
>
> I would like to backup our Trac 1.2.5 installation with the following
> command:
>
> sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup
>
> I get the following result:
>
> *Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'system WHERE name = 'trachours.db_version'' at
> line 1")*
>
> We have the following setup:
>
> Trac 1.2.5
> Database: MariaDB
> Host: Ubuntu 20.04
>
> Does anyone have an idea of how to solve this?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to trac-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/trac-users/337044f1-75f0-4870-906f-527209001eb0n%40googlegroups.com
> <https://groups.google.com/d/msgid/trac-users/337044f1-75f0-4870-906f-527209001eb0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osO%3Dy06hte_VGjznVGcEVLZnHVRbW%3DHXnMRdVhQm4TEjKDg%40mail.gmail.com.
Re: hotcopy not working with MariaDB [ In reply to ]
On Wed, Mar 6, 2024 at 10:28?PM Andreas <muffelmuff@gmail.com> wrote:
> I would like to backup our Trac 1.2.5 installation with the following command:
>
> sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup
>
>
> I get the following result:
>
> Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'system WHERE name = 'trachours.db_version''
^^^^^^^^^
> at line 1")

That is an issue of TracHoursPlugin, not Trac. Please report it to
maintainers of the plugin.


--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaifTcZsdarQER2tMYPMhcNM6E0AJBDjjAuw_np09gAwBA%40mail.gmail.com.
Re: hotcopy not working with MariaDB [ In reply to ]
On Wednesday, March 6, 2024 at 5:48:04?AM UTC-8 Jun Omae wrote:

On Wed, Mar 6, 2024 at 10:28?PM Andreas <muffe...@gmail.com> wrote:
> I would like to backup our Trac 1.2.5 installation with the following
command:
>
> sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup
>
>
> I get the following result:
>
> Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'system WHERE name = 'trachours.db_version''
^^^^^^^^^
> at line 1")

That is an issue of TracHoursPlugin, not Trac. Please report it to
maintainers of the plugin.


I believe the issue may have been fixed:
https://trac-hacks.org/changeset/16795

So it's possible upgrading TracHours to the latest trunk version will
resolve the issue.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a0259e19-64c8-43da-97cd-33cfaf2f1d5an%40googlegroups.com.
Re: hotcopy not working with MariaDB [ In reply to ]
On Fri, Mar 8, 2024 at 3:08?AM RjOllos <rjollos@gmail.com> wrote:
>
> On Wednesday, March 6, 2024 at 5:48:04?AM UTC-8 Jun Omae wrote:
>
> On Wed, Mar 6, 2024 at 10:28?PM Andreas <muffe...@gmail.com> wrote:
> > I would like to backup our Trac 1.2.5 installation with the following command:
> >
> > sudo trac-admin /var/lib/trac/prod hotcopy /var/lib/trac/prod_backup
> >
> >
> > I get the following result:
> >
> > Fehler: ProgrammingError: (1064, "You have an error in your SQL syntax;
> > check the manual that corresponds to your MySQL server version for the
> > right syntax to use near 'system WHERE name = 'trachours.db_version''
> ^^^^^^^^^
> > at line 1")
>
> That is an issue of TracHoursPlugin, not Trac. Please report it to
> maintainers of the plugin.
>
>
> I believe the issue may have been fixed:
> https://trac-hacks.org/changeset/16795
>
> So it's possible upgrading TracHours to the latest trunk version will resolve the issue.

The issue is caused by SYSTEM became a reserved word in MySQL 8 and
MariaDB 10.3.
Could you please try attached patch?

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMajc3h9ePn9oKsf4O5wOzgDAk-ewTtLUwvN0UBCZnN3-LQ%40mail.gmail.com.