Commit graph

184373 commits

Author SHA1 Message Date
Olivier Bertrand
fc98a6d54a Fix compile error for centos 74 Modified taboccur.cpp 2021-07-24 18:31:59 +02:00
Olivier Bertrand
5049887c8d Replace Mongo2.jar and Mongo3.jar with ne versions 2021-07-24 18:24:20 +02:00
Olivier Bertrand
0f18135ec8 - Make user variable prefix recognized by IsArgJson and IsJson
modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/jsonudf.cpp

- Stringify option is now a ; separated list of columns
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabcmg.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabjmg.h
  modified:   storage/connect/tabjson.cpp

- PrepareColist not a static function anymore (+ typo)
  modified:   storage/connect/taboccur.cpp

- JDVC: Recognize schema (database) from a wrapper server
  modified:   storage/connect/tabjdbc.cpp
2021-07-24 16:28:57 +02:00
Olivier Bertrand
1c4b917f0e Fix clang compile error in value.cpp 2021-06-25 18:35:26 +02:00
Olivier Bertrand
7863554e42 Fix clang compile error in tabjson and typo in tabbson.cpp 2021-06-25 12:54:34 +02:00
Olivier Bertrand
af7a0895ac Fix clang compile error in tabjson.cpp and tabbson.cpp 2021-06-25 12:30:10 +02:00
Olivier Bertrand
6239e2a4ec Fix clang compile error in tabjson.cpp and tabbson.cpp 2021-06-25 11:38:16 +02:00
Olivier Bertrand
5c5d60b897 Fix compile error in value.h and remove unused variables in ha_connect.cc 2021-06-25 01:15:51 +02:00
Olivier Bertrand
330b32ebd9 Fix clang compile error 2021-06-24 23:56:13 +02:00
Olivier Bertrand
ed70f76cf7 - Make function strz return null when LEX_STRING is null
modified:   storage/connect/ha_connect.cc

- Use NOTE instead of WARNING in connect_assisted_discovery
  This because MariaDB raise an error when doing so
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabrest.cpp

- Make MONGO tables recognize STRINGIFY and JsonAllPath
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabcmg.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabjmg.h

- Fix OBJECT option for Pretty != 2 JSN and BSON tables
  Accept all syntaxes  for the OBJECT option
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp

- Use my_snprintf in function xcurl (by vuvova)
  modified:   storage/connect/tabrest.cpp

- Format dates entered as integer when formatted
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h
2021-06-24 00:46:12 +02:00
Olivier Bertrand
5f64276fb2 - Fix MDEV-25863 : Replace __WIN__ by _WIN32
modified:   storage/connect/array.cpp
  modified:   storage/connect/blkfil.cpp
  modified:   storage/connect/block.h
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/cmgoconn.cpp
  modified:   storage/connect/colblk.cpp
  modified:   storage/connect/domdoc.cpp
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamdbf.cpp
  modified:   storage/connect/filamfix.cpp
  modified:   storage/connect/filamgz.cpp
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/filter.h
  modified:   storage/connect/fmdlex.c
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jmgfam.cpp
  modified:   storage/connect/json.cpp
  modified:   storage/connect/macutil.cpp
  modified:   storage/connect/macutil.h
  modified:   storage/connect/maputil.cpp
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/myconn.h
  modified:   storage/connect/myutil.cpp
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/odbconn.h
  modified:   storage/connect/os.h
  modified:   storage/connect/osutil.c
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/rcmsg.c
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabext.cpp
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabmac.cpp
  modified:   storage/connect/tabmac.h
  modified:   storage/connect/tabmul.cpp
  modified:   storage/connect/tabmul.h
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/taboccur.cpp
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/tabrest.h
  modified:   storage/connect/tabsys.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabutil.cpp
  modified:   storage/connect/tabvct.cpp
  modified:   storage/connect/tabwmi.cpp
  modified:   storage/connect/tabxcl.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/valblk.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/xindex.cpp
  modified:   storage/connect/xindex.h

- Fix Date errors and SSL warnings
  modified:   storage/connect/mysql-test/connect/r/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/jdbc_new.result
  modified:   storage/connect/mysql-test/connect/t/jdbc.test
  modified:   storage/connect/mysql-test/connect/t/jdbc_new.test

- Update java source files
  modified:   storage/connect/Mongo2Interface.java
  modified:   storage/connect/Mongo3Interface.java
  added:      storage/connect/Client2.java
  added:      storage/connect/Client3.java
  added:      storage/connect/TestInsert2.java
  added:      storage/connect/TestInsert3.java
