我正在尝试在 Docker 容器中的 MariaDB 10.4.11-MariaDB-1:10.4.11+maria~bionic 上安装 Nextcloud (mariadb:latest sha256:2f11cf2ec18988aec8346a5cf528d69ac3f0f4fc02af79ba28f4fd47b7778d6f)。
安装程序所做的第一件事是尝试ROW_FORMAT=COMPRESSED在 DDL 中创建一个表,这会产生错误 140“错误的创建选项”。
如果我省略 row_format 参数,则会创建表,但使用 DYNAMIC row_format。
这里发生了什么?是否ROW_FORMAT=COMPRESSED在某个时候被删除了,或者正在拉取的 MariaDB docker 版本是否未使用它进行编译?
如果不修改 Nextcloud 的 SQL DDL,我能在这里做什么?
Edit:
Run Code Online (Sandbox Code Playgroud)
最后可以添加有关我的系统的更多信息,如下:
首先是我的my.cnf
[mysqld]
innodb_large_prefix=on
innodb_file_per_table=on
innodb_doublewrite=off
innodb_page_size=64k
innodb_file_format=barracuda
innodb_compression_algorithm=lz4
innodb_compression_default=ON
Run Code Online (Sandbox Code Playgroud)
这会导致启动包含以下行:
2020-01-11 07:10:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.11+maria~bionic started.
2020-01-11 07:10:57+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-01-11 07:10:58+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.11+maria~bionic started.
2020-01-11 7:10:58 0 [Note] mysqld (mysqld …Run Code Online (Sandbox Code Playgroud) 我正在处理一个基本上将大量表聚合在一起的查询。
我尝试的第一种方法是将所有表内部连接成一个漂亮的大查询,看起来像这样:
select
a.col1
, a.col2
, a.col3
...
, b.col1
...
...
, l.col1
, l.col2
from myprimarytable a
join secondtable b on a.key = b.key
join third table c on a.key = c.key
...
join thelasttable l on a.key = b.key
Run Code Online (Sandbox Code Playgroud)
这需要永远运行。但是,看起来像这样的第二个解决方案:
create table #output (
primkey char(40)
, mycol1 char(1) null
, mycol2 decimal(20,1) null
...
, mylastcol varchar(max) null
)
insert into #output
select
a.col1
, a.col2
...
from myprimarytable a
update #output set
mycol3 = …Run Code Online (Sandbox Code Playgroud)