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

Bug #479106 reported by Arjen Lentz on 2009-11-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Arjen Lentz
Percona patches
Fix Released
Arch Linux

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; \
        then mv -f ".deps/ha_innodb.Tpo" ".deps/ha_innodb.Po"; else rm -f ".deps/ha_innodb.Tpo"; exit 1; fi In function ‘bool innodb_I_S_buffer_pool_content(THD*, TABLE_LIST*)’: 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?

Related branches

Vadim Tkachenko: Approve on 2009-11-11
Changed in ourdelta:
assignee: nobody → Arjen Lentz (arjen-lentz)
Arjen Lentz (arjen-lentz) wrote :

This fixes it

--- ha_innodb.orig 2009-11-10 23:43:08.000000000 +1000
+++ 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
Arjen Lentz (arjen-lentz) wrote :

See fix in attached branch.
Please verify and merge.

tpol (tyler-poland) wrote :

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

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  Edit
Everyone can see this information.

Other bug subscribers