2021-06-08 17:44:43 +02:00
Olivier Bertrand
be7e41db96 - Mongo defined columns
modified:   storage/connect/cmgoconn.cpp
    modified:   storage/connect/cmgoconn.h

- Change default array LIMIT from 10 to 50
    modified:   storage/connect/ha_connect.cc
    modified:   storage/connect/tabbson.cpp
    modified:   storage/connect/tabjson.cpp
    modified:   storage/connect/tabxml.cpp
2021-05-24 16:56:12 +02:00
Olivier Bertrand
e0edfc277f - Fix MDEV-25715
modified:   storage/connect/bsonudf.cpp
    modified:   storage/connect/jsonudf.cpp
2021-05-18 16:42:19 +02:00
Olivier Bertrand
17533c1ffc - Put all jar files in the SHARE directory (was PLUGIN)
modified:   sql/mysqld.h
    modified:   storage/connect/CMakeLists.txt
    modified:   storage/connect/javaconn.cpp
    modified:   storage/connect/mycat.cc
    modified:   storage/connect/mycat.h

- Get a handled on a not pooled client
  This to avoid a .50 delay when closing
    modified:   storage/connect/cmgoconn.cpp
    modified:   storage/connect/cmgoconn.h

- Allow FIELD_FORMAT options for DECIMAL type
    modified:   storage/connect/tabdos.cpp

- Update tests and result to reflect last changes
  Also because Oracle password has changed
    modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
    modified:   storage/connect/mysql-test/connect/r/json_java_2.result
    modified:   storage/connect/mysql-test/connect/r/json_java_3.result
    modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
    modified:   storage/connect/mysql-test/connect/r/mongo_c.result
    modified:   storage/connect/mysql-test/connect/r/odbc_oracle.result
    modified:   storage/connect/mysql-test/connect/t/jdbc_oracle.test
    modified:   storage/connect/mysql-test/connect/t/odbc_oracle.test

- Typo
    modified:   storage/connect/reldef.cpp
2021-05-17 19:17:31 +02:00
Olivier Bertrand
5ae67c6d63 - All this concern Json or Mongo tables based on MongoDB collections.
- Limit decimals of doubles printed from MongoDB
  Done in function Mini for Mongo C Driver and Java Driver
  Done in function SerializeValue for Java tables using the J Driver
        modified:   storage/connect/cmgoconn.cpp
        modified:   storage/connect/json.cpp
        modified:   storage/connect/json.h
        modified:   storage/connect/tabjmg.cpp

- Fix crash when using BSON_TYPE_DECIMAL128
        modified:   storage/connect/cmgoconn.cpp

- Collection name default to table name
  Fix it when creating tables via discovery
        modified:   storage/connect/ha_connect.cc
        modified:   storage/connect/tabbson.cpp
        modified:   storage/connect/tabjson.cpp
2021-05-05 00:31:21 +02:00
Olivier Bertrand
3b5dabeb96 Typo 2021-05-02 11:59:54 +02:00
Olivier Bertrand
2294f9de8d Fix compile warning as error 2021-05-02 11:03:21 +02:00
Olivier Bertrand
ef0829ef40 - Major update of the json/bson/mongo table types programs.
Fix several bugs, chiefly concerning CURL operations.
        modified:   storage/connect/bson.cpp
        modified:   storage/connect/cmgfam.cpp
        modified:   storage/connect/cmgoconn.cpp
        modified:   storage/connect/cmgoconn.h
        modified:   storage/connect/colblk.h
        modified:   storage/connect/ha_connect.cc
        modified:   storage/connect/jmgfam.cpp
        modified:   storage/connect/jmgoconn.cpp
        modified:   storage/connect/jmgoconn.h
        modified:   storage/connect/json.cpp
        modified:   storage/connect/json.h
        modified:   storage/connect/mysql-test/connect/r/bson_mongo_c.result
        modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
        modified:   storage/connect/mysql-test/connect/r/mongo_c.result
        modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
        modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
        modified:   storage/connect/mysql-test/connect/std_data/Mongo2.jar
        modified:   storage/connect/mysql-test/connect/std_data/Mongo3.jar
        modified:   storage/connect/tabbson.cpp
        modified:   storage/connect/tabbson.h
        modified:   storage/connect/tabcmg.cpp
        modified:   storage/connect/tabcmg.h
        modified:   storage/connect/tabjmg.cpp
        modified:   storage/connect/tabjmg.h
        modified:   storage/connect/tabjson.cpp
        modified:   storage/connect/tabjson.h
