Commit graph

17111 commits

Author SHA1 Message Date
Olivier Bertrand
7829cefa41 - Fix MDEV-9603 compiler error.
modified:   storage/connect/tabmysql.cpp

- Test invalid CSV separator when creating the table (MDEV-9714)
  modified:   storage/connect/ha_connect.cc

- Stop using SQLDescribeParam anymore
  modified:   storage/connect/odbconn.cpp

- Fix MDEV-9723 Regression due to calling Cardinality instead of
  GetMaxSize in info.
  modified:   storage/connect/tabtbl.h
  modified:   storage/connect/mysql-test/connect/r/tbl.result
  modified:   storage/connect/mysql-test/connect/t/tbl.test

- Typo
  modified:   storage/connect/tabodbc.cpp
2016-03-16 18:53:56 +01:00
Olivier Bertrand
69042ffe4e - Fix to MDEV-9579 be testing for void result.
modified:   storage/connect/tabodbc.cpp
2016-02-20 00:22:16 +01:00
Olivier Bertrand
d163ad338d - Fix to MDEV-9542 Connect was not handling NULLs in the answer
from catalog functions and tables. It does now and when decimal
  is NULL defines DOUBLE without parameters.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mysql-test/connect/r/odbc.result
  modified:   storage/connect/mysql-test/connect/r/odbc_oracle.result
  modified:   storage/connect/mysql-test/connect/r/odbc_postgresql.result
  modified:   storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  modified:   storage/connect/mysql-test/connect/r/odbc_xls.result
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/table.cpp
  modified:   storage/connect/valblk.h
2016-02-15 10:32:30 +01:00
Olivier Bertrand
8fb34ea8c1 - Fix to MDEV-9446 (using Json UDFs when CONNECT is not installed)
modified:   storage/connect/ha_connect.cc
  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/mysql-test/connect/t/json_udf.test
  modified:   storage/connect/mysql-test/connect/t/json_udf2.inc
2016-01-25 14:10:09 +01:00
Olivier Bertrand
ddd62ba24a - Change SQL_NTS to 0 when the string is NULL
modified:   storage/connect/odbconn.cpp
2016-01-18 23:00:40 +01:00
Olivier Bertrand
3e20a0d8f4 - Fix MDEV-9239. Meanwhile, make all references to the database in XTAB Schema
(was sometimes in XTAB Catalog)
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabutil.cpp
2016-01-09 19:51:51 +01:00
Olivier Bertrand
3e76d54b98 - Fix MDEV-9322.
modified:   storage/connect/json.cpp
2015-12-27 19:37:28 +01:00
Olivier Bertrand
e57876eacf - Fix MDEV-9279. Replacing exit(1) in yy_fatal_error by a longjmp.
modified:   storage/connect/fmdlex.c
  modified:   storage/connect/plgdbutl.cpp
2015-12-14 23:49:17 +01:00
Olivier Bertrand
2ce0043bf3 - Copy error message from G to g when using temporary storage for parsing.
modified:   storage/connect/tabjson.cpp
2015-12-13 18:43:37 +01:00
Olivier Bertrand
673cc06598 Merge branch 'ob-10.1' into 10.1 2015-12-11 19:19:21 +01:00
Olivier Bertrand
32879b9580 Update version number 2015-12-11 18:43:54 +01:00
Olivier Bertrand
32393e2253 Merge branch 'ob-10.1' into 10.1 2015-12-09 00:02:04 +01:00
Olivier Bertrand
a18a3fbdd1 - Serialize: Protect again eventual longjmp's.
Always return NULL on error.
Adding also the file length.
  modified:   storage/connect/json.cpp
  modified:   storage/connect/jsonudf.cpp

- JSONCOL::WriteColumn Add types SHORT and BIGINT as accepted
  modified:   storage/connect/tabjson.cpp

