Commit graph

864 commits

Author SHA1 Message Date
Monty
c696fc74cf Fixed compiler warnings and errors 2015-10-09 13:01:07 +03:00
Olivier Bertrand
608ad38a0d Temporary changes for making compile to work 2015-10-04 11:57:57 +02:00
Sergei Golubchik
9554342d16 Merge branch '10.1' into pull-request-97
Merge downstream Debian packaging (MDEV-6284)
2015-09-25 10:24:14 +02:00
Alexander Barkov
5c9c8ef1ea MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL 2015-09-22 14:01:54 +04: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
80d1237470 Merge branch 'ob-10.0' into 10.0 2015-09-16 12:14:59 +02:00
Olivier Bertrand
019c9e0a65 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.
  modified:   storage/connect/ha_connect.cc
2015-09-16 12:11:28 +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
d69931eec2 Merge branch 'ob-10.0' into 10.0 2015-09-09 01:28:04 +02:00
Olivier Bertrand
e939ea58e5 Fix assert error for where clause with UDF's
was fixed in HA_CONNECT::CondFilter moving pval->val_str(&tmp)
  modified:   storage/connect/ha_connect.cc
2015-09-09 01:26:00 +02:00
Otto Kekäläinen
f8754d652e Merge branch '10.1' of https://github.com/MariaDB/server into ok-debpkg-10.1 2015-09-07 22:21:35 +03: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
Oleksandr Byelkin
0ce0b88080 MDEV-8450: PATCH] Wrong macro expansion in Query_cache::send_result_to_client()
Expression in macro protected by ()
2015-09-06 22:26:33 +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
Otto Kekäläinen
d6c5e7e2cc Merge branch '10.1' of https://github.com/MariaDB/server into ok-debpkg-10.1 2015-09-05 21:28:14 +03: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
Otto Kekäläinen
b007dfb101 Typofix: preceeding -> preceding 2015-08-31 09:18:30 +03: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
Olivier Bertrand
cd9b9199a1 Merge branch 'ob-10.0' into 10.0 2015-08-14 15:49:46 +02:00
Olivier Bertrand
6d46c977a7 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 14:23:14 +02:00
Olivier Bertrand
335ec7a363 Prevent wrong update of expanded columns when pretty is not 2.
modified:   storage/connect/tabjson.cpp
2015-08-11 21:15:33 +02:00
Olivier Bertrand
0eacebf167 Merge branch 'ob-10.0' into 10.0 2015-08-08 10:54:47 +02:00
Olivier Bertrand
5f533035d3 Fix the TDBDOS::EstimatedLength function that was wrongly counting
its calculation virtual and special columns.
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabdos.cpp
2015-08-06 17:46:47 +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