From 8170b22b5ca69386fb2fcab479e989d084ca8774 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Feb 2008 21:27:12 +0200 Subject: Fixed compiler warnings in a lot of files Added IMPOSSIBLE_RESULT to avoid compiler warnings when using (Item_result) -1 as a dummy value Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined client/get_password.c: Fixed compiler warning cmd-line-utils/readline/bind.c: Fixed compiler warning cmd-line-utils/readline/chardefs.h: Fixed compiler warning by adding marco to be used when largest_char is 255 cmd-line-utils/readline/display.c: Fixed compiler warnings by removing not accessed variables cmd-line-utils/readline/histexpand.c: Fixed compiler warnings by removing not accessed variables cmd-line-utils/readline/history.c: Fixed compiler warnings by adding cast cmd-line-utils/readline/text.c: Fixed compiler warnings by removing not accessed variables and adding casts dbug/dbug.c: Fixed compiler warnings by changing types include/mysql_com.h: Added IMPOSSIBLE_RESULT to avoid compiler warnings when using (Item_result) -1 as a dummy value libmysql/libmysql.c: Fixed compiler warning mysql-test/t/query_cache_debug.test: Mark test as BIG as it uses a lot of memory mysys/mf_iocache2.c: Fixed compiler warnings by adding cast sql/event_data_objects.cc: Fixed compiler warnings by removing not used code sql/events.cc: Fixed compiler warnings by removing not used code sql/field.cc: Fixed compiler warnings by adding cast and removed not accessed variables sql/ha_partition.cc: Fixed compiler warnings by removing not used code sql/item.cc: Fixed compiler warnings by removing not accessed variables Use IMPOSSIBLE_RESULT instead of (Item_result)-1 sql/item_cmpfunc.cc: Fixed compiler warnings by removing not accessed variables sql/item_func.cc: Fixed compiler warnings by removing not used code and not accessed variables Added IMPOSSIBLE_RESULT sql/item_subselect.cc: Fixed compiler warnings by removing not accessed variables sql/item_xmlfunc.cc: Fixed forgotten setting of xpath->error sql/log.cc: Fixed compiler warnings by removing not accessed variables sql/log_event.cc: Added IMPOSSIBLE_RESULT into switch Fixed wrong usage of DBUG_ASSERT(1) Removed always true DBUG_ASSERT() sql/mysqld.cc: Fixed compiler warnings by adding casts for ULONG_MAX sql/opt_sum.cc: Fixed compiler warnings by removing not used code Removed wrong DBUG_ASSERT() sql/partition_info.cc: Fixed compiler warnings by removing not accessed variables sql/rpl_injector.h: Removed always true part from DBUG_ASSERT() to remove compiler warning sql/spatial.cc: Fixed compiler warnings by removing not accessed variables sql/sql_acl.cc: Fixed compiler warnings by removing not accessed variables sql/sql_base.cc: Fixed compiler warnings by removing not accessed variables sql/sql_cache.cc: Fixed compiler warnings by removing not accessed variables sql/sql_class.cc: Fixed compiler warnings by: - Removing always true part from DBUG_ASSERT() - Removing not used code - Added IMPOSSIBLE_RESULT into switch sql/sql_load.cc: Fixed compiler warnings by removing not accessed variables sql/sql_parse.cc: Fixed compiler warnings by: - Removing not accessed variables - Removing always true part from DBUG_ASSERT() - Removing not used code sql/sql_plugin.cc: Added comment sql/sql_prepare.cc: Fixed compiler warnings by removing not accessed variables sql/sql_show.cc: Fixed compiler warnings by using correct cast sql/sql_table.cc: Fixed compiler warnings by removing not used code and removing not accessed variables sql/table.cc: Fixed compiler warnings by removing not accessed variables sql/time.cc: Fixed wrong DBUG_ASSERT(1) storage/maria/unittest/Makefile.am: Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined storage/maria/unittest/ma_pagecache_consist.c: Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined storage/maria/unittest/ma_pagecache_single.c: Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined tests/mysql_client_test.c: Fixed compiler warnings by removing not accessed variables and changing types --- sql/item_xmlfunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/item_xmlfunc.cc') diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 68d85418324..0e13830a3b1 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -2024,8 +2024,8 @@ static int my_xpath_parse_OrExpr(MY_XPATH *xpath) Item *prev= xpath->item; if (!my_xpath_parse_AndExpr(xpath)) { - return 0; xpath->error= 1; + return 0; } xpath->item= new Item_cond_or(nodeset2bool(xpath, prev), nodeset2bool(xpath, xpath->item)); -- cgit v1.2.1 From bd4e65515f556b6bca45d06d81370d99cf649647 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Sat, 31 Jan 2009 23:22:44 +0200 Subject: Fixed compiler warnings found by gcc 4.3.2 - Added braces around expressions with &&, ||, & and | - Added empty line before ; for empty while and for loops - Added () around if with assignments - Removed const before function returning simple type Changed BUILD scripts to not build with NDB BUILD/SETUP.sh: By default, don't build ndb with --max in Maria tree. NDB is not kept up to date anyway in 5.1 client/mysql.cc: Added braces around && to get rid of compiler warnings sql/event_db_repository.cc: Added braces around && to get rid of compiler warnings sql/events.cc: Added braces around && to get rid of compiler warnings sql/field.cc: Added braces around && to get rid of compiler warnings Fixed for loops sql/field.h: Added braces around & to get rid of compiler warnings sql/field_conv.cc: Added braces around && to get rid of compiler warnings Fixed bug when copying between DATETIME fields and strict dates are used Removed not needeed else sql/gstream.cc: Added braces around && to get rid of compiler warnings sql/ha_ndbcluster.cc: Added braces around && to get rid of compiler warnings Added {} to get rid of compiler warnings sql/handler.cc: Added braces around && to get rid of compiler warnings sql/item.cc: Added braces around && to get rid of compiler warnings sql/item_cmpfunc.cc: Added braces around && to get rid of compiler warnings Removed some not needed space sql/item_func.cc: Added braces around && to get rid of compiler warnings sql/item_strfunc.cc: Added braces around && to get rid of compiler warnings sql/item_subselect.cc: Added braces around && to get rid of compiler warnings sql/item_sum.cc: Added braces around && to get rid of compiler warnings sql/item_timefunc.cc: Added braces around && to get rid of compiler warnings sql/item_xmlfunc.cc: Added empty line before ; for empty while and for loops sql/log.cc: Added braces around && to get rid of compiler warnings sql/log_event.cc: Added braces around && to get rid of compiler warnings Removed not needed else sql/log_event_old.cc: Added braces around && to get rid of compiler warnings sql/opt_range.cc: Added braces around && to get rid of compiler warnings sql/opt_sum.cc: Added braces around && to get rid of compiler warnings sql/set_var.cc: Added empty line before ; for empty while and for loops Added () around if with assignments sql/slave.cc: Added braces around && to get rid of compiler warnings Added empty line before ; for empty while and for loops sql/spatial.h: Added braces around && to get rid of compiler warnings sql/sql_acl.cc: Added braces around && to get rid of compiler warnings sql/sql_analyse.cc: Added empty line before ; for empty while and for loops sql/sql_base.cc: Added braces around && to get rid of compiler warnings sql/sql_connect.cc: Added braces around && to get rid of compiler warnings sql/sql_db.cc: Added braces around && to get rid of compiler warnings sql/sql_delete.cc: Added braces around && to get rid of compiler warnings sql/sql_help.cc: Added empty line before ; for empty while and for loops sql/sql_insert.cc: Added braces around && to get rid of compiler warnings Added () around if with assignments sql/sql_lex.cc: Cast char array references to uchar; Fixed wrong array referencing when using characters > ASCII 128 in SQL statments Added empty line before ; for empty while and for loops Trivial indent fixes Added braces around && to get rid of compiler warnings sql/sql_load.cc: Added braces around && to get rid of compiler warnings sql/sql_parse.cc: Added braces around && to get rid of compiler warnings sql/sql_partition.cc: Added braces around && to get rid of compiler warnings sql/sql_plugin.cc: Fixed bug in detecing if option variable should be readonly Added empty line before ; for empty while and for loops sql/sql_prepare.cc: Added braces around && to get rid of compiler warnings sql/sql_select.cc: Added braces around && to get rid of compiler warnings Added () around if with assignments Added empty line before ; for empty while and for loops sql/sql_show.cc: Added braces around && to get rid of compiler warnings sql/sql_table.cc: Added braces around && to get rid of compiler warnings sql/sql_trigger.cc: Added braces around && to get rid of compiler warnings sql/sql_update.cc: Added braces around && to get rid of compiler warnings sql/sql_yacc.yy: Added braces around && to get rid of compiler warnings sql/table.cc: Added braces around && to get rid of compiler warnings sql/table.h: Added braces around && to get rid of compiler warnings sql/time.cc: Added braces around && to get rid of compiler warnings sql/tztime.cc: Added braces around && to get rid of compiler warnings sql/uniques.cc: Added braces around && to get rid of compiler warnings storage/federated/ha_federated.cc: Fixed bug in testing of variable to ha_info() (Not critical) storage/heap/ha_heap.cc: Added braces around && to get rid of compiler warnings storage/maria/ha_maria.cc: Fixed bug: Mark that maria_log_dir_path is readonly Added braces around && to get rid of compiler warnings storage/ndb/include/ndbapi/NdbEventOperation.hpp: Removed const before function returning simple type storage/ndb/include/ndbapi/NdbOperation.hpp: Removed const before function returning simple type storage/ndb/src/ndbapi/Ndb.cpp: Added empty line before ; for empty while and for loops storage/ndb/src/ndbapi/NdbEventOperation.cpp: Removed const before function returning simple type storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Removed const before function returning simple type storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp: Removed const before function returning simple type storage/ndb/src/ndbapi/NdbRecAttr.cpp: Added empty line before ; for empty while and for loops storage/ndb/src/ndbapi/TransporterFacade.hpp: Added braces around && to get rid of compiler warnings --- sql/item_xmlfunc.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sql/item_xmlfunc.cc') diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 0e13830a3b1..8494b4308eb 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -1354,7 +1354,8 @@ my_xpath_lex_scan(MY_XPATH *xpath, MY_XPATH_LEX *lex, const char *beg, const char *end) { int ch, ctype, length; - for ( ; beg < end && *beg == ' ' ; beg++); // skip leading spaces + for ( ; beg < end && *beg == ' ' ; beg++) // skip leading spaces + ; lex->beg= beg; if (beg >= end) @@ -1423,7 +1424,8 @@ my_xpath_lex_scan(MY_XPATH *xpath, if (my_xdigit(ch)) // a sequence of digits { - for ( ; beg < end && my_xdigit(*beg) ; beg++); + for ( ; beg < end && my_xdigit(*beg) ; beg++) + ; lex->end= beg; lex->term= MY_XPATH_LEX_DIGITS; return; @@ -1431,7 +1433,8 @@ my_xpath_lex_scan(MY_XPATH *xpath, if (ch == '"' || ch == '\'') // a string: either '...' or "..." { - for ( ; beg < end && *beg != ch ; beg++); + for ( ; beg < end && *beg != ch ; beg++) + ; if (beg < end) { lex->end= beg+1; -- cgit v1.2.1 From f7a75b999b4b0e51c647fa19df35db517e0b6721 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 16 Oct 2009 15:57:48 -0700 Subject: The main commit of Andrey Zhakov's patch introducing vurtual(computed) columns. The original patch has been ameliorated by Sanja and Igor. --- sql/item_xmlfunc.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/item_xmlfunc.cc') diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 8a5804ffd63..f2e33dc2d44 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -220,6 +220,11 @@ public: collation.collation= pxml->charset(); } const char *func_name() const { return "nodeset"; } + bool check_vcol_func_processor(uchar *int_arg) + { + return trace_unsupported_by_check_vcol_func_processor(func_name()); + } + }; @@ -526,6 +531,10 @@ public: enum Type type() const { return XPATH_NODESET_CMP; }; const char *func_name() const { return "xpath_nodeset_to_const_comparator"; } bool is_bool_func() { return 1; } + bool check_vcol_func_processor(uchar *int_arg) + { + return trace_unsupported_by_check_vcol_func_processor(func_name()); + } longlong val_int() { -- cgit v1.2.1