Commit graph

190 commits

Author SHA1 Message Date
Monty
5a759d31f7 Changing field::field_name and Item::name to LEX_CSTRING
Benefits of this patch:
- Removed a lot of calls to strlen(), especially for field_string
- Strings generated by parser are now const strings, less chance of
  accidently changing a string
- Removed a lot of calls with LEX_STRING as parameter (changed to pointer)
- More uniform code
- Item::name_length was not kept up to date. Now fixed
- Several bugs found and fixed (Access to null pointers,
  access of freed memory, wrong arguments to printf like functions)
- Removed a lot of casts from (const char*) to (char*)

Changes:
- This caused some ABI changes
  - lex_string_set now uses LEX_CSTRING
  - Some fucntions are now taking const char* instead of char*
- Create_field::change and after changed to LEX_CSTRING
- handler::connect_string, comment and engine_name() changed to LEX_CSTRING
- Checked printf() related calls to find bugs. Found and fixed several
  errors in old code.
- A lot of changes from LEX_STRING to LEX_CSTRING, especially related to
  parsing and events.
- Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING*
- Some changes for char* to const char*
- Added printf argument checking for my_snprintf()
- Introduced null_clex_str, star_clex_string, temp_lex_str to simplify
  code
- Added item_empty_name and item_used_name to be able to distingush between
  items that was given an empty name and items that was not given a name
  This is used in sql_yacc.yy to know when to give an item a name.
- select table_name."*' is not anymore same as table_name.*
- removed not used function Item::rename()
- Added comparision of item->name_length before some calls to
  my_strcasecmp() to speed up comparison
- Moved Item_sp_variable::make_field() from item.h to item.cc
- Some minimal code changes to avoid copying to const char *
- Fixed wrong error message in wsrep_mysql_parse()
- Fixed wrong code in find_field_in_natural_join() where real_item() was
  set when it shouldn't
- ER_ERROR_ON_RENAME was used with extra arguments.
- Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already
  give the error.

TODO:
- Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c
- Change code to not modify LEX_CSTRING for database name
  (as part of lower_case_table_names)
2017-04-23 22:35:46 +03:00
Michael Widenius
a05a610d60 Added "const" to new data for handler::update_row()
This was done to make it clear that a update_row() should not change the
row.
This was not done for handler::write_row() as this function still needs
to update auto_increment values in the row. This should at some point
be moved to handler::ha_write_row() after which write_row can also have
const arguments.
2017-04-18 12:23:53 +03:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Sergey Vojtovich
fa137476ff MDEV-11941 - Lintian complains about executable bits
Revoked executable bit from files that are not supposed to be executed directly.
Removed interpreted from files that are not supposed to be executed directly.
Added interpreter to files that are supposed to be executed directly.
2017-03-07 22:28:33 +04:00
Marko Mäkelä
adc91387e3 Merge 10.0 into 10.1 2017-03-03 13:27:12 +02:00
Michael Widenius
d7a9aed43f Fixed test failing as myisam table was deleted before oqgraph table. 2017-02-28 16:10:47 +01:00
Sergei Golubchik
4cf4b61b24 oqgraph: remove redundant update_virtual_fields() calls 2017-02-13 18:12:04 +01:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Sergei Golubchik
9a3ec79b53 cleanup: TABLE::update_virtual_fields
Make update_virtual_fields() a method of TABLE, to be consistent
with TABLE::update_default_fields().
2016-12-12 20:27:33 +01:00
Sergei Golubchik
b2c8d55c22 cleanup: unused open_table_from_share() flags 2016-12-12 20:27:30 +01:00
Sergei Golubchik
a98c85bb50 Merge branch '10.0-galera' into 10.1 2016-11-02 13:44:07 +01:00
Don Lewis
3321f1adc7 MDEV-5944: Compile fix for OQGRAPH with LLVM
Clang/LLVM has more strict schemantics than gcc.

This patch quantifies the namesspace such that it will
compile using clang.
2016-10-25 13:46:28 +03:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Dimitri John Ledkov
26bf066d56 MDEV-9479: Enable OQGRAPH Engine to compile with Boost-1.60+
This used to be a compile failure. The defined structure isn't required
in the later versions of boost.

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
2016-06-22 16:41:38 +03:00
Sergey Vojtovich
7ecb304996 Code cleanups
- unused TABLE_SHARE::deleting and TABLE_LIST::deleting flags were removed
- kill_delayed_threads_for_table() and intern_close_table() are now private
  methods of table cache
- removed free_share flag of closefrm(): it was never used for temporary
  tables and was rarely useful for regular tables
