We were trying to create a table in the mysql database for a complex topic using RTIDDS.
PFA the IDL that we are using - KungfuPandaMovie.idl
When we add the entry corresponding to this IDL in the RTIDDS_SUBSCRIPTIONS file, which is:
"insert into RTIDDS_SUBSCRIPTIONS (table_owner, table_name, domain_Id, topic_name, type_name) values ('TestDB', 'KungfuPandaExample', 0, 'Example KungfuPandaMovie', 'KungfuPandaMovie');"
And start the rtirtc_mysql daemon, we get the error:
"RTI Database Integration Service to MySQL, Release 5.2.0.2: startup succeeded
[DDSQLDaemonDynamic_getPrimitiveFieldDcl,line 424:ERROR:50] The column name 'cast$HeroesInThisMovie$Oougway' exceeds the maximum length of 30 characters.
Use the XML tags <idl_member_prefix_max_length> and <idl_member_suffix_ max_length> to control the length of the column name.
[DDSQLDaemonDynamic_createDatabaseTable,line 1787:ERROR:20] Error generating 'CREATE TABLE' SQL statement string
[DDSQLDaemonCore_onUpdateMetaTableEntry,line 3476:ERROR:8] Error creating table 'rts.KungfuPandaExample'
[DDSQLDaemonCore_ConnectionThreadProc,line 4463:ERROR:4] Error creating subscription associated with the table 'rts.KungfuPandaExample'
"
We tried adding the following entries in the "RTI_REAL_TIME_CONNECT.xml" file which is at the location "<Database Integration Service installation directory>/resource/xml":
<database_mapping_options>
<identifier_separator_char>$</identifier_separator_char>
<open_bracket_char>[</open_bracket_char>
<close_bracket_char>]</close_bracket_char>
<idl_member_prefix_max_length>512</idl_member_prefix_max_length>
<idl_member_suffix_max_length>512</idl_member_suffix_max_length>
</database_mapping_options>
We tried with different values here - 64/256/512/1024, and also restarted the rtirtc_mysql daemon and mysql process before testing.
But still we get this error.
We understand that MySQL database imposes a limit of 64 characters on the column name, but the 30 character limit on column name imposed by RTIDDS can be overcome with the addition of the above two tags in the configuration file.
But here we are not even able to go past the 30 characters limit of RTIDDS, and create a column name of length between 30 to 64 characters.
As per the document: http://community.rti.com/rti-doc/510/RTI_Real-Time_Connect_5.1.0/docs/RTI_RTC_UsersManual.pdf, values -1 (supposedly default value) and 0 should work with <idl_member_prefix_max_length> and <idl_member_suffix_max_length> tags, but when we try to put these values in the configuration file, the rtirtc_mysql daemon throws a file parsing error.
Any pointers on this would be appreciated.
Questions:
1. Is there any other way to overcome the 30 characters limit on the column name by RTIDDS? As this solution did not work for us.
2. Is there any way to bypass the 64 character limit on the column name, imposed by MySQL?
Please note:
Platform used: Suse11
Version of RTIDDS: 5.2.0
Version of MySQL: 5.5
Attachment | Size |
---|---|
kungfupandamovie.idl | 742 bytes |
Hi,
There is no way to overcome this limitation, because they are imposed by the Database engine.
Are you trying to set both idl_member_prefix_max_length and idl_member_suffix_max_length to 0 at the same time? According to the documentation, this is not supported:
Note that those parameters control how to generate the column names based on the idl type definition name. Said that, I would recommend you to use small values (e.g. 5) in those parameters, so the auto-generated column names will remain under 30 characters.