Commit graph

163998 commits

Author SHA1 Message Date
Olivier Bertrand
37840d5313 Security: EOM modules must now be loaded from the plugin directory.
modified:   storage/connect/mycat.cc
  modified:   storage/connect/reldef.cpp

Json array index (position) always defaults to 0
  modified:   storage/connect/tabjson.cpp
2015-05-20 11:19:44 +02:00
Olivier Bertrand
db33294fdc Json array index (position) was badly set for default array setting
modified:   storage/connect/tabjson.cpp
2015-05-17 19:55:48 +02:00
Olivier Bertrand
a82171c9aa In BIN table date_format now imply by default field_format='C'.
modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/reldef.cpp

Json array index (position) is now 0 based by default. This corresponds
to what all json applications and functions do. Also fix ROWNUM calculation.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/r/json.result
  modified:   storage/connect/mysql-test/connect/t/json.test
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
2015-05-17 15:22:42 +02:00
Olivier Bertrand
b9c910909c Fix a bug in BIN buffer initialisation (in FIXFAM::AllocateBuffer)
modified:   storage/connect/filamfix.cpp

Second version of BIN table new field format (1st one was buggy)
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfix.h

Make bin.test not to fail in big-endian machines
  modified:   storage/connect/mysql-test/connect/r/bin.result
  modified:   storage/connect/mysql-test/connect/t/bin.test

Fix a bug causing wrong default offset to be generated when virtual
or special columns were placed beetween standard columns. Also
calculate the good offset for BIN columns with new field format.
  modified:   storage/connect/reldef.cpp
2015-05-15 11:56:29 +02:00
Olivier Bertrand
e6b60ee5af Make BIN table files more flexible with new column format.
In particular enable to set length and endian setting.
This should solve all problems on IBM390s machines.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfix.h

Make DBF tables to be usable in big-endian machines (test version)
  modified:   storage/connect/filamdbf.cpp

Ignore git files on storage/connect
  modified:   .gitignore
2015-05-13 19:58:21 +02:00
Olivier Bertrand
3810fefc65 resolving conflict 2015-05-10 12:40:30 +02:00
Olivier Bertrand
445fc77497 Get rid of more GCC warnings about unused parameters
modified:   storage/connect/array.cpp
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h
2015-05-10 12:25:08 +02:00
Olivier Bertrand
7c02f74cf8 Get rid of more GCC warnings about unused parameters
storage/connect/colblk.cpp
2015-05-10 12:22:43 +02:00
Olivier Bertrand
3b3f6cac8a Typo to check buildbot 2015-05-10 12:17:30 +02:00
Olivier Bertrand
c63bd866fd Get rid of more GCC warnings about unused parameters
modified:   storage/connect/array.cpp
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h
2015-05-10 12:14:21 +02:00
Olivier Bertrand
f5d0c77062 Get rid of GCC warnings about unused parameters
modified:   storage/connect/array.cpp
  modified:   storage/connect/blkfil.cpp
  modified:   storage/connect/block.h
  modified:   storage/connect/catalog.h
  modified:   storage/connect/colblk.cpp
  modified:   storage/connect/colblk.h
  modified:   storage/connect/connect.cc
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamdbf.cpp
  modified:   storage/connect/filamfix.cpp
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamtxt.h
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filter.h
  modified:   storage/connect/ha_connect.c
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mycat.h
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabcol.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabfmt.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/table.cpp
  modified:   storage/connect/tabmul.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabmysql.h
  modified:   storage/connect/taboccur.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabsys.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabtbl.h
  modified:   storage/connect/tabutil.cpp
  modified:   storage/connect/tabutil.h
  modified:   storage/connect/tabvct.cpp
  modified:   storage/connect/tabvir.cpp
  modified:   storage/connect/tabvir.h
  modified:   storage/connect/tabxcl.cpp
  modified:   storage/connect/tabxcl.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h
  modified:   storage/connect/valblk.cpp
  modified:   storage/connect/valblk.h
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h
  modified:   storage/connect/xindex.cpp
  modified:   storage/connect/xindex.h
  modified:   storage/connect/xobject.h
  modified:   storage/connect/xtable.h
