Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IB: update foreign constraints of timestamp-based versioned tables #415

Closed
midenok opened this issue Dec 17, 2017 · 3 comments
Closed

IB: update foreign constraints of timestamp-based versioned tables #415

midenok opened this issue Dec 17, 2017 · 3 comments
Assignees

Comments

@midenok
Copy link

midenok commented Dec 17, 2017

Related to #209. See this in row0mysql.cc:

		if (vers_set_fields && !prebuilt->versioned_write)
		{
			// FIXME: timestamp-based update of sys_trx_end in run_again
			err = DB_UNSUPPORTED;
			trx->error_state = err;

			goto handle_error;
		}
@midenok midenok added the task label Dec 17, 2017
@midenok midenok added this to the 1.1: First priority tasks after merge milestone Dec 17, 2017
@midenok midenok self-assigned this Dec 27, 2017
@midenok midenok modified the milestones: 1.1: First priority tasks after merge, 1.0: Review fixes and merge into 10.3 Dec 27, 2017
@midenok
Copy link
Author

midenok commented Dec 28, 2017

Row is converted to innobase by row_mysql_convert_row_to_innobase(). Field is converted to innobase like this:

		row_mysql_store_col_in_innobase_format(
			dfield,
			prebuilt->ins_upd_rec_buff + templ->mysql_col_offset,
			TRUE, /* MySQL row format data */
			mysql_rec + templ->mysql_col_offset,
			templ->mysql_col_len,
			dict_table_is_comp(prebuilt->table));

@midenok midenok added the info label Dec 28, 2017
@midenok
Copy link
Author

midenok commented Jan 10, 2018

TODO:

  1. get query start time in Field format on SQL side. Impossible to do this on IB side because timestamps are stored in SQL-specific format and presented to IB as DATA_FIXBINARY.
  2. get Field buffer from SQL in IB;
  3. translate Field buffer into IB format with row_mysql_store_col_in_innobase_format().

@midenok
Copy link
Author

midenok commented Jan 11, 2018

It would be good to have TABLE for dict_table_t, but it is unavailable. Currently it can be cached in vc_templ (innobase_find_mysql_table_for_vc(), find_fk_open_table() ). Though vc_templ is for virtual columns and is not built without them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant