mariadb/storage/connect
Monty b6ff139aa3 Reduce usage of strlen()
Changes:
- To detect automatic strlen() I removed the methods in String that
  uses 'const char *' without a length:
  - String::append(const char*)
  - Binary_string(const char *str)
  - String(const char *str, CHARSET_INFO *cs)
  - append_for_single_quote(const char *)
  All usage of append(const char*) is changed to either use
  String::append(char), String::append(const char*, size_t length) or
  String::append(LEX_CSTRING)
- Added STRING_WITH_LEN() around constant string arguments to
  String::append()
- Added overflow argument to escape_string_for_mysql() and
  escape_quotes_for_mysql() instead of returning (size_t) -1 on overflow.
  This was needed as most usage of the above functions never tested the
  result for -1 and would have given wrong results or crashes in case
  of overflows.
- Added Item_func_or_sum::func_name_cstring(), which returns LEX_CSTRING.
  Changed all Item_func::func_name()'s to func_name_cstring()'s.
  The old Item_func_or_sum::func_name() is now an inline function that
  returns func_name_cstring().str.
- Changed Item::mode_name() and Item::func_name_ext() to return
  LEX_CSTRING.
- Changed for some functions the name argument from const char * to
  to const LEX_CSTRING &:
  - Item::Item_func_fix_attributes()
  - Item::check_type_...()
  - Type_std_attributes::agg_item_collations()
  - Type_std_attributes::agg_item_set_converter()
  - Type_std_attributes::agg_arg_charsets...()
  - Type_handler_hybrid_field_type::aggregate_for_result()
  - Type_handler_geometry::check_type_geom_or_binary()
  - Type_handler::Item_func_or_sum_illegal_param()
  - Predicant_to_list_comparator::add_value_skip_null()
  - Predicant_to_list_comparator::add_value()
  - cmp_item_row::prepare_comparators()
  - cmp_item_row::aggregate_row_elements_for_comparison()
  - Cursor_ref::print_func()
- Removes String_space() as it was only used in one cases and that
  could be simplified to not use String_space(), thanks to the fixed
  my_vsnprintf().
- Added some const LEX_CSTRING's for common strings:
  - NULL_clex_str, DATA_clex_str, INDEX_clex_str.
- Changed primary_key_name to a LEX_CSTRING
- Renamed String::set_quick() to String::set_buffer_if_not_allocated() to
  clarify what the function really does.
- Rename of protocol function:
  bool store(const char *from, CHARSET_INFO *cs) to
  bool store_string_or_null(const char *from, CHARSET_INFO *cs).
  This was done to both clarify the difference between this 'store' function
  and also to make it easier to find unoptimal usage of store() calls.
- Added Protocol::store(const LEX_CSTRING*, CHARSET_INFO*)
- Changed some 'const char*' arrays to instead be of type LEX_CSTRING.
- class Item_func_units now used LEX_CSTRING for name.

Other things:
- Fixed a bug in mysql.cc:construct_prompt() where a wrong escape character
  in the prompt would cause some part of the prompt to be duplicated.
- Fixed a lot of instances where the length of the argument to
  append is known or easily obtain but was not used.
- Removed some not needed 'virtual' definition for functions that was
  inherited from the parent. I added override to these.
- Fixed Ordered_key::print() to preallocate needed buffer. Old code could
  case memory overruns.
