Back to the main page.

Bug 1208 - functions for real-time interface with mysql database are missing

Status CLOSED FIXED
Reported 2011-12-01 17:37:00 +0100
Modified 2012-04-11 16:48:33 +0200
Product: FieldTrip
Component: realtime
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2011-12-01 17:37:23 +0100

On 28 Nov 2011, at 22:38, Jacob Martin wrote: Hello, I was considering buffering data to a MySQL database using the ft_write_data and ft_read_date mysql interfaces. However, the files db_connect.m, db_insert.m, db_insert_blob.m, etc.. are all missing. Does anyone know where I might be able to download these? Thanks very much Jacob Martin


Robert Oostenveld - 2011-12-01 17:39:05 +0100

Hi Jacob, I should be able to find them back. Please note that this is a really old and undocumented interface, which I made before implementing the fieldtrip buffer. It requires setting up a database with appropriate tables in it. Robert


Boris Reuderink - 2012-01-03 12:13:51 +0100

@Robert: did you find and send the db_* files to Jakob? I have added you as assignee and updated the status to "assigned" since you started handling this issue.


Robert Oostenveld - 2012-01-20 11:20:52 +0100

Hi Jacob I am not sure whether you are still interested in these, but I decided to pick it up and to get it fixed. Please note that I might not be able to provide all required support (*), and I am also not sure whether the mex file (that is also required) will still work with recent matlab versions. *) I don't recall how the mysql database had to be organized and am not sure whether that has been documented somewhere. STEP 1: I located the m-files in the old CVS repo and moved them to the new location. manzana> svn commit db_*m Adding db_close.m Adding db_insert.m Adding db_insert_blob.m Adding db_open.m Adding db_select.m Adding db_select_blob.m Transmitting file data ...... Committed revision 5155.


Jacob Martin - 2012-01-20 16:08:41 +0100

Dear Robert, Thanks so much for uploading the files. I'm pretty good with MySQL and will most likely be able help you along somewhat. If I make some big changes I will submit them to you. Thanks again! I'll check out the new repo soon. Jake


Robert Oostenveld - 2012-02-08 14:22:51 +0100

The low-level functions have been added (for some time already) to fileio/private. The main functions that are affected are dhcp158> pwd /Users/robert/matlab/fieldtrip/fileio dhcp158> grep -l db_ *.m ft_read_data.m ft_read_event.m ft_read_header.m ft_write_data.m ft_write_event.m The only thing that had not been done yet is to add the mex file. I looked into this: compiling the mex file requires client libraries for mysql to be present. That is a lot of work (especially given all 6 platforms we actively support), so instead of including the compiled mex file for all platforms in the fieldtrip release, I will just point to the place where the mex file and/or source code can be obtained (http://www.mathworks.com/matlabcentral/fileexchange/8663-mysql-database-connector). What I have just done is to extend ft_hastoolbox with mysql (detect the mex file, point to URL if not present). Furthermore, I have added a call to the ft_read and and write functions to check the presence of the mysql toolbox. dhcp158> grep -l db_ *.m ft_read_data.m ft_read_event.m ft_read_header.m ft_write_data.m ft_write_event.m dhcp158> svn commit `grep -l db_ *.m` ../utilities/ft_hastoolbox.m Sending fileio/ft_read_data.m Sending fileio/ft_read_event.m Sending fileio/ft_read_header.m Sending fileio/ft_write_data.m Sending fileio/ft_write_event.m Sending utilities/ft_hastoolbox.m Transmitting file data ...... Committed revision 5260.


Robert Oostenveld - 2012-04-11 16:48:33 +0200

I cleaned up my bugzilla list by changing the status from resolved (either fixed or wontfix) into closed. If you don't agree, please reopen the bug. Robert