2016-06-10 17:37:12 +04:00
Sergei Golubchik
87e3e67f43 Merge branch '10.0' into 10.1 2016-05-04 15:23:26 +02:00
Sergei Golubchik
80da57cc4f remove the forgotten PARENT_SCOPE 2016-05-03 20:13:58 +02:00
Vladislav Vaintroub
67723e9618 Move MYSQL_ADD_PLUGIN outside of IF(OQGRAPH_OK) condition,
otherwise the plugin does not get compiled if
cmake is called multiple times.
2016-05-03 15:23:34 +02:00
Vladislav Vaintroub
673efd0648 MDEV-10015 Fix oqgraph compilation on Windows 2016-05-03 15:18:55 +02:00
Andrew McDonnell
23b1b69b10 Comment from https://github.com/MariaDB/server/pull/153 2016-04-24 18:15:20 +02:00
Andrew McDonnell
6651005e62 Fix for MDEV-8206, as per Jira comments of 2015-11-16 and 2015-11-30 2016-04-24 18:15:20 +02:00
Sergey Vojtovich
250a89cfec MDEV-9283 - Debian: the Lintian complains about "shlib-calls-exit" in
ha_oqgraph.so

exit() was called by Judy error handler. This patch overrides Judy error handler
so that it calls abort() instead of exit().
2016-04-22 15:30:10 +04:00
Sergey Vojtovich
282497dd6d MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
Sergei Golubchik
3b0c7ac1f9 Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
Sergei Golubchik
22ebf3cb45 MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
10.0 part of the fix
2016-03-21 11:55:03 +01:00
Sergei Golubchik
d158ba62f7 ASAN error in OQGraph engine
Fixed more cases for MDEV-6282
2016-03-21 11:43:19 +01:00
Sergei Golubchik
3fdc6140a3 update plugins' maturity levels 2016-03-18 22:05:23 +01:00
Andrew McDonnell
59b6b99ce3 Added regression test for MDEV_5871 2016-02-17 21:46:32 +04: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
658992699b Merge tag 'mariadb-10.0.20' into 10.1 2015-06-27 20:35:26 +02:00
Sergei Golubchik
7bfda275a1 MDEV-8128 cmake fails to detect boost libraries 2015-06-16 23:58:14 +02:00
Sergei Golubchik
5091a4ba75 Merge tag 'mariadb-10.0.19' into 10.1 2015-06-01 15:51:25 +02:00
Andrew McDonnell
a235504b75 Ensure VERBOSE_DEBUG is off by default 2015-02-28 22:43:18 +10:30
Andrew McDonnell
2b9aba3b55 Updated (C) message to 2015, and changelog 2015-02-28 22:43:04 +10:30
Andrew McDonnell
c65f323836 Fixed more cases for MDEV-6282 2015-02-28 22:37:06 +10:30
Andrew McDonnell
e32dafe778 Hopefully finally fixes MDEV-6282, MDEV-5748 and MDEV-6345 2015-02-28 22:37:06 +10:30
Andrew McDonnell
f8e0f1a823 Minor code cleanup: validation of options to member function. 2015-02-28 22:37:05 +10:30
Andrew McDonnell
fbcabb24ce Fixed minor spelling mistake. 2015-02-28 22:37:05 +10:30
Andrew McDonnell
6ff6bf8aa3 Added regression test for MDEV-6345 2015-02-28 22:37:04 +10:30
Andrew McDonnell
a657abd63f Added extra debug to support MDEV-6282
Conflicts:
	storage/oqgraph/ha_oqgraph.cc
2015-02-28 22:37:04 +10:30
Andrew McDonnell
e72abc5a96 Minor fix: make sure alter table wont try to change our storage engine to something else. 2015-02-28 22:37:04 +10:30
Andrew McDonnell
79246ebfe9 Partial code tidy: move plugin description to end with other items, and added status variable for debug. 2015-02-28 22:37:03 +10:30
Andrew McDonnell
13e30c0063 Removed dead code and support for dead (<10.0.5) versions of mariadb
Conflicts:
	storage/oqgraph/ha_oqgraph.cc

Conflicts:
	storage/oqgraph/ha_oqgraph.cc
2015-02-28 22:37:03 +10:30
Andrew McDonnell
abf1e259f6 Partial whitespace cleanup.
Conflicts:
	storage/oqgraph/ha_oqgraph.cc

Conflicts:
	storage/oqgraph/ha_oqgraph.cc
2015-02-28 22:29:43 +10:30
Andrew McDonnell
826141368c Added regression test for MDEV-6282 2015-02-28 22:29:42 +10:30
Andrew McDonnell
1973c00970 Update 2014 (C) message 2015-02-28 22:02:58 +10:30
Sergei Golubchik
db227616d2 followup for "MDEV-6248 GUI-friendly cmake options to enable/disable plugins"
Remove ONLY_IF clause in MYSQL_ADD_PLUGIN and the requirement
that every plugin's CMakeLists.txt *must* do MYSQL_ADD_PLUGIN
for PLUGIN_XXX=YES to work. This was very fragile and cannot be
relied on.

Use a different implementation of =YES check - iterate all
PLUGIN_* variables and see which one doesn't have a matching target.

Revert all ONLY_IF changes in CMakeLists.txt files.
2015-02-15 22:14:33 +01:00
Sergei Golubchik
4b21cd21fe Merge branch '10.0' into merge-wip 2015-01-31 21:48:47 +01:00