2021-05-01 22:29:38 +02:00
Olivier Bertrand
4df6952ce3 Typo modified: CMakeLists.txt 2021-04-09 16:10:37 +02:00
Olivier Bertrand
36fd94aa5c Remove add_jar modified: CMakeLists.txt 2021-04-09 15:24:34 +02:00
Olivier Bertrand
46340ad8d1 Fix add_jar modified: CMakeLists.txt 2021-04-09 14:41:50 +02:00
Olivier Bertrand
03f929aea8 Fix install modified: CMakeLists.txt 2021-04-09 11:58:13 +02:00
Olivier Bertrand
bbec4aafda typo tabrest.cpp 2021-04-08 19:05:11 +02:00
Olivier Bertrand
710e1bac5a tabrest.cpp 2021-04-08 19:05:10 +02:00
Olivier Bertrand
757aaa3bcc tabrest.cpp 2021-04-08 19:05:09 +02:00
Olivier Bertrand
e4c23fe2d0 tabrest.cpp 2021-04-08 17:35:21 +02:00
Olivier Bertrand
953c84657b try to fix tabrest.cpp compile error 2021-04-08 17:35:19 +02:00
Olivier Bertrand
26e5ba4b51 - Fix Linux compile errors
modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/CMakeLists.txt

- Fix cmake error
 modified:   libmariadb/cmake/ConnectorName.cmake
2021-04-08 17:35:17 +02:00
Olivier Bertrand
d1b6cad028 Test tabrest.cpp fix 2021-04-08 17:35:16 +02:00
Olivier Bertrand
c030f4c625 Commit last pull from origin 2021-04-06 12:52:44 +02:00
Olivier Bertrand
28b76afcea - Fix(?) Linux compile errors
modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/CMakeLists.txt

-fix MDEV-24794
 modified:   storage/connect/valblk.h
2021-04-06 00:10:07 +02:00
Olivier Bertrand
2aefe0bee1 - Fix crash when not specifying the collection for MongoDB
modified:   storage/connect/cmgoconn.cpp

- Fix(?) Linux compile errors
  modified:   storage/connect/tabrest.cpp
2021-04-05 18:33:37 +02:00
Olivier Bertrand
caff19ada5 - Copy Mongo2.jar and Mongo3.jar in plugin directory
modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/javaconn.cpp

- Check privileges while creating tables with Discovery
  modified:   storage/connect/ha_connect.cc

- Calculate LRECL for JSON tables created with Discovery
  modified:   storage/connect/tabjson.cpp

- Use CreateProcess (Windows) or fork/exec (linux)
  to retrieve the result from REST queries
  modified:   storage/connect/tabrest.cpp

- Typo
  modified:   storage/connect/jmgoconn.cpp
2021-04-05 17:01:43 +02:00
Sergei Golubchik
6fe624b5ac MDEV-25242 Server crashes in check_grant upon invoking function with userstat enabled
also fix index_stats table.

followup for 5a79807119
2021-04-03 12:12:46 +02:00
Julius Goryavsky
fb9d151934 MDEV-25321: mariabackup failed if password is passed via environment variable
The mariabackup interface currently supports passing a password
through an explicit command line variable, but does not support
passing a password through the MYSQL_PWD environment variable.
At the same time, the Galera SST script for mariabackup uses
the environment variable to pass the password, which leads
(in some cases) to an unsuccessful launch of mariabackup and
to the inability to start the cluster. This patch fixes this
issue. It does not need a separate test, as the problem is
visible in general testing on buildbot.
2021-04-01 21:47:30 +02:00
Srinidhi Kaushik
5bc5ecce08 MDEV-24197: Add "innodb_force_recovery" for "mariabackup --prepare"
During the prepare phase of restoring backups, "mariabackup" does
not seem to allow (or recognize) the option "innodb_force_recovery"
for the embedded InnoDB server instance that it starts.

