Commit graph

704 commits

Author SHA1 Message Date
Olivier Bertrand
0a852591db PATCH-P0-FIX-UPSTREAM: Fix possible buffer overflow (MDEV-8317)
Maintainer: Michal Hrusecky <Michal.Hrusecky@opensuse.org>
(modified by O. Bertrand --> adding and using the XSTR macro)
  modified:   storage/connect/tabxml.cpp
2015-11-08 14:54:56 +01:00
Olivier Bertrand
abe87bb011 Fix error and warnings raised by gcc on Linux:
Define O_RDONLY in jsonudf.cpp
 Correct wrong deinit function names
 Make Locate functions use the variable more
 Avoid signed/unsigned warning in ha_connect.cc GetIntegerTableOption
 Initialize oom in tabodbc MakeInsert
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabodbc.cpp
2015-10-25 21:11:04 +01:00
Olivier Bertrand
1816eca57c Fix MDEV-8882
modified:   storage/connect/tabodbc.cpp
2015-10-21 19:26:35 +02:00
Olivier Bertrand
2445b1b212 Typo 2015-10-20 18:49:33 +02:00
Olivier Bertrand
7cd9af694f Fix MDEV-8926
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mysql-test/connect/r/datest.result
  modified:   storage/connect/mysql-test/connect/t/datest.test
2015-10-18 16:04:25 +02:00
Olivier Bertrand
100be0b6ee Update JSON UDFs to version 1.04.0004
modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/std_data/biblio.json
  modified:   storage/connect/mysql-test/connect/t/json_udf.inc
  modified:   storage/connect/mysql-test/connect/t/json_udf.test
  modified:   storage/connect/tabjson.cpp
2015-10-17 17:23:11 +02:00
Olivier Bertrand
608ad38a0d Temporary changes for making compile to work 2015-10-04 11:57:57 +02:00
Olivier Bertrand
a575d90fe1 Fold all json UDF names to lower case
modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/t/json_udf.inc
  modified:   storage/connect/value.cpp
2015-09-21 21:14:18 +02:00
Olivier Bertrand
9c6405fefa Commit resolved conflicts 2015-09-18 18:39:08 +02:00
Olivier Bertrand
f4fe138321 Fix assert error for where clause with UDF's
was fixed in HA_CONNECT::CondFilter moving res= pval->val_str(&tmp)
    but this was wrong. Now res is only used for strings.
Change version number
  modified:   storage/connect/ha_connect.cc

Add some new UDF's
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

Fix change in tests json_udf
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/t/json_udf.inc
  modified:   storage/connect/mysql-test/connect/t/json_udf.test
2015-09-15 20:42:51 +02:00
Olivier Bertrand
8a154ecde0 Add Json_Get_Item (and Bson_File?) functions
modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
2015-09-07 18:53:25 +02:00
Olivier Bertrand
7915abffbf Add experimental Bson_Array function (not documented)
Change names of functions not returning Json.
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/plugutil.c
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h
2015-09-06 15:51:48 +02:00
Alexander Barkov
e0df116056 A clean-up after the patch for MDEV-8747 and MDEV-8749:
removing IMPOSSIBLE_RESULT from Item_result, as it's not
needed any more. The fact that an Item is not in a comparison
context is now always designated by IDENTITY_SUBST in Subst_constraint.
Previously IMPOSSIBLE_RESULT and IDENTITY_SUBST co-existed but
actually meant the same thing.
2015-09-06 13:25:47 +04:00
Sergei Golubchik
bc12d5fd43 MDEV-6066: Merge new defaults from 5.6 and 5.7
cosmetic fixes. test fixes.
2015-09-04 10:33:56 +02:00
Oleksandr Byelkin
e3982cead2 MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
Sergei Golubchik
a0114b8627 cmake: don't repeat yourself
make repeated cmake runs less verbose:
* remove few not very useful MESSAGE's
* only run pkg_check_modules() if there's no cached result
* only print QQGraph messages on the first run
2015-09-04 10:32:02 +02:00
Sergei Golubchik
530a6e7481 Merge branch '10.0' into 10.1
referenced_by_foreign_key2(), needed for InnoDB to compile,
was taken from 10.0-galera
2015-09-03 12:58:41 +02:00
Olivier Bertrand
175ef097e2 Handle is_null and error arguments
Fix wrong calling sequence for RESULT_INT and RESULT_REAL functions.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
2015-08-22 18:11:42 +02:00
Olivier Bertrand
f741fcc9e5 Handle constant function and argument
modified:   storage/connect/jsonudf.cpp

