mysql报Segmentation fault错误

来源:互联网 发布:搜狐汽车 大数据 编辑:程序博客网 时间:2024/05/21 07:51
问题现象如下
[root@localhost bin]# ./mysql -uroot -pEnter password: Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 8Server version: 5.6.24 Source distributionCopyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Segmentation fault


在源码包里,编辑文件 cmd-line-utils/libedit/terminal.c
把terminal_set方法中的 char buf[TC_BUFSIZE]; 这一行注释,再把 area = buf;改为 area = NULL;
更改后如下

protected int terminal_set(EditLine *el, const char *term) { int i; /*char buf[TC_BUFSIZE];*/ char *area; const struct termcapstr *t; sigset_t oset, nset; int lins, cols; --phpfensi.com (void) sigemptyset(&nset); (void) sigaddset(&nset, SIGWINCH); (void) sigprocmask(SIG_BLOCK, &nset, &oset); area = NULL; 

然后重新编译即可

原创粉丝点击