Skip to content

Commit

Permalink
Merge branch 'PS-5.6-3851' into PS-5.7-3851
Browse files Browse the repository at this point in the history
  • Loading branch information
satya-bodapati committed Jun 27, 2018
2 parents 24c1f1f + 6d352b8 commit 43cb07f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
24 changes: 24 additions & 0 deletions mysql-test/suite/innodb_fts/r/sync.result
Expand Up @@ -132,3 +132,27 @@ id title
2 database
3 good
DROP TABLE t1;
#
# PS-3851: Percona Ver 5.6.39-83.1 Failing assertion: sym_node->table != NULL
#
CREATE TABLE `questions_and_answers` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
`keywords` text COMMENT 'CSV list of keywords related to this entry',
PRIMARY KEY (`id`),
FULLTEXT KEY `keywords` (`keywords`)
) ENGINE=InnoDB AUTO_INCREMENT=3620 DEFAULT CHARSET=utf8 COMMENT='Main table for Q&A module ';
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1854,'support, services, essay, writing, maths, help, advice, study, advice, advise, careers, employability, graduating, graduate, student_support, academic_support, academic_help');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1855,'accommodation, housing, halls, residence, live, living, bed, beds, acomodation, accomodation, accommidation, acomidation, hall, campus_living, uni_living, uni_halls, university_life, university_accommodation');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1856,'interview, interviews, audition, auditions, portfolio, review, admission, interview_preparation, booking, book, change_interview');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1857,'entry_requirements, application, admission, apply, applying, entry, criteria, requirements, mature, life, experience, A-level, A-levels, A_levels, AS, AS_Level, AS_Levels, BTEC, IB, baccalaureate, Access, diploma, course, UCAS, foundation, foundation_degree, level_2, l2');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1858,'alumni, alumnus, FOCUS, former, old, students, graduates');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1859,'results_day, sending_results, clearing, confirmation, results, can_I_apply_through_clearing, do_you_have_vacancies, do_you_have_spaces, do_you_have_places, confirming_your_place');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1860,'contact, contacts, recruitment, admissions, funding, finance, registry, support, careers, disabilities, accommodation, enrol, enrolment, sport, recreation, team');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1861,'food, eat, drink, eating, café, cafés, snacks');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1862,'faculty, faculties, schools, department, departments, courses, subject, subjects, structure, London, campus, CULC, subject_areas');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1863,'freshers, week, induction, students, starters, freshers_week, what\'s_on_at_freshers');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1864,'loan, loans, financial, support, funding, scholarships, bursaries, bursary, busrarys');
SET GLOBAL DEBUG='+d,fts_instrument_sync_request';
ALTER TABLE `questions_and_answers` ALGORITHM=COPY;
SET GLOBAL DEBUG='-d,fts_instrument_sync_request';
DROP TABLE `questions_and_answers`;
26 changes: 26 additions & 0 deletions mysql-test/suite/innodb_fts/t/sync.test
Expand Up @@ -168,4 +168,30 @@ SELECT * FROM t1 WHERE MATCH(title) AGAINST ('mysql database good');

DROP TABLE t1;

--echo #
--echo # PS-3851: Percona Ver 5.6.39-83.1 Failing assertion: sym_node->table != NULL
--echo #
CREATE TABLE `questions_and_answers` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID',
`keywords` text COMMENT 'CSV list of keywords related to this entry',
PRIMARY KEY (`id`),
FULLTEXT KEY `keywords` (`keywords`)
) ENGINE=InnoDB AUTO_INCREMENT=3620 DEFAULT CHARSET=utf8 COMMENT='Main table for Q&A module ';

INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1854,'support, services, essay, writing, maths, help, advice, study, advice, advise, careers, employability, graduating, graduate, student_support, academic_support, academic_help');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1855,'accommodation, housing, halls, residence, live, living, bed, beds, acomodation, accomodation, accommidation, acomidation, hall, campus_living, uni_living, uni_halls, university_life, university_accommodation');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1856,'interview, interviews, audition, auditions, portfolio, review, admission, interview_preparation, booking, book, change_interview');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1857,'entry_requirements, application, admission, apply, applying, entry, criteria, requirements, mature, life, experience, A-level, A-levels, A_levels, AS, AS_Level, AS_Levels, BTEC, IB, baccalaureate, Access, diploma, course, UCAS, foundation, foundation_degree, level_2, l2');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1858,'alumni, alumnus, FOCUS, former, old, students, graduates');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1859,'results_day, sending_results, clearing, confirmation, results, can_I_apply_through_clearing, do_you_have_vacancies, do_you_have_spaces, do_you_have_places, confirming_your_place');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1860,'contact, contacts, recruitment, admissions, funding, finance, registry, support, careers, disabilities, accommodation, enrol, enrolment, sport, recreation, team');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1861,'food, eat, drink, eating, café, cafés, snacks');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1862,'faculty, faculties, schools, department, departments, courses, subject, subjects, structure, London, campus, CULC, subject_areas');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1863,'freshers, week, induction, students, starters, freshers_week, what\'s_on_at_freshers');
INSERT INTO `questions_and_answers` (`id`,`keywords`) VALUES (1864,'loan, loans, financial, support, funding, scholarships, bursaries, bursary, busrarys');

SET GLOBAL DEBUG='+d,fts_instrument_sync_request';
ALTER TABLE `questions_and_answers` ALGORITHM=COPY;
SET GLOBAL DEBUG='-d,fts_instrument_sync_request';
DROP TABLE `questions_and_answers`;
--source include/wait_until_count_sessions.inc
11 changes: 11 additions & 0 deletions storage/innobase/row/row0mysql.cc
Expand Up @@ -5888,6 +5888,17 @@ row_rename_table_for_mysql(
goto funct_exit;
}

/* Wait for background fts sync to finish */
for (retry = 1; dict_fts_index_syncing(table); ++retry) {
DICT_BG_YIELD(trx);
if (retry % 100 == 0) {
ib::info() << "Unable to rename table " << old_name
<< " to new name " << new_name
<< " because FTS sync is running on table."
<< " Retrying";
}
}

/* We use the private SQL parser of Innobase to generate the query
graphs needed in updating the dictionary data from system tables. */

Expand Down

0 comments on commit 43cb07f

Please sign in to comment.