- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 Mariadb 10.2.26 服务器,禁用了“STRICT_TRANS_TABLES”模式。唯一启用的模式是“NO_ENGINE_SUBSTITUTION”。但即使这样,我还是收到“一般错误:1364 字段''没有默认值”。有谁知道为什么吗?谢谢。
最佳答案
以下是多年来所做的“不兼容的更改”的一小部分示例。
----- 2014-09-25 5.7.5 Milestone 15 -- SQL Mode Notes -- Incompatible Change -----
These SQL mode changes were made:
Strict SQL mode for transactional storage engines ([STRICT_TRANS_TABLES](http://dev.mysql.comhttps://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_trans_tables))
is now enabled by default.
Implementation of the [ONLY_FULL_GROUP_BY](http://dev.mysql.comhttps://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by)
SQL mode has been made more sophisticated, to no longer reject deterministic queries that previously were rejected.
MySQL now recognizes when a nonaggregated selected column is functionally dependent on (uniquely determined by) GROUP BY columns.
MySQL has an extension to standard SQL that permits references in the HAVING clause to aliased expressions in the select list.Previously, enabling ONLY_FULL_GROUP_BY disables this extension, thus requiring the HAVING clause to be written using unaliased expressions. This restriction has been lifted so that the HAVING clause can refer to aliases regardless of whether ONLY_FULL_GROUP_BY is enabled.
In consequence, [ONLY_FULL_GROUP_BY](http://dev.mysql.comhttps://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by)
is now enabled by default, to prohibit nondeterministic queries containing expressions not guaranteed to be uniquely determined within a group.
The changes to the default SQL mode result in a default [sql_mode](http://dev.mysql.comhttps://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_sql_mode)
system variable value with these modes enabled: ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ENGINE_SUBSTITUTION.
The [ONLY_FULL_GROUP_BY](http://dev.mysql.comhttps://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by)
mode is now included in the modes comprised by the ANSI SQL mode.
A new function, ANY_VALUE(), is available that can be used to force MySQL to accept queries that it thinks should be rejected with
ONLY_FULL_GROUP_BY enabled. The function return value and type are the same as the return value and type of its argument, but the function result is not checked for the ONLY_FULL_GROUP_BY SQL mode.
If you find that having ONLY_FULL_GROUP_BY enabled causes queries for existing applications to be rejected, either of these actions should restore operation:
If it is possible to modify an offending query, do so, either so that nondeterministic nonaggregated columns are functionally dependent
on GROUP BY columns, or by referring to nonaggregated columns using ANY_VALUE().
If it is not possible to modify an offending query (for example, if it is generated by a third-party application), set the sql_mode
system variable at server startup to not enable ONLY_FULL_GROUP_BY.
For more information about SQL modes and GROUP BY queries, see Server SQL Modes, and MySQL Handling of GROUP BY. (Bug #18486310)
----- 2014-03-31 5.7.4 Milestone 14 -- Functionality Added or Changed -- Incompatible Change -----
The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes now do nothing. Instead, their previous effects are included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). In other words, strict mode now means the same thing as the previous meaning of strict mode plus the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE modes. This change reduces the number of SQL modes with an effect dependent on strict mode and makes them part of strict mode itself.
To prepare for the SQL mode changes in this version of MySQL, it is advisable before upgrading to read SQL Mode Changes in MySQL 5.7. That discussion provides guidelines to assess whether your applications will be affected by these changes.
The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes are still recognized so that statements that name them do not produce an error, but will be removed in a future version of MySQL. To make advance preparation for versions of MySQL in which these modes do not exist, applications should be modified to not refer to those mode names.
----- 2014-03-27 5.6.17 General Availability -- SQL Mode Notes -- Incompatible Change -----
The ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes now are deprecated and setting the sql_mode value to include any of them generates a warning. In MySQL 5.7, these modes do nothing. Instead, their effects are included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). The motivation for the change in MySQL 5.7 is to reduce the number of SQL modes with an effect dependent on strict mode and make them part of strict mode itself.
To make advance preparation for an upgrade to MySQL 5.7, see SQL Mode Changes in MySQL 5.7. That discussion provides guidelines to assess whether your applications will be affected by the SQL mode changes in MySQL 5.7.
----- 2013-02-05 5.6.10 General Availability -- Bugs Fixed -- InnoDB -----
During an online DDL operation, changing a column from nullable to NOT NULL could succeed or fail differently depending on whether the ALTER TABLE statement used ALGORITHM=INPLACE or ALGORITHM=COPY. An operation with ALGORITHM=COPY would succeed even if the column contained NULL values, while an operation with ALGORITHM=INPLACE failed because of the possibility that the column contained NULL values. Now, making a column NOT NULL in combination with the ALGORITHM=INPLACE clause is allowed, but only if the sql_mode configuration option includes the STRICT_TRANS_TABLES or STRICT_ALL_TABLES setting. If the ALGORITHM clause is not specified with the ALTER TABLE statement, the online DDL operation will use ALGORITHM=INPLACE if possible, or ALGORITHM=COPY if not. (Bug #15961327)
----- 2012-11-07 5.6.8 Release Candidate -- Installation Notes -- -----
On Unix platforms, mysql_install_db now creates a default option file named my.cnf in the base installation directory. This file is created from a template included in the distribution package named my-default.cnf. You can find the template in or under the base installation directory. When started using mysqld_safe, the server uses my.cnf file by default. If my.cnf already exists, mysql_install_db assumes it to be in use and writes a new file named my-new.cnf instead.
With one exception, the settings in the default option file are commented and have no effect. The exception is that the file changes the sql_mode system variable from its default of NO_ENGINE_SUBSTITUTION to also include STRICT_TRANS_TABLES:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
This setting produces a server configuration that results in errors rather than warnings for bad data in operations that modify transactional tables. See Server SQL Modes.
The my-default.cnf template replaces the older sample option files (my-small.cnf, my-medium.cnf, and so forth), which are no longer distributed.
----- 2004-12-01 5.0.2 -- Functionality Added or Changed -- -----
Added STRICT_TRANS_TABLES, STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, and TRADITIONAL SQL modes. The TRADITIONAL mode is shorthand for all the preceding modes. When using mode TRADITIONAL, MySQL generates an error if you try to insert a wrong value in a column. It does not adjust the value to the closest possible legal value.
----- 2004-12-01 5.0.2 -- Functionality Added or Changed -- -----
The compilation flag DONT_USE_DEFAULT_FIELDS was removed because you can get the same behavior by setting the sql_mode system variable to STRICT_TRANS_TABLES.
----- 2004-12-01 5.0.2 -- Functionality Added or Changed -- -----
MySQL now remembers which columns were declared to have default values. In STRICT_TRANS_TABLES/STRICT_ALL_TABLES mode, you now get an error if you do an INSERT without specifying all columns that don't have a default value. A side effect of this is that when you do SHOW CREATE for a new table, you no longer see a DEFAULT value for a column for which you didn't specify a default value.
关于mysql - 一般错误 : 1364 with STRICT_TRANS_TABLES disabled,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57673081/
我使用 jQuery 禁用选择下拉列表中的选项。我需要知道使用之间的区别 prop('disabled','disabled') 和 prop('disabled',true) 两者几乎都适用于所有浏
.attr('disabled', 'disabled') 和 .attr('disabled', true) 在我的代码中都有效,但我只是想知道:两者中哪一个更有效和/或哪一个更常用?真的有区别吗?
我的 asp.net mvc View 中有以下脚本:- function disableform(id) { $('#' + id).prop("disabled", true); } 但是
我已经在 Oracle VM Ware 中为我的 ubuntu 可信操作系统安装了 visual studio 代码和依赖项。我用这些命令运行代码。 ssh -X myserver code 但是当我
我有这个函数可以切换输入字段的禁用属性: $('.someElement').click(function(){ if (someCondition) { console.log
自从前几天我升级了 angularjs 后,我一直收到警告。每当我打开 ui.bootstrap 模式时,它都会发生。 这是我在 chrome-beta 44 中收到的警告: angular.js:1
我想限制用户在单击特定按钮时在文本框中输入值,否则设置禁用 false。如果我设置 $("#txtquery").attr("disabled","disabled"); 它将文本框设置为空白。如果切
How do I make a Spinner's "disabled" state look disabled? 可能重复. 我尝试了帖子中提到的解决方案,即 ((Spinner) spinner)
这段代码: $tds = $(this).closest('tr').find(td input,select); $tds.attr('disabled','disabled'); 使我的表格行不
使用 jQM 1.4.0我试图覆盖灰色样式(): input[type="text"]:disabled { opacity: 1.0 !important; color: black
不知道为什么这不起作用。 当人们单击我的应用程序的“编辑”按钮时,禁用的文本字段将变为可编辑: $("#bewerken").click(function(e) { $("input[d
我对以下差异有些困惑: swiftlint:disable:next swiftlint:disable:this 最佳答案 它们都用于禁用单行的快速规则。您还可以为单行启用规则。来自 SwiftLi
我看到一些代码 # pylint: disable=W0123 还有一些 # pylint: disable-msg=W0123 它们只是同义词吗? 最佳答案 从 pylint 0.21.0 开始不推
默认情况下,在桌面上,flutter 中的 btns 在禁用时会更改鼠标光标: 我们想禁用此行为,或替换为不同的光标。 最佳答案 要覆盖 ElevatedButton、TextButton 或 Out
我一直在学习很多关于标准 asp.net 验证器的知识,我的最新发现是关于如何禁用验证器客户端,这非常酷。 现在,如果我的初始帖子启用了验证器,但在客户端,我禁用它,服务器端是否识别客户端更改并保留它
默认情况下,在桌面上,flutter 中的 btns 在禁用时会更改鼠标光标: 我们想禁用此行为,或替换为不同的光标。 最佳答案 要覆盖 ElevatedButton、TextButton 或 Out
这个问题在这里已经有了答案: Should I use CSS :disabled pseudo-class or [disabled] attribute selector or is it a
我有一个 python 脚本,它发送包含文本、html 和 ics 附件的多部分电子邮件。这个想法是,现代电子邮件客户端将呈现 HTML 部分并提供将事件添加到用户日历中的功能。 代码如下: impo
我有一个最初被禁用的按钮: Lorem ipsum 对于此按钮,button.getAttribute('disabled') 返回 "disabled"。但是,当我使用 JavaScript 启用此
在我的一些测试中,我必须确认在设置某些标志时某些 select2 下拉菜单被禁用。为了证实这一点,我发现以下策略似乎有效: Assert.True(element.GetAttribute("disa
我是一名优秀的程序员,十分优秀!