- TDBJSN: Make this type use a separate storage for Json parsing
and retrieve this memory between each rows. This is necessary
to be able to handle big tables. See MDEV-9228.
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
2015-12-09 00:00:08 +01:00
Olivier Bertrand
1ad5a8dfb7 Fix memory error when a plain string argument is parsed.
Parsing memory, not added in CalcLen, is added in CheckMemory.
Adding also the file length.
  modified:   storage/connect/jsonudf.cpp
2015-12-05 20:51:40 +01:00
Olivier Bertrand
0ec89291f1 Remove warning on Linux
modified:   storage/connect/filamzip.cpp

Avoid calling the wrong AddValue (Windows compiler error ???)
  modified:   storage/connect/json.h

Fix looping bug in JARRAY::AddValue for arrays having one value.
Fix potential crash in JVALUE::SetValue
  modified:   storage/connect/json.cpp

Many changes to fix bugs, enhance memory handling and modify Jpath.
In JSNX some functions have been re-written or added to handle new Jpath.
BMX was re-defined to avoid a different size between Windows an Linux.
Jbin memory was fixed to use the proper memory when adding values.
Default pretty value is now 0 instead of 2.
Filename is stored in BSON when IsJson == 2.
BSON size is added to memlen in CalcLen when applicable.
The order or parameter was switch in Json_Object_Grp.
File name argument must be a constant (temporary?)
Json_Set_Item now returns file name when applicable.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

Include "mycat.h"
  modified:   storage/connect/mycat.cc

Udf_json test revisited and fixed for Linux
  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
  modified:   storage/connect/mysql-test/connect/t/json_udf2.inc
2015-12-04 01:02:27 +01:00
Olivier Bertrand
8a860fda0c Remove commented lines.
modified:   storage/connect/value.cpp
Avoid warning on redefined XSTR
  modified:   storage/connect/tabxml.cpp
