Bug #71872 MysqlFabric sharding lookup table returns empty fields to any input parameter
Submitted: 27 Feb 2014 22:27 Modified: 3 Mar 2014 8:59
Reporter: Andres Eduardo Sanchez Rodriguez Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.0 OS:Linux (2.6.39-200.24.1.el6uek.x86_64)
Assigned to: CPU Architecture:Any

[27 Feb 2014 22:27] Andres Eduardo Sanchez Rodriguez
Description:
Sharding lookup_table command  seems to accepts any parameter and return just empty fields.

How to repeat:
bash-4.1$ mysqlfabric help sharding lookup_table
sharding lookup_table table_name

Fetch the shard specification mapping for the given table

tabIII itself doesn’t exist.

-bash-4.1$ mysqlfabric sharding lookup_table tabIII
Command :
{ success     = True
  return      = {'shard_mapping_id': '', 'type_name': '', 'table_name': '', 'global_group': '', 'column_name': ''}
  activities  =
}
-bash-4.1$ mysqlfabric sharding lookup_table oltp.oltp
Command :
{ success     = True
  return      = {'shard_mapping_id': 1, 'type_name': 'RANGE', 'table_name': 'oltp.oltp', 'global_group': 'my_group4', 'column_name': 'emp_no'}
  activities  =
}

but oltp.tabIII does exist

-bash-4.1$ mysqlfabric sharding lookup_table oltp.tabIII
Command :
{ success     = True
  return      = {'shard_mapping_id': 1, 'type_name': 'RANGE', 'table_name': 'oltp.tabIII', 'global_group': 'my_group4', 'column_name': 'emp_no'}
  activities  =
}

Suggested fix:
Perhaps an error should indicate when a table doesn’t exist.
[3 Mar 2014 8:59] Mats Kindahl
Thank you for the report. It is verified as described.

Reporting that a table does not exist in the meta-data is pretty straightforward but if MySQL Fabric need to contact one of the application servers to figure out if the table exists is possibly error-prone.

A reasonable approach would be to always assume that the meta-data is correct and validate any information entered into the meta-data store.
[6 Jul 2017 19:19] Bugs System
Status updated to 'Won't fix' (Fabric is now covered under Oracle Lifetime Sustaining Support)