#463 MySQL 相关的命令汇总
MySQL DB 2021-01-06通过 apt 和 apt-file 列出 mysql 提供的所有可执行文件。
#462 MySQL 版本历史
DB MySQL 2021-01-06历史
- 在更早的 20 年间,MySQL 的前身 UNIREG 被 Monty 开发
- 1994 年瑞典公司 TcX 成立,Monty 是三位创始人之一。次年,这家公司改名为 MySQL AB。
TcX 将 UNIREG 改造为一款支持 SQL 的关系型数据库。 - 1995 年,MySQL 3.11 发布。
- 1999 年,MySQL 3.23 集成 BDB,开始了可插拔存储引擎架构。
- 2000 年,ISAM 改良成 MyISAM,同时 MySQL 基于 GPL 协议开源。
- 2001 年,MySQL AB 和芬兰公司 Infobase Oy 合作,为 MySQL 3.22 带来了 InnoDB 引擎。
重点是事务和行级锁。
注意:InnoDB 是 GPL / 专有协议双授权。 - 2005 年,Innobase Oy 被甲骨文收购。同年, MySQL 5.0 发布。
注意:我们现在数据库系统课的很多概念,触发器,存储过程,视图,游标等都是 5.0 开始支持的。 - 2006 年,Oracle 曾经试图收购 MySQL 但是遭到拒绝。
- 2008-02-26 MySQL AB 被 SUN 10 亿美元收购。
- 2008-11-27 MySQL 5.1,开始支持分区,和主从同步时的行复制(RBR)。
- 2009-04-20 SUN 被甲骨文 74 亿美元收购,收购直到 2010-01-27 才完成。
最重要的存储引擎 InnoDB 终于和 MySQL 版权归于一处了。 - 2010-12-03 MySQL 5.5,InnoDB 成为默认引擎(5.5.5 开始)。
- innodb 改进
- utf8mb4
- metadata lock
- 2013-02-05 MySQL 5.6
- 2015-10-21 MySQL 5.7
- 2018-04-19 MySQL 8.0
- 最新版本是
2020-10-19 发布的 8.0.22
2021-10-19 发布的 8.0.27 (Update @ 2021-11-16)
说明:
- 5.6,5.7 应该是现在最常用的两个版本。
8.0 还比较新,我还没有在线上业务中用过。但是有很多我感兴趣的特性。 - 列举的特性可能是在不同子版本引入,开发中可能需要留意不同子版本的差异。
就现在我理解的主流开发思想,对组件应该简单应用,就数据库而言,应该只用来做基础存储,不要涉及复杂功能,不要涉及所谓特性,最要用好几个大版本就在的功能,其他数据库系统都有的功能。
我觉得有点过了。这个另说吧。
MySQL 5.6 新特性
- GTID复制。
- 无损复制。
- 延迟复制。
- 基于库级别的并行复制。
- mysqlbinlog 可远程备份 binlog。
- 对 TIME, DATETIME 和 TIMESTAMP 进行了重构,可支持微秒(6 位小数)。
- DATETIME 的空间需求也从之前的 8 个字节减少到 5 个字节。
- 可以有多个时间类型
DEFAULT current_timestamp() ON UPDATE current_timestamp()
之前只能支持 1 个 TIMESTAMP 类型 YEAR(2)
被抛弃,新建时会自动转换成YEAR(4)
- Online DDL,部分 ALTER 操作不再阻塞 DML。
- 可传输表空间(transportable tablespaces)。
- 统计信息的持久化。避免主从之间或数据库重启后,同一个SQL的执行计划有差异。
- 全文索引。
- EXPLAIN 可用来查看 DELETE,INSERT,REPLACE,UPDATE 等 DML 操作的执行计划,在此之前,只支持SELECT操作。
-
分区表的增强
-
最大可用分区数增加至 8192
- 支持分区和非分区表之间的数据交换
-
操作时显式指定分区,比如:
SELECT * FROM employees PARTITION (p0, p2)
-
Undo Log 可保存在独立表空间中,因其是随机 IO,更适合放到 SSD 中。但仍然不支持空间的自动回收。
- 可 dump 和 load Buffer pool 的状态,避免数据库重启后需要较长的预热时间。
- InnoDB 优化,并默认使用 InnoDB 做存储引擎。
- NoSQL API:InnoDB Memcached plugin。
- InnoDB 内部的性能提升,包括拆分 kernel mutex,引入独立的刷新线程,可设置多个 purge 线程,减少大内存系统中的buffer_pool竞争。
- Redo Log 总大小的限制从之前的 4G 扩展至 512G(
innodb_log_file_size
)。 - 死锁算法改进,并记录到错误日志中。
- 为了避免大 buffer_pool 的实例重启服务时过长的warmup时间,你可以在重启后立即加载缓存页面。MySQL可以在关闭时导出完全数据文件,检阅此文件找出重启时需要加载的pages。你可以在任何手工导入导出buffer_pool,比如在性能测试时或者在执行复杂的OLAP查询后。
- 优化器性能提升,引入了ICP,MRR,BKA 等特性,针对子查询进行了优化。
- 若干安全性提升(包括密码自动过期 (
mysql.user
的password_expired
))
复制和日志(replication)
1)支持延时复制,MySQL现在支持延迟复制,默认是0秒。使用CHANGE MASTER TO参数 MASTER_DELAY 来设置延迟。可以让slave跟master之间控制一个时间间隔,方便特殊情况下的数据恢复。(以前是使用第三方工具可以做到) 2)行级复制功能加强,可以降低磁盘、内存、网络等资源开销(只记录能确定行记录的字段即可)。3)现在支持多线程复制。如果开启,sql线程作为协调者协调多个工作线程,数量取决于slave_parallel_workers。现在多线程复制以单库为基础,特定库的更新的相对顺序和主库一样。不过,没有必要协调不同库之间的事务。事务可以被分布到每个库,意味着一个复制从库的工作线程可以顺序执行事务而不必等待其它库的更新完成。4)支持以全局统一事务ID(GTID)为基础的复制。当在主库上提交事务或者被从库应用时,可以定位和追踪每一个事务。GTID复制是全部以事务为基础,使得检查主从一致性变得非常简单。如果所有主库上提交的事务也同样提交到从库上,一致性就得到了保证。5)支持启用GTID,对运维人员来说应该是一件令人高兴的事情,在配置主从复制,传统的方式里,你需要找到binlog和POS点,然后change master to指向,而不是很有经验的运维,往往会将其找错,造成主从同步复制报错,在mysql5.6里,如果使用了GTIDs,启动一个新的复制从库或切换到一个新的主库,就不必依赖log文件或者pos位。需要知道master的IP、端口,账号密码即可,因为同步复制是自动的,mysql通过内部机制GTID自动找点同步。
6)binlog的读写现在是崩溃安全的,因为只有完整的事件(或者事务)才会被记录和读取。默认会记录事件的大小以及事件本身,使用大小来验证事件被正确记录。你也可以使用参数binlog_checksum设置使用crc32记录事件的校验值。使用参数master_verify_checksum可以让服务读取校验值。slave-sql-verify-checksum参数使从库读relay日志的时候读取校验值。
MySQL支持在表中保存主库连接信息了。使用参数–master-info-repository和 –relay-log-info-repository来设置。设置 –master-info-repository为表,会记录连接信息到slave_master_info表。设置–relay-log-info-repository为表,会记录relay log信息到slave_relay_log_info表。这几个表都是自动建立在mysql系统库。
增强Performance Schema数据库(Mysql performance schema)
1)记录表的输入与输出,操作包括行级访问表和临时表,如insert,upate,delete. 2)表的事件过滤,以库或者表名为基础。3)线程的事件过滤,更多关于线程的信息被搜集4)表和索引I/O以及表锁的统计表。5)记录命令以及命令的阶段。
不允许在存储过程中或者函数参数中或者存储程序本地变量中使用default来指定(如:SET var_name = DEFAULT命令),但可以在指定系统变量时使用default。
MySQL 5.7 新特性
- 引入对 JSON 的支持,JSON 类型和相关函数。
组复制
InnoDB Cluster
多源复制
增强半同步(AFTER_SYNC)
基于WRITESET的并行复制。
在线开启GTID复制。
在线设置复制过滤规则。
在线修改Buffer pool的大小。
在同一长度编码字节内,修改VARCHAR的大小只需修改表的元数据,无需创建临时表。
可设置NUMA架构的内存分配策略(innodb_numa_interleave)。
透明页压缩(Transparent Page Compression)。
UNDO表空间的自动回收。
查询优化器的重构和增强。
可查看当前正在执行的SQL的执行计划(EXPLAIN FOR CONNECTION)。
引入了查询改写插件(Query Rewrite Plugin),可在服务端对查询进行改写。
EXPLAIN FORMAT=JSON会显示成本信息,这样可直观的比较两种执行计划的优劣。
引入了虚拟列,类似于Oracle中的函数索引。
新实例不再默认创建test数据库及匿名用户。
引入ALTER USER命令,可用来修改用户密码,密码的过期策略,及锁定用户等。
mysql.user表中存储密码的字段从password修改为authentication_string。
表空间加密。
优化了Performance Schema,其内存使用减少。
Performance Schema引入了众多instrumentation。常用的有Memory usage instrumentation,可用来查看MySQL的内存使用情况,Metadata Locking Instrumentation,可用来查看MDL的持有情况,Stage Progress instrumentation,可用来查看Online DDL的进度。
同一触发事件(INSERT,DELETE,UPDATE),同一触发时间(BEFORE,AFTER),允许创建多个触发器。在此之前,只允许创建一个触发器。
InnoDB原生支持分区表,在此之前,是通过ha_partition接口来实现的。
分区表支持可传输表空间特性。
集成了SYS数据库,简化了MySQL的管理及异常问题的定位。
原生支持JSON类型,并引入了众多JSON函数。
引入了新的逻辑备份工具-mysqlpump,支持表级别的多线程备份。
引入了新的客户端工具-mysqlsh,其支持三种语言:JavaScript, Python and SQL。两种API:X DevAPI,AdminAPI,其中,前者可将MySQL作为文档型数据库进行操作,后者用于管理InnoDB Cluster。
mysql_install_db被mysqld --initialize代替,用来进行实例的初始化。
原生支持systemd。
引入了super_read_only选项。
可设置SELECT操作的超时时长(max_execution_time)。
可通过SHUTDOWN命令关闭MySQL实例。
引入了innodb_deadlock_detect选项,在高并发场景下,可使用该选项来关闭死锁检测。
引入了Optimizer Hints,可在语句级别控制优化器的行为,如是否开启ICP,MRR等,在此之前,只有Index Hints。
GIS的增强,包括使用Boost.Geometry替代之前的GIS算法,InnoDB开始支持空间索引。
MySQL 8.0 新特性
最重要的是窗口函数和 CTE
- 窗口函数,这个功能补齐了,非常香。
- CTE (Common Table Expressions)
- 递归 SQL
- UTF8 的变更,默认的 UTF8 字符集是 UTF8MB4
- 优化和完善了对 JSON 的支持,最重要的是 JSON Partial Updates,支持对 JSON 的局部更新。
其他MySQL 8.0计划更新的特性包括:
在锁定行方面增加了更多选项,如SKIP LOCKED和NOWAIT两个选项。其中,
SKIP LOCKED允许在操作中不锁定那些需要忽略的行;NOWAIT则在遇到行的锁定的时候马上抛出错误。
MySQL能根据可用内存的总量去伸缩扩展,以更好利用虚拟机的部署。
新增“隐藏索引”的特性,这样索引可以在查询优化器中变为不可见。索引在标记为不可用后,和表的数据更改同步,但是优化器不会使用它们。对于使用隐藏索引的建议,是当不决定某个索引是否需要保留的时候,可以使用。
引入了原生的,基于InnoDB的数据字典。数据字典表位于mysql库中,对用户不可见,同mysql库的其它系统表一样,保存在数据目录下的mysql.ibd文件中。不再置于mysql目录下。
Atomic DDL。
重构了INFORMATION_SCHEMA,其中,部分表已重构为基于数据字典的视图,在此之前,其为临时表。
PERFORMANCE_SCHEMA查询性能提升,其已内置多个索引。
不可见索引(Invisible index)。
降序索引。
直方图。
角色(Role)。
资源组(Resource Groups),可用来控制线程的优先级及其能使用的资源,目前,能被管理的资源只有CPU。
引入了innodb_dedicated_server选项,可基于服务器的内存来动态设置innodb_buffer_pool_size,innodb_log_file_size和innodb_flush_method。
快速加列(ALGORITHM=INSTANT)。
自增主键的持久化。
可持久化全局变量(SET PERSIST)。
默认字符集由latin1修改为utf8mb4。
默认开启UNDO表空间,且支持在线调整数量(innodb_undo_tablespaces)。在MySQL 5.7中,默认不开启,若要开启,只能初始化时设置。
备份锁。
Redo Log的优化,包括允许多个用户线程并发写入log buffer,可动态修改innodb_log_buffer_size的大小。
默认的认证插件由mysql_native_password更改为caching_sha2_password。
默认的内存临时表由MEMORY引擎更改为TempTable引擎,相比于前者,后者支持以变长方式存储VARCHAR,VARBINARY等变长字段。从MySQL 8.0.13开始,TempTable引擎支持BLOB字段。
Grant不再隐式创建用户。
SELECT ... FOR SHARE和SELECT ... FOR UPDATE语句中引入NOWAIT和SKIP LOCKED选项,解决电商场景热点行问题。
正则表达式的增强,新增了4个相关函数,REGEXP_INSTR(),REGEXP_LIKE(),REGEXP_REPLACE(),REGEXP_SUBSTR()。
查询优化器在制定执行计划时,会考虑数据是否在Buffer Pool中。而在此之前,是假设数据都在磁盘中。
ha_partition接口从代码层移除,如果要使用分区表,只能使用InnoDB存储引擎。
引入了更多细粒度的权限来替代SUPER权限,现在授予SUPER权限会提示warning。
GROUP BY语句不再隐式排序。
MySQL 5.7引入的表空间加密特性可对Redo Log和Undo Log进行加密。
information_schema中的innodb_locks和innodb_lock_waits表被移除,取而代之的是performance_schema中的data_locks和data_lock_waits表。
引入performance_schema.variables_info表,记录了参数的来源及修改情况。
增加了对于客户端报错信息的统计(performance_schema.events_errors_summary_xxx)。
可统计查询的响应时间分布(call sys.ps_statement_avg_latency_histogram())。
支持直接修改列名(ALTER TABLE ... RENAME COLUMN old_name TO new_name)。
用户密码可设置重试策略(Reuse Policy)。
移除PASSWORD()函数。这就意味着无法通过“SET PASSWORD ... = PASSWORD('auth_string') ”命令修改用户密码。
代码层移除Query Cache模块,故Query Cache相关的变量和操作均不再支持。
BLOB, TEXT, GEOMETRY和JSON字段允许设置默认值。
可通过RESTART命令重启MySQL实例。
参考资料与拓展阅读
- Old Reliable: A History of MySQL
- O'Reilly, The History of MySQL
- CNET, Oracle tried to buy open-source MySQL
- MySQL 官方文档, MySQL 5.6 Release Notes
- 1.3 What Is New in MySQL 5.6
- MySQL 官方文档, MySQL 5.7 Release Notes
- 1.3 What Is New in MySQL 5.7
- MySQL 官方文档, MySQL 8.0 Release Notes
- 1.3 What Is New in MySQL 8.0
#461 Graylog Search 规则
日志 Graylog 2021-01-06ssh // 包含 ssh
ssh login // 包含 ssh 或者 login
"ssh login" // 包含 ssh login
// 正则匹配
/ethernet[0-9]+/
type:(ssh OR login) // 字段 type 包含 ssh 或者 login
// 必须 (不) 包含字段
_exists_:type
NOT _exists_:type
// 支持 `*`, `?` 两种通配符
source:xxx?yyy
source:xxx*yyy
// PS: 默认配置,通配符不能放在最前面,避免内存消耗太多
// 可以这样开启:
// allow_leading_wildcard_searches = true
// 模糊匹配 ~
ssh logni~ // 可以搜索到 ssh login
"foo bar"~5 // Damerau–Levenshtein distance
// 范围
http_response_code:[500 TO 504]
http_response_code:{400 TO 404}
bytes:{0 TO 64]
http_response_code:[0 TO 64}
// 大小
http_response_code:>400
http_response_code:<400
http_response_code:>=400
http_response_code:<=400
http_response_code:(>=400 AND <500)
// 时间范围
timestamp:["2019-07-23 09:53:08.175" TO "2019-07-23 09:53:08.575"]
otherDate:[now-5d TO now-4d]
此外,还有 AND,OR,NOT,括号等逻辑运算符可用。
转义符:
& | : \ / + - ! ( ) { } [ ] ^ " ~ * ?
参考资料与拓展阅读
- graylog, Searching
- elastic, Search in Depth
#460 MySQL 常见引擎
DB MySQL 2021-01-06SHOW VARIABLES LIKE '%engine%';
SHOW ENGINES;
以 MySQL 8.0 为例:
除了 PERFORMANCE_SCHEMA,
Engine | Support | Comment | Transactions | XA | Savepoints |
---|---|---|---|---|---|
ARCHIVE | YES | Archive storage engine | NO | NO | NO |
BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
MyISAM | YES | MyISAM storage engine | NO | NO | NO |
InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
CSV | YES | CSV storage engine | NO | NO | NO |
Percona (8.0) 和 MySQL 保持一致,不过 InnoDB 实际被替换成他们自己开发的兼容引擎 XtraDB。
MariaDB (10.1.45) 也使用 XtraDB 替换了 InnoDB,而且没有 BLACKHOKE, ARCHIVE,但是多了:
Engine | Support | Comment | Transactions | XA | Savepoints |
---|---|---|---|---|---|
TokuDB | DEFAULT | Percona TokuDB Storage Engine with Fractal Tree(tm) Technology | YES | YES | YES |
SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
MyISAM
在 2010 年发布的 MySQL 5.5.5 之前,一直是 MySQL 的默认引擎。
InnoDB
InnoDB 是甲骨文的。
TokuDB
TokuTek 公司开发,后来被 Percona 公司收购,现在已被 Percona 废弃(仓库归档)。
其他
- Blackhole
- Mrg_MyISAM
- Memory
- CSV
- Archive
第三方
- federated
参考资料与拓展阅读
#459 Minio 对象存储
存储 对象存储 2021-01-05#458 JSON Schema
数据校验 JSONSchema 2021-01-03JSON Schema 是一个 JSON 数据的校验规范,其规则的定义本身也是 JSON 格式。
目前有 RFC 草案。最新是 2022-06-10 提交的 draft-bhutton-json-schema-01。
Update @ 2023-02-28: 现在还是没有成为标准。最新的那份草案早已过期(提交之后半年)。
- JSON Schema: A Media Type for Describing JSON Documents
- JSON Schema Validation: A Vocabulary for Structural Validation of JSON
- Relative JSON Pointers
示例
{
"type": "object",
"properties": {
"number": { "type": "number" },
"street_name": { "type": "string" },
"street_type": {
"type": "string",
"enum": ["Street", "Avenue", "Boulevard"]
}
}
}
关键字
数据类型(type 关键字)
string
字符串integer
整数number
数字,包括整数、浮点数boolean
布尔类型:true
,false
object
对象array
数组null
空值
字符串
-
format
格式,默认只是注释,验证器实现也可以根据这个来进行校验。 -
date
time
date-time
uri
email
ipv4
-
ipv6
-
pattern
正则表达式
数值(number,integer)
minimum
大于等于exclusiveMinimum
大于,部分版本中,这个值是 bool 型maximum
小于等于exclusiveMaximum
小于,部分版本中,这个值是 bool 型multipleOf
倍数
对象
- properties
- patternProperties
- additionalProperties
数组
- items
- additionalItems
- minItems 整数
- maxItems 整数
- uniqueItems 布尔
通用规则
- title
- description
- default
- required 必需
- enum
- const
- anyOf, oneOf, allOf
Python 示例
采用 Julian/jsonschema
PS:现在仓库地址转向了 python-jsonschema/jsonschema
>>> from jsonschema import validate
>>> # A sample schema, like what we'd get from json.load()
>>> schema = {
... "type" : "object",
... "properties" : {
... "price" : {"type" : "number"},
... "name" : {"type" : "string"},
... },
... }
>>> # If no exception is raised by validate(), the instance is valid.
>>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)
>>> validate(
... instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema,
... ) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ValidationError: 'Invalid' is not of type 'number'
参考资料与拓展阅读
- Wikipedia, JSON, Metadata and schema
- JSON Schema, Specification
https://www.cnblogs.com/dreamyu/p/9317721.html - JSON Schema, Understanding JSON Schema
- Apifox,JSON Schema 规范(中文版)
- JSON-Schema-Editor 编辑器,https://hellosean1025.github.io/json-schema-visual-editor/
#457 Kodi 智能电视平台
Kodi 智能电视 XBMC 电视盒子 2021-01-01了解一下现在热门的智能电视方案 Kodi。
Android TV、Boxee、火狐操作系统、Frog、谷歌电视、Horizon TV、httvLink,、Inview、Kodi Entertainment Center、MeeGo、Mediaroom,、OpenTV,、Opera TV,、Plex,、Roku,、RDK(Reference Development Kit)、智能电视联盟(英文原文:Smart TV Alliance), ToFu Media Platform,、Ubuntu TV以及雅虎智能电视这些平台均由私立机构进行管理。混合广播宽带电视(HbbTV)由混合广播宽带电视协会(英文原文:Hybrid Broadcast Broadband TV association)、CE-HTML是 面向消费类电子产品的网络(英文缩写:Web4CE)的一部分、开放互联网电视论坛(英文缩写:OIPF,英文全称:Open IPTV Forum)是混合广播宽带电视的一部分,还有Tru2way商业化的软件开发平台。
Kodi
https://kodi.tv/
https://en.wikipedia.org/wiki/Kodi_(software)
官网上的定位是 The ultimate entertainment center, 终极娱乐中心。
2002 Xbox Media Player
2004 Xbox Media Center (XBMC)
2008 XBMC 放弃了对 Xbox 的支持
2014 Kodi (从 v14 开始),因为定位已经改成娱乐中心,不再局限于媒体播放,此外,还有商标方面的问题。
https://en.wikipedia.org/wiki/List_of_software_based_on_Kodi_and_XBMC
- OpenELEC: Open Embedded Linux Entertainment Center
2017 年之后就没有更新了,主要开发者早已陆续转入了 LibreELEC 项目 - LibreELEC
- CoreELEC
其他的产品
Android TV
Apple TV
Amazon Fire TV: 基于 Android TV
Roku OS
SambaTV
三星Tizen
LG WebOS
Panasonic My Home Screen: 基于 Firefox OS
又看到一个项目:
https://plasma-bigscreen.org/zh-cn/
#456
Golang make
Golang
2020-12-28
m := make(map[string]int, 5)
发现 len(m) = 0
之后我觉得有必要重新复习一下 make
函数了。
make 的作用:分配内存,初始化,返回值(不是指针)。
PS:返回值的说明:返回的是这三种引用类型本身(指针),而不是指向这三个引用的指针。
PS:new 就会返回指针。还有,new 不限类型,不初始化。
slice
-> len, capmap
-> 预留大约 n 个元素的空间(具体分配空间的规则不清楚)chan
-> buffer size
The built-in function make
takes a type T, which must be a slice, map or channel type, optionally followed by a type-specific list of expressions. It returns a value of type T (not *T). The memory is initialized as described in the section on initial values.
Call Type T Result
make(T, n) slice slice of type T with length n and capacity n
make(T, n, m) slice slice of type T with length n and capacity m
make(T) map map of type T
make(T, n) map map of type T with initial space for approximately n elements
make(T) channel unbuffered channel of type T
make(T, n) channel buffered channel of type T, buffer size n
Each of the size arguments n and m must be of integer type or an untyped constant. A constant size argument must be non-negative and representable by a value of type int; if it is an untyped constant it is given type int. If both n and m are provided and are constant, then n must be no larger than m. If n is negative or larger than m at run time, a run-time panic occurs.
s := make([]int, 10, 100) // slice with len(s) == 10, cap(s) == 100
s := make([]int, 1e3) // slice with len(s) == cap(s) == 1000
s := make([]int, 1<<63) // illegal: len(s) is not representable by a value of type int
s := make([]int, 10, 0) // illegal: len(s) > cap(s)
c := make(chan int, 10) // channel with a buffer size of 10
m := make(map[string]int, 100) // map with initial space for approximately 100 elements
Calling make with a map type and size hint n will create a map with initial space to hold n map elements. The precise behavior is implementation-dependent.
#455 Nginx 版本
Nginx 2020-12-26Nginx Release History
参考: https://nginx.org/en/CHANGES-1.20
Version | Date |
---|---|
1.20.2 | 16 Nov 2021 |
1.20.1 | 25 May 2021 |
1.20.0 | 20 Apr 2021 |
1.19.10 | 13 Apr 2021 |
1.19.9 | 30 Mar 2021 |
1.19.8 | 09 Mar 2021 |
1.19.7 | 16 Feb 2021 |
1.19.6 | 15 Dec 2020 |
1.19.5 | 24 Nov 2020 |
1.19.4 | 27 Oct 2020 |
1.19.3 | 29 Sep 2020 |
1.19.2 | 11 Aug 2020 |
1.19.1 | 07 Jul 2020 |
1.19.0 | 26 May 2020 |
1.17.10 | 14 Apr 2020 |
1.17.9 | 03 Mar 2020 |
1.17.8 | 21 Jan 2020 |
1.17.7 | 24 Dec 2019 |
1.17.6 | 19 Nov 2019 |
1.17.5 | 22 Oct 2019 |
1.17.4 | 24 Sep 2019 |
1.17.3 | 13 Aug 2019 |
1.17.2 | 23 Jul 2019 |
1.17.1 | 25 Jun 2019 |
1.17.0 | 21 May 2019 |
1.15.12 | 16 Apr 2019 |
1.15.11 | 09 Apr 2019 |
1.15.10 | 26 Mar 2019 |
1.15.9 | 26 Feb 2019 |
1.15.8 | 25 Dec 2018 |
1.15.7 | 27 Nov 2018 |
1.15.6 | 06 Nov 2018 |
1.15.5 | 02 Oct 2018 |
1.15.4 | 25 Sep 2018 |
1.15.3 | 28 Aug 2018 |
1.15.2 | 24 Jul 2018 |
1.15.1 | 03 Jul 2018 |
1.15.0 | 05 Jun 2018 |
1.13.12 | 10 Apr 2018 |
1.13.11 | 03 Apr 2018 |
1.13.10 | 20 Mar 2018 |
1.13.9 | 20 Feb 2018 |
1.13.8 | 26 Dec 2017 |
1.13.7 | 21 Nov 2017 |
1.13.6 | 10 Oct 2017 |
1.13.5 | 05 Sep 2017 |
1.13.4 | 08 Aug 2017 |
1.13.3 | 11 Jul 2017 |
1.13.2 | 27 Jun 2017 |
1.13.1 | 30 May 2017 |
1.13.0 | 25 Apr 2017 |
1.11.13 | 04 Apr 2017 |
1.11.12 | 24 Mar 2017 |
1.11.11 | 21 Mar 2017 |
1.11.10 | 14 Feb 2017 |
1.11.9 | 24 Jan 2017 |
1.11.8 | 27 Dec 2016 |
1.11.7 | 13 Dec 2016 |
1.11.6 | 15 Nov 2016 |
1.11.5 | 11 Oct 2016 |
1.11.4 | 13 Sep 2016 |
1.11.3 | 26 Jul 2016 |
1.11.2 | 05 Jul 2016 |
1.11.1 | 31 May 2016 |
1.11.0 | 24 May 2016 |
1.9.15 | 19 Apr 2016 |
1.9.14 | 05 Apr 2016 |
1.9.13 | 29 Mar 2016 |
1.9.12 | 24 Feb 2016 |
1.9.11 | 09 Feb 2016 |
1.9.10 | 26 Jan 2016 |
1.9.9 | 09 Dec 2015 |
1.9.8 | 08 Dec 2015 |
1.9.7 | 17 Nov 2015 |
1.9.6 | 27 Oct 2015 |
1.9.5 | 22 Sep 2015 |
1.9.4 | 18 Aug 2015 |
1.9.3 | 14 Jul 2015 |
1.9.2 | 16 Jun 2015 |
1.9.1 | 26 May 2015 |
1.9.0 | 28 Apr 2015 |
1.7.12 | 07 Apr 2015 |
1.7.11 | 24 Mar 2015 |
1.7.10 | 10 Feb 2015 |
1.7.9 | 23 Dec 2014 |
1.7.8 | 02 Dec 2014 |
1.7.7 | 28 Oct 2014 |
1.7.6 | 30 Sep 2014 |
1.7.5 | 16 Sep 2014 |
1.7.4 | 05 Aug 2014 |
1.7.3 | 08 Jul 2014 |
1.7.2 | 17 Jun 2014 |
1.7.1 | 27 May 2014 |
1.7.0 | 24 Apr 2014 |
1.5.13 | 08 Apr 2014 |
1.5.12 | 18 Mar 2014 |
1.5.11 | 04 Mar 2014 |
1.5.10 | 04 Feb 2014 |
1.5.9 | 22 Jan 2014 |
1.5.8 | 17 Dec 2013 |
1.5.7 | 19 Nov 2013 |
1.5.6 | 01 Oct 2013 |
1.5.5 | 17 Sep 2013 |
1.5.4 | 27 Aug 2013 |
1.5.3 | 30 Jul 2013 |
1.5.2 | 02 Jul 2013 |
1.5.1 | 04 Jun 2013 |
1.5.0 | 07 May 2013 |
1.4.0 | 24 Apr 2013 |
1.3.16 | 16 Apr 2013 |
1.3.15 | 26 Mar 2013 |
1.3.14 | 05 Mar 2013 |
1.3.13 | 19 Feb 2013 |
1.3.12 | 05 Feb 2013 |
1.3.11 | 10 Jan 2013 |
1.3.10 | 25 Dec 2012 |
1.3.9 | 27 Nov 2012 |
1.3.8 | 30 Oct 2012 |
1.3.7 | 02 Oct 2012 |
1.3.6 | 12 Sep 2012 |
1.3.5 | 21 Aug 2012 |
1.3.4 | 31 Jul 2012 |
1.3.3 | 10 Jul 2012 |
1.3.2 | 26 Jun 2012 |
1.3.1 | 05 Jun 2012 |
1.3.0 | 15 May 2012 |
1.2.0 | 23 Apr 2012 |
1.1.19 | 12 Apr 2012 |
1.1.18 | 28 Mar 2012 |
1.1.17 | 15 Mar 2012 |
1.1.16 | 29 Feb 2012 |
1.1.15 | 15 Feb 2012 |
1.1.14 | 30 Jan 2012 |
1.1.13 | 16 Jan 2012 |
1.1.12 | 26 Dec 2011 |
1.1.11 | 12 Dec 2011 |
1.1.10 | 30 Nov 2011 |
1.1.9 | 28 Nov 2011 |
1.1.8 | 14 Nov 2011 |
1.1.7 | 31 Oct 2011 |
1.1.6 | 17 Oct 2011 |
1.1.5 | 05 Oct 2011 |
1.1.4 | 20 Sep 2011 |
1.1.3 | 14 Sep 2011 |
1.1.2 | 05 Sep 2011 |
1.1.1 | 22 Aug 2011 |
1.1.0 | 01 Aug 2011 |
1.0.5 | 19 Jul 2011 |
1.0.4 | 01 Jun 2011 |
1.0.3 | 25 May 2011 |
1.0.2 | 10 May 2011 |
1.0.1 | 03 May 2011 |
1.0.0 | 12 Apr 2011 |
0.9.7 | 04 Apr 2011 |
0.9.6 | 21 Mar 2011 |
0.9.5 | 21 Feb 2011 |
0.9.4 | 21 Jan 2011 |
0.9.3 | 13 Dec 2010 |
0.9.2 | 06 Dec 2010 |
0.9.1 | 30 Nov 2010 |
0.9.0 | 29 Nov 2010 |
0.8.53 | 18 Oct 2010 |
0.8.52 | 28 Sep 2010 |
0.8.51 | 27 Sep 2010 |
0.8.50 | 02 Sep 2010 |
0.8.49 | 09 Aug 2010 |
0.8.48 | 03 Aug 2010 |
0.8.47 | 28 Jul 2010 |
0.8.46 | 19 Jul 2010 |
0.8.45 | 13 Jul 2010 |
0.8.44 | 05 Jul 2010 |
0.8.43 | 30 Jun 2010 |
0.8.42 | 21 Jun 2010 |
0.8.41 | 15 Jun 2010 |
0.8.40 | 07 Jun 2010 |
0.8.39 | 31 May 2010 |
0.8.38 | 24 May 2010 |
0.8.37 | 17 May 2010 |
0.8.36 | 22 Apr 2010 |
0.8.35 | 01 Apr 2010 |
0.8.34 | 03 Mar 2010 |
0.8.33 | 01 Feb 2010 |
0.8.32 | 11 Jan 2010 |
0.8.31 | 23 Dec 2009 |
0.8.30 | 15 Dec 2009 |
0.8.29 | 30 Nov 2009 |
0.8.28 | 23 Nov 2009 |
0.8.27 | 17 Nov 2009 |
0.8.26 | 16 Nov 2009 |
0.8.25 | 16 Nov 2009 |
0.8.24 | 11 Nov 2009 |
0.8.23 | 11 Nov 2009 |
0.8.22 | 03 Nov 2009 |
0.8.21 | 26 Oct 2009 |
0.8.20 | 14 Oct 2009 |
0.8.19 | 06 Oct 2009 |
0.8.18 | 06 Oct 2009 |
0.8.17 | 28 Sep 2009 |
0.8.16 | 22 Sep 2009 |
0.8.15 | 14 Sep 2009 |
0.8.14 | 07 Sep 2009 |
0.8.13 | 31 Aug 2009 |
0.8.12 | 31 Aug 2009 |
0.8.11 | 28 Aug 2009 |
0.8.10 | 24 Aug 2009 |
0.8.9 | 17 Aug 2009 |
0.8.8 | 10 Aug 2009 |
0.8.7 | 27 Jul 2009 |
0.8.6 | 20 Jul 2009 |
0.8.5 | 13 Jul 2009 |
0.8.4 | 22 Jun 2009 |
0.8.3 | 19 Jun 2009 |
0.8.2 | 15 Jun 2009 |
0.8.1 | 08 Jun 2009 |
0.8.0 | 02 Jun 2009 |
0.7.59 | 25 May 2009 |
0.7.58 | 18 May 2009 |
0.7.57 | 12 May 2009 |
0.7.56 | 11 May 2009 |
0.7.55 | 06 May 2009 |
0.7.54 | 01 May 2009 |
0.7.53 | 27 Apr 2009 |
0.7.52 | 20 Apr 2009 |
0.7.51 | 12 Apr 2009 |
0.7.50 | 06 Apr 2009 |
0.7.49 | 06 Apr 2009 |
0.7.48 | 06 Apr 2009 |
0.7.47 | 01 Apr 2009 |
0.7.46 | 30 Mar 2009 |
0.7.45 | 30 Mar 2009 |
0.7.44 | 23 Mar 2009 |
0.7.43 | 18 Mar 2009 |
0.7.42 | 16 Mar 2009 |
0.7.41 | 11 Mar 2009 |
0.7.40 | 09 Mar 2009 |
0.7.39 | 02 Mar 2009 |
0.7.38 | 23 Feb 2009 |
0.7.37 | 21 Feb 2009 |
0.7.36 | 21 Feb 2009 |
0.7.35 | 16 Feb 2009 |
0.7.34 | 10 Feb 2009 |
0.7.33 | 02 Feb 2009 |
0.7.32 | 26 Jan 2009 |
0.7.31 | 19 Jan 2009 |
0.7.30 | 24 Dec 2008 |
0.7.29 | 24 Dec 2008 |
0.7.28 | 22 Dec 2008 |
0.7.27 | 15 Dec 2008 |
0.7.26 | 08 Dec 2008 |
0.7.25 | 08 Dec 2008 |
0.7.24 | 01 Dec 2008 |
0.7.23 | 27 Nov 2008 |
0.7.22 | 20 Nov 2008 |
0.7.21 | 11 Nov 2008 |
0.7.20 | 10 Nov 2008 |
0.7.19 | 13 Oct 2008 |
0.7.18 | 13 Oct 2008 |
0.7.17 | 15 Sep 2008 |
0.7.16 | 08 Sep 2008 |
0.7.15 | 08 Sep 2008 |
0.7.14 | 01 Sep 2008 |
0.7.13 | 26 Aug 2008 |
0.7.12 | 26 Aug 2008 |
0.7.11 | 18 Aug 2008 |
0.7.10 | 13 Aug 2008 |
0.7.9 | 12 Aug 2008 |
0.7.8 | 04 Aug 2008 |
0.7.7 | 30 Jul 2008 |
0.7.6 | 07 Jul 2008 |
0.7.5 | 01 Jul 2008 |
0.7.4 | 30 Jun 2008 |
0.7.3 | 23 Jun 2008 |
0.7.2 | 16 Jun 2008 |
0.7.1 | 26 May 2008 |
0.7.0 | 19 May 2008 |
0.6.31 | 12 May 2008 |
0.6.30 | 29 Apr 2008 |
0.6.29 | 18 Mar 2008 |
0.6.28 | 13 Mar 2008 |
0.6.27 | 12 Mar 2008 |
0.6.26 | 11 Feb 2008 |
0.6.25 | 08 Jan 2008 |
0.6.24 | 27 Dec 2007 |
0.6.23 | 27 Dec 2007 |
0.6.22 | 19 Dec 2007 |
0.6.21 | 03 Dec 2007 |
0.6.20 | 28 Nov 2007 |
0.6.19 | 27 Nov 2007 |
0.6.18 | 27 Nov 2007 |
0.6.17 | 15 Nov 2007 |
0.6.16 | 29 Oct 2007 |
0.6.15 | 22 Oct 2007 |
0.6.14 | 15 Oct 2007 |
0.6.13 | 24 Sep 2007 |
0.6.12 | 21 Sep 2007 |
0.6.11 | 11 Sep 2007 |
0.6.10 | 03 Sep 2007 |
0.6.9 | 28 Aug 2007 |
0.6.8 | 20 Aug 2007 |
0.6.7 | 15 Aug 2007 |
0.6.6 | 30 Jul 2007 |
0.6.5 | 23 Jul 2007 |
0.6.4 | 17 Jul 2007 |
0.6.3 | 12 Jul 2007 |
0.6.2 | 09 Jul 2007 |
0.6.1 | 17 Jun 2007 |
0.6.0 | 14 Jun 2007 |
0.5.25 | 11 Jun 2007 |
0.5.24 | 06 Jun 2007 |
0.5.23 | 04 Jun 2007 |
0.5.22 | 29 May 2007 |
0.5.21 | 28 May 2007 |
0.5.20 | 07 May 2007 |
0.5.19 | 24 Apr 2007 |
0.5.18 | 19 Apr 2007 |
0.5.17 | 02 Apr 2007 |
0.5.16 | 26 Mar 2007 |
0.5.15 | 19 Mar 2007 |
0.5.14 | 23 Feb 2007 |
0.5.13 | 19 Feb 2007 |
0.5.12 | 12 Feb 2007 |
0.5.11 | 05 Feb 2007 |
0.5.10 | 26 Jan 2007 |
0.5.9 | 25 Jan 2007 |
0.5.8 | 19 Jan 2007 |
0.5.7 | 15 Jan 2007 |
0.5.6 | 09 Jan 2007 |
0.5.5 | 24 Dec 2006 |
0.5.4 | 15 Dec 2006 |
0.5.3 | 13 Dec 2006 |
0.5.2 | 11 Dec 2006 |
0.5.1 | 11 Dec 2006 |
0.5.0 | 04 Dec 2006 |
0.4.14 | 27 Nov 2006 |
0.4.13 | 15 Nov 2006 |
0.4.12 | 31 Oct 2006 |
0.4.11 | 25 Oct 2006 |
0.4.10 | 23 Oct 2006 |
0.4.9 | 13 Oct 2006 |
0.4.8 | 11 Oct 2006 |
0.4.7 | 10 Oct 2006 |
0.4.6 | 06 Oct 2006 |
0.4.5 | 02 Oct 2006 |
0.4.4 | 02 Oct 2006 |
0.4.3 | 26 Sep 2006 |
0.4.2 | 14 Sep 2006 |
0.4.1 | 14 Sep 2006 |
0.4.0 | 30 Aug 2006 |
0.3.61 | 28 Aug 2006 |
0.3.60 | 18 Aug 2006 |
0.3.59 | 16 Aug 2006 |
0.3.58 | 14 Aug 2006 |
0.3.57 | 09 Aug 2006 |
0.3.56 | 04 Aug 2006 |
0.3.55 | 28 Jul 2006 |
0.3.54 | 11 Jul 2006 |
0.3.53 | 07 Jul 2006 |
0.3.52 | 03 Jul 2006 |
0.3.51 | 30 Jun 2006 |
0.3.50 | 28 Jun 2006 |
0.3.49 | 31 May 2006 |
0.3.48 | 29 May 2006 |
0.3.47 | 23 May 2006 |
0.3.46 | 11 May 2006 |
0.3.45 | 06 May 2006 |
0.3.44 | 04 May 2006 |
0.3.43 | 26 Apr 2006 |
0.3.42 | 26 Apr 2006 |
0.3.41 | 21 Apr 2006 |
0.3.40 | 19 Apr 2006 |
0.3.39 | 17 Apr 2006 |
0.3.38 | 14 Apr 2006 |
0.3.37 | 07 Apr 2006 |
0.3.36 | 05 Apr 2006 |
0.3.35 | 22 Mar 2006 |
0.3.34 | 21 Mar 2006 |
0.3.33 | 15 Mar 2006 |
0.3.32 | 11 Mar 2006 |
0.3.31 | 10 Mar 2006 |
0.3.30 | 22 Feb 2006 |
0.3.29 | 20 Feb 2006 |
0.3.28 | 16 Feb 2006 |
0.3.27 | 08 Feb 2006 |
0.3.26 | 03 Feb 2006 |
0.3.25 | 01 Feb 2006 |
0.3.24 | 01 Feb 2006 |
0.3.23 | 24 Jan 2006 |
0.3.22 | 17 Jan 2006 |
0.3.21 | 16 Jan 2006 |
0.3.20 | 11 Jan 2006 |
0.3.19 | 28 Dec 2005 |
0.3.18 | 26 Dec 2005 |
0.3.17 | 18 Dec 2005 |
0.3.16 | 16 Dec 2005 |
0.3.15 | 07 Dec 2005 |
0.3.14 | 05 Dec 2005 |
0.3.13 | 05 Dec 2005 |
0.3.12 | 26 Nov 2005 |
0.3.11 | 15 Nov 2005 |
0.3.10 | 15 Nov 2005 |
0.3.9 | 10 Nov 2005 |
0.3.8 | 09 Nov 2005 |
0.3.7 | 27 Oct 2005 |
0.3.6 | 24 Oct 2005 |
0.3.5 | 21 Oct 2005 |
0.3.4 | 19 Oct 2005 |
0.3.3 | 19 Oct 2005 |
0.3.2 | 12 Oct 2005 |
0.3.1 | 10 Oct 2005 |
0.3.0 | 07 Oct 2005 |
0.2.6 | 05 Oct 2005 |
0.2.5 | 04 Oct 2005 |
0.2.4 | 03 Oct 2005 |
0.2.3 | 30 Sep 2005 |
0.2.2 | 30 Sep 2005 |
0.2.1 | 23 Sep 2005 |
0.2.0 | 23 Sep 2005 |
0.1.45 | 08 Sep 2005 |
0.1.44 | 06 Sep 2005 |
0.1.43 | 30 Aug 2005 |
0.1.42 | 23 Aug 2005 |
0.1.41 | 25 Jul 2005 |
0.1.40 | 22 Jul 2005 |
0.1.39 | 14 Jul 2005 |
0.1.38 | 08 Jul 2005 |
0.1.37 | 23 Jun 2005 |
0.1.36 | 15 Jun 2005 |
0.1.35 | 07 Jun 2005 |
0.1.34 | 26 May 2005 |
0.1.33 | 23 May 2005 |
0.1.32 | 19 May 2005 |
0.1.31 | 16 May 2005 |
0.1.30 | 14 May 2005 |
0.1.29 | 12 May 2005 |
0.1.28 | 08 Apr 2005 |
0.1.27 | 28 Mar 2005 |
0.1.26 | 22 Mar 2005 |
0.1.25 | 19 Mar 2005 |
0.1.24 | 04 Mar 2005 |
0.1.23 | 01 Mar 2005 |
0.1.22 | 22 Feb 2005 |
0.1.21 | 22 Feb 2005 |
0.1.20 | 17 Feb 2005 |
0.1.19 | 16 Feb 2005 |
0.1.18 | 09 Feb 2005 |
0.1.17 | 03 Feb 2005 |
0.1.16 | 25 Jan 2005 |
0.1.15 | 19 Jan 2005 |
0.1.14 | 18 Jan 2005 |
0.1.13 | 21 Dec 2004 |
0.1.12 | 06 Dec 2004 |
0.1.11 | 02 Dec 2004 |
0.1.10 | 26 Nov 2004 |
0.1.9 | 25 Nov 2004 |
0.1.8 | 20 Nov 2004 |
0.1.7 | 12 Nov 2004 |
0.1.6 | 11 Nov 2004 |
0.1.5 | 11 Nov 2004 |
0.1.4 | 26 Oct 2004 |
0.1.3 | 25 Oct 2004 |
0.1.2 | 21 Oct 2004 |
0.1.1 | 11 Oct 2004 |
0.1.0 | 04 Oct 2004 |