2015-05-09 17:30:20 +02:00
Olivier Bertrand
6b56e8998b Typo to check buildbot 2015-05-08 13:21:42 +02:00
Olivier Bertrand
5fa2a6ce81 Merge branch 'ob-10.0' into 10.0 2015-05-07 18:02:31 +02:00
Olivier Bertrand
7704fde0c6 Heidi stuff 2015-05-07 18:01:49 +02:00
Olivier Bertrand
c387e7d8e2 Heidi stuff 2015-05-07 17:36:25 +02:00
Olivier Bertrand
3a889b1f90 Fix a bug in init_table_share that caused syntax error with Boolean options:
oom|= sql->append(vull ? "ON" : "OFF");
  replaced by:
  oom|= sql->append(vull ? "YES" : "NO");
modified:
  ha_connect.cc

Make DBF tables to be usable in big-endian machines (test version)
modified:
  filamdbf.cpp
2015-05-07 16:59:25 +02:00
Olivier Bertrand
12bebceb8e - Fix a regression bug on (XML) HTML tables.
modified:
  tabxml.cpp
added:
  xml_html.test
  xml_html.result
  beers.xml
  coffee.htm

- Fix MDEV-7935 by suppressing error resetting code in delete_or_rename_table.
  However, the issue is that this code was added because without it an assertion
  was raised in some cases. Unfortunately I can't remember what were these cases.
  Therefore fixing it in this case will perhaps make a new crash happening on another cases.
modified:
  ha_connect.cc

- Add the UDF Json_Array_Delete.
modified:
  jsonudf.cpp
2015-05-05 11:37:21 +02:00
Olivier Bertrand
1b07ba57a4 Fix MDEV-8090 in tabmysql.cpp 2015-05-02 15:36:33 +02:00
Olivier Bertrand
f5b05a11c1 - Fix bug on updating JSON expanded values
modified:
  json.result
  tabjson.cpp
  tabjson.h

- Fix bug on multiple tables (directories must be eliminated from file list)
modified:
  tabmul.cpp

- Update version
modified:
  ha_connect.cc

- Typo
modified:
  global.h
  ha_connect.cc
  tabtbl.cpp
  tabutil.cpp
  value.cpp
2015-05-01 15:59:12 +02:00
Olivier Bertrand
eae8318b19 - Fix Catalog JSON table crash when no Jpath
- Added JSON OBJECT specification for pretty != 2.
- Fix NULL values not recognized for nullable JSON columns
- Issue an error message when a JSON table is created without specifying LRECL if PRETTY != 2.
- Make JSONColumns use a TDBJSON class.
- Make JSON table using MAPFAM
modified:
  filamap.h
  filamtxt.h
  ha_connect.cc
  json.result
  tabjson.cpp
  tabjson.h
  table.cpp

- Implementing Discovery for the XML table type.
modified:
  domdoc.cpp
  domdoc.h
  ha_connect.cc
  libdoc.cpp
  plgxml.cpp
  plgxml.h
  reldef.cpp
  reldef.h
  tabxml.cpp
  tabxml.h

- Providing an error message when creating an ODBC table via discovery returns
  columns of more than one table.
modified:
  ha_connect.cc

- TableOptionStruct declaration moved from ha_connect.h to mycat.h
  To make it easier to use by other classes.
modified:
  ha_connect.cc
  ha_connect.h
  mycat.cc
  mycat.h
  reldef.cpp
  tabmysql.cpp
  taboccur.cpp
  tabpivot.cpp
  tabtbl.cpp
  tabutil.cpp
  tabxcl.cpp
2015-04-17 20:05:41 +02:00
Olivier Bertrand
05b30fbcc3 Fix MDEV-7890 2015-04-04 19:29:34 +02:00
Olivier Bertrand
836740cd8f Correct a typo that made multiple 1 tables to return 0 lines on Linux 2015-04-02 11:36:53 +02:00
Olivier Bertrand
8721d20fb1 - Fix MDEV-7879 by adding a test in all SetValue_pval function to return when valp == this.
- Fix MDEV-7840 by making proper datetime constant in ha_connect::CheckCond on a second place.
2015-03-30 19:03:57 +02:00
Olivier Bertrand
daa8b6b5ba D:\Ber\Develop\git3.msg 2015-03-28 20:18:46 +01:00
Olivier Bertrand
9cace9932f - Fix a bug that caused a crash when doing delete on a json table with wrong syntax file
- Suppress MYSQL_SUPPORT preprocessor variable
2015-03-22 11:34:29 +01:00
Olivier Bertrand
2bb42803df This commit includes changes done in a previous (deleted) branch plus new ones.
From the previous branch:
commit eda4928ff122a0845baf5ade83b4aa29244a3a89
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Mon Mar 9 22:34:56 2015 +0100

