Commit graph

21 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
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Andrew McDonnell
f8e0f1a823 Minor code cleanup: validation of options to member function. 2015-02-28 22:37:05 +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
Elena Stepanova
560a526bc4 MDEV-5744 OQGRAPH backing table changes not reflected in OQGRAPH table
Disable query cache for OQGRAPH
2014-02-27 14:31:39 +04:00
Andrew McDonnell
a6af7fc047 Backwards compatibility fixes for 5.5.32 2013-09-16 22:47:12 +09:30
Andrew McDonnell
174fc2a8f3 Fix remaining build problems caused by merge from lp:maria/10.0 2013-09-09 21:50:20 +09:30
Andrew McDonnell
6d1d8847f9 Partial fix for lp bug 1221722 2013-09-07 18:51:05 +09:30
andrew
86d49f149e Merge upstream latest maria/10.0 2013-09-06 20:45:53 +09:30
Sergei Golubchik
69ba585a1e remove #if MYSQL_VERSION_ID
there is no "upstream" OQGraph version that needs to stay compatible
with different MariaDB releases.
2013-04-07 17:09:05 +02:00
Andrew McDonnell
4884ba5ef5 Implement latch VARCHAR()- table structure - retain SHORTINT backwards compatibility. Passes test for b/compat 2013-03-04 23:15:29 +10:30
Arjen Lentz
d0e852a723 Removed old oqgraph v1 files (graphstore.*)
Updated oqgraph copyright, version and author info.
2013-02-28 10:16:29 +10:00
Antony T Curtis
321de37e68 Merge with lp:maria/10.0 2013-02-10 16:21:49 -08:00
Antony T Curtis
1af7d555b7 Fixups for OQGraph v3 on MariaDB 10.0 2013-02-10 16:07:55 -08:00
Sergei Golubchik
cb7f5948ec simplify the handler api - table_type() is no longer abstract, not even virtual 2012-12-17 11:00:39 +01:00
Antony T Curtis
b965d031bb Merge OQGraph3 into MariaDB 5.5.27 2012-09-30 12:14:12 -07:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Antony T Curtis
a062735d60 Cleanup, simplify and optimize. Change makefile a little so that we have debug symbols for the graph core. 2011-04-13 19:06:43 -07:00
Antony T Curtis
2037f387ee Commit work for OQGraph v3
Todo:
 - Add #ifdefs for building in MySQL
 - Lots more testing
2011-04-12 15:50:32 -07:00
unknown
ccf8a63f2d Import OQGraph engine into MariaDB. 2010-01-04 09:27:50 +01:00