Record result of json test
  modified:   storage/connect/mysql-test/connect/r/json.result
2015-08-22 12:13:37 +02:00
Olivier Bertrand
ffc0f5b3de Add new UDF noconst.
modified:   storage/connect/noconst.c

Fix a few bugs in json udf's.
  modified:   storage/connect/jsonudf.cpp
2015-08-19 17:52:33 +02:00
Olivier Bertrand
69ce20c4bd Add new json UDF Json_Object_List.
modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
2015-08-18 12:03:29 +02:00
Monty
dfac82e44d Fixed failing tests and compiler warnings
- UNINIT_VAR() was required for 4.8.3 on openSUSE 13.2
2015-08-18 11:18:58 +03:00
Olivier Bertrand
55cb3d8b44 Add new json UDFs and make possible to use a json file name as json item.
modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/t/json.test
  modified:   storage/connect/tabjson.cpp

Fix wrong calculation of Estimated Length when the table has virtual or special columns
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabdos.cpp

Fix wrong handling of null values in ODBCCOL::ReadColumn
  modified:   storage/connect/tabodbc.cpp

Fix crash when SetValue_char is called with a negative length value.
This can happen in odbconn.cpp when SQLFetch returns SQL_NO_TOTAL (-4) as length.
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/value.cpp
2015-08-14 17:07:50 +02:00
Sergei Golubchik
0785b2d55d Merge 'https://github.com/Buggynours/MariaDB 10.0' into 10.0 2015-08-03 17:10:20 +02:00
Sergei Golubchik
58a73e70e2 remove generated CONNECT files 2015-08-03 16:48:19 +02:00
Olivier Bertrand
8ab46a5129 Merge branch 'ob-10.0' into 10.0 2015-07-30 13:27:56 +02:00
Olivier Bertrand
7962add6c4 Fix MDEV-8561 removing a wrong patch
modified:   storage/connect/tabodbc.cpp
2015-07-30 13:15:54 +02:00
Olivier Bertrand
701af14b7d Merge branch 'ob-10.0' into 10.0 2015-07-28 19:39:02 +02:00
Sergei Golubchik
6f14531b52 CONNECT: compiler warnings
and don't check table privileges in external_lock(F_UNLCK).
2015-07-27 10:52:22 +02:00
Sergei Golubchik
00967e114c CONNECT: clean up a stray variable
(patch originally by Alexander Barkov)
2015-07-27 10:52:21 +02:00
Sergei Golubchik
40a6160f4f MDEV-7574 Security definer views don't work with CONNECT ODBC tables
Instead of checking user's privileges with check_access(),
use the cached value in table->grant.privilege instead -
it is correctly set to the invoker or definer, depending
on SQL SECURITY mode.

Continue to use check_access() for DDLs when
table->grant.privilege may be not set (but these cases are
only possible on tables, never for views).

(patch originally by Alexander Barkov)
2015-07-27 10:52:21 +02:00
Olivier Bertrand
3b040a06ed Fix (?) retrieving integer arguments in JSON UDF's
modified:   storage/connect/jsonudf.cpp
2015-07-22 15:49:38 +02:00
Olivier Bertrand
4efcc35a31 Fix (?) retrieving integer arguments in JSON UDF's
modified:   storage/connect/jsonudf.cpp
2015-07-22 13:21:55 +02:00
Alexander Barkov
cb3a71d238 Updating the instructions on how to prepare the OS to run
"mtr connect.odbc_postgresql"
2015-07-22 11:17:55 +04:00
Olivier Bertrand
a392c79552 Fix and Enhance remote indexing:
- Apply to ODBC tables as well as MYSQL tables
- Fix and enhance the CheckCond routine
  Make ReadKey and MakeKeyWhere handle all conditions
  modified:   storage/connect/.gitattributes
  modified:   storage/connect/.gitignore
  modified:   storage/connect/connect.cc
  modified:   storage/connect/connect.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabmysql.h
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/tabodbc.h
  modified:   storage/connect/xobject.cpp
  modified:   storage/connect/xobject.h
  modified:   storage/connect/xtable.h

