[MDEV-12071] storage/xtradb/handler/ha_innodb.cc: Cannot assign const_iterator to iterator Created: 2017-02-15  Updated: 2017-05-17  Resolved: 2017-05-17

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - XtraDB
Affects Version/s: 10.1.22
Fix Version/s: 10.1.24, 10.0.31

Type: Bug Priority: Major
Reporter: Chris Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None
Environment:

OS: AIX 7.1 TL3
Compiler: XLC 13.1.3
cmake 3.3.1



 Description   

"/usr/local/src/mariadb-10.1-aix-github/mariadb-aix/storage/xtradb/handler/ha_innodb.cc", line 15117.73: 1540-2465 (S) An object or reference of type "std::set<dict_foreign_t *,dict_foreign_compare,std::allocator<dict_foreign_t *> >::iterator" cannot be initialized with a prvalue of type "std::_Tree<std::_Tset_traits<dict_foreign_t *,dict_foreign_compare,std::allocator<dict_foreign_t *>,0> >::const_iterator".
storage/xtradb/CMakeFiles/xtradb.dir/build.make:1190: recipe for target 'storage/xtradb/CMakeFiles/xtradb.dir/handler/ha_innodb.cc.o' failed
gmake[2]: *** [storage/xtradb/CMakeFiles/xtradb.dir/handler/ha_innodb.cc.o] Error 1
CMakeFiles/Makefile2:2294: recipe for target 'storage/xtradb/CMakeFiles/xtradb.dir/all' failed
gmake[1]: *** [storage/xtradb/CMakeFiles/xtradb.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
gmake: *** [all] Error 2



 Comments   
Comment by Marko Mäkelä [ 2017-05-16 ]

This looks like a simple 1-line patch:

@@ -15073,7 +15068,8 @@ fill_foreign_key_list(THD* thd,
 {
        ut_ad(mutex_own(&dict_sys->mutex));
 
-       for (dict_foreign_set::iterator it = table->referenced_set.begin();
+       for (dict_foreign_set::const_iterator it
+                    = table->referenced_set.begin();
             it != table->referenced_set.end(); ++it) {
 
                dict_foreign_t* foreign = *it;

Generated at Thu Feb 08 07:54:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.