MySQL Forums
Forum List  »  Custom Storage Engines

Use field->store() in custom storage engine
Posted by: Luca Ippolito
Date: January 25, 2016 10:14AM

Hello everyone

Does anybody know how the field->store() method works in custom storage engines?

I'd like to use it in the rnd_next(uchar *buf) method to save random data. I tried the following code:

char *data = (char*)malloc(field->max_display_length() +1);
*data = 's';
int data_len = sizeof(data) / sizeof(*char);
field->set_notnull();
field->store(data, data_len, &my_charset_bin);
free(data)

There were no compilingerrors, but the server crashes when i try to select some data of a table with my custom storage engine type.

Looking foreward for some answers

Options: ReplyQuote


Subject
Views
Written By
Posted
Use field->store() in custom storage engine
1729
January 25, 2016 10:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.