mysql-5.0.87 + patches-5.0.86 compile fail in ubuntu 9.10 (karmic)

Bug #479106 reported by Arjen Lentz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OurDelta
Fix Committed
Undecided
Arjen Lentz
Percona patches
Fix Released
Undecided
Unassigned
Arch Linux
New
Undecided
Unassigned

Bug Description

Did a test build of mysql-5.0.87 with percona-patches-5.0.86 applied.
Compiles on Ubuntu 8.04 (Hardy) and 9.04 (Jaunty), but compile fails on 9.10 (Karmic) with the following:

make[4]: Entering directory `sql'
if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr\"" -DMYSQL_DATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DHAVE_CONFIG_H -I. -I. -I../include -I../innobase/include -I../innobase/include -I../ndb/include -I../ndb/include -I../ndb/include/ndbapi -I../ndb/include/mgmapi -I../include -I../include -I../regex -I. -DDBUG_OFF -DBIG_JOINS=1 -felide-constructors -fno-rtti -O2 -fno-implicit-templates -fno-exceptions -fno-rtti -MT ha_innodb.o -MD -MP -MF ".deps/ha_innodb.Tpo" -c -o ha_innodb.o ha_innodb.cc; \
        then mv -f ".deps/ha_innodb.Tpo" ".deps/ha_innodb.Po"; else rm -f ".deps/ha_innodb.Tpo"; exit 1; fi
ha_innodb.cc: In function ‘bool innodb_I_S_buffer_pool_content(THD*, TABLE_LIST*)’:
ha_innodb.cc:6774: error: invalid conversion from ‘const char*’ to ‘char*â

The compiler version in Karmic is newer, and perhaps more pedantic.
Karmic: g++-4.4.real (Ubuntu 4.4.1-4ubuntu8) 4.4.1
Jaunty: g++-4.3.real (Ubuntu 4.3.3-5ubuntu4) 4.3.3

Since similar is in XtraDB and that compiles ok on Karmic, you might be able to easily derive a solution from there?
Thanks

Related branches

Changed in ourdelta:
assignee: nobody → Arjen Lentz (arjen-lentz)
Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

This fixes it

--- ha_innodb.orig 2009-11-10 23:43:08.000000000 +1000
+++ ha_innodb.cc 2009-11-10 23:41:11.000000000 +1000
@@ -6771,7 +6771,7 @@
     table->field[10]->store(index->name, strlen(index->name), system_charset_info);
     // fprintf(stderr, " index %s, table %s", index->name, index->table_name);

- if((p = strchr(index->table_name, '/')))
+ if((p = strchr((char *) index->table_name, '/')))
     {
      strncpy(db_name_raw, index->table_name, p-index->table_name);
      db_name_raw[p-index->table_name] = 0;

In-tree patch provided in attached branch.

Changed in ourdelta:
status: New → Fix Committed
Revision history for this message
Arjen Lentz (arjen-lentz) wrote :

See fix in attached branch.
Please verify and merge.
Thanks!

Revision history for this message
tpol (tyler-poland) wrote :

This patch also resolves the issue for 5.0.87 under Arch Linux.

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

Sorry for late...
merged to lp:~percona-dev/percona-patches/5.0.86

Changed in percona-patches:
status: New → Fix Committed
Changed in percona-patches:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.