2222#include < vector>
2323
2424#include " dd/object_id.h"
25+ #include " my_compiler.h"
2526#include " my_dbug.h"
2627#include " object_registry.h" // Object_registry
2728
@@ -257,7 +258,8 @@ class Dictionary_client
257258
258259 template <typename K, typename T>
259260 bool acquire (const K &key, const T **object,
260- bool *local_committed, bool *local_uncommitted);
261+ bool *local_committed, bool *local_uncommitted)
262+ MY_ATTRIBUTE((warn_unused_result));
261263
262264
263265 /* *
@@ -461,7 +463,8 @@ class Dictionary_client
461463 */
462464
463465 template <typename T>
464- bool acquire (Object_id id, const T** object);
466+ bool acquire (Object_id id, const T** object)
467+ MY_ATTRIBUTE((warn_unused_result));
465468
466469
467470 /* *
@@ -478,7 +481,8 @@ class Dictionary_client
478481 */
479482
480483 template <typename T>
481- bool acquire_for_modification (Object_id id, T** object);
484+ bool acquire_for_modification (Object_id id, T** object)
485+ MY_ATTRIBUTE((warn_unused_result));
482486
483487
484488 /* *
@@ -498,7 +502,8 @@ class Dictionary_client
498502 */
499503
500504 template <typename T>
501- bool acquire_uncached (Object_id id, T** object);
505+ bool acquire_uncached (Object_id id, T** object)
506+ MY_ATTRIBUTE((warn_unused_result));
502507
503508
504509 /* *
@@ -522,7 +527,8 @@ class Dictionary_client
522527 */
523528
524529 template <typename T>
525- bool acquire_uncached_uncommitted (Object_id id, T** object);
530+ bool acquire_uncached_uncommitted (Object_id id, T** object)
531+ MY_ATTRIBUTE((warn_unused_result));
526532
527533
528534 /* *
@@ -537,7 +543,8 @@ class Dictionary_client
537543 */
538544
539545 template <typename T>
540- bool acquire (const String_type &object_name, const T** object);
546+ bool acquire (const String_type &object_name, const T** object)
547+ MY_ATTRIBUTE((warn_unused_result));
541548
542549
543550 /* *
@@ -554,7 +561,8 @@ class Dictionary_client
554561 */
555562
556563 template <typename T>
557- bool acquire_for_modification (const String_type &object_name, T** object);
564+ bool acquire_for_modification (const String_type &object_name, T** object)
565+ MY_ATTRIBUTE((warn_unused_result));
558566
559567
560568 /* *
@@ -581,7 +589,8 @@ class Dictionary_client
581589
582590 template <typename T>
583591 bool acquire (const String_type &schema_name, const String_type &object_name,
584- const T** object);
592+ const T** object)
593+ MY_ATTRIBUTE((warn_unused_result));
585594
586595
587596 /* *
@@ -611,7 +620,8 @@ class Dictionary_client
611620 template <typename T>
612621 bool acquire_for_modification (const String_type &schema_name,
613622 const String_type &object_name,
614- T** object);
623+ T** object)
624+ MY_ATTRIBUTE((warn_unused_result));
615625
616626
617627 /* *
@@ -644,7 +654,8 @@ class Dictionary_client
644654
645655 template <typename T>
646656 bool acquire (const String_type &schema_name, const String_type &object_name,
647- const typename T::cache_partition_type** object);
657+ const typename T::cache_partition_type** object)
658+ MY_ATTRIBUTE((warn_unused_result));
648659
649660
650661 /* *
@@ -680,7 +691,8 @@ class Dictionary_client
680691 template <typename T>
681692 bool acquire_for_modification (const String_type &schema_name,
682693 const String_type &object_name,
683- typename T::cache_partition_type** object);
694+ typename T::cache_partition_type** object)
695+ MY_ATTRIBUTE((warn_unused_result));
684696
685697
686698 /* *
@@ -702,7 +714,8 @@ class Dictionary_client
702714
703715 bool acquire_uncached_table_by_se_private_id (const String_type &engine,
704716 Object_id se_private_id,
705- Table **table);
717+ Table **table)
718+ MY_ATTRIBUTE((warn_unused_result));
706719
707720
708721 /* *
@@ -719,7 +732,8 @@ class Dictionary_client
719732 bool acquire_uncached_table_by_partition_se_private_id (
720733 const String_type &engine,
721734 Object_id se_partition_id,
722- Table **table);
735+ Table **table)
736+ MY_ATTRIBUTE((warn_unused_result));
723737
724738
725739 /* *
@@ -739,7 +753,8 @@ class Dictionary_client
739753 bool get_table_name_by_se_private_id (const String_type &engine,
740754 Object_id se_private_id,
741755 String_type *schema_name,
742- String_type *table_name);
756+ String_type *table_name)
757+ MY_ATTRIBUTE((warn_unused_result));
743758
744759
745760 /* *
@@ -759,7 +774,8 @@ class Dictionary_client
759774 bool get_table_name_by_partition_se_private_id (const String_type &engine,
760775 Object_id se_partition_id,
761776 String_type *schema_name,
762- String_type *table_name);
777+ String_type *table_name)
778+ MY_ATTRIBUTE((warn_unused_result));
763779
764780
765781 /* *
@@ -777,7 +793,8 @@ class Dictionary_client
777793
778794 bool get_table_name_by_trigger_name (const Schema &schema,
779795 const String_type &trigger_name,
780- String_type *table_name);
796+ String_type *table_name)
797+ MY_ATTRIBUTE((warn_unused_result));
781798
782799
783800 /* *
@@ -791,7 +808,8 @@ class Dictionary_client
791808 */
792809
793810 bool get_tables_max_se_private_id (const String_type &engine,
794- Object_id *max_id);
811+ Object_id *max_id)
812+ MY_ATTRIBUTE((warn_unused_result));
795813
796814
797815 /* *
@@ -810,9 +828,9 @@ class Dictionary_client
810828 */
811829
812830 template <typename T>
813- bool fetch_schema_component_names (
814- const Schema *schema,
815- std::vector<String_type> *names) const ;
831+ bool fetch_schema_component_names (const Schema *schema,
832+ std::vector<String_type> *names) const
833+ MY_ATTRIBUTE((warn_unused_result)) ;
816834
817835
818836 /* *
@@ -827,9 +845,9 @@ class Dictionary_client
827845 */
828846
829847 template <typename T>
830- bool fetch_schema_components (
831- const Schema *schema,
832- std::vector< const T*> *coll) const ;
848+ bool fetch_schema_components (const Schema *schema,
849+ std::vector< const T*> *coll) const
850+ MY_ATTRIBUTE((warn_unused_result)) ;
833851
834852
835853 /* *
@@ -843,7 +861,8 @@ class Dictionary_client
843861 */
844862
845863 template <typename T>
846- bool fetch_global_components (std::vector<const T*> *coll) const ;
864+ bool fetch_global_components (std::vector<const T*> *coll) const
865+ MY_ATTRIBUTE((warn_unused_result));
847866
848867
849868 /* *
@@ -863,10 +882,10 @@ class Dictionary_client
863882 @return false Success.
864883 */
865884 template <typename T>
866- bool fetch_referencing_views_object_id (
867- const char *schema ,
868- const char *tbl_or_sf_name,
869- std::vector<Object_id> *view_ids) const ;
885+ bool fetch_referencing_views_object_id (const char *schema,
886+ const char *tbl_or_sf_name ,
887+ std::vector<Object_id> *view_ids) const
888+ MY_ATTRIBUTE((warn_unused_result)) ;
870889
871890
872891 /* *
@@ -910,7 +929,8 @@ class Dictionary_client
910929 */
911930
912931 template <typename T>
913- bool drop (const T *object);
932+ bool drop (const T *object)
933+ MY_ATTRIBUTE((warn_unused_result));
914934
915935
916936 /* *
@@ -939,7 +959,8 @@ class Dictionary_client
939959 */
940960
941961 template <typename T>
942- bool store (T* object);
962+ bool store (T* object)
963+ MY_ATTRIBUTE((warn_unused_result));
943964
944965
945966 /* *
@@ -968,7 +989,8 @@ class Dictionary_client
968989 */
969990
970991 template <typename T>
971- bool update (T* new_object);
992+ bool update (T* new_object)
993+ MY_ATTRIBUTE((warn_unused_result));
972994
973995
974996 /* *
@@ -1007,7 +1029,8 @@ class Dictionary_client
10071029 @return false - on success
10081030 */
10091031 bool remove_table_dynamic_statistics (const String_type &schema_name,
1010- const String_type &table_name);
1032+ const String_type &table_name)
1033+ MY_ATTRIBUTE((warn_unused_result));
10111034
10121035
10131036 /* *
0 commit comments