- Add discovery to JSON tables
  When columns are not defined, CONNECT analyses the json file to find column definitions.
  This wors only on table that are an array of objects. Pair keys are used to generate the
  column names and pair values are used for its definition. When the LEVEL option is defined
  as a not null integer, the eventual JPATH is scanned up to the LEVEL value.

From the current one:
- Fix MDEV-7521 when column names are utf8 encoded (not a general multi-charset fix)

- Adds more to JSON discovery processing and UDF's

- Use PlugDup everywhere it replaces PlugSubAlloc + strcpy.
2015-03-18 13:30:14 +01:00
Olivier Bertrand
57aaccef52 - Adding files to ignore from C C++ and Visual Studio
- Making result files to be ended by LF to avoid test failures
2015-03-16 17:37:00 +01:00
Buggynours
eb2f763872 Add #include <ostream> in dict0mem.h and change iterator to const_iterator in dic0mem.cc
This fix compiling error when compiled with Visual Studio 9 2008
2015-03-03 12:39:42 +01:00
Sergei Golubchik
e33b48ae8b Merge remote-tracking branch 'origin/10.0' into 10.0 2015-03-02 16:47:43 +01:00
Sergei Golubchik
c06c465a96 10.0-connect merge 2015-03-02 16:45:44 +01:00
Olivier Bertrand
b9a9b82f9e - Make json_udf test work on Windows
modified:
  storage/connect/mysql-test/connect/t/json_udf.inc
2015-03-02 00:35:56 +01:00
Olivier Bertrand
5f4909b31d - Making json_udf test working on linux
added:
  storage/connect/mysql-test/connect/t/json_udf.inc
modified:
  storage/connect/mysql-test/connect/r/json_udf.result
  storage/connect/mysql-test/connect/t/json_udf.test
2015-03-01 23:55:09 +01:00
Olivier Bertrand
34c89597ef - Remove a signed/unsigned warning.
modified:
  storage/connect/jsonudf.cpp
2015-03-01 19:29:56 +01:00
Olivier Bertrand
5c8862ee19 - Fix crash when Json_Value was called without arguments.
Correct memory calculation in Serialize.
  Correct some UDF's messages.
  Add and modify the json tests
removed:
  storage/connect/mysql-test/connect/std_data/biblio.jsn
  storage/connect/mysql-test/connect/std_data/expense.jsn
  storage/connect/mysql-test/connect/std_data/mulexp3.jsn
  storage/connect/mysql-test/connect/std_data/mulexp4.jsn
  storage/connect/mysql-test/connect/std_data/mulexp5.jsn
added:
  storage/connect/mysql-test/connect/r/json_udf.result
  storage/connect/mysql-test/connect/std_data/biblio.json
  storage/connect/mysql-test/connect/std_data/expense.json
  storage/connect/mysql-test/connect/std_data/mulexp3.json
  storage/connect/mysql-test/connect/std_data/mulexp4.json
  storage/connect/mysql-test/connect/std_data/mulexp5.json
  storage/connect/mysql-test/connect/t/json_udf.test
modified:
  storage/connect/json.cpp
  storage/connect/jsonudf.cpp
  storage/connect/mysql-test/connect/r/json.result
  storage/connect/mysql-test/connect/t/json.test
2015-03-01 19:20:40 +01:00
Olivier Bertrand
d862d7c049 - Implement random access to ODBC tables
modified:
  storage/connect/odbconn.cpp
  storage/connect/odbconn.h

- Fix get proper length of ODBC DECIMAL column in discovery
modified:
  storage/connect/ha_connect.cc
  storage/connect/mysql-test/connect/r/odbc_oracle.result

