I'm using SlashDB to layer a REST interface over MySQL back-end. Mostly, I define queries through the 'SQL Pass-thru' feature. We're using this system to record test data from various test station.
When sending test data into the database, it seems SlashDB chokes once the URL exceeds a certain length (about 2K worth of data). The error returned was '502', which is strange because URI too long normally returns a '414'. When I try the query directly in MySQL, there was no problem.
Here's the table definition:
CREATE TABLE `test_result` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`test_instance_id` bigint(20) unsigned NOT NULL,
`test_instance_test_station_id` varchar(15) NOT NULL,
`test_instance_unit_sn` varchar(30) NOT NULL,
`test_instance_contact_address_id` int(2) NOT NULL,
`testStep` varchar(45) DEFAULT NULL,
`testData` blob,
`externalDataLink` text,
PRIMARY KEY (`id`),
KEY `fk_test_result_test_instance1_idx` (`test_instance_id`,`test_instance_test_station_id`,`test_instance_unit_sn`,`test_instance_contact_address_id`),
CONSTRAINT `fk_test_result_test_instance1` FOREIGN KEY (`test_instance_id`, `test_instance_test_station_id`, `test_instance_unit_sn`, `test_instance_contact_address_id`) REFERENCES `test_instance` (`id`, `test_station_id`, `unit_sn`, `contact_address_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8
And here's the URL (with the big data truncated):
/post-test-result/testId/116/locationId/99/stationId/BO-01/sn/991807000003/stepName/test2/testData/[2K's worth of data here]/dataUrl/bye2.json?limit=29
The query defined through 'SQL Pass-thru':
insert into test_result (test_instance_id, test_instance_contact_address_id, test_instance_test_station_id, test_instance_unit_sn, testStep, testData, externalDataLink) values (:testId, :locationId, :stationId, :sn, :stepName, :testData, :dataUrl);
Would anybody be able to shed any light?