Add some new tests:
  storage/connect/mysql-test/connect/r/endian.result
  storage/connect/mysql-test/connect/r/mysql_index.result
  storage/connect/mysql-test/connect/t/endian.test
  storage/connect/mysql-test/connect/t/mysql_index.test
2015-07-16 11:05:20 +02:00
Olivier Bertrand
b520febbc3 Resolving conflict on ha_connect.cc 2015-07-09 12:33:17 +02:00
Olivier Bertrand
fdd9af56f6 Correct typo in endian.test 2015-07-07 19:41:56 +02:00
Olivier Bertrand
0efaedf430 Add some new tests:
storage/connect/mysql-test/connect/r/endian.result
  storage/connect/mysql-test/connect/r/mysql_index.result
  storage/connect/mysql-test/connect/t/endian.test
  storage/connect/mysql-test/connect/t/mysql_index.test
2015-07-07 18:16:42 +02:00
Olivier Bertrand
6114101344 Fix regression bug on "select max(length(nom)) from emp1" when:
The emp1 table type is MYSQL
  nom is an indexed column
2015-07-07 15:55:32 +02:00
Monty
7332af49e4 - Renaming variables so that they don't shadow others (After this patch one can compile with -Wshadow and get much fewer warnings)
- Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function.
- Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined.
- Removing calls to current_thd when we have access to thd

Part of this is optimization (not calling current_thd when not needed),
but part is bug fixing for error condition when current_thd is not defined
(For example on startup and end of mysqld)

Notable renames done as otherwise a lot of functions would have to be changed:
- In JOIN structure renamed:
   examined_rows -> join_examined_rows
   record_count -> join_record_count
- In Field, renamed new_field() to make_new_field()

Other things:
- Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe.
- Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly
- Added 'thd' as argument to a few functions to avoid calling current_thd.
2015-07-06 20:24:14 +03:00
Olivier Bertrand
f07359349f Fix loosing result lines when all of this is true:
The table type is MYSQL
  The query where clause includes an indexed column
  The where clause contains < or <= operator on this column
Change version date
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabmysql.cpp

Add visual studio 2013 files to ignore
  modified:   .gitignore
2015-07-06 12:33:11 +02:00
Sergei Golubchik
658992699b Merge tag 'mariadb-10.0.20' into 10.1 2015-06-27 20:35:26 +02:00
Olivier Bertrand
8e524d2f84 Set maturity to GAMMA modified ha_connect.cc 2015-06-25 00:06:55 +02:00
Olivier Bertrand
0e270f7399 Set maturity to GAMMA modified ha_connect.cc 2015-06-25 00:01:38 +02:00
Sergei Golubchik
569d2f8154 Merge branch 'connect-10.0' into 10.0 2015-06-16 23:57:49 +02:00
Sergei Golubchik
36bf482db1 MDEV-8285 compile fails under Mac OS X 10.6.8 due to use of strnlen
#include <m_string.h> where strnlen() is used
2015-06-14 15:51:34 +02:00
Olivier Bertrand
3a9a3b98b7 Fix test txt files line endings 2015-06-08 00:03:52 +02:00
Olivier Bertrand
7482f073ae Commit od last modifications made for version 10.0 2015-06-06 19:23:06 +02:00
Olivier Bertrand
1c756512b0 Commit win and CONNECT resolved files 2015-06-05 23:54:19 +02:00
Olivier Bertrand
f8fa5fe1bc Commit merge resolve 2015-06-05 23:24:39 +02:00