- Implement random access to JSON tables
modified:
  storage/connect/tabjson.cpp
  storage/connect/tabjson.h

- Fix MDEV-7636
modified:
  storage/connect/tabutil.cpp
2015-02-28 23:01:55 +01:00
Kristian Nielsen
aa845d123c MDEV-6391: GTID binlog state not recovered if mariadb-bin.state is removed
When the server starts up, check if the master-bin.state file was lost.
If it was, recover its contents by scanning the last binlog file, thus
avoiding running with a corrupt binlog state.
2015-02-27 14:34:52 +01:00
Vicențiu Ciorbaru
ec4ff9a2e7 MDEV-7586: Merged derived tables/VIEWs increment created_tmp_tables
Temporary table count fix. The number of temporary tables was increased
when the table is not actually created. (when do_not_open was passed
as TRUE to create_tmp_table).
2015-02-26 23:09:54 +02:00
Sergei Golubchik
5c66abf0b0 Merge remote-tracking branch 'origin/10.0' into 10.0 2015-02-25 16:34:33 +01:00
Sergey Petrunya
4a3e94e025 MDEV-7413: optimizer_use_condition_selectivity > 2 crashes 10.0.15+maria-1~wheezy
Add a testcase. The bug itself was fixed by the fix for MDEV-7316.
2015-02-25 16:58:36 +03:00
Olivier Bertrand
aa107ef3ab - FIX assert failure when sorting JSON tables
modified:
  storage/connect/tabjson.cpp
  storage/connect/tabjson.h
2015-02-25 11:59:00 +01:00
Alexander Barkov
f825b5a4ee MDEV-7629 Regression: Bit and hex string literals changed column names in 10.0.14 2015-02-25 14:13:32 +04:00
Sergei Golubchik
cbf8cdc252 MDEV-7530 !includedir reads files in random order 2015-02-25 09:43:31 +01:00
Olivier Bertrand
e027f5e8d5 - Fix MDEV-7616 by adding SQLCOM_SET_OPTION to the accepted command list.
modified:
  storage/connect/ha_connect.cc

- Add new JSON UDF functions and JSON functionalities.
modified:
  storage/connect/json.cpp
  storage/connect/json.h
  storage/connect/jsonudf.cpp
  storage/connect/tabjson.cpp
2015-02-24 23:18:04 +01:00
Sergei Golubchik
6c09a72af5 Merge remote-tracking branch 'origin/10.0' into 10.0 2015-02-24 20:52:37 +01:00
Sergei Golubchik
126523d190 MDEV-6703 Add "mysqlbinlog --binlog-row-event-max-size" support
partially cherry-pick from mysql/5.6.
No test case (mysql/5.6 test case is useless, the correct
test case uses too much memory)

commit e061985813db54948f99892d89f7e076242473a5
Author:  <Dao-Gang.Qu@sun.com>
Date:   Tue Jun 1 15:02:22 2010 +0800

    Bug #49931          Incorrect type in read_log_event error
    Bug #49932          mysqlbinlog max_allowed_packet hard coded to 1GB
2015-02-24 15:55:00 +01:00
Sergei Golubchik
73033e5e1a fix mroonga to compile w/o performance schema 2015-02-24 15:54:59 +01:00
Kristian Nielsen
a227cf8046 MDEV-7335: Potential parallel slave deadlock with specific binlog corruption
If somehow the COMMIT or XID event in an event group was missing, the code in
parallel replication to handle this was not sufficient, leading to server
deadlock.
2015-02-24 14:39:15 +01:00
Sergei Golubchik
723be51678 Merge 2015-02-24 14:17:00 +01:00
Jan Lindström
8799f87075 MDEV-7623: Add lock wait time and hold time to every record/table lock in
InnoDB transaction lock printout.
2015-02-24 10:33:49 +02:00
Kristian Nielsen
79e9ff44d1 MDEV-7458: Deadlock in parallel replication can allow following transaction to start replicating too early
In parallel replication, don't rollback inside ha_commit_trans() in case of
error.

The rollback will be done later, but the parallel replication code needs to
run unmark_start_commit() before the rollback to properly control the
sequencing of transactions.

I did not manage to come up with a reliable automatic test case for this, but
I tested it manually.
2015-02-23 13:37:34 +01:00