mysql firebird 性能_Firebird, MySQL 与 PostgreSQL 代码质量对比

今天看到一篇文章 - “Firebird, MySQL 与 PostgreSQL 代码质量对比”-  关于三个开源 RDBMS 的静态分析比较。

主要内容

A few words about the projects

Firebird

MySQL

PostgreSQL

PVS-Studio

Comparison criteria

Why "head-on" comparison is not a good idea

An alternative way

Review of bugs

Total analysis results

Troubles with clearing private data

No check for the pointer returned by malloc and other similar functions

The use of a potential null pointer

Potentially unsafe use of formatted-output functions

Other warnings mentioned in the article on vulnerabilities

Suspicious use of enumeration elements

Incorrect determination of memory-block size

Missing 'throw' keyword

Calling the wrong memory-deallocation operator

Summing it all up

最终比较结果

Summing up the demerit points, we get the following:

Firebird: 1 + 1 + 2 = 4 points.

MySQL: 3 + 1 + 2 + 2 + 2 + 2 = 12 points.

PostgreSQL: 3 points.

Remember: the fewer points, the better.And if you ask me (a person with a wicked taste), I'd prefer... MySQL! It has the most interesting bugs and it's the leader, which makes it a perfect choice for analysis!

Firebird and PostgreSQL are trickier. On the one hand, even a one-point margin counts; on the other hand, it's quite a small difference, especially because that point was given for a V768 warning of the medium-certainty level... But then again, the codebase of PostgreSQL is way larger, yet it issued four hundred warnings at its automatically generated code...

Anyway, to figure out which of the two projects, Firebird or PostgreSQL, is better, we'd have to do a more thorough comparison. For now, I put them on one podium place so no one is offended. Maybe one day we'll compare them again more carefully, but it will be quite a different story...

So, the code-quality rankings are as follows:

1 place - Firebird and PostgreSQL.

2 place - MySQL.

Please remember that any review or comparison, including this one, is subjective. Different approaches may produce different results (though it is mostly true for Firebird and PostgreSQL, but not for MySQL).

So what about static analysis? I hope you are convinced now that it is useful for detecting defects of various types. Want to find out if your codebase has any of those bugs? Then it's the right time to try PVS-Studio! You write perfectly clean code? Then why not check your colleagues' code? ;)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/333641.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Linux 命令之 let -- bash 中用于计算的工具,用于执行一个或多个表达式

文章目录一、命令介绍二、命令示例自增操作自减操作shell 脚本中的运算表达式一、命令介绍 let 命令是 BASH 中用于计算的工具,用于执行一个或多个表达式,变量计算中不需要加上 $ 来表示变量。如果表达式中包含了空格或其他特殊字符,则必须引…

sun jdk 与jdk_Sun过去的世界中的JDK 11和代理

sun jdk 与jdk使用JDK 11后,就sun.misc.Unsafe的第一种方法。 其中, defineClass方法已删除。 代码生成框架通常使用此方法在现有的类加载器中定义新的类。 尽管此方法易于使用,但它的存在也使JVM本质上不安全,正如其定义类的名称…

php mysql上传多张图片_PHP开发之多个文件上传到MySql数据库(一)

前面的章节我们介绍了用PHP实现上传一个文件的教程。朋友们就会有疑问,怎么样才能上传多张多个文件到数据库?重点在于放入几个文件以后点击提交上传之后所有的文件一起上传,并且每个文件都给一个新的路径。提供一种思路:先获取每个…

jdk只有一个java进程_JDK 10:从Java访问Java应用程序的进程ID

