On Mon, Sep 3, 2018 at 7:31 PM Mingxing Tian <tianterre...@gmail.com> wrote:

> RjOllos於 2018年9月4日星期二 UTC+8上午10時00分41秒寫道:
>
>>
>> On Monday, September 3, 2018 at 6:58:08 PM UTC-7, Mingxing Tian wrote:
>>>
>>> I confirm that the engine is already InnoDB, but it still detects errors.
>>>
>>> [image: 0001.png]
>>> C:\Users\Administrator>trac-admin "D:\myproject" deploy
>>> "D:\myproject_deploy"
>>> Error: The current storage engine is MyISAM. It must be InnoDB or NDB
>>> storage engine to support transactions.
>>>
>>
>>
>> Which version of Trac and which version of MySQL?
>>
>> - Ryan
>>
>
>
> I have found out that something went wrong. I changed the default engine
> of the entire database instance to InnoDB.
>

Did you edit my.cnf to make that change? As in:
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_storage_engine


> I think you should not check the engine of the entire instance, but one of
> the specific database engines. This is an optimization. local.
>

The engine for each table and the default engine are both checked:
https://trac.edgewall.org/browser/tags/trac-1.2.3/trac/db/mysql_backend.py?marks=308-315,336-341#L296

It was implemented in #10993:
https://trac.edgewall.org/ticket/10993

I don't see a way to set a persistent default storage engine for each
database/schema. However, rather than requiring the MySQL instance default
storage engine to be set (in the system-wide my.cnf configuration), we
could possibly have a trac.ini configuration option to specify the storage
engine and explicitly set the default for the session before creating the
tables, or use the ENGINE option when creating tables:
https://dev.mysql.com/doc/refman/8.0/en/storage-engine-setting.html

I'm not sure of the best solution, but we do need better documentation in:
https://trac.edgewall.org/wiki/MySqlDb

I will wait to see what Jun has to say before opening a new ticket.

default-storage-engine=INNODB
>
> Unfortunately, configuration changes must be made to the database
> instance, not the database.
>

- Ryan

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to