MariaDB数据表字段默认值有问题 #1204

Open
opened 2019-01-23 06:17:14 +00:00 by richardchey · 3 comments
richardchey commented 2019-01-23 06:17:14 +00:00 (Migrated from github.com)

MySQL:
default

MariaDB:
default

导致使用MariaDB时,DBMetas的返回结果,列的默认值(Column.Default)多了一层单引号。另外在调用Sync时会产生不符实际的告警信息。

MySQL: ![default](https://user-images.githubusercontent.com/6816901/51586633-f913a080-1f18-11e9-9c10-b004bf0b9e83.png) MariaDB: ![default](https://user-images.githubusercontent.com/6816901/51586656-121c5180-1f19-11e9-8e94-8f7f20517955.png) 导致使用MariaDB时,`DBMetas`的返回结果,列的默认值(`Column.Default`)多了一层单引号。另外在调用`Sync`时会产生不符实际的告警信息。
richardchey commented 2019-01-24 02:00:42 +00:00 (Migrated from github.com)

也不是所有的MariaDB都会这样,我试了下,10.1.37没有问题,但是10.3.12会出问题。

也不是所有的MariaDB都会这样,我试了下,`10.1.37`没有问题,但是`10.3.12`会出问题。
zxysilent commented 2019-05-12 05:53:52 +00:00 (Migrated from github.com)

同样发现这个问题 默认值不对应

同样发现这个问题 默认值不对应
zxysilent commented 2019-06-06 07:56:50 +00:00 (Migrated from github.com)

[xorm] [warn] 2019/06/06 15:54:03.911124 Table article Column addr db default is '''', struct default is ''
[xorm] [warn] 2019/06/06 15:54:03.912121 Table article Column area db default is '''', struct default is ''
[xorm] [warn] 2019/06/06 15:54:03.913118 Table article Column utime db default is 'NULL', struct default is NULL
[xorm] [warn] 2019/06/06 15:54:03.914116 Table article Column ctime db default is 'NULL', struct default is NULL

image

[xorm] [warn] 2019/06/06 15:54:03.911124 Table article Column addr db default is '''', struct default is '' [xorm] [warn] 2019/06/06 15:54:03.912121 Table article Column area db default is '''', struct default is '' [xorm] [warn] 2019/06/06 15:54:03.913118 Table article Column utime db default is 'NULL', struct default is NULL [xorm] [warn] 2019/06/06 15:54:03.914116 Table article Column ctime db default is 'NULL', struct default is NULL ![image](https://user-images.githubusercontent.com/19162822/59016372-ad341900-8873-11e9-9dc8-071e6a1f3d63.png)
lunny added
kind
bug
and removed
need
test
labels 2020-03-09 02:15:26 +00:00
lunny added this to the 1.1.1 milestone 2020-03-09 02:15:26 +00:00
lunny modified the milestone from 1.1.1 to (deleted) 2021-06-09 02:43:16 +00:00
lunny removed this from the (deleted) milestone 2023-07-26 01:23:28 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1204
No description provided.