jdk只有一个java进程StackOverflow.com上一个普遍的问题是:“ Java程序如何获得自己的进程ID? 与该问题相关的几个答案包括解析ManagementFactory返回的String 。 getRuntimeMXBean() 。 getName() [但是可…

Shell 脚本生成不重复的随机数

#!/bin/bash #AUTHOR:AN #DATE:2019-3-24 #Describe:Generate No-Repeat Random-Number #Method:如生成3~7的随机数,先生成0~4(7-3)的随机数,再加上3(起始值)来修正 #####################################…

python if语句能否判断中文_Python“if”语句被忽略

如果满足多个条件(“or”)中的一个,我将触发Python中的循环。脚本似乎跳过了“if”语句并在不满足所需条件的情况下进入内部循环。在编码# Begin TestCase# Main logic: execute RemoteController macro, if expected state true, set Success, else: Failfor macr…

payara 创建 集群_Payara Micro在Oracle应用容器云上

payara 创建 集群在此博客文章中,我将描述如何将打包在Payara Microber -jar中的CloudEE Duke应用程序部署到Oracle Application Container Cloud 。 在Oracle Application Container Cloud中进行部署所需的部署工件是一个ZIP归档文件,其中包含应用程序…

shell 脚本书写规范

表达式中的运算符之间不允许空格,例如: [roothtlwk0001host ~]# sum 200 300 sum: : 没有那个文件或目录 sum: 200: 没有那个文件或目录 sum: : 没有那个文件或目录 sum: 300: 没有那个文件或目录从上面的输出结果可知,每项前后出现空格&a…

python可以用来整理表格吗_Python将多份excel表格整理成一份表格

利用Python将多份excel表格整理成一份表格,抛弃过去逐份打开复制粘贴的方式。直接附上代码: import xlrdimport xlwtimport osfrom xlutils.copy import copyimport os.pathfrom xlwt import *dir input("输入文件路径\n");start_row input(…

Linux 环境变量启动过程/配置文件的读取过程

环境变量配置文件 对所有用户都起作用 /etc/profile/etc/profile.d/*.sh/etc/bashrc 对当前用户起作用 配置文件在用户家目录下,即用户的主目录下。 ~/.bash_profile~/.bashrc 环境变量启动过程 新进程启动后先将父进程的全局性的环境变量复制一份到自己的栈…

azure blob_使用Azure Blob存储托管Maven工件

azure blob如果您使用Microsoft Azure并且将Java用于项目,则Azure Blob存储是托管团队工件的理想场所。 它很容易设置,而且很便宜。 如果您对它们的功能不特别感兴趣,那么它比设置现有存储库选项(jfrog,nexus&#xf…

angular ngoninit 刷新html页面_web前端入门到实战:实现html页面自动刷新

使用场景:页面需要定时刷新,实时加载数据,需要实时查看监控数据(H5中的WebSocket和SSE可以实现局部刷新)一定时间之后跳转到指定页面(登录注册之类)前端开发使用伪数据调试html页面(…

什么是超越数

超越数,数学概念,指不是代数数的数。超越数的存在是由法国数学家刘维尔(Joseph Liouville,1809 ~ 1882)在1844年最早证明的。关于超越数的存在,刘维尔写出了下面这样一个无限小数:a0.1100010000…

认识JSON补丁:JSON-P 1.1概述系列

Java EE 8包括对JSON处理API的更新,并使其与JSON的最新IEFT标准保持同步。 他们是: JSON指针 RFC 6901 JSON补丁 RFC 6902 JSON合并修补程序RFC 7396 我将在这个迷你系列中涵盖这些主题。 入门 要开始使用JSON-P,您将需要Maven中央存储库…

mysql驱动连接不了mariadb_无法从振动应用程序连接到MySQL / MariaDB数据库

如果我使用自定义main(void main()而不是shared static this()),一切正常.使用默认主菜单时出现“访问冲突”错误.它看起来像MySQL不允许从localhost连接到它,但在my.ini中我添加了字符串:bind-address 127.0.0.1代码,如果有帮助:import std.stdio;impo…

什么是自然数

自然数是指用以计量事物的件数或表示事物次序的数。即用数码 0,1,2,3,4……所表示的数。自然数由 0 开始,一个接一个,组成一个无穷的集体。自然数有有序性,无限性。分为偶数和奇数,合…

angular jwt_Angular5 JWT身份验证(Spring Boot安全性)

angular jwt欢迎使用带有Spring Security的angular5 jwt身份验证。在本教程中,我们将在一个angular5单页应用程序中使用jwt身份验证创建一个全栈应用程序,该应用程序具有由spring boot支持并支持spring security集成的后备服务器。带有集成了HttpInterce…

impacket安装 python_Impacket网络协议工具包介绍

Impacket是一个Python类库,用于对SMB1-3或IPv4 / IPv6 上的TCP、UDP、ICMP、IGMP,ARP,IPv4,IPv6,SMB,MSRPC,NTLM,Kerberos,WMI,LDAP等协议进行低级编程访问。…

什么是实数?

文章目录什么是实数有理数无理数实数的运算什么是实数 实数就是所有的有理数与无理数的集合,在数轴上,我们可以一一找到与实数相对应的点,更加具体化来说,实数也就是有限小数(整数也可以被看成是小数部位为零的小数)和无限小数的…