If page corruption observed during page recovery, the prepare step
fails. While this is indeed the correct behavior ideally, allowing
this option to be set in case of emergencies might be useful when
the current backup is the only copy available. Some error messages
during "--prepare" suggest to set "innodb_force_recovery" to 1:

  [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption.

For backwards compatibility, "mariabackup --innobackupex --apply-log"
should also have this option.

Signed-off-by: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
2021-04-01 13:34:40 +03:00
mkaruza
f93e087d74 MDEV-25047: SIGSEGV in mach_read_from_n_little_endian
Virtual column fields are not found in prebuilt data type, so we should
match InnoDB fields with `get_innobase_type_from_mysql_type` method.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-04-01 07:35:00 +03:00
Vladislav Vaintroub
453bac08c2 CMake - when searching bison, look also for win_bison
win_bison belongs winflexbison project, which is Windows most up-to-date
bison distro.
2021-03-31 14:26:10 +02:00
Vladislav Vaintroub
08cb5d8483 MDEV-25221 Do not remove source file, if copy_file() fails in mariabackup --move-back
Remove an incompletely copied destination file.
2021-03-31 14:23:56 +02:00
Marko Mäkelä
35ee4aa4e3 MDEV-13103 fixup: Actually fix a crash during IMPORT TABLESPACE 2021-03-31 09:06:44 +03:00
David CARLIER
99945d77d7 MDEV-25294 signal handler display coredump on mac 2021-03-30 19:53:04 +03:00
Thirunarayanan Balathandayuthapani
b771ab242b MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
- Aborting of fulltext index creation fails to remove the
index from sys indexes table. When we try to reload the
table definition, InnoDB fails with index count mismatch
error. InnoDB should remove the index from sys indexes while
rollbacking the secondary index creation.
2021-03-30 20:40:14 +05:30
Thirunarayanan Balathandayuthapani
108ba4c380 MDEV-15527 page_compressed compressed page partially during import tablespace
- Post push to address 32-bit build failure.
2021-03-30 20:34:39 +05:30
Marko Mäkelä
7c423c26d9 Add missing have_perfschema.inc 2021-03-30 16:14:19 +03:00
Thirunarayanan Balathandayuthapani
c468d5cb50 MDEV-15527 page_compressed compressed page partially during import tablespace
- Importing table operation fails to punch the hole in
the filesystem when page compressed table is involved.
To achieve that, InnoDB firstly punches the hole for
the IOBuffer size(1MB). After that, InnoDB should write
page by page when page compression is involved.
2021-03-30 15:18:06 +05:30
Jan Lindström
dfda1c9283 Add supression for warning. 2021-03-30 08:58:10 +03:00
Jan Lindström
d217a925b2 MDEV-24923 : Port selected Galera conflict resolution changes from 10.6
Add condition on trx->state == TRX_STATE_COMMITTED_IN_MEMORY in order to
avoid unnecessary work. If a transaction has already been committed or
rolled back, it will release its locks in lock_release() and let
the waiting thread(s) continue execution.

Let BF wait on lock_rec_has_to_wait and if necessary other BF
is replayed.

wsrep_trx_order_before
  If BF is not even replicated yet then they are ordered
  correctly.

bg_wsrep_kill_trx
  Make sure victim_trx is found and check also its state. If
  state is TRX_STATE_COMMITTED_IN_MEMORY transaction is
  already committed or rolled back and will release it locks
  soon.

wsrep_assert_no_bf_bf_wait
  Transaction requesting new record lock should be TRX_STATE_ACTIVE
  Conflicting transaction can be in states TRX_STATE_ACTIVE,
  TRX_STATE_COMMITTED_IN_MEMORY or in TRX_STATE_PREPARED.
  If conflicting transaction is already committed in memory or
  prepared we should wait. When transaction is committed in memory we
  held trx mutex, but not lock_sys->mutex. Therefore, we
  could end here before transaction has time to do lock_release()
  that is protected with lock_sys->mutex.

lock_rec_has_to_wait
  We very well can let bf to wait normally as other BF will be
  replayed in case of conflict. For debug builds we will do
  additional sanity checks to catch unsupported bf wait if any.

wsrep_kill_victim
  Check is victim already in TRX_STATE_COMMITTED_IN_MEMORY state and
  if it is we can return.

lock_rec_dequeue_from_page
lock_rec_unlock
  Remove unnecessary wsrep_assert_no_bf_bf_wait function calls.
  We can very well let BF wait here.
2021-03-30 08:58:10 +03:00
Daniel Black
c44273329e remove broken tests/grant.pl 2021-03-30 16:18:30 +11:00
Daniel Black
fb3b2eb517 mallinfo2: whitespace fix 2021-03-30 16:16:24 +11:00
Vladislav Vaintroub
add24e7889 Windows - suppress nonsensical(for this OS) system check.
Amends 48141f3c17
2021-03-30 16:15:24 +11:00