- Simplified some loops when adding char * to a String with delimiters.
2021-05-19 22:27:48 +02:00
..
mysql-test/connect Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
.gitignore git90.msg + git91.msg 2016-06-02 23:36:19 +02:00
ApacheInterface.java - Fix MDEV-11234. Escape quoting character. Should be doubled. 2016-11-06 14:57:27 +01:00
array.cpp CONNECT: compiler warnings 2021-02-01 13:50:16 +01:00
array.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
blkfil.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
blkfil.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
block.h - Fix json_bjson (s was erase by Json_Subset) 2020-12-09 00:55:06 +01:00
bson.cpp Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
bson.h Fix of crashes of connect engine. 2021-02-05 10:56:05 +01:00
bsonudf.cpp Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
bsonudf.h - Add new JPATH features 2021-02-16 00:31:27 +01:00
catalog.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
checklvl.h Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
Client.java Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
CMakeLists.txt Merge 10.4 into 10.5 2021-05-10 10:01:15 +03:00
cmgfam.cpp - Continue BSON implementation 2020-12-08 01:15:40 +01:00
cmgfam.h - Continue BSON implementation 2020-12-08 01:15:40 +01:00
cmgoconn.cpp - Fix crash when not specifying the collection for MongoDB 2021-04-05 18:33:37 +02:00
cmgoconn.h Squashed commit of the following: 2017-10-26 12:48:13 +03:00
colblk.cpp Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
colblk.h Fix all warnings given by UBSAN 2021-04-20 12:30:09 +03:00
connect.cc Fix all warnings given by UBSAN 2021-04-20 12:30:09 +03:00
connect.h Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
csort.cpp Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
csort.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
domdoc.cpp Squashed commit of connect/10.0: 2018-10-28 10:41:31 +01:00
domdoc.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
encas.h - Remove gcc warning (no previous declaration of msglang) 2014-11-16 01:16:51 +01:00
engmsg.h Make source the same as branch 10.2 2017-08-06 21:33:52 +02:00
enids.h - Implement the NEWMSG and XMSG methods 2014-11-15 18:28:24 +01:00
filamap.cpp Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
filamap.h Fix some XML table type bugs: 2016-12-23 16:58:32 +01:00
filamdbf.cpp Merge branch '10.4' into 10.5 2020-08-04 17:24:15 +02:00
filamdbf.h - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
filamfix.cpp Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
filamfix.h - Add a new CONNECT global variable allowing to tell whether or not 2014-08-22 17:30:22 +02:00
filamgz.cpp Merge 10.4 into 10.5 2020-02-07 08:51:20 +02:00
filamgz.h Commit changes made for version 10.1 2017-01-17 19:39:49 +01:00
filamtxt.cpp Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
filamtxt.h - Fix pretty=2 Tabjson bug on INSERT. 2020-12-15 12:28:03 +01:00
filamvct.cpp Merge 10.4 into 10.5 2021-04-21 09:01:01 +03:00
filamvct.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
filamzip.cpp Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
filamzip.h - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
filter.cpp Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
filter.h CONNECT compilation failure 2019-04-26 20:50:31 +02:00
fmdlex.c Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
frcas.h - Remove gcc warning (no previous declaration of msglang) 2014-11-16 01:16:51 +01:00
frids.h - Implement the NEWMSG and XMSG methods 2014-11-15 18:28:24 +01:00
frmsg.h - Remove gcc warning (no previous declaration of msglang) 2014-11-16 01:16:51 +01:00
frmsg1.h - Fixing TAB to 2 spaces 2013-02-07 13:34:27 +04:00
frmsg2.h - Fixing TAB to 2 spaces 2013-02-07 13:34:27 +04:00
global.h - Add the new BSON temporary type for testing 2021-01-08 22:18:52 +01:00
ha_connect.cc Reduce usage of strlen() 2021-05-19 22:27:48 +02:00
ha_connect.h Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00
inihandl.cpp Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
inihandl.h - Add the PROFILE_End function in inihandl. Called by connect_done_func 2013-06-29 01:10:31 +02:00
ioapi.c Fix wrong value of JSON column 2017-05-11 21:57:21 +02:00
ioapi.h Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
javaconn.cpp Merge branch bb-10.4-release into bb-10.5-release 2021-05-05 23:57:11 +03:00
javaconn.h Squashed commit of connect/10.0: 2018-10-28 10:41:31 +01:00
jdbccat.h Squashed commit of the following: 2017-10-26 12:48:13 +03:00
JdbcInterface.java Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
jdbconn.cpp Fix compiler warnings in connect engine 2021-03-20 21:17:32 +02:00
jdbconn.h Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
jmgfam.cpp - Continue BSON implementation 2020-12-08 01:15:40 +01:00
jmgfam.h - Continue BSON implementation 2020-12-08 01:15:40 +01:00
jmgoconn.cpp - Copy Mongo2.jar and Mongo3.jar in plugin directory 2021-04-05 17:01:43 +02:00
jmgoconn.h Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
json.cpp Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
json.h Desesperatly trying to stop compiling failures 2020-11-25 17:42:01 +01:00
jsonudf.cpp Merge 10.4 into 10.5 2021-05-10 10:01:15 +03:00
jsonudf.h - Add new JPATH features 2021-02-16 00:31:27 +01:00
libdoc.cpp Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
libdoc.h Fixing warnings: 2013-07-08 11:05:59 +04:00
macutil.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
macutil.h Commit changes pulled from ob-10.0 2015-06-02 10:34:51 +02:00
maputil.cpp Fix compile error on LINUX (LARGE_INTEGER) 2020-11-03 23:19:22 +01:00
maputil.h Fix compile error on LINUX (LARGE_INTEGER) 2020-11-03 23:19:22 +01:00
MariadbInterface.java All changes made on 10.1 for last 11 commits 2016-07-14 20:12:22 +02:00
messages.h - Fixing TAB to 2 spaces 2013-02-07 13:34:27 +04:00
mini-global.h In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data. 2019-08-24 16:14:24 +02:00
mongo.cpp - Inline MakePtr and MakeOff with OFFSET as size_t 2020-10-18 17:20:44 +02:00
mongo.h - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
Mongo2Interface.java Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
Mongo3Interface.java Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
msgid.h Make source the same as branch 10.2 2017-08-06 21:33:52 +02:00
mycat.cc Fix compiler warnings in connect engine 2021-03-20 21:17:32 +02:00
mycat.h Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
myconn.cpp Fix various spelling errors still found in code 2021-03-22 18:10:39 +11:00
myconn.h - Possibly fix MDEV-10179 Reset remote tables when re-opening 2016-06-13 14:28:02 +02:00
MysqlInterface.java All changes made on 10.1 for last 11 commits 2016-07-14 20:12:22 +02:00
myutil.cpp Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
myutil.h - Make possible to allocate work space larger than 4GB 2020-10-01 19:18:26 +02:00
noconst.c Merge connect/10.0 into 10.0 2017-08-01 11:39:10 +03:00
odbccat.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
odbconn.cpp Fix compiler warnings in connect engine 2021-03-20 21:17:32 +02:00
odbconn.h Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
OracleInterface.java All changes made on 10.1 for last 11 commits 2016-07-14 20:12:22 +02:00
os.h Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
osutil.c Make source the same as branch 10.2 2017-08-06 21:33:52 +02:00
osutil.h In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data. 2019-08-24 16:14:24 +02:00
plgcnx.h Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
plgdbsem.h - Fix memory leak for the JSON table type 2020-12-01 19:39:09 +01:00
plgdbutl.cpp Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00
plgodbc.h - Fixing TAB to 2 spaces 2013-02-07 13:34:27 +04:00
plgxml.cpp - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
plgxml.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
plugutil.cpp Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
PostgresqlInterface.java Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
preparse.h Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
rcmsg.c Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
rcmsg.h Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
reldef.cpp MDEV-8334: Rename utf8 to utf8mb3 2021-05-19 06:48:36 +02:00
reldef.h Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
resource.h - Implement the NEWMSG and XMSG methods 2014-11-15 18:28:24 +01:00
rest.def In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data. 2019-08-24 16:14:24 +02:00
restget.cpp Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
tabbson.cpp Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
tabbson.h - Fix bug making REST table fail using CURL 2021-03-16 23:32:58 +01:00
tabcmg.cpp - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
tabcmg.h Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
tabcol.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
tabcol.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
tabdos.cpp Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
tabdos.h - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
tabext.cpp MDEV-19897 Rename source code variable names from utf8 to utf8mb3 2019-06-28 12:37:04 +04:00
tabext.h Squashed commit of connect/10.0: 2019-04-26 16:49:25 +02:00
tabfix.cpp Fixed compiler warnings from gcc and clang 5.0.1 2020-05-23 12:29:10 +03:00
tabfix.h - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
tabfmt.cpp Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
tabfmt.h Squashed commit of connect/10.0: 2019-01-25 10:06:16 +01:00
tabjdbc.cpp Merge 10.4 into 10.5 2019-09-06 14:25:20 +03:00
tabjdbc.h Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
tabjmg.cpp Squashed commit of connect/10.0: 2018-10-28 10:41:31 +01:00
tabjmg.h Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
tabjson.cpp Merge 10.5 into 10.6 2021-05-07 15:00:27 +03:00
tabjson.h - Fix bug making REST table fail using CURL 2021-03-16 23:32:58 +01:00
table.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
tabmac.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
tabmac.h All changes made on 10.1 2017-02-16 18:01:48 +01:00
tabmul.cpp Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
tabmul.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
tabmysql.cpp Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
tabmysql.h - Remove warning on not used tabtyp variable in connect_assisted_discovery 2018-02-25 14:31:28 +01:00
taboccur.cpp Fix various spelling errors 2020-03-16 00:10:50 +02:00
taboccur.h Fix various spelling errors 2020-03-16 00:10:50 +02:00
tabodbc.cpp Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
tabodbc.h Merge connect/10.0 into 10.0 2017-09-19 02:05:11 +03:00
tabpivot.cpp Fix various spelling errors 2020-03-16 00:10:50 +02:00
tabpivot.h Fix various spelling errors 2020-03-16 00:10:50 +02:00
tabrest.cpp typo tabrest.cpp 2021-04-08 19:05:11 +02:00
tabrest.h Fix compiler warnings in connect engine 2021-03-20 21:17:32 +02:00
tabsys.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
tabsys.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
tabtbl.cpp In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data. 2019-08-24 16:14:24 +02:00
tabtbl.h Squashed commit of connect/10.0: 2018-01-24 16:12:52 +02:00
tabutil.cpp Merge 10.4 into 10.5 2021-04-21 09:01:01 +03:00
tabutil.h Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
tabvct.cpp Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
tabvct.h All changes made on 10.1 2017-02-16 18:01:48 +01:00
tabvir.cpp CONNECT: compiler warnings 2021-02-01 13:50:16 +01:00
tabvir.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
tabwmi.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
tabwmi.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
tabxcl.cpp Fix various spelling errors 2020-03-16 00:10:50 +02:00
tabxcl.h Fix various spelling errors 2020-03-16 00:10:50 +02:00
tabxml.cpp Merge branch bb-10.4-release into bb-10.5-release 2021-05-05 23:57:11 +03:00
tabxml.h - Fix https://stackoverflow.com/questions/60625778/import-complex-xml-from-multiple-files-in-mariadb/60637429#60637429 2020-03-11 23:14:19 +01:00
tabzip.cpp - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
tabzip.h - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table 2020-07-16 16:30:54 +02:00
unzip.c - MDEV-11295: developing handling files contained in ZIP file. 2016-12-12 10:57:19 +01:00
unzip.h - MDEV-11295: developing handling files contained in ZIP file. 2016-12-12 10:57:19 +01:00
user_connect.cc Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
user_connect.h Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
valblk.cpp Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
valblk.h - Fix(?) Linux compile errors 2021-04-06 00:10:07 +02:00
value.cpp Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
value.h Fix crash on Json date columns 2020-11-04 15:46:02 +01:00
xindex.cpp Fix compile error on LINUX (LARGE_INTEGER) 2020-11-03 23:19:22 +01:00
xindex.h Fix gcc compiler warnings reported by Sergei 2017-05-23 19:35:50 +02:00
xobject.cpp Squashed commit of connect/10.0: 2018-04-26 14:15:18 +02:00
xobject.h - Getting text of json items now includes all array members 2020-11-07 15:40:46 +01:00
xtable.h Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
zip.c Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
zip.h - MDEV-11295: developing handling files contained in ZIP file. 2016-12-12 10:57:19 +01:00