请问各位大哥,静态编译时,mysql编译选项--with-mysqld-ldflags后面用-all-static和-static有什么不同吗?

解决方案 »

  1.   

    -all-static 见到过,是所有的文件为静态LINK,这样mysqld的运行效率会比较高,同样尺寸会比较大。
    -static 没见过。
      

  2.   


    手册中是这样说的
    If you link dynamically (without -static), the result is 13% slower on Linux. Note that you still can use a dynamically linked MySQL library for your client applications. It is the server that is most critical for performance. 反而没有出现-all-static
      

  3.   

    而且使用cat mysqlbug | grep CONFIGURE_LINE查看下载下来的二进制包,编译选项中也是--with-mysqld-ldflags=-static
      

  4.   

    If you link dynamically (without -static), the result is 13% slower on Linux.
    目的就是加快扫描吧和那个 engine_condition_pushdown 参数效果一样吧
      

  5.   

    mysql 二进制包也是静态编译的,为什么可以plugin方式加裁innodb,而我自己静态编译的就不行?
      

  6.   

    我使用-static重新编译了一下,可以加裁plugin了,之前用-all-static编译的不行。。