Code Monkey home page Code Monkey logo

pdo_taos's Issues

float type fails

When the parameter is bound by bindParam and the data type is float, the insert operation fails.

编译报错 gcc9.4.0

cc -I/www/server/php/74/include/php/ext -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DZEND_SIGNALS -I. -I/www/xjy/pdo_taos -DPHP_ATOM_INC -I/www/xjy/pdo_taos/include -I/www/xjy/pdo_taos/main -I/www/xjy/pdo_taos -I/www/server/php/74/include/php -I/www/server/php/74/include/php/main -I/www/server/php/74/include/php/TSRM -I/www/server/php/74/include/php/Zend -I/www/server/php/74/include/php/ext -I/www/server/php/74/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /www/xjy/pdo_taos/taos_statement.c -fPIC -DPIC -o .libs/taos_statement.o
In file included from /www/xjy/pdo_taos/taos_statement.c:23:
/www/xjy/pdo_taos/70300/taos_statement.c: In function ‘pdo_taos_stmt_get_col’:
/www/xjy/pdo_taos/70300/taos_statement.c:462:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Wformat=]
462 | sprintf(time_value, "%s.%03ld", time_str, (int32_t)(*((int64_t ) row[colno]) % 1000));
| ~~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| long int int
| %03d
/www/xjy/pdo_taos/70300/taos_statement.c:464:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Wformat=]
464 | sprintf(time_value, "%s.%06ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000000));
| ~~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| long int int
| %06d
/www/xjy/pdo_taos/70300/taos_statement.c:466:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int’ [-Wformat=]
466 | sprintf(time_value, "%s.%09ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000000000));
| ~~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| long int int
| %09d
/www/xjy/pdo_taos/70300/taos_statement.c:466:45: warning: ‘%09ld’ directive writing between 9 and 10 bytes into a region of size between 0 and 29 [-Wformat-overflow=]
466 | sprintf(time_value, "%s.%09ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000000000));
| ^~~~~
/www/xjy/pdo_taos/70300/taos_statement.c:466:41: note: directive argument in the range [-999999999, 999999999]
466 | sprintf(time_value, "%s.%09ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000000000));
| ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from /www/server/php/74/include/php/Zend/zend_portability.h:49,
from /www/server/php/74/include/php/Zend/zend_types.h:25,
from /www/server/php/74/include/php/Zend/zend.h:27,
from /www/server/php/74/include/php/main/php.h:33,
from /www/xjy/pdo_taos/taos_statement.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 41 bytes into a destination of size 30
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /www/xjy/pdo_taos/taos_statement.c:23:
/www/xjy/pdo_taos/70300/taos_statement.c:464:45: warning: ‘%06ld’ directive writing between 6 and 7 bytes into a region of size between 0 and 29 [-Wformat-overflow=]
464 | sprintf(time_value, "%s.%06ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000000));
| ^~~~~
/www/xjy/pdo_taos/70300/taos_statement.c:464:41: note: directive argument in the range [-999999, 999999]
464 | sprintf(time_value, "%s.%06ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000000));
| ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from /www/server/php/74/include/php/Zend/zend_portability.h:49,
from /www/server/php/74/include/php/Zend/zend_types.h:25,
from /www/server/php/74/include/php/Zend/zend.h:27,
from /www/server/php/74/include/php/main/php.h:33,
from /www/xjy/pdo_taos/taos_statement.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 38 bytes into a destination of size 30
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /www/xjy/pdo_taos/taos_statement.c:23:
/www/xjy/pdo_taos/70300/taos_statement.c:462:45: warning: ‘%03ld’ directive writing between 3 and 4 bytes into a region of size between 0 and 29 [-Wformat-overflow=]
462 | sprintf(time_value, "%s.%03ld", time_str, (int32_t)(
((int64_t ) row[colno]) % 1000));
| ^~~~~
/www/xjy/pdo_taos/70300/taos_statement.c:462:41: note: directive argument in the range [-999, 999]
462 | sprintf(time_value, "%s.%03ld", time_str, (int32_t)(
((int64_t *) row[colno]) % 1000));
| ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from /www/server/php/74/include/php/Zend/zend_portability.h:49,
from /www/server/php/74/include/php/Zend/zend_types.h:25,
from /www/server/php/74/include/php/Zend/zend.h:27,
from /www/server/php/74/include/php/main/php.h:33,
from /www/xjy/pdo_taos/taos_statement.c:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 35 bytes into a destination of size 30
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/bin/sh /www/xjy/pdo_taos/libtool --mode=link cc -DPHP_ATOM_INC -I/www/xjy/pdo_taos/include -I/www/xjy/pdo_taos/main -I/www/xjy/pdo_taos -I/www/server/php/74/include/php -I/www/server/php/74/include/php/main -I/www/server/php/74/include/php/TSRM -I/www/server/php/74/include/php/Zend -I/www/server/php/74/include/php/ext -I/www/server/php/74/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -o pdo_taos.la -export-dynamic -avoid-version -prefer-pic -module -rpath /www/xjy/pdo_taos/modules pdo_taos.lo taos_driver.lo taos_statement.lo -Wl,-rpath,/usr/driver -L/usr/driver -ltaos
cc -shared .libs/pdo_taos.o .libs/taos_driver.o .libs/taos_statement.o -L/usr/driver -ltaos -Wl,-rpath -Wl,/usr/driver -Wl,-soname -Wl,pdo_taos.so -o .libs/pdo_taos.so
creating pdo_taos.la
(cd .libs && rm -f pdo_taos.la && ln -s ../pdo_taos.la pdo_taos.la)
/bin/sh /www/xjy/pdo_taos/libtool --mode=install cp ./pdo_taos.la /www/xjy/pdo_taos/modules
cp ./.libs/pdo_taos.so /www/xjy/pdo_taos/modules/pdo_taos.so
cp ./.libs/pdo_taos.lai /www/xjy/pdo_taos/modules/pdo_taos.la
PATH="$PATH:/sbin" ldconfig -n /www/xjy/pdo_taos/modules

Libraries have been installed in:
/www/xjy/pdo_taos/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  • use the `-Wl,--rpath -Wl,LIBDIR' linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

Build complete.
Don't forget to run 'make test'.

Installing shared extensions: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/

configure无法通过

phpize运行正常无报错,之后./configure的时候发现依赖自身?无法通过:
image
测试了php 7.4.3和8.0.16均不行

如果是我自己姿势问题,望指点...


公司的后端技术栈主要是php workerman
也有用到一些8.1的新特性,所以希望早日支持8.1
我们会持续follow进展,感谢您为社区做的贡献
项目上线后会在显眼位置增加致谢说明!

在苹果m1编译失败

环境 m1 php7.2.16 tdengine 2.4.0
报错如下:
/pdo_taos/taos_driver.c:41:16: error: implicit declaration of function 'php_addcslashes_str' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return php_addcslashes_str(str, strlen(str), "\'", sizeof("\'"));
/pdo_taos/taos_driver.c:41:16: note: did you mean 'php_addcslashes'?
/usr/local/include/php/ext/standard/php_string.h:129:21: note: 'php_addcslashes' declared here
PHPAPI zend_string *php_addcslashes(zend_string *str, int freeit, char *what, size_t what_len);
^
/pdo_taos/taos_driver.c:41:16: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'zend_string *' (aka 'struct _zend_string *') [-Wint-conversion]
return php_addcslashes_str(str, strlen(str), "\'", sizeof("\'"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/pdo_taos/taos_driver.c:149:19: warning: assigning to 'struct pdo_stmt_methods *' from 'const struct pdo_stmt_methods *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
stmt->methods = &taos_stmt_methods;
^ ~~~~~~~~~~~~~~~~~~
/pdo_taos/taos_driver.c:415:18: warning: assigning to 'struct pdo_dbh_methods *' from 'const struct pdo_dbh_methods *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
dbh->methods = &taos_methods;
^ ~~~~~~~~~~~~~

/pdo_taos/taos_driver.c:428:18: warning: assigning to 'struct pdo_dbh_methods *' from 'const struct pdo_dbh_methods *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
dbh->methods = &taos_methods;
^ ~~~~~~~~~~~~~
4 warnings and 1 error generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.