diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2016-05-26 18:48:47 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2016-05-26 18:48:47 +0200 |
commit | ead4147b13aa828f3b8393a2fc294479df9e4bb3 (patch) | |
tree | 65d513be7273e98b90aca80e2a80510a50bafbfc /storage/connect/jsonudf.cpp | |
parent | afa4657fd334056ea8de0c83e1ad655fd49566ae (diff) | |
download | mariadb-git-ead4147b13aa828f3b8393a2fc294479df9e4bb3.tar.gz |
- Reconize the JDBC type -7 (BIT)
modified: storage/connect/jdbconn.cpp
- Add the global variable connect_java_wrapper
This enables to use different wrappers
modified: storage/connect/CMakeLists.txt
renamed: storage/connect/java/ap/JdbcInterface.class -> storage/connect/JdbcApacheInterface.class
renamed: storage/connect/java/ap/JdbcInterface.java -> storage/connect/JdbcApacheInterface.java
renamed: storage/connect/java/ds/JdbcInterface.class -> storage/connect/JdbcDSInterface.class
renamed: storage/connect/java/ds/JdbcInterface.java -> storage/connect/JdbcDSInterface.java
modified: storage/connect/ha_connect.cc
deleted: storage/connect/java/std/JdbcInterface.class
deleted: storage/connect/java/std/JdbcInterface.java
modified: storage/connect/jdbconn.cpp
modified: storage/connect/jdbconn.h
- Add JDBC tests (disabled)
modified: storage/connect/mysql-test/connect/disabled.def
new file: storage/connect/mysql-test/connect/r/jdbc.result
new file: storage/connect/mysql-test/connect/r/jdbc_new.result
new file: storage/connect/mysql-test/connect/r/jdbc_oracle.result
new file: storage/connect/mysql-test/connect/r/jdbc_postgresql.result
new file: storage/connect/mysql-test/connect/std_data/girls.txt
new file: storage/connect/mysql-test/connect/t/jdbc.test
new file: storage/connect/mysql-test/connect/t/jdbc_new.test
new file: storage/connect/mysql-test/connect/t/jdbc_oracle.test
new file: storage/connect/mysql-test/connect/t/jdbc_postgresql.test
new file: storage/connect/mysql-test/connect/t/jdbconn.inc
new file: storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc
- Typo
modified: storage/connect/jsonudf.cpp
Diffstat (limited to 'storage/connect/jsonudf.cpp')
-rw-r--r-- | storage/connect/jsonudf.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 4cead259896..29af7b95f66 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -5235,21 +5235,28 @@ my_bool envar_init(UDF_INIT *initid, UDF_ARGS *args, char *message) if (args->arg_count != 1) { strcpy(message, "Unique argument must be an environment variable name"); return true; - } else + } else { + initid->maybe_null = true; return false; + } // endif count } // end of envar_init char *envar(UDF_INIT *initid, UDF_ARGS *args, char *result, - unsigned long *res_length, char *, char *) + unsigned long *res_length, char *is_null, char *) { char *str, name[256]; int n = MY_MIN(args->lengths[0], sizeof(name) - 1); memcpy(name, args->args[0], n); name[n] = 0; - str = getenv(name); - *res_length = (str) ? strlen(str) : 0; + + if (!(str = getenv(name))) { + *res_length = 0; + *is_null = 1; + } else + *res_length = strlen(str); + return str; } // end of envar |