2015-11-22 16:15:57 +01:00
Olivier Bertrand
1d239d8c94 Make changes required by version 10.1.9 (see Sergei's mmail):
Use PlgDBSuballoc in JbinAlloc to avoid unsupported longjmp's.
  modified:   storage/connect/ha_connect.cc
  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/tabjson.cpp
  modified:   storage/connect/value.cpp
Add new UDF functions jsoncontains, jsoncontains_path, json_set_item,
json_insert_item, json_update_item, jbin_set_item, jbin_insert_item,
jbin_update_item
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
2015-11-22 14:49:51 +01:00
Olivier Bertrand
ad916ef33c Merge branch 'ob-10.1' into 10.1 2015-11-08 14:56:48 +01:00
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
e7fa7e0858 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:19:45 +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
Buggynours
de19721296 Fix of error and warnings when compiling on linux
modifié :         storage/connect/ha_connect.cc
	modifié :         storage/connect/jsonudf.cpp
	nouveau fichier : storage/connect/mysql-test/connect/r/odbc_firebird.result
	modifié :         storage/connect/mysql-test/connect/t/json.test
	nouveau fichier : storage/connect/mysql-test/connect/t/odbc_firebird.test
	modifié :         storage/connect/tabodbc.cpp
	supprimé :        storage/connect/Makefile
2015-10-25 17:46:20 +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
Alexander Barkov
d9b25ae3db MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty strings
MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
2015-09-17 11:05:07 +04: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
Jan Lindström
9e6f3df51a MDEV-8799: Server crashes in btr_defragment_add_index, encryption.innodb-bad-key-change5 and alike fail in buildbot
Problem was unsafe access to NULL pointer. Added additional checks to avoid
access to NULL pointer.
2015-09-15 09:40:04 +03:00
Jan Lindström
3079bd43af Fix release build compile failure. 2015-09-14 16:28:16 +03:00
Jan Lindström
4d3f680c95 MDEV-8772: Assertion failure in file ha_innodb.cc line 20027 when importing page compressed and encrypted tablespace using incorrect keys
Add error handling to decryp function when decrypt fails during
import.
2015-09-14 14:11:23 +03:00
Jan Lindström
ddaddf1019 MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keys
Add error handling when getting block from encrypted table and decryption
fails.
2015-09-14 12:15:27 +03:00
Jan Lindström
71b1444601 MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
Add error handling to btr_validate_index when index root block
can't be read because block decryption fails.
2015-09-14 11:01:14 +03:00
Jan Lindström
d581ef5b2c MDEV-8764: Wrong error when encrypted table can't be decrypted.
Add a new error message when table is encrypted but decryption
fails. Use this new error message on InnoDB/XtraDB.
2015-09-14 08:27:36 +03:00
Elena Stepanova
80089a60e5 Follow-up for MDEV-8675 and MDEV-8676
type_spatial_indexes test is now be re-enabled, and the new result file
can be used for creating engine-specific rdiffs
2015-09-14 03:12:54 +03:00
Jan Lindström
067ed23c27 MDEV-8774: Test innodb.innodb_bug53290 failures on buildbot
Problem was -O2 and __attribute__((nonnull)) when it should have been
__attribute__((nonnull(1,2,3,4,5)))
2015-09-08 21:04:46 +03:00
Jan Lindström
2c1553e545 MDEV-8774: Test innodb.innodb_bug53290 failures on buildbot
Fixed unsafe reference to null pointer.
2015-09-08 16:23:19 +03:00
Jan Lindström
509b836623 MDEV-8708: InnoDB temp file encryption
Added encryption support for online alter table where InnoDB temporary
files are used. Added similar support also for tables containing
full text-indexes.

Made sure that table remains encrypted during discard and import
tablespace.
2015-09-08 08:38:12 +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
Jan Lindström
5448e0a6dc MDEV-8745: Bad InnoDB logging: "[Note] InnoDB: not started" 2015-09-07 08:34:04 +03: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
Jan Lindström
a0df8225ec MDEV-8753: 10.1 build is broken: xtradb/handler/ha_innodb.cc:21430: error: redefinition of 'void ib_push_warning(trx_t*, ulint, const char*, ...)'
Fixed bad merge.
2015-09-05 07:18:57 +03:00
Jan Lindström
e04723d754 MDEV-8750: Server crashes in page_cur_is_after_last on altering table using a wrong encryption key
Analysis: Server tried to continue reading tablespace using a cursor after
we had resolved that pages in the tablespace can't be decrypted.

Fixed by addind check is tablespace still encrypted.
2015-09-04 20:19:45 +03:00
Jan Lindström
7e916bb86f MDEV-8588: Assertion failure in file ha_innodb.cc line 21140 if at least one encrypted table exists and encryption service is not available
Analysis: Problem was that in fil_read_first_page we do find that
    table has encryption information and that encryption service
    or used key_id is not available. But, then we just printed
    fatal error message that causes above assertion.

    Fix: When we open single table tablespace if it has encryption
    information (crypt_data) store this crypt data to the table
    structure. When we open a table and we find out that tablespace
    is not available, check has table a encryption information
    and from there is encryption service or used key_id is not available.
    If it is, add additional warning for SQL-layer.
2015-09-04 20:19:45 +03:00
Jan Lindström
e1978234eb MDEV-8588: Assertion failure in file ha_innodb.cc line 21140 if at least one encrypted table exists and encryption service is not available
Analysis: Problem was that in fil_read_first_page we do find that
table has encryption information and that encryption service
or used key_id is not available. But, then we just printed
fatal error message that causes above assertion.

Fix: When we open single table tablespace if it has encryption
information (crypt_data) store this crypt data to the table
structure. When we open a table and we find out that tablespace
is not available, check has table a encryption information
and from there is encryption service or used key_id is not available.
If it is, add additional warning for SQL-layer.
2015-09-04 20:19:33 +03:00
Sergei Golubchik
e9b6f95013 test failure 2015-09-04 16:30:11 +02:00