201021 17:22:21 402 Connect aultman@ip-10-0-16-51.ec2.internal on lms_aultman_restored_bk using TCP/IP 402 Query SELECT collation_name 402 Query SET NAMES utf8 402 Query SET SESSION sql_mode = 'STRICT_ALL_TABLES' 402 Query SELECT value FROM mdl_config WHERE name = 'siteidentifier' 402 Query SELECT * FROM mdl_mp WHERE domain = 'ault-test.aultman.org' 402 Query SELECT * FROM mdl_context WHERE contextlevel = '10' 402 Query SELECT * FROM mdl_mp WHERE domain = 'ault-test.aultman.org' 402 Query SELECT * FROM mdl_course WHERE category = '0' 402 Query SELECT * FROM mdl_mp WHERE domain = 'ault-test.aultman.org' 402 Query SHOW TABLES LIKE 'mdl\_%' 402 Query select * from mdl_mph_tables 402 Query select max(time2) from mdl_mph_main 402 Query SET @htime = 1592825856 402 Query select count(*) from mdl_mph_main_view 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query SELECT * FROM mdl_mph_snapshots WHERE fsid = '/vol2/aultmanhospital/aultman_test2/moodledata/fd_snapshots/1592825856' 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contextlevel,mt.instanceid,mt.path,mt.depth from mdl_mph_main_view mhv join mdl_context mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='context' 402 Query insert into mdl_mph_ctx (id,time2,deleted2,contextlevel,instanceid,path,depth) select mhv.instance, mhv.time2, 0, mt.contextlevel,mt.instanceid,mt.path,mt.depth from mdl_mph_main_view mhv join mdl_context mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='context' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='context' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contextlevel,mt.instanceid,mt.path,mt.depth from mdl_mph_main_view mhv join mdl_context mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='context' 402 Query insert into mdl_mph_ctx (id,time2,deleted2,contextlevel,instanceid,path,depth) select distinct mhv.instance, mhv.time2, 0, mt.contextlevel,mt.instanceid,mt.path,mt.depth from mdl_mph_main_view mhv join mdl_context mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='context' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='context' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contextlevel,mt.instanceid,mt.path,mt.depth from mdl_mph_main_view mhv join (select h.id,h.contextlevel,h.instanceid,h.path,h.depth from mdl_mph_ctx h join (select id, max(time2) time2 from mdl_mph_ctx group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='context' 402 Query insert into mdl_mph_ctx (id,time2,deleted2,contextlevel,instanceid,path,depth) select mhv.instance, mhv.time2, 1, mt.contextlevel,mt.instanceid,mt.path,mt.depth from mdl_mph_main_view mhv join (select h.id,h.contextlevel,h.instanceid,h.path,h.depth from mdl_mph_ctx h join (select id, max(time2) time2 from mdl_mph_ctx group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='context' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='context' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query select distinct mhv.instance, mhv.time2, 0, mt.category,mt.sortorder,mt.fullname,mt.shortname,mt.idnumber,mt.summary,mt.summaryformat,mt.format,mt.showgrades,mt.newsitems,mt.startdate,mt.enddate,mt.marker,mt.maxbytes,mt.legacyfiles,mt.showreports,mt.visible,mt.visibleold,mt.groupmode,mt.groupmodeforce,mt.defaultgroupingid,mt.lang,mt.theme,mt.timecreated,mt.timemodified,mt.requested,mt.enablecompletion,mt.completionnotify,mt.cacherev,mt.calendartype from mdl_mph_main_view mhv join mdl_course mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course' 402 Query insert into mdl_mph_c (id,time2,deleted2,category,sortorder,fullname,shortname,idnumber,summary,summaryformat,format,showgrades,newsitems,startdate,enddate,marker,maxbytes,legacyfiles,showreports,visible,visibleold,groupmode,groupmodeforce,defaultgroupingid,lang,theme,timecreated,timemodified,requested,enablecompletion,completionnotify,cacherev,calendartype) select mhv.instance, mhv.time2, 0, mt.category,mt.sortorder,mt.fullname,mt.shortname,mt.idnumber,mt.summary,mt.summaryformat,mt.format,mt.showgrades,mt.newsitems,mt.startdate,mt.enddate,mt.marker,mt.maxbytes,mt.legacyfiles,mt.showreports,mt.visible,mt.visibleold,mt.groupmode,mt.groupmodeforce,mt.defaultgroupingid,mt.lang,mt.theme,mt.timecreated,mt.timemodified,mt.requested,mt.enablecompletion,mt.completionnotify,mt.cacherev,mt.calendartype from mdl_mph_main_view mhv join mdl_course mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.category,mt.sortorder,mt.fullname,mt.shortname,mt.idnumber,mt.summary,mt.summaryformat,mt.format,mt.showgrades,mt.newsitems,mt.startdate,mt.enddate,mt.marker,mt.maxbytes,mt.legacyfiles,mt.showreports,mt.visible,mt.visibleold,mt.groupmode,mt.groupmodeforce,mt.defaultgroupingid,mt.lang,mt.theme,mt.timecreated,mt.timemodified,mt.requested,mt.enablecompletion,mt.completionnotify,mt.cacherev,mt.calendartype from mdl_mph_main_view mhv join mdl_course mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course' 402 Query insert into mdl_mph_c (id,time2,deleted2,category,sortorder,fullname,shortname,idnumber,summary,summaryformat,format,showgrades,newsitems,startdate,enddate,marker,maxbytes,legacyfiles,showreports,visible,visibleold,groupmode,groupmodeforce,defaultgroupingid,lang,theme,timecreated,timemodified,requested,enablecompletion,completionnotify,cacherev,calendartype) select distinct mhv.instance, mhv.time2, 0, mt.category,mt.sortorder,mt.fullname,mt.shortname,mt.idnumber,mt.summary,mt.summaryformat,mt.format,mt.showgrades,mt.newsitems,mt.startdate,mt.enddate,mt.marker,mt.maxbytes,mt.legacyfiles,mt.showreports,mt.visible,mt.visibleold,mt.groupmode,mt.groupmodeforce,mt.defaultgroupingid,mt.lang,mt.theme,mt.timecreated,mt.timemodified,mt.requested,mt.enablecompletion,mt.completionnotify,mt.cacherev,mt.calendartype from mdl_mph_main_view mhv join mdl_course mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.category,mt.sortorder,mt.fullname,mt.shortname,mt.idnumber,mt.summary,mt.summaryformat,mt.format,mt.showgrades,mt.newsitems,mt.startdate,mt.enddate,mt.marker,mt.maxbytes,mt.legacyfiles,mt.showreports,mt.visible,mt.visibleold,mt.groupmode,mt.groupmodeforce,mt.defaultgroupingid,mt.lang,mt.theme,mt.timecreated,mt.timemodified,mt.requested,mt.enablecompletion,mt.completionnotify,mt.cacherev,mt.calendartype from mdl_mph_main_view mhv join (select h.id,h.category,h.sortorder,h.fullname,h.shortname,h.idnumber,h.summary,h.summaryformat,h.format,h.showgrades,h.newsitems,h.startdate,h.enddate,h.marker,h.maxbytes,h.legacyfiles,h.showreports,h.visible,h.visibleold,h.groupmode,h.groupmodeforce,h.defaultgroupingid,h.lang,h.theme,h.timecreated,h.timemodified,h.requested,h.enablecompletion,h.completionnotify,h.cacherev,h.calendartype from mdl_mph_c h join (select id, max(time2) time2 from mdl_mph_c group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course' 402 Query insert into mdl_mph_c (id,time2,deleted2,category,sortorder,fullname,shortname,idnumber,summary,summaryformat,format,showgrades,newsitems,startdate,enddate,marker,maxbytes,legacyfiles,showreports,visible,visibleold,groupmode,groupmodeforce,defaultgroupingid,lang,theme,timecreated,timemodified,requested,enablecompletion,completionnotify,cacherev,calendartype) select mhv.instance, mhv.time2, 1, mt.category,mt.sortorder,mt.fullname,mt.shortname,mt.idnumber,mt.summary,mt.summaryformat,mt.format,mt.showgrades,mt.newsitems,mt.startdate,mt.enddate,mt.marker,mt.maxbytes,mt.legacyfiles,mt.showreports,mt.visible,mt.visibleold,mt.groupmode,mt.groupmodeforce,mt.defaultgroupingid,mt.lang,mt.theme,mt.timecreated,mt.timemodified,mt.requested,mt.enablecompletion,mt.completionnotify,mt.cacherev,mt.calendartype from mdl_mph_main_view mhv join (select h.id,h.category,h.sortorder,h.fullname,h.shortname,h.idnumber,h.summary,h.summaryformat,h.format,h.showgrades,h.newsitems,h.startdate,h.enddate,h.marker,h.maxbytes,h.legacyfiles,h.showreports,h.visible,h.visibleold,h.groupmode,h.groupmodeforce,h.defaultgroupingid,h.lang,h.theme,h.timecreated,h.timemodified,h.requested,h.enablecompletion,h.completionnotify,h.cacherev,h.calendartype from mdl_mph_c h join (select id, max(time2) time2 from mdl_mph_c group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.parent,mt.sortorder,mt.coursecount,mt.visible,mt.visibleold,mt.timemodified,mt.depth,mt.path,mt.theme from mdl_mph_main_view mhv join mdl_course_categories mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_categories' 402 Query insert into mdl_mph_cc (id,time2,deleted2,name,idnumber,description,descriptionformat,parent,sortorder,coursecount,visible,visibleold,timemodified,depth,path,theme) select mhv.instance, mhv.time2, 0, mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.parent,mt.sortorder,mt.coursecount,mt.visible,mt.visibleold,mt.timemodified,mt.depth,mt.path,mt.theme from mdl_mph_main_view mhv join mdl_course_categories mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_categories' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_categories' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.parent,mt.sortorder,mt.coursecount,mt.visible,mt.visibleold,mt.timemodified,mt.depth,mt.path,mt.theme from mdl_mph_main_view mhv join mdl_course_categories mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_categories' 402 Query insert into mdl_mph_cc (id,time2,deleted2,name,idnumber,description,descriptionformat,parent,sortorder,coursecount,visible,visibleold,timemodified,depth,path,theme) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.parent,mt.sortorder,mt.coursecount,mt.visible,mt.visibleold,mt.timemodified,mt.depth,mt.path,mt.theme from mdl_mph_main_view mhv join mdl_course_categories mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_categories' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_categories' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.parent,mt.sortorder,mt.coursecount,mt.visible,mt.visibleold,mt.timemodified,mt.depth,mt.path,mt.theme from mdl_mph_main_view mhv join (select h.id,h.name,h.idnumber,h.description,h.descriptionformat,h.parent,h.sortorder,h.coursecount,h.visible,h.visibleold,h.timemodified,h.depth,h.path,h.theme from mdl_mph_cc h join (select id, max(time2) time2 from mdl_mph_cc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_categories' 402 Query insert into mdl_mph_cc (id,time2,deleted2,name,idnumber,description,descriptionformat,parent,sortorder,coursecount,visible,visibleold,timemodified,depth,path,theme) select mhv.instance, mhv.time2, 1, mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.parent,mt.sortorder,mt.coursecount,mt.visible,mt.visibleold,mt.timemodified,mt.depth,mt.path,mt.theme from mdl_mph_main_view mhv join (select h.id,h.name,h.idnumber,h.description,h.descriptionformat,h.parent,h.sortorder,h.coursecount,h.visible,h.visibleold,h.timemodified,h.depth,h.path,h.theme from mdl_mph_cc h join (select id, max(time2) time2 from mdl_mph_cc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_categories' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_categories' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.section,mt.name,mt.summary,mt.summaryformat,mt.sequence,mt.visible,mt.availability from mdl_mph_main_view mhv join mdl_course_sections mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_sections' 402 Query insert into mdl_mph_cs (id,time2,deleted2,course,section,name,summary,summaryformat,sequence,visible,availability) select mhv.instance, mhv.time2, 0, mt.course,mt.section,mt.name,mt.summary,mt.summaryformat,mt.sequence,mt.visible,mt.availability from mdl_mph_main_view mhv join mdl_course_sections mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_sections' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_sections' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.section,mt.name,mt.summary,mt.summaryformat,mt.sequence,mt.visible,mt.availability from mdl_mph_main_view mhv join mdl_course_sections mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_sections' 402 Query insert into mdl_mph_cs (id,time2,deleted2,course,section,name,summary,summaryformat,sequence,visible,availability) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.section,mt.name,mt.summary,mt.summaryformat,mt.sequence,mt.visible,mt.availability from mdl_mph_main_view mhv join mdl_course_sections mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_sections' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_sections' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.section,mt.name,mt.summary,mt.summaryformat,mt.sequence,mt.visible,mt.availability from mdl_mph_main_view mhv join (select h.id,h.course,h.section,h.name,h.summary,h.summaryformat,h.sequence,h.visible,h.availability from mdl_mph_cs h join (select id, max(time2) time2 from mdl_mph_cs group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_sections' 402 Query insert into mdl_mph_cs (id,time2,deleted2,course,section,name,summary,summaryformat,sequence,visible,availability) select mhv.instance, mhv.time2, 1, mt.course,mt.section,mt.name,mt.summary,mt.summaryformat,mt.sequence,mt.visible,mt.availability from mdl_mph_main_view mhv join (select h.id,h.course,h.section,h.name,h.summary,h.summaryformat,h.sequence,h.visible,h.availability from mdl_mph_cs h join (select id, max(time2) time2 from mdl_mph_cs group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_sections' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_sections' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.format,mt.sectionid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_course_format_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_format_options' 402 Query insert into mdl_mph_cfo (id,time2,deleted2,courseid,format,sectionid,name,value) select mhv.instance, mhv.time2, 0, mt.courseid,mt.format,mt.sectionid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_course_format_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_format_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_format_options' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.format,mt.sectionid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_course_format_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_format_options' 402 Query insert into mdl_mph_cfo (id,time2,deleted2,courseid,format,sectionid,name,value) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.format,mt.sectionid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_course_format_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_format_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_format_options' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.format,mt.sectionid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.courseid,h.format,h.sectionid,h.name,h.value from mdl_mph_cfo h join (select id, max(time2) time2 from mdl_mph_cfo group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_format_options' 402 Query insert into mdl_mph_cfo (id,time2,deleted2,courseid,format,sectionid,name,value) select mhv.instance, mhv.time2, 1, mt.courseid,mt.format,mt.sectionid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.courseid,h.format,h.sectionid,h.name,h.value from mdl_mph_cfo h join (select id, max(time2) time2 from mdl_mph_cfo group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_format_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_format_options' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.instance,mt.section,mt.idnumber,mt.added,mt.score,mt.indent,mt.visible,mt.visibleoncoursepage,mt.visibleold,mt.groupmode,mt.groupingid,mt.completion,mt.completiongradeitemnumber,mt.completionview,mt.completionexpected,mt.showdescription,mt.availability,mt.deletioninprogress from mdl_mph_main_view mhv join mdl_course_modules mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_modules' 402 Query insert into mdl_mph_cm (id,time2,deleted2,course,module,instance,section,idnumber,added,score,indent,visible,visibleoncoursepage,visibleold,groupmode,groupingid,completion,completiongradeitemnumber,completionview,completionexpected,showdescription,availability,deletioninprogress) select mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.instance,mt.section,mt.idnumber,mt.added,mt.score,mt.indent,mt.visible,mt.visibleoncoursepage,mt.visibleold,mt.groupmode,mt.groupingid,mt.completion,mt.completiongradeitemnumber,mt.completionview,mt.completionexpected,mt.showdescription,mt.availability,mt.deletioninprogress from mdl_mph_main_view mhv join mdl_course_modules mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_modules' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_modules' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.instance,mt.section,mt.idnumber,mt.added,mt.score,mt.indent,mt.visible,mt.visibleoncoursepage,mt.visibleold,mt.groupmode,mt.groupingid,mt.completion,mt.completiongradeitemnumber,mt.completionview,mt.completionexpected,mt.showdescription,mt.availability,mt.deletioninprogress from mdl_mph_main_view mhv join mdl_course_modules mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_modules' 402 Query insert into mdl_mph_cm (id,time2,deleted2,course,module,instance,section,idnumber,added,score,indent,visible,visibleoncoursepage,visibleold,groupmode,groupingid,completion,completiongradeitemnumber,completionview,completionexpected,showdescription,availability,deletioninprogress) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.instance,mt.section,mt.idnumber,mt.added,mt.score,mt.indent,mt.visible,mt.visibleoncoursepage,mt.visibleold,mt.groupmode,mt.groupingid,mt.completion,mt.completiongradeitemnumber,mt.completionview,mt.completionexpected,mt.showdescription,mt.availability,mt.deletioninprogress from mdl_mph_main_view mhv join mdl_course_modules mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_modules' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_modules' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.module,mt.instance,mt.section,mt.idnumber,mt.added,mt.score,mt.indent,mt.visible,mt.visibleoncoursepage,mt.visibleold,mt.groupmode,mt.groupingid,mt.completion,mt.completiongradeitemnumber,mt.completionview,mt.completionexpected,mt.showdescription,mt.availability,mt.deletioninprogress from mdl_mph_main_view mhv join (select h.id,h.course,h.module,h.instance,h.section,h.idnumber,h.added,h.score,h.indent,h.visible,h.visibleoncoursepage,h.visibleold,h.groupmode,h.groupingid,h.completion,h.completiongradeitemnumber,h.completionview,h.completionexpected,h.showdescription,h.availability,h.deletioninprogress from mdl_mph_cm h join (select id, max(time2) time2 from mdl_mph_cm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_modules' 402 Query insert into mdl_mph_cm (id,time2,deleted2,course,module,instance,section,idnumber,added,score,indent,visible,visibleoncoursepage,visibleold,groupmode,groupingid,completion,completiongradeitemnumber,completionview,completionexpected,showdescription,availability,deletioninprogress) select mhv.instance, mhv.time2, 1, mt.course,mt.module,mt.instance,mt.section,mt.idnumber,mt.added,mt.score,mt.indent,mt.visible,mt.visibleoncoursepage,mt.visibleold,mt.groupmode,mt.groupingid,mt.completion,mt.completiongradeitemnumber,mt.completionview,mt.completionexpected,mt.showdescription,mt.availability,mt.deletioninprogress from mdl_mph_main_view mhv join (select h.id,h.course,h.module,h.instance,h.section,h.idnumber,h.added,h.score,h.indent,h.visible,h.visibleoncoursepage,h.visibleold,h.groupmode,h.groupingid,h.completion,h.completiongradeitemnumber,h.completionview,h.completionexpected,h.showdescription,h.availability,h.deletioninprogress from mdl_mph_cm h join (select id, max(time2) time2 from mdl_mph_cm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_modules' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_modules' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.coursemoduleid,mt.userid,mt.completionstate,mt.viewed,mt.timemodified from mdl_mph_main_view mhv join mdl_course_modules_completion mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_modules_completion' 402 Query insert into mdl_mph_cmc (id,time2,deleted2,coursemoduleid,userid,completionstate,viewed,timemodified) select mhv.instance, mhv.time2, 0, mt.coursemoduleid,mt.userid,mt.completionstate,mt.viewed,mt.timemodified from mdl_mph_main_view mhv join mdl_course_modules_completion mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_modules_completion' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_modules_completion' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.coursemoduleid,mt.userid,mt.completionstate,mt.viewed,mt.timemodified from mdl_mph_main_view mhv join mdl_course_modules_completion mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_modules_completion' 402 Query insert into mdl_mph_cmc (id,time2,deleted2,coursemoduleid,userid,completionstate,viewed,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.coursemoduleid,mt.userid,mt.completionstate,mt.viewed,mt.timemodified from mdl_mph_main_view mhv join mdl_course_modules_completion mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_modules_completion' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_modules_completion' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.coursemoduleid,mt.userid,mt.completionstate,mt.viewed,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.coursemoduleid,h.userid,h.completionstate,h.viewed,h.timemodified from mdl_mph_cmc h join (select id, max(time2) time2 from mdl_mph_cmc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_modules_completion' 402 Query insert into mdl_mph_cmc (id,time2,deleted2,coursemoduleid,userid,completionstate,viewed,timemodified) select mhv.instance, mhv.time2, 1, mt.coursemoduleid,mt.userid,mt.completionstate,mt.viewed,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.coursemoduleid,h.userid,h.completionstate,h.viewed,h.timemodified from mdl_mph_cmc h join (select id, max(time2) time2 from mdl_mph_cmc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_modules_completion' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_modules_completion' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.auth,mt.confirmed,mt.policyagreed,mt.deleted,mt.suspended,mt.mnethostid,mt.username,mt.password,mt.idnumber,mt.firstname,mt.lastname,mt.email,mt.emailstop,mt.icq,mt.skype,mt.yahoo,mt.aim,mt.msn,mt.phone1,mt.phone2,mt.institution,mt.department,mt.address,mt.city,mt.country,mt.lang,mt.theme,mt.timezone,mt.firstaccess,mt.lastaccess,mt.lastlogin,mt.currentlogin,mt.lastip,mt.secret,mt.picture,mt.url,mt.description,mt.descriptionformat,mt.mailformat,mt.maildigest,mt.maildisplay,mt.autosubscribe,mt.trackforums,mt.timecreated,mt.timemodified,mt.trustbitmask,mt.imagealt,mt.lastnamephonetic,mt.firstnamephonetic,mt.middlename,mt.alternatename,mt.calendartype from mdl_mph_main_view mhv join mdl_user mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user' 402 Query insert into mdl_mph_u (id,time2,deleted2,auth,confirmed,policyagreed,deleted,suspended,mnethostid,username,password,idnumber,firstname,lastname,email,emailstop,icq,skype,yahoo,aim,msn,phone1,phone2,institution,department,address,city,country,lang,theme,timezone,firstaccess,lastaccess,lastlogin,currentlogin,lastip,secret,picture,url,description,descriptionformat,mailformat,maildigest,maildisplay,autosubscribe,trackforums,timecreated,timemodified,trustbitmask,imagealt,lastnamephonetic,firstnamephonetic,middlename,alternatename,calendartype) select mhv.instance, mhv.time2, 0, mt.auth,mt.confirmed,mt.policyagreed,mt.deleted,mt.suspended,mt.mnethostid,mt.username,mt.password,mt.idnumber,mt.firstname,mt.lastname,mt.email,mt.emailstop,mt.icq,mt.skype,mt.yahoo,mt.aim,mt.msn,mt.phone1,mt.phone2,mt.institution,mt.department,mt.address,mt.city,mt.country,mt.lang,mt.theme,mt.timezone,mt.firstaccess,mt.lastaccess,mt.lastlogin,mt.currentlogin,mt.lastip,mt.secret,mt.picture,mt.url,mt.description,mt.descriptionformat,mt.mailformat,mt.maildigest,mt.maildisplay,mt.autosubscribe,mt.trackforums,mt.timecreated,mt.timemodified,mt.trustbitmask,mt.imagealt,mt.lastnamephonetic,mt.firstnamephonetic,mt.middlename,mt.alternatename,mt.calendartype from mdl_mph_main_view mhv join mdl_user mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.auth,mt.confirmed,mt.policyagreed,mt.deleted,mt.suspended,mt.mnethostid,mt.username,mt.password,mt.idnumber,mt.firstname,mt.lastname,mt.email,mt.emailstop,mt.icq,mt.skype,mt.yahoo,mt.aim,mt.msn,mt.phone1,mt.phone2,mt.institution,mt.department,mt.address,mt.city,mt.country,mt.lang,mt.theme,mt.timezone,mt.firstaccess,mt.lastaccess,mt.lastlogin,mt.currentlogin,mt.lastip,mt.secret,mt.picture,mt.url,mt.description,mt.descriptionformat,mt.mailformat,mt.maildigest,mt.maildisplay,mt.autosubscribe,mt.trackforums,mt.timecreated,mt.timemodified,mt.trustbitmask,mt.imagealt,mt.lastnamephonetic,mt.firstnamephonetic,mt.middlename,mt.alternatename,mt.calendartype from mdl_mph_main_view mhv join mdl_user mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user' 402 Query insert into mdl_mph_u (id,time2,deleted2,auth,confirmed,policyagreed,deleted,suspended,mnethostid,username,password,idnumber,firstname,lastname,email,emailstop,icq,skype,yahoo,aim,msn,phone1,phone2,institution,department,address,city,country,lang,theme,timezone,firstaccess,lastaccess,lastlogin,currentlogin,lastip,secret,picture,url,description,descriptionformat,mailformat,maildigest,maildisplay,autosubscribe,trackforums,timecreated,timemodified,trustbitmask,imagealt,lastnamephonetic,firstnamephonetic,middlename,alternatename,calendartype) select distinct mhv.instance, mhv.time2, 0, mt.auth,mt.confirmed,mt.policyagreed,mt.deleted,mt.suspended,mt.mnethostid,mt.username,mt.password,mt.idnumber,mt.firstname,mt.lastname,mt.email,mt.emailstop,mt.icq,mt.skype,mt.yahoo,mt.aim,mt.msn,mt.phone1,mt.phone2,mt.institution,mt.department,mt.address,mt.city,mt.country,mt.lang,mt.theme,mt.timezone,mt.firstaccess,mt.lastaccess,mt.lastlogin,mt.currentlogin,mt.lastip,mt.secret,mt.picture,mt.url,mt.description,mt.descriptionformat,mt.mailformat,mt.maildigest,mt.maildisplay,mt.autosubscribe,mt.trackforums,mt.timecreated,mt.timemodified,mt.trustbitmask,mt.imagealt,mt.lastnamephonetic,mt.firstnamephonetic,mt.middlename,mt.alternatename,mt.calendartype from mdl_mph_main_view mhv join mdl_user mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.auth,mt.confirmed,mt.policyagreed,mt.deleted,mt.suspended,mt.mnethostid,mt.username,mt.password,mt.idnumber,mt.firstname,mt.lastname,mt.email,mt.emailstop,mt.icq,mt.skype,mt.yahoo,mt.aim,mt.msn,mt.phone1,mt.phone2,mt.institution,mt.department,mt.address,mt.city,mt.country,mt.lang,mt.theme,mt.timezone,mt.firstaccess,mt.lastaccess,mt.lastlogin,mt.currentlogin,mt.lastip,mt.secret,mt.picture,mt.url,mt.description,mt.descriptionformat,mt.mailformat,mt.maildigest,mt.maildisplay,mt.autosubscribe,mt.trackforums,mt.timecreated,mt.timemodified,mt.trustbitmask,mt.imagealt,mt.lastnamephonetic,mt.firstnamephonetic,mt.middlename,mt.alternatename,mt.calendartype from mdl_mph_main_view mhv join (select h.id,h.auth,h.confirmed,h.policyagreed,h.deleted,h.suspended,h.mnethostid,h.username,h.password,h.idnumber,h.firstname,h.lastname,h.email,h.emailstop,h.icq,h.skype,h.yahoo,h.aim,h.msn,h.phone1,h.phone2,h.institution,h.department,h.address,h.city,h.country,h.lang,h.theme,h.timezone,h.firstaccess,h.lastaccess,h.lastlogin,h.currentlogin,h.lastip,h.secret,h.picture,h.url,h.description,h.descriptionformat,h.mailformat,h.maildigest,h.maildisplay,h.autosubscribe,h.trackforums,h.timecreated,h.timemodified,h.trustbitmask,h.imagealt,h.lastnamephonetic,h.firstnamephonetic,h.middlename,h.alternatename,h.calendartype from mdl_mph_u h join (select id, max(time2) time2 from mdl_mph_u group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user' 402 Query insert into mdl_mph_u (id,time2,deleted2,auth,confirmed,policyagreed,deleted,suspended,mnethostid,username,password,idnumber,firstname,lastname,email,emailstop,icq,skype,yahoo,aim,msn,phone1,phone2,institution,department,address,city,country,lang,theme,timezone,firstaccess,lastaccess,lastlogin,currentlogin,lastip,secret,picture,url,description,descriptionformat,mailformat,maildigest,maildisplay,autosubscribe,trackforums,timecreated,timemodified,trustbitmask,imagealt,lastnamephonetic,firstnamephonetic,middlename,alternatename,calendartype) select mhv.instance, mhv.time2, 1, mt.auth,mt.confirmed,mt.policyagreed,mt.deleted,mt.suspended,mt.mnethostid,mt.username,mt.password,mt.idnumber,mt.firstname,mt.lastname,mt.email,mt.emailstop,mt.icq,mt.skype,mt.yahoo,mt.aim,mt.msn,mt.phone1,mt.phone2,mt.institution,mt.department,mt.address,mt.city,mt.country,mt.lang,mt.theme,mt.timezone,mt.firstaccess,mt.lastaccess,mt.lastlogin,mt.currentlogin,mt.lastip,mt.secret,mt.picture,mt.url,mt.description,mt.descriptionformat,mt.mailformat,mt.maildigest,mt.maildisplay,mt.autosubscribe,mt.trackforums,mt.timecreated,mt.timemodified,mt.trustbitmask,mt.imagealt,mt.lastnamephonetic,mt.firstnamephonetic,mt.middlename,mt.alternatename,mt.calendartype from mdl_mph_main_view mhv join (select h.id,h.auth,h.confirmed,h.policyagreed,h.deleted,h.suspended,h.mnethostid,h.username,h.password,h.idnumber,h.firstname,h.lastname,h.email,h.emailstop,h.icq,h.skype,h.yahoo,h.aim,h.msn,h.phone1,h.phone2,h.institution,h.department,h.address,h.city,h.country,h.lang,h.theme,h.timezone,h.firstaccess,h.lastaccess,h.lastlogin,h.currentlogin,h.lastip,h.secret,h.picture,h.url,h.description,h.descriptionformat,h.mailformat,h.maildigest,h.maildisplay,h.autosubscribe,h.trackforums,h.timecreated,h.timemodified,h.trustbitmask,h.imagealt,h.lastnamephonetic,h.firstnamephonetic,h.middlename,h.alternatename,h.calendartype from mdl_mph_u h join (select id, max(time2) time2 from mdl_mph_u group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.idnumber,mt.name,mt.description,mt.descriptionformat,mt.enrolmentkey,mt.picture,mt.hidepicture,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groups mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groups' 402 Query insert into mdl_mph_g (id,time2,deleted2,courseid,idnumber,name,description,descriptionformat,enrolmentkey,picture,hidepicture,timecreated,timemodified) select mhv.instance, mhv.time2, 0, mt.courseid,mt.idnumber,mt.name,mt.description,mt.descriptionformat,mt.enrolmentkey,mt.picture,mt.hidepicture,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groups mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groups' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groups' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.idnumber,mt.name,mt.description,mt.descriptionformat,mt.enrolmentkey,mt.picture,mt.hidepicture,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groups mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groups' 402 Query insert into mdl_mph_g (id,time2,deleted2,courseid,idnumber,name,description,descriptionformat,enrolmentkey,picture,hidepicture,timecreated,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.idnumber,mt.name,mt.description,mt.descriptionformat,mt.enrolmentkey,mt.picture,mt.hidepicture,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groups mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groups' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groups' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.idnumber,mt.name,mt.description,mt.descriptionformat,mt.enrolmentkey,mt.picture,mt.hidepicture,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.courseid,h.idnumber,h.name,h.description,h.descriptionformat,h.enrolmentkey,h.picture,h.hidepicture,h.timecreated,h.timemodified from mdl_mph_g h join (select id, max(time2) time2 from mdl_mph_g group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groups' 402 Query insert into mdl_mph_g (id,time2,deleted2,courseid,idnumber,name,description,descriptionformat,enrolmentkey,picture,hidepicture,timecreated,timemodified) select mhv.instance, mhv.time2, 1, mt.courseid,mt.idnumber,mt.name,mt.description,mt.descriptionformat,mt.enrolmentkey,mt.picture,mt.hidepicture,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.courseid,h.idnumber,h.name,h.description,h.descriptionformat,h.enrolmentkey,h.picture,h.hidepicture,h.timecreated,h.timemodified from mdl_mph_g h join (select id, max(time2) time2 from mdl_mph_g group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groups' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groups' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.groupid,mt.userid,mt.timeadded,mt.component,mt.itemid from mdl_mph_main_view mhv join mdl_groups_members mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groups_members' 402 Query insert into mdl_mph_gm (id,time2,deleted2,groupid,userid,timeadded,component,itemid) select mhv.instance, mhv.time2, 0, mt.groupid,mt.userid,mt.timeadded,mt.component,mt.itemid from mdl_mph_main_view mhv join mdl_groups_members mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groups_members' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groups_members' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.groupid,mt.userid,mt.timeadded,mt.component,mt.itemid from mdl_mph_main_view mhv join mdl_groups_members mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groups_members' 402 Query insert into mdl_mph_gm (id,time2,deleted2,groupid,userid,timeadded,component,itemid) select distinct mhv.instance, mhv.time2, 0, mt.groupid,mt.userid,mt.timeadded,mt.component,mt.itemid from mdl_mph_main_view mhv join mdl_groups_members mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groups_members' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groups_members' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.groupid,mt.userid,mt.timeadded,mt.component,mt.itemid from mdl_mph_main_view mhv join (select h.id,h.groupid,h.userid,h.timeadded,h.component,h.itemid from mdl_mph_gm h join (select id, max(time2) time2 from mdl_mph_gm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groups_members' 402 Query insert into mdl_mph_gm (id,time2,deleted2,groupid,userid,timeadded,component,itemid) select mhv.instance, mhv.time2, 1, mt.groupid,mt.userid,mt.timeadded,mt.component,mt.itemid from mdl_mph_main_view mhv join (select h.id,h.groupid,h.userid,h.timeadded,h.component,h.itemid from mdl_mph_gm h join (select id, max(time2) time2 from mdl_mph_gm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groups_members' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groups_members' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.configdata,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groupings mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groupings' 402 Query insert into mdl_mph_g2 (id,time2,deleted2,courseid,name,idnumber,description,descriptionformat,configdata,timecreated,timemodified) select mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.configdata,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groupings mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groupings' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groupings' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.configdata,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groupings mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groupings' 402 Query insert into mdl_mph_g2 (id,time2,deleted2,courseid,name,idnumber,description,descriptionformat,configdata,timecreated,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.configdata,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_groupings mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groupings' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groupings' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.configdata,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.courseid,h.name,h.idnumber,h.description,h.descriptionformat,h.configdata,h.timecreated,h.timemodified from mdl_mph_g2 h join (select id, max(time2) time2 from mdl_mph_g2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groupings' 402 Query insert into mdl_mph_g2 (id,time2,deleted2,courseid,name,idnumber,description,descriptionformat,configdata,timecreated,timemodified) select mhv.instance, mhv.time2, 1, mt.courseid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.configdata,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.courseid,h.name,h.idnumber,h.description,h.descriptionformat,h.configdata,h.timecreated,h.timemodified from mdl_mph_g2 h join (select id, max(time2) time2 from mdl_mph_g2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groupings' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groupings' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.groupingid,mt.groupid,mt.timeadded from mdl_mph_main_view mhv join mdl_groupings_groups mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groupings_groups' 402 Query insert into mdl_mph_gg2 (id,time2,deleted2,groupingid,groupid,timeadded) select mhv.instance, mhv.time2, 0, mt.groupingid,mt.groupid,mt.timeadded from mdl_mph_main_view mhv join mdl_groupings_groups mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='groupings_groups' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groupings_groups' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.groupingid,mt.groupid,mt.timeadded from mdl_mph_main_view mhv join mdl_groupings_groups mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groupings_groups' 402 Query insert into mdl_mph_gg2 (id,time2,deleted2,groupingid,groupid,timeadded) select distinct mhv.instance, mhv.time2, 0, mt.groupingid,mt.groupid,mt.timeadded from mdl_mph_main_view mhv join mdl_groupings_groups mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='groupings_groups' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groupings_groups' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.groupingid,mt.groupid,mt.timeadded from mdl_mph_main_view mhv join (select h.id,h.groupingid,h.groupid,h.timeadded from mdl_mph_gg2 h join (select id, max(time2) time2 from mdl_mph_gg2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groupings_groups' 402 Query insert into mdl_mph_gg2 (id,time2,deleted2,groupingid,groupid,timeadded) select mhv.instance, mhv.time2, 1, mt.groupingid,mt.groupid,mt.timeadded from mdl_mph_main_view mhv join (select h.id,h.groupingid,h.groupid,h.timeadded from mdl_mph_gg2 h join (select id, max(time2) time2 from mdl_mph_gg2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='groupings_groups' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='groupings_groups' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.visible,mt.component,mt.timecreated,mt.timemodified,mt.mp from mdl_mph_main_view mhv join mdl_cohort mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='cohort' 402 Query insert into mdl_mph_ch (id,time2,deleted2,contextid,name,idnumber,description,descriptionformat,visible,component,timecreated,timemodified,mp) select mhv.instance, mhv.time2, 0, mt.contextid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.visible,mt.component,mt.timecreated,mt.timemodified,mt.mp from mdl_mph_main_view mhv join mdl_cohort mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='cohort' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='cohort' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contextid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.visible,mt.component,mt.timecreated,mt.timemodified,mt.mp from mdl_mph_main_view mhv join mdl_cohort mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='cohort' 402 Query insert into mdl_mph_ch (id,time2,deleted2,contextid,name,idnumber,description,descriptionformat,visible,component,timecreated,timemodified,mp) select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.visible,mt.component,mt.timecreated,mt.timemodified,mt.mp from mdl_mph_main_view mhv join mdl_cohort mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='cohort' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='cohort' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contextid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.visible,mt.component,mt.timecreated,mt.timemodified,mt.mp from mdl_mph_main_view mhv join (select h.id,h.contextid,h.name,h.idnumber,h.description,h.descriptionformat,h.visible,h.component,h.timecreated,h.timemodified,h.mp from mdl_mph_ch h join (select id, max(time2) time2 from mdl_mph_ch group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='cohort' 402 Query insert into mdl_mph_ch (id,time2,deleted2,contextid,name,idnumber,description,descriptionformat,visible,component,timecreated,timemodified,mp) select mhv.instance, mhv.time2, 1, mt.contextid,mt.name,mt.idnumber,mt.description,mt.descriptionformat,mt.visible,mt.component,mt.timecreated,mt.timemodified,mt.mp from mdl_mph_main_view mhv join (select h.id,h.contextid,h.name,h.idnumber,h.description,h.descriptionformat,h.visible,h.component,h.timecreated,h.timemodified,h.mp from mdl_mph_ch h join (select id, max(time2) time2 from mdl_mph_ch group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='cohort' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='cohort' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.cohortid,mt.userid,mt.timeadded from mdl_mph_main_view mhv join mdl_cohort_members mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='cohort_members' 402 Query insert into mdl_mph_chm (id,time2,deleted2,cohortid,userid,timeadded) select mhv.instance, mhv.time2, 0, mt.cohortid,mt.userid,mt.timeadded from mdl_mph_main_view mhv join mdl_cohort_members mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='cohort_members' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='cohort_members' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.cohortid,mt.userid,mt.timeadded from mdl_mph_main_view mhv join mdl_cohort_members mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='cohort_members' 402 Query insert into mdl_mph_chm (id,time2,deleted2,cohortid,userid,timeadded) select distinct mhv.instance, mhv.time2, 0, mt.cohortid,mt.userid,mt.timeadded from mdl_mph_main_view mhv join mdl_cohort_members mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='cohort_members' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='cohort_members' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.cohortid,mt.userid,mt.timeadded from mdl_mph_main_view mhv join (select h.id,h.cohortid,h.userid,h.timeadded from mdl_mph_chm h join (select id, max(time2) time2 from mdl_mph_chm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='cohort_members' 402 Query insert into mdl_mph_chm (id,time2,deleted2,cohortid,userid,timeadded) select mhv.instance, mhv.time2, 1, mt.cohortid,mt.userid,mt.timeadded from mdl_mph_main_view mhv join (select h.id,h.cohortid,h.userid,h.timeadded from mdl_mph_chm h join (select id, max(time2) time2 from mdl_mph_chm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='cohort_members' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='cohort_members' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.courseid,mt.timeaccess from mdl_mph_main_view mhv join mdl_user_lastaccess mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_lastaccess' 402 Query insert into mdl_mph_ua (id,time2,deleted2,userid,courseid,timeaccess) select mhv.instance, mhv.time2, 0, mt.userid,mt.courseid,mt.timeaccess from mdl_mph_main_view mhv join mdl_user_lastaccess mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_lastaccess' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_lastaccess' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.courseid,mt.timeaccess from mdl_mph_main_view mhv join mdl_user_lastaccess mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_lastaccess' 402 Query insert into mdl_mph_ua (id,time2,deleted2,userid,courseid,timeaccess) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.courseid,mt.timeaccess from mdl_mph_main_view mhv join mdl_user_lastaccess mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_lastaccess' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_lastaccess' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.courseid,mt.timeaccess from mdl_mph_main_view mhv join (select h.id,h.userid,h.courseid,h.timeaccess from mdl_mph_ua h join (select id, max(time2) time2 from mdl_mph_ua group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_lastaccess' 402 Query insert into mdl_mph_ua (id,time2,deleted2,userid,courseid,timeaccess) select mhv.instance, mhv.time2, 1, mt.userid,mt.courseid,mt.timeaccess from mdl_mph_main_view mhv join (select h.id,h.userid,h.courseid,h.timeaccess from mdl_mph_ua h join (select id, max(time2) time2 from mdl_mph_ua group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_lastaccess' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_lastaccess' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.enrol,mt.status,mt.courseid,mt.sortorder,mt.name,mt.enrolperiod,mt.enrolstartdate,mt.enrolenddate,mt.expirynotify,mt.expirythreshold,mt.notifyall,mt.password,mt.cost,mt.currency,mt.roleid,mt.customint1,mt.customint2,mt.customint3,mt.customint4,mt.customint5,mt.customint6,mt.customint7,mt.customint8,mt.customchar1,mt.customchar2,mt.customchar3,mt.customdec1,mt.customdec2,mt.customtext1,mt.customtext2,mt.customtext3,mt.customtext4,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_enrol mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='enrol' 402 Query insert into mdl_mph_e (id,time2,deleted2,enrol,status,courseid,sortorder,name,enrolperiod,enrolstartdate,enrolenddate,expirynotify,expirythreshold,notifyall,password,cost,currency,roleid,customint1,customint2,customint3,customint4,customint5,customint6,customint7,customint8,customchar1,customchar2,customchar3,customdec1,customdec2,customtext1,customtext2,customtext3,customtext4,timecreated,timemodified) select mhv.instance, mhv.time2, 0, mt.enrol,mt.status,mt.courseid,mt.sortorder,mt.name,mt.enrolperiod,mt.enrolstartdate,mt.enrolenddate,mt.expirynotify,mt.expirythreshold,mt.notifyall,mt.password,mt.cost,mt.currency,mt.roleid,mt.customint1,mt.customint2,mt.customint3,mt.customint4,mt.customint5,mt.customint6,mt.customint7,mt.customint8,mt.customchar1,mt.customchar2,mt.customchar3,mt.customdec1,mt.customdec2,mt.customtext1,mt.customtext2,mt.customtext3,mt.customtext4,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_enrol mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='enrol' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='enrol' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.enrol,mt.status,mt.courseid,mt.sortorder,mt.name,mt.enrolperiod,mt.enrolstartdate,mt.enrolenddate,mt.expirynotify,mt.expirythreshold,mt.notifyall,mt.password,mt.cost,mt.currency,mt.roleid,mt.customint1,mt.customint2,mt.customint3,mt.customint4,mt.customint5,mt.customint6,mt.customint7,mt.customint8,mt.customchar1,mt.customchar2,mt.customchar3,mt.customdec1,mt.customdec2,mt.customtext1,mt.customtext2,mt.customtext3,mt.customtext4,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_enrol mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='enrol' 402 Query insert into mdl_mph_e (id,time2,deleted2,enrol,status,courseid,sortorder,name,enrolperiod,enrolstartdate,enrolenddate,expirynotify,expirythreshold,notifyall,password,cost,currency,roleid,customint1,customint2,customint3,customint4,customint5,customint6,customint7,customint8,customchar1,customchar2,customchar3,customdec1,customdec2,customtext1,customtext2,customtext3,customtext4,timecreated,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.enrol,mt.status,mt.courseid,mt.sortorder,mt.name,mt.enrolperiod,mt.enrolstartdate,mt.enrolenddate,mt.expirynotify,mt.expirythreshold,mt.notifyall,mt.password,mt.cost,mt.currency,mt.roleid,mt.customint1,mt.customint2,mt.customint3,mt.customint4,mt.customint5,mt.customint6,mt.customint7,mt.customint8,mt.customchar1,mt.customchar2,mt.customchar3,mt.customdec1,mt.customdec2,mt.customtext1,mt.customtext2,mt.customtext3,mt.customtext4,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_enrol mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='enrol' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='enrol' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.enrol,mt.status,mt.courseid,mt.sortorder,mt.name,mt.enrolperiod,mt.enrolstartdate,mt.enrolenddate,mt.expirynotify,mt.expirythreshold,mt.notifyall,mt.password,mt.cost,mt.currency,mt.roleid,mt.customint1,mt.customint2,mt.customint3,mt.customint4,mt.customint5,mt.customint6,mt.customint7,mt.customint8,mt.customchar1,mt.customchar2,mt.customchar3,mt.customdec1,mt.customdec2,mt.customtext1,mt.customtext2,mt.customtext3,mt.customtext4,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.enrol,h.status,h.courseid,h.sortorder,h.name,h.enrolperiod,h.enrolstartdate,h.enrolenddate,h.expirynotify,h.expirythreshold,h.notifyall,h.password,h.cost,h.currency,h.roleid,h.customint1,h.customint2,h.customint3,h.customint4,h.customint5,h.customint6,h.customint7,h.customint8,h.customchar1,h.customchar2,h.customchar3,h.customdec1,h.customdec2,h.customtext1,h.customtext2,h.customtext3,h.customtext4,h.timecreated,h.timemodified from mdl_mph_e h join (select id, max(time2) time2 from mdl_mph_e group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='enrol' 402 Query insert into mdl_mph_e (id,time2,deleted2,enrol,status,courseid,sortorder,name,enrolperiod,enrolstartdate,enrolenddate,expirynotify,expirythreshold,notifyall,password,cost,currency,roleid,customint1,customint2,customint3,customint4,customint5,customint6,customint7,customint8,customchar1,customchar2,customchar3,customdec1,customdec2,customtext1,customtext2,customtext3,customtext4,timecreated,timemodified) select mhv.instance, mhv.time2, 1, mt.enrol,mt.status,mt.courseid,mt.sortorder,mt.name,mt.enrolperiod,mt.enrolstartdate,mt.enrolenddate,mt.expirynotify,mt.expirythreshold,mt.notifyall,mt.password,mt.cost,mt.currency,mt.roleid,mt.customint1,mt.customint2,mt.customint3,mt.customint4,mt.customint5,mt.customint6,mt.customint7,mt.customint8,mt.customchar1,mt.customchar2,mt.customchar3,mt.customdec1,mt.customdec2,mt.customtext1,mt.customtext2,mt.customtext3,mt.customtext4,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.enrol,h.status,h.courseid,h.sortorder,h.name,h.enrolperiod,h.enrolstartdate,h.enrolenddate,h.expirynotify,h.expirythreshold,h.notifyall,h.password,h.cost,h.currency,h.roleid,h.customint1,h.customint2,h.customint3,h.customint4,h.customint5,h.customint6,h.customint7,h.customint8,h.customchar1,h.customchar2,h.customchar3,h.customdec1,h.customdec2,h.customtext1,h.customtext2,h.customtext3,h.customtext4,h.timecreated,h.timemodified from mdl_mph_e h join (select id, max(time2) time2 from mdl_mph_e group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='enrol' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='enrol' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.status,mt.enrolid,mt.userid,mt.timestart,mt.timeend,mt.modifierid,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_user_enrolments mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_enrolments' 402 Query insert into mdl_mph_ue (id,time2,deleted2,status,enrolid,userid,timestart,timeend,modifierid,timecreated,timemodified) select mhv.instance, mhv.time2, 0, mt.status,mt.enrolid,mt.userid,mt.timestart,mt.timeend,mt.modifierid,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_user_enrolments mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_enrolments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_enrolments' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.status,mt.enrolid,mt.userid,mt.timestart,mt.timeend,mt.modifierid,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_user_enrolments mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_enrolments' 402 Query insert into mdl_mph_ue (id,time2,deleted2,status,enrolid,userid,timestart,timeend,modifierid,timecreated,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.status,mt.enrolid,mt.userid,mt.timestart,mt.timeend,mt.modifierid,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_user_enrolments mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_enrolments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_enrolments' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.status,mt.enrolid,mt.userid,mt.timestart,mt.timeend,mt.modifierid,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.status,h.enrolid,h.userid,h.timestart,h.timeend,h.modifierid,h.timecreated,h.timemodified from mdl_mph_ue h join (select id, max(time2) time2 from mdl_mph_ue group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_enrolments' 402 Query insert into mdl_mph_ue (id,time2,deleted2,status,enrolid,userid,timestart,timeend,modifierid,timecreated,timemodified) select mhv.instance, mhv.time2, 1, mt.status,mt.enrolid,mt.userid,mt.timestart,mt.timeend,mt.modifierid,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.status,h.enrolid,h.userid,h.timestart,h.timeend,h.modifierid,h.timecreated,h.timemodified from mdl_mph_ue h join (select id, max(time2) time2 from mdl_mph_ue group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_enrolments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_enrolments' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.contextid,mt.userid,mt.timemodified,mt.modifierid,mt.component,mt.itemid,mt.sortorder from mdl_mph_main_view mhv join mdl_role_assignments mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_assignments' 402 Query insert into mdl_mph_ra (id,time2,deleted2,roleid,contextid,userid,timemodified,modifierid,component,itemid,sortorder) select mhv.instance, mhv.time2, 0, mt.roleid,mt.contextid,mt.userid,mt.timemodified,mt.modifierid,mt.component,mt.itemid,mt.sortorder from mdl_mph_main_view mhv join mdl_role_assignments mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_assignments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_assignments' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.roleid,mt.contextid,mt.userid,mt.timemodified,mt.modifierid,mt.component,mt.itemid,mt.sortorder from mdl_mph_main_view mhv join mdl_role_assignments mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_assignments' 402 Query insert into mdl_mph_ra (id,time2,deleted2,roleid,contextid,userid,timemodified,modifierid,component,itemid,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.contextid,mt.userid,mt.timemodified,mt.modifierid,mt.component,mt.itemid,mt.sortorder from mdl_mph_main_view mhv join mdl_role_assignments mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_assignments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_assignments' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.roleid,mt.contextid,mt.userid,mt.timemodified,mt.modifierid,mt.component,mt.itemid,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.roleid,h.contextid,h.userid,h.timemodified,h.modifierid,h.component,h.itemid,h.sortorder from mdl_mph_ra h join (select id, max(time2) time2 from mdl_mph_ra group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_assignments' 402 Query insert into mdl_mph_ra (id,time2,deleted2,roleid,contextid,userid,timemodified,modifierid,component,itemid,sortorder) select mhv.instance, mhv.time2, 1, mt.roleid,mt.contextid,mt.userid,mt.timemodified,mt.modifierid,mt.component,mt.itemid,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.roleid,h.contextid,h.userid,h.timemodified,h.modifierid,h.component,h.itemid,h.sortorder from mdl_mph_ra h join (select id, max(time2) time2 from mdl_mph_ra group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_assignments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_assignments' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.cmid,mt.moduleid,mt.name,mt.type,mt.typeid,mt.due,mt.expected,mt.timelimit from mdl_mph_main_view mhv join mdl_block_progress_mods mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_progress_mods' 402 Query insert into mdl_mph_bpm (id,time2,deleted2,courseid,blockid,cmid,moduleid,name,type,typeid,due,expected,timelimit) select mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.cmid,mt.moduleid,mt.name,mt.type,mt.typeid,mt.due,mt.expected,mt.timelimit from mdl_mph_main_view mhv join mdl_block_progress_mods mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_progress_mods' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_progress_mods' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.cmid,mt.moduleid,mt.name,mt.type,mt.typeid,mt.due,mt.expected,mt.timelimit from mdl_mph_main_view mhv join mdl_block_progress_mods mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_progress_mods' 402 Query insert into mdl_mph_bpm (id,time2,deleted2,courseid,blockid,cmid,moduleid,name,type,typeid,due,expected,timelimit) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.cmid,mt.moduleid,mt.name,mt.type,mt.typeid,mt.due,mt.expected,mt.timelimit from mdl_mph_main_view mhv join mdl_block_progress_mods mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_progress_mods' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_progress_mods' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.blockid,mt.cmid,mt.moduleid,mt.name,mt.type,mt.typeid,mt.due,mt.expected,mt.timelimit from mdl_mph_main_view mhv join (select h.id,h.courseid,h.blockid,h.cmid,h.moduleid,h.name,h.type,h.typeid,h.due,h.expected,h.timelimit from mdl_mph_bpm h join (select id, max(time2) time2 from mdl_mph_bpm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_progress_mods' 402 Query insert into mdl_mph_bpm (id,time2,deleted2,courseid,blockid,cmid,moduleid,name,type,typeid,due,expected,timelimit) select mhv.instance, mhv.time2, 1, mt.courseid,mt.blockid,mt.cmid,mt.moduleid,mt.name,mt.type,mt.typeid,mt.due,mt.expected,mt.timelimit from mdl_mph_main_view mhv join (select h.id,h.courseid,h.blockid,h.cmid,h.moduleid,h.name,h.type,h.typeid,h.due,h.expected,h.timelimit from mdl_mph_bpm h join (select id, max(time2) time2 from mdl_mph_bpm group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_progress_mods' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_progress_mods' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_block_progress_config mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_progress_config' 402 Query insert into mdl_mph_bpc (id,time2,deleted2,courseid,blockid,name,value) select mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_block_progress_config mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_progress_config' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_progress_config' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_block_progress_config mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_progress_config' 402 Query insert into mdl_mph_bpc (id,time2,deleted2,courseid,blockid,name,value) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.blockid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_block_progress_config mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_progress_config' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_progress_config' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.blockid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.courseid,h.blockid,h.name,h.value from mdl_mph_bpc h join (select id, max(time2) time2 from mdl_mph_bpc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_progress_config' 402 Query insert into mdl_mph_bpc (id,time2,deleted2,courseid,blockid,name,value) select mhv.instance, mhv.time2, 1, mt.courseid,mt.blockid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.courseid,h.blockid,h.name,h.value from mdl_mph_bpc h join (select id, max(time2) time2 from mdl_mph_bpc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_progress_config' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_progress_config' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.mpid,mt.amount,mt.spacelimit,mt.type,mt.status,mt.enrolid,mt.starttime,mt.endtime,mt.paysum from mdl_mph_main_view mhv join mdl_mp_licenses mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='mp_licenses' 402 Query insert into mdl_mph_mpl (id,time2,deleted2,mpid,amount,spacelimit,type,status,enrolid,starttime,endtime,paysum) select mhv.instance, mhv.time2, 0, mt.mpid,mt.amount,mt.spacelimit,mt.type,mt.status,mt.enrolid,mt.starttime,mt.endtime,mt.paysum from mdl_mph_main_view mhv join mdl_mp_licenses mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='mp_licenses' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp_licenses' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.mpid,mt.amount,mt.spacelimit,mt.type,mt.status,mt.enrolid,mt.starttime,mt.endtime,mt.paysum from mdl_mph_main_view mhv join mdl_mp_licenses mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='mp_licenses' 402 Query insert into mdl_mph_mpl (id,time2,deleted2,mpid,amount,spacelimit,type,status,enrolid,starttime,endtime,paysum) select distinct mhv.instance, mhv.time2, 0, mt.mpid,mt.amount,mt.spacelimit,mt.type,mt.status,mt.enrolid,mt.starttime,mt.endtime,mt.paysum from mdl_mph_main_view mhv join mdl_mp_licenses mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='mp_licenses' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp_licenses' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.mpid,mt.amount,mt.spacelimit,mt.type,mt.status,mt.enrolid,mt.starttime,mt.endtime,mt.paysum from mdl_mph_main_view mhv join (select h.id,h.mpid,h.amount,h.spacelimit,h.type,h.status,h.enrolid,h.starttime,h.endtime,h.paysum from mdl_mph_mpl h join (select id, max(time2) time2 from mdl_mph_mpl group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='mp_licenses' 402 Query insert into mdl_mph_mpl (id,time2,deleted2,mpid,amount,spacelimit,type,status,enrolid,starttime,endtime,paysum) select mhv.instance, mhv.time2, 1, mt.mpid,mt.amount,mt.spacelimit,mt.type,mt.status,mt.enrolid,mt.starttime,mt.endtime,mt.paysum from mdl_mph_main_view mhv join (select h.id,h.mpid,h.amount,h.spacelimit,h.type,h.status,h.enrolid,h.starttime,h.endtime,h.paysum from mdl_mph_mpl h join (select id, max(time2) time2 from mdl_mph_mpl group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='mp_licenses' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp_licenses' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.licenseid,mt.userid from mdl_mph_main_view mhv join mdl_mp_licenses_usage mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='mp_licenses_usage' 402 Query insert into mdl_mph_mplu (id,time2,deleted2,licenseid,userid) select mhv.instance, mhv.time2, 0, mt.licenseid,mt.userid from mdl_mph_main_view mhv join mdl_mp_licenses_usage mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='mp_licenses_usage' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp_licenses_usage' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.licenseid,mt.userid from mdl_mph_main_view mhv join mdl_mp_licenses_usage mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='mp_licenses_usage' 402 Query insert into mdl_mph_mplu (id,time2,deleted2,licenseid,userid) select distinct mhv.instance, mhv.time2, 0, mt.licenseid,mt.userid from mdl_mph_main_view mhv join mdl_mp_licenses_usage mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='mp_licenses_usage' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp_licenses_usage' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.licenseid,mt.userid from mdl_mph_main_view mhv join (select h.id,h.licenseid,h.userid from mdl_mph_mplu h join (select id, max(time2) time2 from mdl_mph_mplu group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='mp_licenses_usage' 402 Query insert into mdl_mph_mplu (id,time2,deleted2,licenseid,userid) select mhv.instance, mhv.time2, 1, mt.licenseid,mt.userid from mdl_mph_main_view mhv join (select h.id,h.licenseid,h.userid from mdl_mph_mplu h join (select id, max(time2) time2 from mdl_mph_mplu group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='mp_licenses_usage' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp_licenses_usage' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.alwaysshowdescription,mt.nosubmissions,mt.submissiondrafts,mt.sendnotifications,mt.sendlatenotifications,mt.duedate,mt.allowsubmissionsfromdate,mt.grade,mt.timemodified,mt.completionsubmit,mt.cutoffdate,mt.gradingduedate,mt.teamsubmission,mt.requireallteammemberssubmit,mt.teamsubmissiongroupingid,mt.blindmarking,mt.revealidentities,mt.attemptreopenmethod,mt.maxattempts,mt.markingworkflow,mt.markingallocation,mt.sendstudentnotifications,mt.preventsubmissionnotingroup,mt.requiresubmissionstatement from mdl_mph_main_view mhv join mdl_assign mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign' 402 Query insert into mdl_mph_as1 (id,time2,deleted2,course,name,intro,introformat,alwaysshowdescription,nosubmissions,submissiondrafts,sendnotifications,sendlatenotifications,duedate,allowsubmissionsfromdate,grade,timemodified,completionsubmit,cutoffdate,gradingduedate,teamsubmission,requireallteammemberssubmit,teamsubmissiongroupingid,blindmarking,revealidentities,attemptreopenmethod,maxattempts,markingworkflow,markingallocation,sendstudentnotifications,preventsubmissionnotingroup,requiresubmissionstatement) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.alwaysshowdescription,mt.nosubmissions,mt.submissiondrafts,mt.sendnotifications,mt.sendlatenotifications,mt.duedate,mt.allowsubmissionsfromdate,mt.grade,mt.timemodified,mt.completionsubmit,mt.cutoffdate,mt.gradingduedate,mt.teamsubmission,mt.requireallteammemberssubmit,mt.teamsubmissiongroupingid,mt.blindmarking,mt.revealidentities,mt.attemptreopenmethod,mt.maxattempts,mt.markingworkflow,mt.markingallocation,mt.sendstudentnotifications,mt.preventsubmissionnotingroup,mt.requiresubmissionstatement from mdl_mph_main_view mhv join mdl_assign mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.alwaysshowdescription,mt.nosubmissions,mt.submissiondrafts,mt.sendnotifications,mt.sendlatenotifications,mt.duedate,mt.allowsubmissionsfromdate,mt.grade,mt.timemodified,mt.completionsubmit,mt.cutoffdate,mt.gradingduedate,mt.teamsubmission,mt.requireallteammemberssubmit,mt.teamsubmissiongroupingid,mt.blindmarking,mt.revealidentities,mt.attemptreopenmethod,mt.maxattempts,mt.markingworkflow,mt.markingallocation,mt.sendstudentnotifications,mt.preventsubmissionnotingroup,mt.requiresubmissionstatement from mdl_mph_main_view mhv join mdl_assign mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign' 402 Query insert into mdl_mph_as1 (id,time2,deleted2,course,name,intro,introformat,alwaysshowdescription,nosubmissions,submissiondrafts,sendnotifications,sendlatenotifications,duedate,allowsubmissionsfromdate,grade,timemodified,completionsubmit,cutoffdate,gradingduedate,teamsubmission,requireallteammemberssubmit,teamsubmissiongroupingid,blindmarking,revealidentities,attemptreopenmethod,maxattempts,markingworkflow,markingallocation,sendstudentnotifications,preventsubmissionnotingroup,requiresubmissionstatement) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.alwaysshowdescription,mt.nosubmissions,mt.submissiondrafts,mt.sendnotifications,mt.sendlatenotifications,mt.duedate,mt.allowsubmissionsfromdate,mt.grade,mt.timemodified,mt.completionsubmit,mt.cutoffdate,mt.gradingduedate,mt.teamsubmission,mt.requireallteammemberssubmit,mt.teamsubmissiongroupingid,mt.blindmarking,mt.revealidentities,mt.attemptreopenmethod,mt.maxattempts,mt.markingworkflow,mt.markingallocation,mt.sendstudentnotifications,mt.preventsubmissionnotingroup,mt.requiresubmissionstatement from mdl_mph_main_view mhv join mdl_assign mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.alwaysshowdescription,mt.nosubmissions,mt.submissiondrafts,mt.sendnotifications,mt.sendlatenotifications,mt.duedate,mt.allowsubmissionsfromdate,mt.grade,mt.timemodified,mt.completionsubmit,mt.cutoffdate,mt.gradingduedate,mt.teamsubmission,mt.requireallteammemberssubmit,mt.teamsubmissiongroupingid,mt.blindmarking,mt.revealidentities,mt.attemptreopenmethod,mt.maxattempts,mt.markingworkflow,mt.markingallocation,mt.sendstudentnotifications,mt.preventsubmissionnotingroup,mt.requiresubmissionstatement from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.alwaysshowdescription,h.nosubmissions,h.submissiondrafts,h.sendnotifications,h.sendlatenotifications,h.duedate,h.allowsubmissionsfromdate,h.grade,h.timemodified,h.completionsubmit,h.cutoffdate,h.gradingduedate,h.teamsubmission,h.requireallteammemberssubmit,h.teamsubmissiongroupingid,h.blindmarking,h.revealidentities,h.attemptreopenmethod,h.maxattempts,h.markingworkflow,h.markingallocation,h.sendstudentnotifications,h.preventsubmissionnotingroup,h.requiresubmissionstatement from mdl_mph_as1 h join (select id, max(time2) time2 from mdl_mph_as1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign' 402 Query insert into mdl_mph_as1 (id,time2,deleted2,course,name,intro,introformat,alwaysshowdescription,nosubmissions,submissiondrafts,sendnotifications,sendlatenotifications,duedate,allowsubmissionsfromdate,grade,timemodified,completionsubmit,cutoffdate,gradingduedate,teamsubmission,requireallteammemberssubmit,teamsubmissiongroupingid,blindmarking,revealidentities,attemptreopenmethod,maxattempts,markingworkflow,markingallocation,sendstudentnotifications,preventsubmissionnotingroup,requiresubmissionstatement) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.alwaysshowdescription,mt.nosubmissions,mt.submissiondrafts,mt.sendnotifications,mt.sendlatenotifications,mt.duedate,mt.allowsubmissionsfromdate,mt.grade,mt.timemodified,mt.completionsubmit,mt.cutoffdate,mt.gradingduedate,mt.teamsubmission,mt.requireallteammemberssubmit,mt.teamsubmissiongroupingid,mt.blindmarking,mt.revealidentities,mt.attemptreopenmethod,mt.maxattempts,mt.markingworkflow,mt.markingallocation,mt.sendstudentnotifications,mt.preventsubmissionnotingroup,mt.requiresubmissionstatement from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.alwaysshowdescription,h.nosubmissions,h.submissiondrafts,h.sendnotifications,h.sendlatenotifications,h.duedate,h.allowsubmissionsfromdate,h.grade,h.timemodified,h.completionsubmit,h.cutoffdate,h.gradingduedate,h.teamsubmission,h.requireallteammemberssubmit,h.teamsubmissiongroupingid,h.blindmarking,h.revealidentities,h.attemptreopenmethod,h.maxattempts,h.markingworkflow,h.markingallocation,h.sendstudentnotifications,h.preventsubmissionnotingroup,h.requiresubmissionstatement from mdl_mph_as1 h join (select id, max(time2) time2 from mdl_mph_as1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.grader,mt.grade,mt.attemptnumber from mdl_mph_main_view mhv join mdl_assign_grades mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_grades' 402 Query insert into mdl_mph_as2 (id,time2,deleted2,assignment,userid,timecreated,timemodified,grader,grade,attemptnumber) select mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.grader,mt.grade,mt.attemptnumber from mdl_mph_main_view mhv join mdl_assign_grades mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_grades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_grades' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.grader,mt.grade,mt.attemptnumber from mdl_mph_main_view mhv join mdl_assign_grades mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_grades' 402 Query insert into mdl_mph_as2 (id,time2,deleted2,assignment,userid,timecreated,timemodified,grader,grade,attemptnumber) select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.grader,mt.grade,mt.attemptnumber from mdl_mph_main_view mhv join mdl_assign_grades mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_grades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_grades' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.grader,mt.grade,mt.attemptnumber from mdl_mph_main_view mhv join (select h.id,h.assignment,h.userid,h.timecreated,h.timemodified,h.grader,h.grade,h.attemptnumber from mdl_mph_as2 h join (select id, max(time2) time2 from mdl_mph_as2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_grades' 402 Query insert into mdl_mph_as2 (id,time2,deleted2,assignment,userid,timecreated,timemodified,grader,grade,attemptnumber) select mhv.instance, mhv.time2, 1, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.grader,mt.grade,mt.attemptnumber from mdl_mph_main_view mhv join (select h.id,h.assignment,h.userid,h.timecreated,h.timemodified,h.grader,h.grade,h.attemptnumber from mdl_mph_as2 h join (select id, max(time2) time2 from mdl_mph_as2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_grades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_grades' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.plugin,mt.subtype,mt.name,mt.value from mdl_mph_main_view mhv join mdl_assign_plugin_config mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_plugin_config' 402 Query insert into mdl_mph_as3 (id,time2,deleted2,assignment,plugin,subtype,name,value) select mhv.instance, mhv.time2, 0, mt.assignment,mt.plugin,mt.subtype,mt.name,mt.value from mdl_mph_main_view mhv join mdl_assign_plugin_config mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_plugin_config' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_plugin_config' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.assignment,mt.plugin,mt.subtype,mt.name,mt.value from mdl_mph_main_view mhv join mdl_assign_plugin_config mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_plugin_config' 201021 17:22:22 402 Query insert into mdl_mph_as3 (id,time2,deleted2,assignment,plugin,subtype,name,value) select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.plugin,mt.subtype,mt.name,mt.value from mdl_mph_main_view mhv join mdl_assign_plugin_config mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_plugin_config' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_plugin_config' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.assignment,mt.plugin,mt.subtype,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.assignment,h.plugin,h.subtype,h.name,h.value from mdl_mph_as3 h join (select id, max(time2) time2 from mdl_mph_as3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_plugin_config' 402 Query insert into mdl_mph_as3 (id,time2,deleted2,assignment,plugin,subtype,name,value) select mhv.instance, mhv.time2, 1, mt.assignment,mt.plugin,mt.subtype,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.assignment,h.plugin,h.subtype,h.name,h.value from mdl_mph_as3 h join (select id, max(time2) time2 from mdl_mph_as3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_plugin_config' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_plugin_config' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.status,mt.groupid,mt.attemptnumber,mt.latest from mdl_mph_main_view mhv join mdl_assign_submission mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_submission' 402 Query insert into mdl_mph_as4 (id,time2,deleted2,assignment,userid,timecreated,timemodified,status,groupid,attemptnumber,latest) select mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.status,mt.groupid,mt.attemptnumber,mt.latest from mdl_mph_main_view mhv join mdl_assign_submission mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_submission' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_submission' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.status,mt.groupid,mt.attemptnumber,mt.latest from mdl_mph_main_view mhv join mdl_assign_submission mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_submission' 402 Query insert into mdl_mph_as4 (id,time2,deleted2,assignment,userid,timecreated,timemodified,status,groupid,attemptnumber,latest) select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.status,mt.groupid,mt.attemptnumber,mt.latest from mdl_mph_main_view mhv join mdl_assign_submission mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_submission' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_submission' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.status,mt.groupid,mt.attemptnumber,mt.latest from mdl_mph_main_view mhv join (select h.id,h.assignment,h.userid,h.timecreated,h.timemodified,h.status,h.groupid,h.attemptnumber,h.latest from mdl_mph_as4 h join (select id, max(time2) time2 from mdl_mph_as4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_submission' 402 Query insert into mdl_mph_as4 (id,time2,deleted2,assignment,userid,timecreated,timemodified,status,groupid,attemptnumber,latest) select mhv.instance, mhv.time2, 1, mt.assignment,mt.userid,mt.timecreated,mt.timemodified,mt.status,mt.groupid,mt.attemptnumber,mt.latest from mdl_mph_main_view mhv join (select h.id,h.assignment,h.userid,h.timecreated,h.timemodified,h.status,h.groupid,h.attemptnumber,h.latest from mdl_mph_as4 h join (select id, max(time2) time2 from mdl_mph_as4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_submission' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_submission' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.userid from mdl_mph_main_view mhv join mdl_assign_user_mapping mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_user_mapping' 402 Query insert into mdl_mph_as5 (id,time2,deleted2,assignment,userid) select mhv.instance, mhv.time2, 0, mt.assignment,mt.userid from mdl_mph_main_view mhv join mdl_assign_user_mapping mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assign_user_mapping' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_user_mapping' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.assignment,mt.userid from mdl_mph_main_view mhv join mdl_assign_user_mapping mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_user_mapping' 402 Query insert into mdl_mph_as5 (id,time2,deleted2,assignment,userid) select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.userid from mdl_mph_main_view mhv join mdl_assign_user_mapping mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assign_user_mapping' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_user_mapping' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.assignment,mt.userid from mdl_mph_main_view mhv join (select h.id,h.assignment,h.userid from mdl_mph_as5 h join (select id, max(time2) time2 from mdl_mph_as5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_user_mapping' 402 Query insert into mdl_mph_as5 (id,time2,deleted2,assignment,userid) select mhv.instance, mhv.time2, 1, mt.assignment,mt.userid from mdl_mph_main_view mhv join (select h.id,h.assignment,h.userid from mdl_mph_as5 h join (select id, max(time2) time2 from mdl_mph_as5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assign_user_mapping' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assign_user_mapping' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.oldcmid,mt.oldinstance,mt.newcmid,mt.newinstance,mt.timecreated from mdl_mph_main_view mhv join mdl_assignment_upgrade mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assignment_upgrade' 402 Query insert into mdl_mph_as6 (id,time2,deleted2,oldcmid,oldinstance,newcmid,newinstance,timecreated) select mhv.instance, mhv.time2, 0, mt.oldcmid,mt.oldinstance,mt.newcmid,mt.newinstance,mt.timecreated from mdl_mph_main_view mhv join mdl_assignment_upgrade mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assignment_upgrade' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignment_upgrade' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.oldcmid,mt.oldinstance,mt.newcmid,mt.newinstance,mt.timecreated from mdl_mph_main_view mhv join mdl_assignment_upgrade mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assignment_upgrade' 402 Query insert into mdl_mph_as6 (id,time2,deleted2,oldcmid,oldinstance,newcmid,newinstance,timecreated) select distinct mhv.instance, mhv.time2, 0, mt.oldcmid,mt.oldinstance,mt.newcmid,mt.newinstance,mt.timecreated from mdl_mph_main_view mhv join mdl_assignment_upgrade mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assignment_upgrade' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignment_upgrade' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.oldcmid,mt.oldinstance,mt.newcmid,mt.newinstance,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.oldcmid,h.oldinstance,h.newcmid,h.newinstance,h.timecreated from mdl_mph_as6 h join (select id, max(time2) time2 from mdl_mph_as6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assignment_upgrade' 402 Query insert into mdl_mph_as6 (id,time2,deleted2,oldcmid,oldinstance,newcmid,newinstance,timecreated) select mhv.instance, mhv.time2, 1, mt.oldcmid,mt.oldinstance,mt.newcmid,mt.newinstance,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.oldcmid,h.oldinstance,h.newcmid,h.newinstance,h.timecreated from mdl_mph_as6 h join (select id, max(time2) time2 from mdl_mph_as6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assignment_upgrade' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignment_upgrade' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.numfiles from mdl_mph_main_view mhv join mdl_assignsubmission_file mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assignsubmission_file' 402 Query insert into mdl_mph_as7 (id,time2,deleted2,assignment,submission,numfiles) select mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.numfiles from mdl_mph_main_view mhv join mdl_assignsubmission_file mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assignsubmission_file' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignsubmission_file' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.numfiles from mdl_mph_main_view mhv join mdl_assignsubmission_file mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assignsubmission_file' 402 Query insert into mdl_mph_as7 (id,time2,deleted2,assignment,submission,numfiles) select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.numfiles from mdl_mph_main_view mhv join mdl_assignsubmission_file mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assignsubmission_file' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignsubmission_file' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.assignment,mt.submission,mt.numfiles from mdl_mph_main_view mhv join (select h.id,h.assignment,h.submission,h.numfiles from mdl_mph_as7 h join (select id, max(time2) time2 from mdl_mph_as7 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assignsubmission_file' 402 Query insert into mdl_mph_as7 (id,time2,deleted2,assignment,submission,numfiles) select mhv.instance, mhv.time2, 1, mt.assignment,mt.submission,mt.numfiles from mdl_mph_main_view mhv join (select h.id,h.assignment,h.submission,h.numfiles from mdl_mph_as7 h join (select id, max(time2) time2 from mdl_mph_as7 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assignsubmission_file' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignsubmission_file' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.onlinetext,mt.onlineformat from mdl_mph_main_view mhv join mdl_assignsubmission_onlinetext mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assignsubmission_onlinetext' 402 Query insert into mdl_mph_as8 (id,time2,deleted2,assignment,submission,onlinetext,onlineformat) select mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.onlinetext,mt.onlineformat from mdl_mph_main_view mhv join mdl_assignsubmission_onlinetext mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='assignsubmission_onlinetext' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignsubmission_onlinetext' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.onlinetext,mt.onlineformat from mdl_mph_main_view mhv join mdl_assignsubmission_onlinetext mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assignsubmission_onlinetext' 402 Query insert into mdl_mph_as8 (id,time2,deleted2,assignment,submission,onlinetext,onlineformat) select distinct mhv.instance, mhv.time2, 0, mt.assignment,mt.submission,mt.onlinetext,mt.onlineformat from mdl_mph_main_view mhv join mdl_assignsubmission_onlinetext mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='assignsubmission_onlinetext' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignsubmission_onlinetext' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.assignment,mt.submission,mt.onlinetext,mt.onlineformat from mdl_mph_main_view mhv join (select h.id,h.assignment,h.submission,h.onlinetext,h.onlineformat from mdl_mph_as8 h join (select id, max(time2) time2 from mdl_mph_as8 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assignsubmission_onlinetext' 402 Query insert into mdl_mph_as8 (id,time2,deleted2,assignment,submission,onlinetext,onlineformat) select mhv.instance, mhv.time2, 1, mt.assignment,mt.submission,mt.onlinetext,mt.onlineformat from mdl_mph_main_view mhv join (select h.id,h.assignment,h.submission,h.onlinetext,h.onlineformat from mdl_mph_as8 h join (select id, max(time2) time2 from mdl_mph_as8 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='assignsubmission_onlinetext' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='assignsubmission_onlinetext' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.user,mt.session,mt.timestamp from mdl_mph_main_view mhv join mdl_aultman_auth mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='aultman_auth' 402 Query insert into mdl_mph_au (id,time2,deleted2,user,session,timestamp) select mhv.instance, mhv.time2, 0, mt.user,mt.session,mt.timestamp from mdl_mph_main_view mhv join mdl_aultman_auth mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='aultman_auth' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='aultman_auth' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.user,mt.session,mt.timestamp from mdl_mph_main_view mhv join mdl_aultman_auth mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='aultman_auth' 402 Query insert into mdl_mph_au (id,time2,deleted2,user,session,timestamp) select distinct mhv.instance, mhv.time2, 0, mt.user,mt.session,mt.timestamp from mdl_mph_main_view mhv join mdl_aultman_auth mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='aultman_auth' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='aultman_auth' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.user,mt.session,mt.timestamp from mdl_mph_main_view mhv join (select h.id,h.user,h.session,h.timestamp from mdl_mph_au h join (select id, max(time2) time2 from mdl_mph_au group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='aultman_auth' 402 Query insert into mdl_mph_au (id,time2,deleted2,user,session,timestamp) select mhv.instance, mhv.time2, 1, mt.user,mt.session,mt.timestamp from mdl_mph_main_view mhv join (select h.id,h.user,h.session,h.timestamp from mdl_mph_au h join (select id, max(time2) time2 from mdl_mph_au group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='aultman_auth' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='aultman_auth' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.laststarttime,mt.lastendtime,mt.laststatus,mt.nextstarttime from mdl_mph_main_view mhv join mdl_backup_courses mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='backup_courses' 402 Query insert into mdl_mph_ba (id,time2,deleted2,courseid,laststarttime,lastendtime,laststatus,nextstarttime) select mhv.instance, mhv.time2, 0, mt.courseid,mt.laststarttime,mt.lastendtime,mt.laststatus,mt.nextstarttime from mdl_mph_main_view mhv join mdl_backup_courses mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='backup_courses' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='backup_courses' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.laststarttime,mt.lastendtime,mt.laststatus,mt.nextstarttime from mdl_mph_main_view mhv join mdl_backup_courses mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='backup_courses' 402 Query insert into mdl_mph_ba (id,time2,deleted2,courseid,laststarttime,lastendtime,laststatus,nextstarttime) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.laststarttime,mt.lastendtime,mt.laststatus,mt.nextstarttime from mdl_mph_main_view mhv join mdl_backup_courses mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='backup_courses' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='backup_courses' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.laststarttime,mt.lastendtime,mt.laststatus,mt.nextstarttime from mdl_mph_main_view mhv join (select h.id,h.courseid,h.laststarttime,h.lastendtime,h.laststatus,h.nextstarttime from mdl_mph_ba h join (select id, max(time2) time2 from mdl_mph_ba group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='backup_courses' 402 Query insert into mdl_mph_ba (id,time2,deleted2,courseid,laststarttime,lastendtime,laststatus,nextstarttime) select mhv.instance, mhv.time2, 1, mt.courseid,mt.laststarttime,mt.lastendtime,mt.laststatus,mt.nextstarttime from mdl_mph_main_view mhv join (select h.id,h.courseid,h.laststarttime,h.lastendtime,h.laststatus,h.nextstarttime from mdl_mph_ba h join (select id, max(time2) time2 from mdl_mph_ba group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='backup_courses' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='backup_courses' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.timecreated,mt.timemodified,mt.usercreated,mt.usermodified,mt.issuername,mt.issuerurl,mt.issuercontact,mt.expiredate,mt.expireperiod,mt.type,mt.courseid,mt.message,mt.messagesubject,mt.attachment,mt.notification,mt.status,mt.nextcron from mdl_mph_main_view mhv join mdl_badge mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge' 402 Query insert into mdl_mph_ba1 (id,time2,deleted2,name,description,timecreated,timemodified,usercreated,usermodified,issuername,issuerurl,issuercontact,expiredate,expireperiod,type,courseid,message,messagesubject,attachment,notification,status,nextcron) select mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.timecreated,mt.timemodified,mt.usercreated,mt.usermodified,mt.issuername,mt.issuerurl,mt.issuercontact,mt.expiredate,mt.expireperiod,mt.type,mt.courseid,mt.message,mt.messagesubject,mt.attachment,mt.notification,mt.status,mt.nextcron from mdl_mph_main_view mhv join mdl_badge mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.timecreated,mt.timemodified,mt.usercreated,mt.usermodified,mt.issuername,mt.issuerurl,mt.issuercontact,mt.expiredate,mt.expireperiod,mt.type,mt.courseid,mt.message,mt.messagesubject,mt.attachment,mt.notification,mt.status,mt.nextcron from mdl_mph_main_view mhv join mdl_badge mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge' 402 Query insert into mdl_mph_ba1 (id,time2,deleted2,name,description,timecreated,timemodified,usercreated,usermodified,issuername,issuerurl,issuercontact,expiredate,expireperiod,type,courseid,message,messagesubject,attachment,notification,status,nextcron) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.timecreated,mt.timemodified,mt.usercreated,mt.usermodified,mt.issuername,mt.issuerurl,mt.issuercontact,mt.expiredate,mt.expireperiod,mt.type,mt.courseid,mt.message,mt.messagesubject,mt.attachment,mt.notification,mt.status,mt.nextcron from mdl_mph_main_view mhv join mdl_badge mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.description,mt.timecreated,mt.timemodified,mt.usercreated,mt.usermodified,mt.issuername,mt.issuerurl,mt.issuercontact,mt.expiredate,mt.expireperiod,mt.type,mt.courseid,mt.message,mt.messagesubject,mt.attachment,mt.notification,mt.status,mt.nextcron from mdl_mph_main_view mhv join (select h.id,h.name,h.description,h.timecreated,h.timemodified,h.usercreated,h.usermodified,h.issuername,h.issuerurl,h.issuercontact,h.expiredate,h.expireperiod,h.type,h.courseid,h.message,h.messagesubject,h.attachment,h.notification,h.status,h.nextcron from mdl_mph_ba1 h join (select id, max(time2) time2 from mdl_mph_ba1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge' 402 Query insert into mdl_mph_ba1 (id,time2,deleted2,name,description,timecreated,timemodified,usercreated,usermodified,issuername,issuerurl,issuercontact,expiredate,expireperiod,type,courseid,message,messagesubject,attachment,notification,status,nextcron) select mhv.instance, mhv.time2, 1, mt.name,mt.description,mt.timecreated,mt.timemodified,mt.usercreated,mt.usermodified,mt.issuername,mt.issuerurl,mt.issuercontact,mt.expiredate,mt.expireperiod,mt.type,mt.courseid,mt.message,mt.messagesubject,mt.attachment,mt.notification,mt.status,mt.nextcron from mdl_mph_main_view mhv join (select h.id,h.name,h.description,h.timecreated,h.timemodified,h.usercreated,h.usermodified,h.issuername,h.issuerurl,h.issuercontact,h.expiredate,h.expireperiod,h.type,h.courseid,h.message,h.messagesubject,h.attachment,h.notification,h.status,h.nextcron from mdl_mph_ba1 h join (select id, max(time2) time2 from mdl_mph_ba1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.badgeid,mt.criteriatype,mt.method,mt.description,mt.descriptionformat from mdl_mph_main_view mhv join mdl_badge_criteria mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_criteria' 402 Query insert into mdl_mph_ba2 (id,time2,deleted2,badgeid,criteriatype,method,description,descriptionformat) select mhv.instance, mhv.time2, 0, mt.badgeid,mt.criteriatype,mt.method,mt.description,mt.descriptionformat from mdl_mph_main_view mhv join mdl_badge_criteria mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_criteria' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.badgeid,mt.criteriatype,mt.method,mt.description,mt.descriptionformat from mdl_mph_main_view mhv join mdl_badge_criteria mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_criteria' 402 Query insert into mdl_mph_ba2 (id,time2,deleted2,badgeid,criteriatype,method,description,descriptionformat) select distinct mhv.instance, mhv.time2, 0, mt.badgeid,mt.criteriatype,mt.method,mt.description,mt.descriptionformat from mdl_mph_main_view mhv join mdl_badge_criteria mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_criteria' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.badgeid,mt.criteriatype,mt.method,mt.description,mt.descriptionformat from mdl_mph_main_view mhv join (select h.id,h.badgeid,h.criteriatype,h.method,h.description,h.descriptionformat from mdl_mph_ba2 h join (select id, max(time2) time2 from mdl_mph_ba2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_criteria' 402 Query insert into mdl_mph_ba2 (id,time2,deleted2,badgeid,criteriatype,method,description,descriptionformat) select mhv.instance, mhv.time2, 1, mt.badgeid,mt.criteriatype,mt.method,mt.description,mt.descriptionformat from mdl_mph_main_view mhv join (select h.id,h.badgeid,h.criteriatype,h.method,h.description,h.descriptionformat from mdl_mph_ba2 h join (select id, max(time2) time2 from mdl_mph_ba2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_criteria' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.issuedid,mt.critid,mt.userid,mt.datemet from mdl_mph_main_view mhv join mdl_badge_criteria_met mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_criteria_met' 402 Query insert into mdl_mph_ba3 (id,time2,deleted2,issuedid,critid,userid,datemet) select mhv.instance, mhv.time2, 0, mt.issuedid,mt.critid,mt.userid,mt.datemet from mdl_mph_main_view mhv join mdl_badge_criteria_met mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_criteria_met' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria_met' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.issuedid,mt.critid,mt.userid,mt.datemet from mdl_mph_main_view mhv join mdl_badge_criteria_met mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_criteria_met' 402 Query insert into mdl_mph_ba3 (id,time2,deleted2,issuedid,critid,userid,datemet) select distinct mhv.instance, mhv.time2, 0, mt.issuedid,mt.critid,mt.userid,mt.datemet from mdl_mph_main_view mhv join mdl_badge_criteria_met mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_criteria_met' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria_met' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.issuedid,mt.critid,mt.userid,mt.datemet from mdl_mph_main_view mhv join (select h.id,h.issuedid,h.critid,h.userid,h.datemet from mdl_mph_ba3 h join (select id, max(time2) time2 from mdl_mph_ba3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_criteria_met' 402 Query insert into mdl_mph_ba3 (id,time2,deleted2,issuedid,critid,userid,datemet) select mhv.instance, mhv.time2, 1, mt.issuedid,mt.critid,mt.userid,mt.datemet from mdl_mph_main_view mhv join (select h.id,h.issuedid,h.critid,h.userid,h.datemet from mdl_mph_ba3 h join (select id, max(time2) time2 from mdl_mph_ba3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_criteria_met' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria_met' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.critid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_badge_criteria_param mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_criteria_param' 402 Query insert into mdl_mph_ba4 (id,time2,deleted2,critid,name,value) select mhv.instance, mhv.time2, 0, mt.critid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_badge_criteria_param mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_criteria_param' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria_param' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.critid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_badge_criteria_param mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_criteria_param' 402 Query insert into mdl_mph_ba4 (id,time2,deleted2,critid,name,value) select distinct mhv.instance, mhv.time2, 0, mt.critid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_badge_criteria_param mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_criteria_param' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria_param' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.critid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.critid,h.name,h.value from mdl_mph_ba4 h join (select id, max(time2) time2 from mdl_mph_ba4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_criteria_param' 402 Query insert into mdl_mph_ba4 (id,time2,deleted2,critid,name,value) select mhv.instance, mhv.time2, 1, mt.critid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.critid,h.name,h.value from mdl_mph_ba4 h join (select id, max(time2) time2 from mdl_mph_ba4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_criteria_param' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_criteria_param' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.badgeid,mt.userid,mt.uniquehash,mt.dateissued,mt.dateexpire,mt.visible,mt.issuernotified from mdl_mph_main_view mhv join mdl_badge_issued mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_issued' 402 Query insert into mdl_mph_ba5 (id,time2,deleted2,badgeid,userid,uniquehash,dateissued,dateexpire,visible,issuernotified) select mhv.instance, mhv.time2, 0, mt.badgeid,mt.userid,mt.uniquehash,mt.dateissued,mt.dateexpire,mt.visible,mt.issuernotified from mdl_mph_main_view mhv join mdl_badge_issued mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='badge_issued' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_issued' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.badgeid,mt.userid,mt.uniquehash,mt.dateissued,mt.dateexpire,mt.visible,mt.issuernotified from mdl_mph_main_view mhv join mdl_badge_issued mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_issued' 402 Query insert into mdl_mph_ba5 (id,time2,deleted2,badgeid,userid,uniquehash,dateissued,dateexpire,visible,issuernotified) select distinct mhv.instance, mhv.time2, 0, mt.badgeid,mt.userid,mt.uniquehash,mt.dateissued,mt.dateexpire,mt.visible,mt.issuernotified from mdl_mph_main_view mhv join mdl_badge_issued mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='badge_issued' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_issued' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.badgeid,mt.userid,mt.uniquehash,mt.dateissued,mt.dateexpire,mt.visible,mt.issuernotified from mdl_mph_main_view mhv join (select h.id,h.badgeid,h.userid,h.uniquehash,h.dateissued,h.dateexpire,h.visible,h.issuernotified from mdl_mph_ba5 h join (select id, max(time2) time2 from mdl_mph_ba5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_issued' 402 Query insert into mdl_mph_ba5 (id,time2,deleted2,badgeid,userid,uniquehash,dateissued,dateexpire,visible,issuernotified) select mhv.instance, mhv.time2, 1, mt.badgeid,mt.userid,mt.uniquehash,mt.dateissued,mt.dateexpire,mt.visible,mt.issuernotified from mdl_mph_main_view mhv join (select h.id,h.badgeid,h.userid,h.uniquehash,h.dateissued,h.dateexpire,h.visible,h.issuernotified from mdl_mph_ba5 h join (select id, max(time2) time2 from mdl_mph_ba5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='badge_issued' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='badge_issued' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.visible from mdl_mph_main_view mhv join mdl_block mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block' 402 Query insert into mdl_mph_bl (id,time2,deleted2,name,cron,lastcron,visible) select mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.visible from mdl_mph_main_view mhv join mdl_block mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.visible from mdl_mph_main_view mhv join mdl_block mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block' 402 Query insert into mdl_mph_bl (id,time2,deleted2,name,cron,lastcron,visible) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.visible from mdl_mph_main_view mhv join mdl_block mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.cron,mt.lastcron,mt.visible from mdl_mph_main_view mhv join (select h.id,h.name,h.cron,h.lastcron,h.visible from mdl_mph_bl h join (select id, max(time2) time2 from mdl_mph_bl group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block' 402 Query insert into mdl_mph_bl (id,time2,deleted2,name,cron,lastcron,visible) select mhv.instance, mhv.time2, 1, mt.name,mt.cron,mt.lastcron,mt.visible from mdl_mph_main_view mhv join (select h.id,h.name,h.cron,h.lastcron,h.visible from mdl_mph_bl h join (select id, max(time2) time2 from mdl_mph_bl group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.blockname,mt.parentcontextid,mt.showinsubcontexts,mt.requiredbytheme,mt.pagetypepattern,mt.subpagepattern,mt.defaultweight,mt.configdata,mt.defaultregion from mdl_mph_main_view mhv join mdl_block_instances mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_instances' 402 Query insert into mdl_mph_bl1 (id,time2,deleted2,blockname,parentcontextid,showinsubcontexts,requiredbytheme,pagetypepattern,subpagepattern,defaultweight,configdata,defaultregion) select mhv.instance, mhv.time2, 0, mt.blockname,mt.parentcontextid,mt.showinsubcontexts,mt.requiredbytheme,mt.pagetypepattern,mt.subpagepattern,mt.defaultweight,mt.configdata,mt.defaultregion from mdl_mph_main_view mhv join mdl_block_instances mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_instances' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_instances' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.blockname,mt.parentcontextid,mt.showinsubcontexts,mt.requiredbytheme,mt.pagetypepattern,mt.subpagepattern,mt.defaultweight,mt.configdata,mt.defaultregion from mdl_mph_main_view mhv join mdl_block_instances mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_instances' 402 Query insert into mdl_mph_bl1 (id,time2,deleted2,blockname,parentcontextid,showinsubcontexts,requiredbytheme,pagetypepattern,subpagepattern,defaultweight,configdata,defaultregion) select distinct mhv.instance, mhv.time2, 0, mt.blockname,mt.parentcontextid,mt.showinsubcontexts,mt.requiredbytheme,mt.pagetypepattern,mt.subpagepattern,mt.defaultweight,mt.configdata,mt.defaultregion from mdl_mph_main_view mhv join mdl_block_instances mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_instances' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_instances' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.blockname,mt.parentcontextid,mt.showinsubcontexts,mt.requiredbytheme,mt.pagetypepattern,mt.subpagepattern,mt.defaultweight,mt.configdata,mt.defaultregion from mdl_mph_main_view mhv join (select h.id,h.blockname,h.parentcontextid,h.showinsubcontexts,h.requiredbytheme,h.pagetypepattern,h.subpagepattern,h.defaultweight,h.configdata,h.defaultregion from mdl_mph_bl1 h join (select id, max(time2) time2 from mdl_mph_bl1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_instances' 402 Query insert into mdl_mph_bl1 (id,time2,deleted2,blockname,parentcontextid,showinsubcontexts,requiredbytheme,pagetypepattern,subpagepattern,defaultweight,configdata,defaultregion) select mhv.instance, mhv.time2, 1, mt.blockname,mt.parentcontextid,mt.showinsubcontexts,mt.requiredbytheme,mt.pagetypepattern,mt.subpagepattern,mt.defaultweight,mt.configdata,mt.defaultregion from mdl_mph_main_view mhv join (select h.id,h.blockname,h.parentcontextid,h.showinsubcontexts,h.requiredbytheme,h.pagetypepattern,h.subpagepattern,h.defaultweight,h.configdata,h.defaultregion from mdl_mph_bl1 h join (select id, max(time2) time2 from mdl_mph_bl1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_instances' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_instances' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.blockinstanceid,mt.contextid,mt.pagetype,mt.subpage,mt.visible,mt.region,mt.weight from mdl_mph_main_view mhv join mdl_block_positions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_positions' 402 Query insert into mdl_mph_bl2 (id,time2,deleted2,blockinstanceid,contextid,pagetype,subpage,visible,region,weight) select mhv.instance, mhv.time2, 0, mt.blockinstanceid,mt.contextid,mt.pagetype,mt.subpage,mt.visible,mt.region,mt.weight from mdl_mph_main_view mhv join mdl_block_positions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_positions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_positions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.blockinstanceid,mt.contextid,mt.pagetype,mt.subpage,mt.visible,mt.region,mt.weight from mdl_mph_main_view mhv join mdl_block_positions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_positions' 402 Query insert into mdl_mph_bl2 (id,time2,deleted2,blockinstanceid,contextid,pagetype,subpage,visible,region,weight) select distinct mhv.instance, mhv.time2, 0, mt.blockinstanceid,mt.contextid,mt.pagetype,mt.subpage,mt.visible,mt.region,mt.weight from mdl_mph_main_view mhv join mdl_block_positions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_positions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_positions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.blockinstanceid,mt.contextid,mt.pagetype,mt.subpage,mt.visible,mt.region,mt.weight from mdl_mph_main_view mhv join (select h.id,h.blockinstanceid,h.contextid,h.pagetype,h.subpage,h.visible,h.region,h.weight from mdl_mph_bl2 h join (select id, max(time2) time2 from mdl_mph_bl2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_positions' 402 Query insert into mdl_mph_bl2 (id,time2,deleted2,blockinstanceid,contextid,pagetype,subpage,visible,region,weight) select mhv.instance, mhv.time2, 1, mt.blockinstanceid,mt.contextid,mt.pagetype,mt.subpage,mt.visible,mt.region,mt.weight from mdl_mph_main_view mhv join (select h.id,h.blockinstanceid,h.contextid,h.pagetype,h.subpage,h.visible,h.region,h.weight from mdl_mph_bl2 h join (select id, max(time2) time2 from mdl_mph_bl2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_positions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_positions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.captype,mt.contextlevel,mt.component,mt.riskbitmask from mdl_mph_main_view mhv join mdl_capabilities mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='capabilities' 402 Query insert into mdl_mph_ca (id,time2,deleted2,name,captype,contextlevel,component,riskbitmask) select mhv.instance, mhv.time2, 0, mt.name,mt.captype,mt.contextlevel,mt.component,mt.riskbitmask from mdl_mph_main_view mhv join mdl_capabilities mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='capabilities' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='capabilities' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.captype,mt.contextlevel,mt.component,mt.riskbitmask from mdl_mph_main_view mhv join mdl_capabilities mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='capabilities' 402 Query insert into mdl_mph_ca (id,time2,deleted2,name,captype,contextlevel,component,riskbitmask) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.captype,mt.contextlevel,mt.component,mt.riskbitmask from mdl_mph_main_view mhv join mdl_capabilities mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='capabilities' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='capabilities' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.captype,mt.contextlevel,mt.component,mt.riskbitmask from mdl_mph_main_view mhv join (select h.id,h.name,h.captype,h.contextlevel,h.component,h.riskbitmask from mdl_mph_ca h join (select id, max(time2) time2 from mdl_mph_ca group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='capabilities' 402 Query insert into mdl_mph_ca (id,time2,deleted2,name,captype,contextlevel,component,riskbitmask) select mhv.instance, mhv.time2, 1, mt.name,mt.captype,mt.contextlevel,mt.component,mt.riskbitmask from mdl_mph_main_view mhv join (select h.id,h.name,h.captype,h.contextlevel,h.component,h.riskbitmask from mdl_mph_ca h join (select id, max(time2) time2 from mdl_mph_ca group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='capabilities' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='capabilities' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.emailteachers,mt.emailothers,mt.savecert,mt.reportcert,mt.delivery,mt.requiredtime,mt.certificatetype,mt.orientation,mt.borderstyle,mt.bordercolor,mt.printwmark,mt.printdate,mt.datefmt,mt.printnumber,mt.printgrade,mt.gradefmt,mt.printoutcome,mt.printhours,mt.printteacher,mt.customtext,mt.printsignature,mt.printseal,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_certificate mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='certificate' 402 Query insert into mdl_mph_ce (id,time2,deleted2,course,name,intro,introformat,emailteachers,emailothers,savecert,reportcert,delivery,requiredtime,certificatetype,orientation,borderstyle,bordercolor,printwmark,printdate,datefmt,printnumber,printgrade,gradefmt,printoutcome,printhours,printteacher,customtext,printsignature,printseal,timecreated,timemodified) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.emailteachers,mt.emailothers,mt.savecert,mt.reportcert,mt.delivery,mt.requiredtime,mt.certificatetype,mt.orientation,mt.borderstyle,mt.bordercolor,mt.printwmark,mt.printdate,mt.datefmt,mt.printnumber,mt.printgrade,mt.gradefmt,mt.printoutcome,mt.printhours,mt.printteacher,mt.customtext,mt.printsignature,mt.printseal,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_certificate mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='certificate' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='certificate' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.emailteachers,mt.emailothers,mt.savecert,mt.reportcert,mt.delivery,mt.requiredtime,mt.certificatetype,mt.orientation,mt.borderstyle,mt.bordercolor,mt.printwmark,mt.printdate,mt.datefmt,mt.printnumber,mt.printgrade,mt.gradefmt,mt.printoutcome,mt.printhours,mt.printteacher,mt.customtext,mt.printsignature,mt.printseal,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_certificate mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='certificate' 402 Query insert into mdl_mph_ce (id,time2,deleted2,course,name,intro,introformat,emailteachers,emailothers,savecert,reportcert,delivery,requiredtime,certificatetype,orientation,borderstyle,bordercolor,printwmark,printdate,datefmt,printnumber,printgrade,gradefmt,printoutcome,printhours,printteacher,customtext,printsignature,printseal,timecreated,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.emailteachers,mt.emailothers,mt.savecert,mt.reportcert,mt.delivery,mt.requiredtime,mt.certificatetype,mt.orientation,mt.borderstyle,mt.bordercolor,mt.printwmark,mt.printdate,mt.datefmt,mt.printnumber,mt.printgrade,mt.gradefmt,mt.printoutcome,mt.printhours,mt.printteacher,mt.customtext,mt.printsignature,mt.printseal,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_certificate mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='certificate' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='certificate' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.emailteachers,mt.emailothers,mt.savecert,mt.reportcert,mt.delivery,mt.requiredtime,mt.certificatetype,mt.orientation,mt.borderstyle,mt.bordercolor,mt.printwmark,mt.printdate,mt.datefmt,mt.printnumber,mt.printgrade,mt.gradefmt,mt.printoutcome,mt.printhours,mt.printteacher,mt.customtext,mt.printsignature,mt.printseal,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.emailteachers,h.emailothers,h.savecert,h.reportcert,h.delivery,h.requiredtime,h.certificatetype,h.orientation,h.borderstyle,h.bordercolor,h.printwmark,h.printdate,h.datefmt,h.printnumber,h.printgrade,h.gradefmt,h.printoutcome,h.printhours,h.printteacher,h.customtext,h.printsignature,h.printseal,h.timecreated,h.timemodified from mdl_mph_ce h join (select id, max(time2) time2 from mdl_mph_ce group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='certificate' 402 Query insert into mdl_mph_ce (id,time2,deleted2,course,name,intro,introformat,emailteachers,emailothers,savecert,reportcert,delivery,requiredtime,certificatetype,orientation,borderstyle,bordercolor,printwmark,printdate,datefmt,printnumber,printgrade,gradefmt,printoutcome,printhours,printteacher,customtext,printsignature,printseal,timecreated,timemodified) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.emailteachers,mt.emailothers,mt.savecert,mt.reportcert,mt.delivery,mt.requiredtime,mt.certificatetype,mt.orientation,mt.borderstyle,mt.bordercolor,mt.printwmark,mt.printdate,mt.datefmt,mt.printnumber,mt.printgrade,mt.gradefmt,mt.printoutcome,mt.printhours,mt.printteacher,mt.customtext,mt.printsignature,mt.printseal,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.emailteachers,h.emailothers,h.savecert,h.reportcert,h.delivery,h.requiredtime,h.certificatetype,h.orientation,h.borderstyle,h.bordercolor,h.printwmark,h.printdate,h.datefmt,h.printnumber,h.printgrade,h.gradefmt,h.printoutcome,h.printhours,h.printteacher,h.customtext,h.printsignature,h.printseal,h.timecreated,h.timemodified from mdl_mph_ce h join (select id, max(time2) time2 from mdl_mph_ce group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='certificate' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='certificate' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.certificateid,mt.code,mt.timecreated from mdl_mph_main_view mhv join mdl_certificate_issues mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='certificate_issues' 402 Query insert into mdl_mph_ce1 (id,time2,deleted2,userid,certificateid,code,timecreated) select mhv.instance, mhv.time2, 0, mt.userid,mt.certificateid,mt.code,mt.timecreated from mdl_mph_main_view mhv join mdl_certificate_issues mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='certificate_issues' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='certificate_issues' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.certificateid,mt.code,mt.timecreated from mdl_mph_main_view mhv join mdl_certificate_issues mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='certificate_issues' 402 Query insert into mdl_mph_ce1 (id,time2,deleted2,userid,certificateid,code,timecreated) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.certificateid,mt.code,mt.timecreated from mdl_mph_main_view mhv join mdl_certificate_issues mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='certificate_issues' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='certificate_issues' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.certificateid,mt.code,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.userid,h.certificateid,h.code,h.timecreated from mdl_mph_ce1 h join (select id, max(time2) time2 from mdl_mph_ce1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='certificate_issues' 402 Query insert into mdl_mph_ce1 (id,time2,deleted2,userid,certificateid,code,timecreated) select mhv.instance, mhv.time2, 1, mt.userid,mt.certificateid,mt.code,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.userid,h.certificateid,h.code,h.timecreated from mdl_mph_ce1 h join (select id, max(time2) time2 from mdl_mph_ce1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='certificate_issues' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='certificate_issues' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.commentarea,mt.itemid,mt.content,mt.format,mt.userid,mt.timecreated from mdl_mph_main_view mhv join mdl_comments mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='comments' 402 Query insert into mdl_mph_co (id,time2,deleted2,contextid,component,commentarea,itemid,content,format,userid,timecreated) select mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.commentarea,mt.itemid,mt.content,mt.format,mt.userid,mt.timecreated from mdl_mph_main_view mhv join mdl_comments mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='comments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='comments' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.commentarea,mt.itemid,mt.content,mt.format,mt.userid,mt.timecreated from mdl_mph_main_view mhv join mdl_comments mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='comments' 402 Query insert into mdl_mph_co (id,time2,deleted2,contextid,component,commentarea,itemid,content,format,userid,timecreated) select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.commentarea,mt.itemid,mt.content,mt.format,mt.userid,mt.timecreated from mdl_mph_main_view mhv join mdl_comments mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='comments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='comments' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contextid,mt.component,mt.commentarea,mt.itemid,mt.content,mt.format,mt.userid,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.contextid,h.component,h.commentarea,h.itemid,h.content,h.format,h.userid,h.timecreated from mdl_mph_co h join (select id, max(time2) time2 from mdl_mph_co group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='comments' 402 Query insert into mdl_mph_co (id,time2,deleted2,contextid,component,commentarea,itemid,content,format,userid,timecreated) select mhv.instance, mhv.time2, 1, mt.contextid,mt.component,mt.commentarea,mt.itemid,mt.content,mt.format,mt.userid,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.contextid,h.component,h.commentarea,h.itemid,h.content,h.format,h.userid,h.timecreated from mdl_mph_co h join (select id, max(time2) time2 from mdl_mph_co group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='comments' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='comments' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.method,mt.value from mdl_mph_main_view mhv join mdl_course_completion_aggr_methd mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_aggr_methd' 402 Query insert into mdl_mph_co1 (id,time2,deleted2,course,criteriatype,method,value) select mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.method,mt.value from mdl_mph_main_view mhv join mdl_course_completion_aggr_methd mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_aggr_methd' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_aggr_methd' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.method,mt.value from mdl_mph_main_view mhv join mdl_course_completion_aggr_methd mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_aggr_methd' 402 Query insert into mdl_mph_co1 (id,time2,deleted2,course,criteriatype,method,value) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.method,mt.value from mdl_mph_main_view mhv join mdl_course_completion_aggr_methd mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_aggr_methd' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_aggr_methd' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.criteriatype,mt.method,mt.value from mdl_mph_main_view mhv join (select h.id,h.course,h.criteriatype,h.method,h.value from mdl_mph_co1 h join (select id, max(time2) time2 from mdl_mph_co1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_aggr_methd' 402 Query insert into mdl_mph_co1 (id,time2,deleted2,course,criteriatype,method,value) select mhv.instance, mhv.time2, 1, mt.course,mt.criteriatype,mt.method,mt.value from mdl_mph_main_view mhv join (select h.id,h.course,h.criteriatype,h.method,h.value from mdl_mph_co1 h join (select id, max(time2) time2 from mdl_mph_co1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_aggr_methd' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_aggr_methd' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.criteriaid,mt.gradefinal,mt.unenroled,mt.timecompleted from mdl_mph_main_view mhv join mdl_course_completion_crit_compl mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_crit_compl' 402 Query insert into mdl_mph_co2 (id,time2,deleted2,userid,course,criteriaid,gradefinal,unenroled,timecompleted) select mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.criteriaid,mt.gradefinal,mt.unenroled,mt.timecompleted from mdl_mph_main_view mhv join mdl_course_completion_crit_compl mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_crit_compl' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_crit_compl' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.criteriaid,mt.gradefinal,mt.unenroled,mt.timecompleted from mdl_mph_main_view mhv join mdl_course_completion_crit_compl mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_crit_compl' 402 Query insert into mdl_mph_co2 (id,time2,deleted2,userid,course,criteriaid,gradefinal,unenroled,timecompleted) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.criteriaid,mt.gradefinal,mt.unenroled,mt.timecompleted from mdl_mph_main_view mhv join mdl_course_completion_crit_compl mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_crit_compl' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_crit_compl' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.course,mt.criteriaid,mt.gradefinal,mt.unenroled,mt.timecompleted from mdl_mph_main_view mhv join (select h.id,h.userid,h.course,h.criteriaid,h.gradefinal,h.unenroled,h.timecompleted from mdl_mph_co2 h join (select id, max(time2) time2 from mdl_mph_co2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_crit_compl' 402 Query insert into mdl_mph_co2 (id,time2,deleted2,userid,course,criteriaid,gradefinal,unenroled,timecompleted) select mhv.instance, mhv.time2, 1, mt.userid,mt.course,mt.criteriaid,mt.gradefinal,mt.unenroled,mt.timecompleted from mdl_mph_main_view mhv join (select h.id,h.userid,h.course,h.criteriaid,h.gradefinal,h.unenroled,h.timecompleted from mdl_mph_co2 h join (select id, max(time2) time2 from mdl_mph_co2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_crit_compl' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_crit_compl' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.module,mt.moduleinstance,mt.courseinstance,mt.enrolperiod,mt.timeend,mt.gradepass,mt.role from mdl_mph_main_view mhv join mdl_course_completion_criteria mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_criteria' 402 Query insert into mdl_mph_co3 (id,time2,deleted2,course,criteriatype,module,moduleinstance,courseinstance,enrolperiod,timeend,gradepass,role) select mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.module,mt.moduleinstance,mt.courseinstance,mt.enrolperiod,mt.timeend,mt.gradepass,mt.role from mdl_mph_main_view mhv join mdl_course_completion_criteria mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_criteria' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_criteria' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.module,mt.moduleinstance,mt.courseinstance,mt.enrolperiod,mt.timeend,mt.gradepass,mt.role from mdl_mph_main_view mhv join mdl_course_completion_criteria mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_criteria' 402 Query insert into mdl_mph_co3 (id,time2,deleted2,course,criteriatype,module,moduleinstance,courseinstance,enrolperiod,timeend,gradepass,role) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.criteriatype,mt.module,mt.moduleinstance,mt.courseinstance,mt.enrolperiod,mt.timeend,mt.gradepass,mt.role from mdl_mph_main_view mhv join mdl_course_completion_criteria mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_criteria' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_criteria' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.criteriatype,mt.module,mt.moduleinstance,mt.courseinstance,mt.enrolperiod,mt.timeend,mt.gradepass,mt.role from mdl_mph_main_view mhv join (select h.id,h.course,h.criteriatype,h.module,h.moduleinstance,h.courseinstance,h.enrolperiod,h.timeend,h.gradepass,h.role from mdl_mph_co3 h join (select id, max(time2) time2 from mdl_mph_co3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_criteria' 402 Query insert into mdl_mph_co3 (id,time2,deleted2,course,criteriatype,module,moduleinstance,courseinstance,enrolperiod,timeend,gradepass,role) select mhv.instance, mhv.time2, 1, mt.course,mt.criteriatype,mt.module,mt.moduleinstance,mt.courseinstance,mt.enrolperiod,mt.timeend,mt.gradepass,mt.role from mdl_mph_main_view mhv join (select h.id,h.course,h.criteriatype,h.module,h.moduleinstance,h.courseinstance,h.enrolperiod,h.timeend,h.gradepass,h.role from mdl_mph_co3 h join (select id, max(time2) time2 from mdl_mph_co3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_criteria' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_criteria' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.completion,mt.completionview,mt.completionusegrade,mt.completionexpected,mt.customrules from mdl_mph_main_view mhv join mdl_course_completion_defaults mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_defaults' 402 Query insert into mdl_mph_co4 (id,time2,deleted2,course,module,completion,completionview,completionusegrade,completionexpected,customrules) select mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.completion,mt.completionview,mt.completionusegrade,mt.completionexpected,mt.customrules from mdl_mph_main_view mhv join mdl_course_completion_defaults mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completion_defaults' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_defaults' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.completion,mt.completionview,mt.completionusegrade,mt.completionexpected,mt.customrules from mdl_mph_main_view mhv join mdl_course_completion_defaults mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_defaults' 402 Query insert into mdl_mph_co4 (id,time2,deleted2,course,module,completion,completionview,completionusegrade,completionexpected,customrules) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.module,mt.completion,mt.completionview,mt.completionusegrade,mt.completionexpected,mt.customrules from mdl_mph_main_view mhv join mdl_course_completion_defaults mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completion_defaults' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_defaults' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.module,mt.completion,mt.completionview,mt.completionusegrade,mt.completionexpected,mt.customrules from mdl_mph_main_view mhv join (select h.id,h.course,h.module,h.completion,h.completionview,h.completionusegrade,h.completionexpected,h.customrules from mdl_mph_co4 h join (select id, max(time2) time2 from mdl_mph_co4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_defaults' 402 Query insert into mdl_mph_co4 (id,time2,deleted2,course,module,completion,completionview,completionusegrade,completionexpected,customrules) select mhv.instance, mhv.time2, 1, mt.course,mt.module,mt.completion,mt.completionview,mt.completionusegrade,mt.completionexpected,mt.customrules from mdl_mph_main_view mhv join (select h.id,h.course,h.module,h.completion,h.completionview,h.completionusegrade,h.completionexpected,h.customrules from mdl_mph_co4 h join (select id, max(time2) time2 from mdl_mph_co4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completion_defaults' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completion_defaults' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.timeenrolled,mt.timestarted,mt.timecompleted,mt.reaggregate from mdl_mph_main_view mhv join mdl_course_completions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completions' 402 Query insert into mdl_mph_co5 (id,time2,deleted2,userid,course,timeenrolled,timestarted,timecompleted,reaggregate) select mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.timeenrolled,mt.timestarted,mt.timecompleted,mt.reaggregate from mdl_mph_main_view mhv join mdl_course_completions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='course_completions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.timeenrolled,mt.timestarted,mt.timecompleted,mt.reaggregate from mdl_mph_main_view mhv join mdl_course_completions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completions' 402 Query insert into mdl_mph_co5 (id,time2,deleted2,userid,course,timeenrolled,timestarted,timecompleted,reaggregate) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.course,mt.timeenrolled,mt.timestarted,mt.timecompleted,mt.reaggregate from mdl_mph_main_view mhv join mdl_course_completions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='course_completions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.course,mt.timeenrolled,mt.timestarted,mt.timecompleted,mt.reaggregate from mdl_mph_main_view mhv join (select h.id,h.userid,h.course,h.timeenrolled,h.timestarted,h.timecompleted,h.reaggregate from mdl_mph_co5 h join (select id, max(time2) time2 from mdl_mph_co5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completions' 402 Query insert into mdl_mph_co5 (id,time2,deleted2,userid,course,timeenrolled,timestarted,timecompleted,reaggregate) select mhv.instance, mhv.time2, 1, mt.userid,mt.course,mt.timeenrolled,mt.timestarted,mt.timecompleted,mt.reaggregate from mdl_mph_main_view mhv join (select h.id,h.userid,h.course,h.timeenrolled,h.timestarted,h.timecompleted,h.reaggregate from mdl_mph_co5 h join (select id, max(time2) time2 from mdl_mph_co5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='course_completions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='course_completions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.format,mt.courseid,mt.groupid,mt.userid,mt.repeatid,mt.modulename,mt.instance,mt.type,mt.eventtype,mt.timestart,mt.timeduration,mt.timesort,mt.visible,mt.uuid,mt.sequence,mt.timemodified,mt.subscriptionid,mt.priority from mdl_mph_main_view mhv join mdl_event mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='event' 402 Query insert into mdl_mph_ev (id,time2,deleted2,name,description,format,courseid,groupid,userid,repeatid,modulename,instance,type,eventtype,timestart,timeduration,timesort,visible,uuid,sequence,timemodified,subscriptionid,priority) select mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.format,mt.courseid,mt.groupid,mt.userid,mt.repeatid,mt.modulename,mt.instance,mt.type,mt.eventtype,mt.timestart,mt.timeduration,mt.timesort,mt.visible,mt.uuid,mt.sequence,mt.timemodified,mt.subscriptionid,mt.priority from mdl_mph_main_view mhv join mdl_event mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='event' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='event' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.format,mt.courseid,mt.groupid,mt.userid,mt.repeatid,mt.modulename,mt.instance,mt.type,mt.eventtype,mt.timestart,mt.timeduration,mt.timesort,mt.visible,mt.uuid,mt.sequence,mt.timemodified,mt.subscriptionid,mt.priority from mdl_mph_main_view mhv join mdl_event mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='event' 402 Query insert into mdl_mph_ev (id,time2,deleted2,name,description,format,courseid,groupid,userid,repeatid,modulename,instance,type,eventtype,timestart,timeduration,timesort,visible,uuid,sequence,timemodified,subscriptionid,priority) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.format,mt.courseid,mt.groupid,mt.userid,mt.repeatid,mt.modulename,mt.instance,mt.type,mt.eventtype,mt.timestart,mt.timeduration,mt.timesort,mt.visible,mt.uuid,mt.sequence,mt.timemodified,mt.subscriptionid,mt.priority from mdl_mph_main_view mhv join mdl_event mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='event' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='event' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.description,mt.format,mt.courseid,mt.groupid,mt.userid,mt.repeatid,mt.modulename,mt.instance,mt.type,mt.eventtype,mt.timestart,mt.timeduration,mt.timesort,mt.visible,mt.uuid,mt.sequence,mt.timemodified,mt.subscriptionid,mt.priority from mdl_mph_main_view mhv join (select h.id,h.name,h.description,h.format,h.courseid,h.groupid,h.userid,h.repeatid,h.modulename,h.instance,h.type,h.eventtype,h.timestart,h.timeduration,h.timesort,h.visible,h.uuid,h.sequence,h.timemodified,h.subscriptionid,h.priority from mdl_mph_ev h join (select id, max(time2) time2 from mdl_mph_ev group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='event' 402 Query insert into mdl_mph_ev (id,time2,deleted2,name,description,format,courseid,groupid,userid,repeatid,modulename,instance,type,eventtype,timestart,timeduration,timesort,visible,uuid,sequence,timemodified,subscriptionid,priority) select mhv.instance, mhv.time2, 1, mt.name,mt.description,mt.format,mt.courseid,mt.groupid,mt.userid,mt.repeatid,mt.modulename,mt.instance,mt.type,mt.eventtype,mt.timestart,mt.timeduration,mt.timesort,mt.visible,mt.uuid,mt.sequence,mt.timemodified,mt.subscriptionid,mt.priority from mdl_mph_main_view mhv join (select h.id,h.name,h.description,h.format,h.courseid,h.groupid,h.userid,h.repeatid,h.modulename,h.instance,h.type,h.eventtype,h.timestart,h.timeduration,h.timesort,h.visible,h.uuid,h.sequence,h.timemodified,h.subscriptionid,h.priority from mdl_mph_ev h join (select id, max(time2) time2 from mdl_mph_ev group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='event' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='event' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.classname,mt.methodname,mt.classpath,mt.component,mt.capabilities,mt.services from mdl_mph_main_view mhv join mdl_external_functions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_functions' 402 Query insert into mdl_mph_ex (id,time2,deleted2,name,classname,methodname,classpath,component,capabilities,services) select mhv.instance, mhv.time2, 0, mt.name,mt.classname,mt.methodname,mt.classpath,mt.component,mt.capabilities,mt.services from mdl_mph_main_view mhv join mdl_external_functions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_functions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_functions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.classname,mt.methodname,mt.classpath,mt.component,mt.capabilities,mt.services from mdl_mph_main_view mhv join mdl_external_functions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_functions' 402 Query insert into mdl_mph_ex (id,time2,deleted2,name,classname,methodname,classpath,component,capabilities,services) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.classname,mt.methodname,mt.classpath,mt.component,mt.capabilities,mt.services from mdl_mph_main_view mhv join mdl_external_functions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_functions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_functions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.classname,mt.methodname,mt.classpath,mt.component,mt.capabilities,mt.services from mdl_mph_main_view mhv join (select h.id,h.name,h.classname,h.methodname,h.classpath,h.component,h.capabilities,h.services from mdl_mph_ex h join (select id, max(time2) time2 from mdl_mph_ex group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_functions' 402 Query insert into mdl_mph_ex (id,time2,deleted2,name,classname,methodname,classpath,component,capabilities,services) select mhv.instance, mhv.time2, 1, mt.name,mt.classname,mt.methodname,mt.classpath,mt.component,mt.capabilities,mt.services from mdl_mph_main_view mhv join (select h.id,h.name,h.classname,h.methodname,h.classpath,h.component,h.capabilities,h.services from mdl_mph_ex h join (select id, max(time2) time2 from mdl_mph_ex group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_functions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_functions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.enabled,mt.requiredcapability,mt.restrictedusers,mt.component,mt.timecreated,mt.timemodified,mt.shortname,mt.downloadfiles,mt.uploadfiles from mdl_mph_main_view mhv join mdl_external_services mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_services' 402 Query insert into mdl_mph_ex1 (id,time2,deleted2,name,enabled,requiredcapability,restrictedusers,component,timecreated,timemodified,shortname,downloadfiles,uploadfiles) select mhv.instance, mhv.time2, 0, mt.name,mt.enabled,mt.requiredcapability,mt.restrictedusers,mt.component,mt.timecreated,mt.timemodified,mt.shortname,mt.downloadfiles,mt.uploadfiles from mdl_mph_main_view mhv join mdl_external_services mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_services' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_services' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.enabled,mt.requiredcapability,mt.restrictedusers,mt.component,mt.timecreated,mt.timemodified,mt.shortname,mt.downloadfiles,mt.uploadfiles from mdl_mph_main_view mhv join mdl_external_services mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_services' 402 Query insert into mdl_mph_ex1 (id,time2,deleted2,name,enabled,requiredcapability,restrictedusers,component,timecreated,timemodified,shortname,downloadfiles,uploadfiles) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.enabled,mt.requiredcapability,mt.restrictedusers,mt.component,mt.timecreated,mt.timemodified,mt.shortname,mt.downloadfiles,mt.uploadfiles from mdl_mph_main_view mhv join mdl_external_services mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_services' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_services' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.enabled,mt.requiredcapability,mt.restrictedusers,mt.component,mt.timecreated,mt.timemodified,mt.shortname,mt.downloadfiles,mt.uploadfiles from mdl_mph_main_view mhv join (select h.id,h.name,h.enabled,h.requiredcapability,h.restrictedusers,h.component,h.timecreated,h.timemodified,h.shortname,h.downloadfiles,h.uploadfiles from mdl_mph_ex1 h join (select id, max(time2) time2 from mdl_mph_ex1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_services' 402 Query insert into mdl_mph_ex1 (id,time2,deleted2,name,enabled,requiredcapability,restrictedusers,component,timecreated,timemodified,shortname,downloadfiles,uploadfiles) select mhv.instance, mhv.time2, 1, mt.name,mt.enabled,mt.requiredcapability,mt.restrictedusers,mt.component,mt.timecreated,mt.timemodified,mt.shortname,mt.downloadfiles,mt.uploadfiles from mdl_mph_main_view mhv join (select h.id,h.name,h.enabled,h.requiredcapability,h.restrictedusers,h.component,h.timecreated,h.timemodified,h.shortname,h.downloadfiles,h.uploadfiles from mdl_mph_ex1 h join (select id, max(time2) time2 from mdl_mph_ex1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_services' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_services' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.externalserviceid,mt.functionname from mdl_mph_main_view mhv join mdl_external_services_functions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_services_functions' 402 Query insert into mdl_mph_ex2 (id,time2,deleted2,externalserviceid,functionname) select mhv.instance, mhv.time2, 0, mt.externalserviceid,mt.functionname from mdl_mph_main_view mhv join mdl_external_services_functions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_services_functions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_services_functions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.externalserviceid,mt.functionname from mdl_mph_main_view mhv join mdl_external_services_functions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_services_functions' 402 Query insert into mdl_mph_ex2 (id,time2,deleted2,externalserviceid,functionname) select distinct mhv.instance, mhv.time2, 0, mt.externalserviceid,mt.functionname from mdl_mph_main_view mhv join mdl_external_services_functions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_services_functions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_services_functions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.externalserviceid,mt.functionname from mdl_mph_main_view mhv join (select h.id,h.externalserviceid,h.functionname from mdl_mph_ex2 h join (select id, max(time2) time2 from mdl_mph_ex2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_services_functions' 402 Query insert into mdl_mph_ex2 (id,time2,deleted2,externalserviceid,functionname) select mhv.instance, mhv.time2, 1, mt.externalserviceid,mt.functionname from mdl_mph_main_view mhv join (select h.id,h.externalserviceid,h.functionname from mdl_mph_ex2 h join (select id, max(time2) time2 from mdl_mph_ex2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_services_functions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_services_functions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.token,mt.tokentype,mt.userid,mt.externalserviceid,mt.sid,mt.contextid,mt.creatorid,mt.iprestriction,mt.validuntil,mt.timecreated,mt.lastaccess,mt.privatetoken from mdl_mph_main_view mhv join mdl_external_tokens mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_tokens' 402 Query insert into mdl_mph_ex3 (id,time2,deleted2,token,tokentype,userid,externalserviceid,sid,contextid,creatorid,iprestriction,validuntil,timecreated,lastaccess,privatetoken) select mhv.instance, mhv.time2, 0, mt.token,mt.tokentype,mt.userid,mt.externalserviceid,mt.sid,mt.contextid,mt.creatorid,mt.iprestriction,mt.validuntil,mt.timecreated,mt.lastaccess,mt.privatetoken from mdl_mph_main_view mhv join mdl_external_tokens mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='external_tokens' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_tokens' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.token,mt.tokentype,mt.userid,mt.externalserviceid,mt.sid,mt.contextid,mt.creatorid,mt.iprestriction,mt.validuntil,mt.timecreated,mt.lastaccess,mt.privatetoken from mdl_mph_main_view mhv join mdl_external_tokens mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_tokens' 402 Query insert into mdl_mph_ex3 (id,time2,deleted2,token,tokentype,userid,externalserviceid,sid,contextid,creatorid,iprestriction,validuntil,timecreated,lastaccess,privatetoken) select distinct mhv.instance, mhv.time2, 0, mt.token,mt.tokentype,mt.userid,mt.externalserviceid,mt.sid,mt.contextid,mt.creatorid,mt.iprestriction,mt.validuntil,mt.timecreated,mt.lastaccess,mt.privatetoken from mdl_mph_main_view mhv join mdl_external_tokens mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='external_tokens' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_tokens' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.token,mt.tokentype,mt.userid,mt.externalserviceid,mt.sid,mt.contextid,mt.creatorid,mt.iprestriction,mt.validuntil,mt.timecreated,mt.lastaccess,mt.privatetoken from mdl_mph_main_view mhv join (select h.id,h.token,h.tokentype,h.userid,h.externalserviceid,h.sid,h.contextid,h.creatorid,h.iprestriction,h.validuntil,h.timecreated,h.lastaccess,h.privatetoken from mdl_mph_ex3 h join (select id, max(time2) time2 from mdl_mph_ex3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_tokens' 402 Query insert into mdl_mph_ex3 (id,time2,deleted2,token,tokentype,userid,externalserviceid,sid,contextid,creatorid,iprestriction,validuntil,timecreated,lastaccess,privatetoken) select mhv.instance, mhv.time2, 1, mt.token,mt.tokentype,mt.userid,mt.externalserviceid,mt.sid,mt.contextid,mt.creatorid,mt.iprestriction,mt.validuntil,mt.timecreated,mt.lastaccess,mt.privatetoken from mdl_mph_main_view mhv join (select h.id,h.token,h.tokentype,h.userid,h.externalserviceid,h.sid,h.contextid,h.creatorid,h.iprestriction,h.validuntil,h.timecreated,h.lastaccess,h.privatetoken from mdl_mph_ex3 h join (select id, max(time2) time2 from mdl_mph_ex3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='external_tokens' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='external_tokens' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.anonymous,mt.email_notification,mt.multiple_submit,mt.autonumbering,mt.site_after_submit,mt.page_after_submit,mt.page_after_submitformat,mt.publish_stats,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionsubmit from mdl_mph_main_view mhv join mdl_feedback mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback' 402 Query insert into mdl_mph_fe (id,time2,deleted2,course,name,intro,introformat,anonymous,email_notification,multiple_submit,autonumbering,site_after_submit,page_after_submit,page_after_submitformat,publish_stats,timeopen,timeclose,timemodified,completionsubmit) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.anonymous,mt.email_notification,mt.multiple_submit,mt.autonumbering,mt.site_after_submit,mt.page_after_submit,mt.page_after_submitformat,mt.publish_stats,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionsubmit from mdl_mph_main_view mhv join mdl_feedback mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.anonymous,mt.email_notification,mt.multiple_submit,mt.autonumbering,mt.site_after_submit,mt.page_after_submit,mt.page_after_submitformat,mt.publish_stats,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionsubmit from mdl_mph_main_view mhv join mdl_feedback mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback' 402 Query insert into mdl_mph_fe (id,time2,deleted2,course,name,intro,introformat,anonymous,email_notification,multiple_submit,autonumbering,site_after_submit,page_after_submit,page_after_submitformat,publish_stats,timeopen,timeclose,timemodified,completionsubmit) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.anonymous,mt.email_notification,mt.multiple_submit,mt.autonumbering,mt.site_after_submit,mt.page_after_submit,mt.page_after_submitformat,mt.publish_stats,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionsubmit from mdl_mph_main_view mhv join mdl_feedback mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.anonymous,mt.email_notification,mt.multiple_submit,mt.autonumbering,mt.site_after_submit,mt.page_after_submit,mt.page_after_submitformat,mt.publish_stats,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionsubmit from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.anonymous,h.email_notification,h.multiple_submit,h.autonumbering,h.site_after_submit,h.page_after_submit,h.page_after_submitformat,h.publish_stats,h.timeopen,h.timeclose,h.timemodified,h.completionsubmit from mdl_mph_fe h join (select id, max(time2) time2 from mdl_mph_fe group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback' 402 Query insert into mdl_mph_fe (id,time2,deleted2,course,name,intro,introformat,anonymous,email_notification,multiple_submit,autonumbering,site_after_submit,page_after_submit,page_after_submitformat,publish_stats,timeopen,timeclose,timemodified,completionsubmit) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.anonymous,mt.email_notification,mt.multiple_submit,mt.autonumbering,mt.site_after_submit,mt.page_after_submit,mt.page_after_submitformat,mt.publish_stats,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionsubmit from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.anonymous,h.email_notification,h.multiple_submit,h.autonumbering,h.site_after_submit,h.page_after_submit,h.page_after_submitformat,h.publish_stats,h.timeopen,h.timeclose,h.timemodified,h.completionsubmit from mdl_mph_fe h join (select id, max(time2) time2 from mdl_mph_fe group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.feedback,mt.userid,mt.timemodified,mt.random_response,mt.anonymous_response,mt.courseid from mdl_mph_main_view mhv join mdl_feedback_completed mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback_completed' 402 Query insert into mdl_mph_fe1 (id,time2,deleted2,feedback,userid,timemodified,random_response,anonymous_response,courseid) select mhv.instance, mhv.time2, 0, mt.feedback,mt.userid,mt.timemodified,mt.random_response,mt.anonymous_response,mt.courseid from mdl_mph_main_view mhv join mdl_feedback_completed mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback_completed' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_completed' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.feedback,mt.userid,mt.timemodified,mt.random_response,mt.anonymous_response,mt.courseid from mdl_mph_main_view mhv join mdl_feedback_completed mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback_completed' 402 Query insert into mdl_mph_fe1 (id,time2,deleted2,feedback,userid,timemodified,random_response,anonymous_response,courseid) select distinct mhv.instance, mhv.time2, 0, mt.feedback,mt.userid,mt.timemodified,mt.random_response,mt.anonymous_response,mt.courseid from mdl_mph_main_view mhv join mdl_feedback_completed mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback_completed' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_completed' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.feedback,mt.userid,mt.timemodified,mt.random_response,mt.anonymous_response,mt.courseid from mdl_mph_main_view mhv join (select h.id,h.feedback,h.userid,h.timemodified,h.random_response,h.anonymous_response,h.courseid from mdl_mph_fe1 h join (select id, max(time2) time2 from mdl_mph_fe1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback_completed' 402 Query insert into mdl_mph_fe1 (id,time2,deleted2,feedback,userid,timemodified,random_response,anonymous_response,courseid) select mhv.instance, mhv.time2, 1, mt.feedback,mt.userid,mt.timemodified,mt.random_response,mt.anonymous_response,mt.courseid from mdl_mph_main_view mhv join (select h.id,h.feedback,h.userid,h.timemodified,h.random_response,h.anonymous_response,h.courseid from mdl_mph_fe1 h join (select id, max(time2) time2 from mdl_mph_fe1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback_completed' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_completed' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.feedback,mt.template,mt.name,mt.label,mt.presentation,mt.typ,mt.hasvalue,mt.position,mt.required,mt.dependitem,mt.dependvalue,mt.options from mdl_mph_main_view mhv join mdl_feedback_item mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback_item' 402 Query insert into mdl_mph_fe2 (id,time2,deleted2,feedback,template,name,label,presentation,typ,hasvalue,position,required,dependitem,dependvalue,options) select mhv.instance, mhv.time2, 0, mt.feedback,mt.template,mt.name,mt.label,mt.presentation,mt.typ,mt.hasvalue,mt.position,mt.required,mt.dependitem,mt.dependvalue,mt.options from mdl_mph_main_view mhv join mdl_feedback_item mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback_item' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_item' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.feedback,mt.template,mt.name,mt.label,mt.presentation,mt.typ,mt.hasvalue,mt.position,mt.required,mt.dependitem,mt.dependvalue,mt.options from mdl_mph_main_view mhv join mdl_feedback_item mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback_item' 402 Query insert into mdl_mph_fe2 (id,time2,deleted2,feedback,template,name,label,presentation,typ,hasvalue,position,required,dependitem,dependvalue,options) select distinct mhv.instance, mhv.time2, 0, mt.feedback,mt.template,mt.name,mt.label,mt.presentation,mt.typ,mt.hasvalue,mt.position,mt.required,mt.dependitem,mt.dependvalue,mt.options from mdl_mph_main_view mhv join mdl_feedback_item mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback_item' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_item' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.feedback,mt.template,mt.name,mt.label,mt.presentation,mt.typ,mt.hasvalue,mt.position,mt.required,mt.dependitem,mt.dependvalue,mt.options from mdl_mph_main_view mhv join (select h.id,h.feedback,h.template,h.name,h.label,h.presentation,h.typ,h.hasvalue,h.position,h.required,h.dependitem,h.dependvalue,h.options from mdl_mph_fe2 h join (select id, max(time2) time2 from mdl_mph_fe2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback_item' 402 Query insert into mdl_mph_fe2 (id,time2,deleted2,feedback,template,name,label,presentation,typ,hasvalue,position,required,dependitem,dependvalue,options) select mhv.instance, mhv.time2, 1, mt.feedback,mt.template,mt.name,mt.label,mt.presentation,mt.typ,mt.hasvalue,mt.position,mt.required,mt.dependitem,mt.dependvalue,mt.options from mdl_mph_main_view mhv join (select h.id,h.feedback,h.template,h.name,h.label,h.presentation,h.typ,h.hasvalue,h.position,h.required,h.dependitem,h.dependvalue,h.options from mdl_mph_fe2 h join (select id, max(time2) time2 from mdl_mph_fe2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback_item' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_item' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course_id,mt.item,mt.completed,mt.tmp_completed,mt.value from mdl_mph_main_view mhv join mdl_feedback_value mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback_value' 402 Query insert into mdl_mph_fe3 (id,time2,deleted2,course_id,item,completed,tmp_completed,value) select mhv.instance, mhv.time2, 0, mt.course_id,mt.item,mt.completed,mt.tmp_completed,mt.value from mdl_mph_main_view mhv join mdl_feedback_value mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='feedback_value' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_value' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course_id,mt.item,mt.completed,mt.tmp_completed,mt.value from mdl_mph_main_view mhv join mdl_feedback_value mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback_value' 402 Query insert into mdl_mph_fe3 (id,time2,deleted2,course_id,item,completed,tmp_completed,value) select distinct mhv.instance, mhv.time2, 0, mt.course_id,mt.item,mt.completed,mt.tmp_completed,mt.value from mdl_mph_main_view mhv join mdl_feedback_value mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='feedback_value' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_value' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course_id,mt.item,mt.completed,mt.tmp_completed,mt.value from mdl_mph_main_view mhv join (select h.id,h.course_id,h.item,h.completed,h.tmp_completed,h.value from mdl_mph_fe3 h join (select id, max(time2) time2 from mdl_mph_fe3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback_value' 402 Query insert into mdl_mph_fe3 (id,time2,deleted2,course_id,item,completed,tmp_completed,value) select mhv.instance, mhv.time2, 1, mt.course_id,mt.item,mt.completed,mt.tmp_completed,mt.value from mdl_mph_main_view mhv join (select h.id,h.course_id,h.item,h.completed,h.tmp_completed,h.value from mdl_mph_fe3 h join (select id, max(time2) time2 from mdl_mph_fe3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='feedback_value' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='feedback_value' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contenthash,mt.pathnamehash,mt.contextid,mt.component,mt.filearea,mt.itemid,mt.filepath,mt.filename,mt.userid,mt.filesize,mt.mimetype,mt.status,mt.source,mt.author,mt.license,mt.timecreated,mt.timemodified,mt.sortorder,mt.referencefileid from mdl_mph_main_view mhv join mdl_files mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='files' 402 Query insert into mdl_mph_fi (id,time2,deleted2,contenthash,pathnamehash,contextid,component,filearea,itemid,filepath,filename,userid,filesize,mimetype,status,source,author,license,timecreated,timemodified,sortorder,referencefileid) select mhv.instance, mhv.time2, 0, mt.contenthash,mt.pathnamehash,mt.contextid,mt.component,mt.filearea,mt.itemid,mt.filepath,mt.filename,mt.userid,mt.filesize,mt.mimetype,mt.status,mt.source,mt.author,mt.license,mt.timecreated,mt.timemodified,mt.sortorder,mt.referencefileid from mdl_mph_main_view mhv join mdl_files mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='files' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='files' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contenthash,mt.pathnamehash,mt.contextid,mt.component,mt.filearea,mt.itemid,mt.filepath,mt.filename,mt.userid,mt.filesize,mt.mimetype,mt.status,mt.source,mt.author,mt.license,mt.timecreated,mt.timemodified,mt.sortorder,mt.referencefileid from mdl_mph_main_view mhv join mdl_files mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='files' 402 Query insert into mdl_mph_fi (id,time2,deleted2,contenthash,pathnamehash,contextid,component,filearea,itemid,filepath,filename,userid,filesize,mimetype,status,source,author,license,timecreated,timemodified,sortorder,referencefileid) select distinct mhv.instance, mhv.time2, 0, mt.contenthash,mt.pathnamehash,mt.contextid,mt.component,mt.filearea,mt.itemid,mt.filepath,mt.filename,mt.userid,mt.filesize,mt.mimetype,mt.status,mt.source,mt.author,mt.license,mt.timecreated,mt.timemodified,mt.sortorder,mt.referencefileid from mdl_mph_main_view mhv join mdl_files mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='files' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='files' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contenthash,mt.pathnamehash,mt.contextid,mt.component,mt.filearea,mt.itemid,mt.filepath,mt.filename,mt.userid,mt.filesize,mt.mimetype,mt.status,mt.source,mt.author,mt.license,mt.timecreated,mt.timemodified,mt.sortorder,mt.referencefileid from mdl_mph_main_view mhv join (select h.id,h.contenthash,h.pathnamehash,h.contextid,h.component,h.filearea,h.itemid,h.filepath,h.filename,h.userid,h.filesize,h.mimetype,h.status,h.source,h.author,h.license,h.timecreated,h.timemodified,h.sortorder,h.referencefileid from mdl_mph_fi h join (select id, max(time2) time2 from mdl_mph_fi group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='files' 402 Query insert into mdl_mph_fi (id,time2,deleted2,contenthash,pathnamehash,contextid,component,filearea,itemid,filepath,filename,userid,filesize,mimetype,status,source,author,license,timecreated,timemodified,sortorder,referencefileid) select mhv.instance, mhv.time2, 1, mt.contenthash,mt.pathnamehash,mt.contextid,mt.component,mt.filearea,mt.itemid,mt.filepath,mt.filename,mt.userid,mt.filesize,mt.mimetype,mt.status,mt.source,mt.author,mt.license,mt.timecreated,mt.timemodified,mt.sortorder,mt.referencefileid from mdl_mph_main_view mhv join (select h.id,h.contenthash,h.pathnamehash,h.contextid,h.component,h.filearea,h.itemid,h.filepath,h.filename,h.userid,h.filesize,h.mimetype,h.status,h.source,h.author,h.license,h.timecreated,h.timemodified,h.sortorder,h.referencefileid from mdl_mph_fi h join (select id, max(time2) time2 from mdl_mph_fi group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='files' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='files' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.filter,mt.contextid,mt.active,mt.sortorder from mdl_mph_main_view mhv join mdl_filter_active mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='filter_active' 402 Query insert into mdl_mph_fi1 (id,time2,deleted2,filter,contextid,active,sortorder) select mhv.instance, mhv.time2, 0, mt.filter,mt.contextid,mt.active,mt.sortorder from mdl_mph_main_view mhv join mdl_filter_active mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='filter_active' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='filter_active' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.filter,mt.contextid,mt.active,mt.sortorder from mdl_mph_main_view mhv join mdl_filter_active mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='filter_active' 402 Query insert into mdl_mph_fi1 (id,time2,deleted2,filter,contextid,active,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.filter,mt.contextid,mt.active,mt.sortorder from mdl_mph_main_view mhv join mdl_filter_active mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='filter_active' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='filter_active' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.filter,mt.contextid,mt.active,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.filter,h.contextid,h.active,h.sortorder from mdl_mph_fi1 h join (select id, max(time2) time2 from mdl_mph_fi1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='filter_active' 402 Query insert into mdl_mph_fi1 (id,time2,deleted2,filter,contextid,active,sortorder) select mhv.instance, mhv.time2, 1, mt.filter,mt.contextid,mt.active,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.filter,h.contextid,h.active,h.sortorder from mdl_mph_fi1 h join (select id, max(time2) time2 from mdl_mph_fi1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='filter_active' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='filter_active' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.revision,mt.showexpanded,mt.showdownloadfolder,mt.timemodified,mt.display from mdl_mph_main_view mhv join mdl_folder mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='folder' 402 Query insert into mdl_mph_fo (id,time2,deleted2,course,name,intro,introformat,revision,showexpanded,showdownloadfolder,timemodified,display) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.revision,mt.showexpanded,mt.showdownloadfolder,mt.timemodified,mt.display from mdl_mph_main_view mhv join mdl_folder mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='folder' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='folder' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.revision,mt.showexpanded,mt.showdownloadfolder,mt.timemodified,mt.display from mdl_mph_main_view mhv join mdl_folder mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='folder' 402 Query insert into mdl_mph_fo (id,time2,deleted2,course,name,intro,introformat,revision,showexpanded,showdownloadfolder,timemodified,display) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.revision,mt.showexpanded,mt.showdownloadfolder,mt.timemodified,mt.display from mdl_mph_main_view mhv join mdl_folder mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='folder' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='folder' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.revision,mt.showexpanded,mt.showdownloadfolder,mt.timemodified,mt.display from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.revision,h.showexpanded,h.showdownloadfolder,h.timemodified,h.display from mdl_mph_fo h join (select id, max(time2) time2 from mdl_mph_fo group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='folder' 402 Query insert into mdl_mph_fo (id,time2,deleted2,course,name,intro,introformat,revision,showexpanded,showdownloadfolder,timemodified,display) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.revision,mt.showexpanded,mt.showdownloadfolder,mt.timemodified,mt.display from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.revision,h.showexpanded,h.showdownloadfolder,h.timemodified,h.display from mdl_mph_fo h join (select id, max(time2) time2 from mdl_mph_fo group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='folder' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='folder' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.type,mt.name,mt.intro,mt.introformat,mt.assessed,mt.assesstimestart,mt.assesstimefinish,mt.scale,mt.maxbytes,mt.maxattachments,mt.forcesubscribe,mt.trackingtype,mt.rsstype,mt.rssarticles,mt.timemodified,mt.warnafter,mt.blockafter,mt.blockperiod,mt.completiondiscussions,mt.completionreplies,mt.completionposts,mt.displaywordcount,mt.lockdiscussionafter from mdl_mph_main_view mhv join mdl_forum mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum' 402 Query insert into mdl_mph_fo1 (id,time2,deleted2,course,type,name,intro,introformat,assessed,assesstimestart,assesstimefinish,scale,maxbytes,maxattachments,forcesubscribe,trackingtype,rsstype,rssarticles,timemodified,warnafter,blockafter,blockperiod,completiondiscussions,completionreplies,completionposts,displaywordcount,lockdiscussionafter) select mhv.instance, mhv.time2, 0, mt.course,mt.type,mt.name,mt.intro,mt.introformat,mt.assessed,mt.assesstimestart,mt.assesstimefinish,mt.scale,mt.maxbytes,mt.maxattachments,mt.forcesubscribe,mt.trackingtype,mt.rsstype,mt.rssarticles,mt.timemodified,mt.warnafter,mt.blockafter,mt.blockperiod,mt.completiondiscussions,mt.completionreplies,mt.completionposts,mt.displaywordcount,mt.lockdiscussionafter from mdl_mph_main_view mhv join mdl_forum mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.type,mt.name,mt.intro,mt.introformat,mt.assessed,mt.assesstimestart,mt.assesstimefinish,mt.scale,mt.maxbytes,mt.maxattachments,mt.forcesubscribe,mt.trackingtype,mt.rsstype,mt.rssarticles,mt.timemodified,mt.warnafter,mt.blockafter,mt.blockperiod,mt.completiondiscussions,mt.completionreplies,mt.completionposts,mt.displaywordcount,mt.lockdiscussionafter from mdl_mph_main_view mhv join mdl_forum mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum' 402 Query insert into mdl_mph_fo1 (id,time2,deleted2,course,type,name,intro,introformat,assessed,assesstimestart,assesstimefinish,scale,maxbytes,maxattachments,forcesubscribe,trackingtype,rsstype,rssarticles,timemodified,warnafter,blockafter,blockperiod,completiondiscussions,completionreplies,completionposts,displaywordcount,lockdiscussionafter) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.type,mt.name,mt.intro,mt.introformat,mt.assessed,mt.assesstimestart,mt.assesstimefinish,mt.scale,mt.maxbytes,mt.maxattachments,mt.forcesubscribe,mt.trackingtype,mt.rsstype,mt.rssarticles,mt.timemodified,mt.warnafter,mt.blockafter,mt.blockperiod,mt.completiondiscussions,mt.completionreplies,mt.completionposts,mt.displaywordcount,mt.lockdiscussionafter from mdl_mph_main_view mhv join mdl_forum mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.type,mt.name,mt.intro,mt.introformat,mt.assessed,mt.assesstimestart,mt.assesstimefinish,mt.scale,mt.maxbytes,mt.maxattachments,mt.forcesubscribe,mt.trackingtype,mt.rsstype,mt.rssarticles,mt.timemodified,mt.warnafter,mt.blockafter,mt.blockperiod,mt.completiondiscussions,mt.completionreplies,mt.completionposts,mt.displaywordcount,mt.lockdiscussionafter from mdl_mph_main_view mhv join (select h.id,h.course,h.type,h.name,h.intro,h.introformat,h.assessed,h.assesstimestart,h.assesstimefinish,h.scale,h.maxbytes,h.maxattachments,h.forcesubscribe,h.trackingtype,h.rsstype,h.rssarticles,h.timemodified,h.warnafter,h.blockafter,h.blockperiod,h.completiondiscussions,h.completionreplies,h.completionposts,h.displaywordcount,h.lockdiscussionafter from mdl_mph_fo1 h join (select id, max(time2) time2 from mdl_mph_fo1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum' 402 Query insert into mdl_mph_fo1 (id,time2,deleted2,course,type,name,intro,introformat,assessed,assesstimestart,assesstimefinish,scale,maxbytes,maxattachments,forcesubscribe,trackingtype,rsstype,rssarticles,timemodified,warnafter,blockafter,blockperiod,completiondiscussions,completionreplies,completionposts,displaywordcount,lockdiscussionafter) select mhv.instance, mhv.time2, 1, mt.course,mt.type,mt.name,mt.intro,mt.introformat,mt.assessed,mt.assesstimestart,mt.assesstimefinish,mt.scale,mt.maxbytes,mt.maxattachments,mt.forcesubscribe,mt.trackingtype,mt.rsstype,mt.rssarticles,mt.timemodified,mt.warnafter,mt.blockafter,mt.blockperiod,mt.completiondiscussions,mt.completionreplies,mt.completionposts,mt.displaywordcount,mt.lockdiscussionafter from mdl_mph_main_view mhv join (select h.id,h.course,h.type,h.name,h.intro,h.introformat,h.assessed,h.assesstimestart,h.assesstimefinish,h.scale,h.maxbytes,h.maxattachments,h.forcesubscribe,h.trackingtype,h.rsstype,h.rssarticles,h.timemodified,h.warnafter,h.blockafter,h.blockperiod,h.completiondiscussions,h.completionreplies,h.completionposts,h.displaywordcount,h.lockdiscussionafter from mdl_mph_fo1 h join (select id, max(time2) time2 from mdl_mph_fo1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.forum,mt.name,mt.firstpost,mt.userid,mt.groupid,mt.assessed,mt.timemodified,mt.usermodified,mt.timestart,mt.timeend,mt.pinned from mdl_mph_main_view mhv join mdl_forum_discussions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum_discussions' 402 Query insert into mdl_mph_fo2 (id,time2,deleted2,course,forum,name,firstpost,userid,groupid,assessed,timemodified,usermodified,timestart,timeend,pinned) select mhv.instance, mhv.time2, 0, mt.course,mt.forum,mt.name,mt.firstpost,mt.userid,mt.groupid,mt.assessed,mt.timemodified,mt.usermodified,mt.timestart,mt.timeend,mt.pinned from mdl_mph_main_view mhv join mdl_forum_discussions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum_discussions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_discussions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.forum,mt.name,mt.firstpost,mt.userid,mt.groupid,mt.assessed,mt.timemodified,mt.usermodified,mt.timestart,mt.timeend,mt.pinned from mdl_mph_main_view mhv join mdl_forum_discussions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum_discussions' 402 Query insert into mdl_mph_fo2 (id,time2,deleted2,course,forum,name,firstpost,userid,groupid,assessed,timemodified,usermodified,timestart,timeend,pinned) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.forum,mt.name,mt.firstpost,mt.userid,mt.groupid,mt.assessed,mt.timemodified,mt.usermodified,mt.timestart,mt.timeend,mt.pinned from mdl_mph_main_view mhv join mdl_forum_discussions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum_discussions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_discussions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.forum,mt.name,mt.firstpost,mt.userid,mt.groupid,mt.assessed,mt.timemodified,mt.usermodified,mt.timestart,mt.timeend,mt.pinned from mdl_mph_main_view mhv join (select h.id,h.course,h.forum,h.name,h.firstpost,h.userid,h.groupid,h.assessed,h.timemodified,h.usermodified,h.timestart,h.timeend,h.pinned from mdl_mph_fo2 h join (select id, max(time2) time2 from mdl_mph_fo2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum_discussions' 402 Query insert into mdl_mph_fo2 (id,time2,deleted2,course,forum,name,firstpost,userid,groupid,assessed,timemodified,usermodified,timestart,timeend,pinned) select mhv.instance, mhv.time2, 1, mt.course,mt.forum,mt.name,mt.firstpost,mt.userid,mt.groupid,mt.assessed,mt.timemodified,mt.usermodified,mt.timestart,mt.timeend,mt.pinned from mdl_mph_main_view mhv join (select h.id,h.course,h.forum,h.name,h.firstpost,h.userid,h.groupid,h.assessed,h.timemodified,h.usermodified,h.timestart,h.timeend,h.pinned from mdl_mph_fo2 h join (select id, max(time2) time2 from mdl_mph_fo2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum_discussions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_discussions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.discussion,mt.parent,mt.userid,mt.created,mt.modified,mt.mailed,mt.subject,mt.message,mt.messageformat,mt.messagetrust,mt.attachment,mt.totalscore,mt.mailnow,mt.deleted from mdl_mph_main_view mhv join mdl_forum_posts mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum_posts' 402 Query insert into mdl_mph_fo3 (id,time2,deleted2,discussion,parent,userid,created,modified,mailed,subject,message,messageformat,messagetrust,attachment,totalscore,mailnow,deleted) select mhv.instance, mhv.time2, 0, mt.discussion,mt.parent,mt.userid,mt.created,mt.modified,mt.mailed,mt.subject,mt.message,mt.messageformat,mt.messagetrust,mt.attachment,mt.totalscore,mt.mailnow,mt.deleted from mdl_mph_main_view mhv join mdl_forum_posts mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum_posts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_posts' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.discussion,mt.parent,mt.userid,mt.created,mt.modified,mt.mailed,mt.subject,mt.message,mt.messageformat,mt.messagetrust,mt.attachment,mt.totalscore,mt.mailnow,mt.deleted from mdl_mph_main_view mhv join mdl_forum_posts mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum_posts' 402 Query insert into mdl_mph_fo3 (id,time2,deleted2,discussion,parent,userid,created,modified,mailed,subject,message,messageformat,messagetrust,attachment,totalscore,mailnow,deleted) select distinct mhv.instance, mhv.time2, 0, mt.discussion,mt.parent,mt.userid,mt.created,mt.modified,mt.mailed,mt.subject,mt.message,mt.messageformat,mt.messagetrust,mt.attachment,mt.totalscore,mt.mailnow,mt.deleted from mdl_mph_main_view mhv join mdl_forum_posts mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum_posts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_posts' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.discussion,mt.parent,mt.userid,mt.created,mt.modified,mt.mailed,mt.subject,mt.message,mt.messageformat,mt.messagetrust,mt.attachment,mt.totalscore,mt.mailnow,mt.deleted from mdl_mph_main_view mhv join (select h.id,h.discussion,h.parent,h.userid,h.created,h.modified,h.mailed,h.subject,h.message,h.messageformat,h.messagetrust,h.attachment,h.totalscore,h.mailnow,h.deleted from mdl_mph_fo3 h join (select id, max(time2) time2 from mdl_mph_fo3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum_posts' 402 Query insert into mdl_mph_fo3 (id,time2,deleted2,discussion,parent,userid,created,modified,mailed,subject,message,messageformat,messagetrust,attachment,totalscore,mailnow,deleted) select mhv.instance, mhv.time2, 1, mt.discussion,mt.parent,mt.userid,mt.created,mt.modified,mt.mailed,mt.subject,mt.message,mt.messageformat,mt.messagetrust,mt.attachment,mt.totalscore,mt.mailnow,mt.deleted from mdl_mph_main_view mhv join (select h.id,h.discussion,h.parent,h.userid,h.created,h.modified,h.mailed,h.subject,h.message,h.messageformat,h.messagetrust,h.attachment,h.totalscore,h.mailnow,h.deleted from mdl_mph_fo3 h join (select id, max(time2) time2 from mdl_mph_fo3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum_posts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_posts' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.forum from mdl_mph_main_view mhv join mdl_forum_subscriptions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum_subscriptions' 402 Query insert into mdl_mph_fo4 (id,time2,deleted2,userid,forum) select mhv.instance, mhv.time2, 0, mt.userid,mt.forum from mdl_mph_main_view mhv join mdl_forum_subscriptions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='forum_subscriptions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_subscriptions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.forum from mdl_mph_main_view mhv join mdl_forum_subscriptions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum_subscriptions' 402 Query insert into mdl_mph_fo4 (id,time2,deleted2,userid,forum) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.forum from mdl_mph_main_view mhv join mdl_forum_subscriptions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='forum_subscriptions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_subscriptions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.forum from mdl_mph_main_view mhv join (select h.id,h.userid,h.forum from mdl_mph_fo4 h join (select id, max(time2) time2 from mdl_mph_fo4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum_subscriptions' 402 Query insert into mdl_mph_fo4 (id,time2,deleted2,userid,forum) select mhv.instance, mhv.time2, 1, mt.userid,mt.forum from mdl_mph_main_view mhv join (select h.id,h.userid,h.forum from mdl_mph_fo4 h join (select id, max(time2) time2 from mdl_mph_fo4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='forum_subscriptions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='forum_subscriptions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.popupformatname,mt.visible,mt.showgroup,mt.showtabs,mt.defaultmode,mt.defaulthook,mt.sortkey,mt.sortorder from mdl_mph_main_view mhv join mdl_glossary_formats mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='glossary_formats' 402 Query insert into mdl_mph_gl (id,time2,deleted2,name,popupformatname,visible,showgroup,showtabs,defaultmode,defaulthook,sortkey,sortorder) select mhv.instance, mhv.time2, 0, mt.name,mt.popupformatname,mt.visible,mt.showgroup,mt.showtabs,mt.defaultmode,mt.defaulthook,mt.sortkey,mt.sortorder from mdl_mph_main_view mhv join mdl_glossary_formats mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='glossary_formats' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='glossary_formats' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.popupformatname,mt.visible,mt.showgroup,mt.showtabs,mt.defaultmode,mt.defaulthook,mt.sortkey,mt.sortorder from mdl_mph_main_view mhv join mdl_glossary_formats mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='glossary_formats' 402 Query insert into mdl_mph_gl (id,time2,deleted2,name,popupformatname,visible,showgroup,showtabs,defaultmode,defaulthook,sortkey,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.popupformatname,mt.visible,mt.showgroup,mt.showtabs,mt.defaultmode,mt.defaulthook,mt.sortkey,mt.sortorder from mdl_mph_main_view mhv join mdl_glossary_formats mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='glossary_formats' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='glossary_formats' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.popupformatname,mt.visible,mt.showgroup,mt.showtabs,mt.defaultmode,mt.defaulthook,mt.sortkey,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.name,h.popupformatname,h.visible,h.showgroup,h.showtabs,h.defaultmode,h.defaulthook,h.sortkey,h.sortorder from mdl_mph_gl h join (select id, max(time2) time2 from mdl_mph_gl group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='glossary_formats' 402 Query insert into mdl_mph_gl (id,time2,deleted2,name,popupformatname,visible,showgroup,showtabs,defaultmode,defaulthook,sortkey,sortorder) select mhv.instance, mhv.time2, 1, mt.name,mt.popupformatname,mt.visible,mt.showgroup,mt.showtabs,mt.defaultmode,mt.defaulthook,mt.sortkey,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.name,h.popupformatname,h.visible,h.showgroup,h.showtabs,h.defaultmode,h.defaulthook,h.sortkey,h.sortorder from mdl_mph_gl h join (select id, max(time2) time2 from mdl_mph_gl group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='glossary_formats' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='glossary_formats' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_grade_settings mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='grade_settings' 402 Query insert into mdl_mph_gr (id,time2,deleted2,courseid,name,value) select mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_grade_settings mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='grade_settings' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='grade_settings' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_grade_settings mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='grade_settings' 402 Query insert into mdl_mph_gr (id,time2,deleted2,courseid,name,value) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_grade_settings mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='grade_settings' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='grade_settings' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.courseid,h.name,h.value from mdl_mph_gr h join (select id, max(time2) time2 from mdl_mph_gr group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='grade_settings' 402 Query insert into mdl_mph_gr (id,time2,deleted2,courseid,name,value) select mhv.instance, mhv.time2, 1, mt.courseid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.courseid,h.name,h.value from mdl_mph_gr h join (select id, max(time2) time2 from mdl_mph_gr group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='grade_settings' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='grade_settings' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.areaname,mt.activemethod from mdl_mph_main_view mhv join mdl_grading_areas mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='grading_areas' 402 Query insert into mdl_mph_gr1 (id,time2,deleted2,contextid,component,areaname,activemethod) select mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.areaname,mt.activemethod from mdl_mph_main_view mhv join mdl_grading_areas mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='grading_areas' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='grading_areas' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.areaname,mt.activemethod from mdl_mph_main_view mhv join mdl_grading_areas mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='grading_areas' 402 Query insert into mdl_mph_gr1 (id,time2,deleted2,contextid,component,areaname,activemethod) select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.areaname,mt.activemethod from mdl_mph_main_view mhv join mdl_grading_areas mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='grading_areas' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='grading_areas' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contextid,mt.component,mt.areaname,mt.activemethod from mdl_mph_main_view mhv join (select h.id,h.contextid,h.component,h.areaname,h.activemethod from mdl_mph_gr1 h join (select id, max(time2) time2 from mdl_mph_gr1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='grading_areas' 402 Query insert into mdl_mph_gr1 (id,time2,deleted2,contextid,component,areaname,activemethod) select mhv.instance, mhv.time2, 1, mt.contextid,mt.component,mt.areaname,mt.activemethod from mdl_mph_main_view mhv join (select h.id,h.contextid,h.component,h.areaname,h.activemethod from mdl_mph_gr1 h join (select id, max(time2) time2 from mdl_mph_gr1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='grading_areas' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='grading_areas' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timemodified from mdl_mph_main_view mhv join mdl_label mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='label' 402 Query insert into mdl_mph_la (id,time2,deleted2,course,name,intro,introformat,timemodified) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timemodified from mdl_mph_main_view mhv join mdl_label mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='label' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='label' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timemodified from mdl_mph_main_view mhv join mdl_label mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='label' 402 Query insert into mdl_mph_la (id,time2,deleted2,course,name,intro,introformat,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timemodified from mdl_mph_main_view mhv join mdl_label mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='label' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='label' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.timemodified from mdl_mph_la h join (select id, max(time2) time2 from mdl_mph_la group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='label' 402 Query insert into mdl_mph_la (id,time2,deleted2,course,name,intro,introformat,timemodified) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.timemodified from mdl_mph_la h join (select id, max(time2) time2 from mdl_mph_la group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='label' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='label' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.shortname,mt.fullname,mt.source,mt.enabled,mt.version from mdl_mph_main_view mhv join mdl_license mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='license' 402 Query insert into mdl_mph_li (id,time2,deleted2,shortname,fullname,source,enabled,version) select mhv.instance, mhv.time2, 0, mt.shortname,mt.fullname,mt.source,mt.enabled,mt.version from mdl_mph_main_view mhv join mdl_license mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='license' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='license' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.shortname,mt.fullname,mt.source,mt.enabled,mt.version from mdl_mph_main_view mhv join mdl_license mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='license' 402 Query insert into mdl_mph_li (id,time2,deleted2,shortname,fullname,source,enabled,version) select distinct mhv.instance, mhv.time2, 0, mt.shortname,mt.fullname,mt.source,mt.enabled,mt.version from mdl_mph_main_view mhv join mdl_license mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='license' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='license' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.shortname,mt.fullname,mt.source,mt.enabled,mt.version from mdl_mph_main_view mhv join (select h.id,h.shortname,h.fullname,h.source,h.enabled,h.version from mdl_mph_li h join (select id, max(time2) time2 from mdl_mph_li group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='license' 402 Query insert into mdl_mph_li (id,time2,deleted2,shortname,fullname,source,enabled,version) select mhv.instance, mhv.time2, 1, mt.shortname,mt.fullname,mt.source,mt.enabled,mt.version from mdl_mph_main_view mhv join (select h.id,h.shortname,h.fullname,h.source,h.enabled,h.version from mdl_mph_li h join (select id, max(time2) time2 from mdl_mph_li group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='license' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='license' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message' 402 Query insert into mdl_mph_me (id,time2,deleted2,useridfrom,useridto,fullmessage,fullmessageformat,timecreated,timeusertodeleted,component,eventtype,timeuserfromdeleted,subject,fullmessagehtml,smallmessage,notification,contexturl,contexturlname) select mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message' 402 Query insert into mdl_mph_me (id,time2,deleted2,useridfrom,useridto,fullmessage,fullmessageformat,timecreated,timeusertodeleted,component,eventtype,timeuserfromdeleted,subject,fullmessagehtml,smallmessage,notification,contexturl,contexturlname) select distinct mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join (select h.id,h.useridfrom,h.useridto,h.fullmessage,h.fullmessageformat,h.timecreated,h.timeusertodeleted,h.component,h.eventtype,h.timeuserfromdeleted,h.subject,h.fullmessagehtml,h.smallmessage,h.notification,h.contexturl,h.contexturlname from mdl_mph_me h join (select id, max(time2) time2 from mdl_mph_me group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message' 402 Query insert into mdl_mph_me (id,time2,deleted2,useridfrom,useridto,fullmessage,fullmessageformat,timecreated,timeusertodeleted,component,eventtype,timeuserfromdeleted,subject,fullmessagehtml,smallmessage,notification,contexturl,contexturlname) select mhv.instance, mhv.time2, 1, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join (select h.id,h.useridfrom,h.useridto,h.fullmessage,h.fullmessageformat,h.timecreated,h.timeusertodeleted,h.component,h.eventtype,h.timeuserfromdeleted,h.subject,h.fullmessagehtml,h.smallmessage,h.notification,h.contexturl,h.contexturlname from mdl_mph_me h join (select id, max(time2) time2 from mdl_mph_me group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.contactid,mt.blocked from mdl_mph_main_view mhv join mdl_message_contacts mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_contacts' 402 Query insert into mdl_mph_me1 (id,time2,deleted2,userid,contactid,blocked) select mhv.instance, mhv.time2, 0, mt.userid,mt.contactid,mt.blocked from mdl_mph_main_view mhv join mdl_message_contacts mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_contacts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_contacts' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.contactid,mt.blocked from mdl_mph_main_view mhv join mdl_message_contacts mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_contacts' 402 Query insert into mdl_mph_me1 (id,time2,deleted2,userid,contactid,blocked) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.contactid,mt.blocked from mdl_mph_main_view mhv join mdl_message_contacts mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_contacts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_contacts' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.contactid,mt.blocked from mdl_mph_main_view mhv join (select h.id,h.userid,h.contactid,h.blocked from mdl_mph_me1 h join (select id, max(time2) time2 from mdl_mph_me1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_contacts' 402 Query insert into mdl_mph_me1 (id,time2,deleted2,userid,contactid,blocked) select mhv.instance, mhv.time2, 1, mt.userid,mt.contactid,mt.blocked from mdl_mph_main_view mhv join (select h.id,h.userid,h.contactid,h.blocked from mdl_mph_me1 h join (select id, max(time2) time2 from mdl_mph_me1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_contacts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_contacts' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.enabled from mdl_mph_main_view mhv join mdl_message_processors mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_processors' 402 Query insert into mdl_mph_me2 (id,time2,deleted2,name,enabled) select mhv.instance, mhv.time2, 0, mt.name,mt.enabled from mdl_mph_main_view mhv join mdl_message_processors mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_processors' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_processors' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.enabled from mdl_mph_main_view mhv join mdl_message_processors mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_processors' 402 Query insert into mdl_mph_me2 (id,time2,deleted2,name,enabled) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.enabled from mdl_mph_main_view mhv join mdl_message_processors mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_processors' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_processors' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.enabled from mdl_mph_main_view mhv join (select h.id,h.name,h.enabled from mdl_mph_me2 h join (select id, max(time2) time2 from mdl_mph_me2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_processors' 402 Query insert into mdl_mph_me2 (id,time2,deleted2,name,enabled) select mhv.instance, mhv.time2, 1, mt.name,mt.enabled from mdl_mph_main_view mhv join (select h.id,h.name,h.enabled from mdl_mph_me2 h join (select id, max(time2) time2 from mdl_mph_me2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_processors' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_processors' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.component,mt.capability from mdl_mph_main_view mhv join mdl_message_providers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_providers' 402 Query insert into mdl_mph_me3 (id,time2,deleted2,name,component,capability) select mhv.instance, mhv.time2, 0, mt.name,mt.component,mt.capability from mdl_mph_main_view mhv join mdl_message_providers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_providers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_providers' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.component,mt.capability from mdl_mph_main_view mhv join mdl_message_providers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_providers' 402 Query insert into mdl_mph_me3 (id,time2,deleted2,name,component,capability) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.component,mt.capability from mdl_mph_main_view mhv join mdl_message_providers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_providers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_providers' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.component,mt.capability from mdl_mph_main_view mhv join (select h.id,h.name,h.component,h.capability from mdl_mph_me3 h join (select id, max(time2) time2 from mdl_mph_me3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_providers' 402 Query insert into mdl_mph_me3 (id,time2,deleted2,name,component,capability) select mhv.instance, mhv.time2, 1, mt.name,mt.component,mt.capability from mdl_mph_main_view mhv join (select h.id,h.name,h.component,h.capability from mdl_mph_me3 h join (select id, max(time2) time2 from mdl_mph_me3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_providers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_providers' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.timeread,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message_read mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_read' 402 Query insert into mdl_mph_me4 (id,time2,deleted2,useridfrom,useridto,fullmessage,fullmessageformat,timecreated,timeusertodeleted,component,eventtype,timeuserfromdeleted,timeread,subject,fullmessagehtml,smallmessage,notification,contexturl,contexturlname) select mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.timeread,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message_read mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_read' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_read' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.timeread,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message_read mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_read' 402 Query insert into mdl_mph_me4 (id,time2,deleted2,useridfrom,useridto,fullmessage,fullmessageformat,timecreated,timeusertodeleted,component,eventtype,timeuserfromdeleted,timeread,subject,fullmessagehtml,smallmessage,notification,contexturl,contexturlname) select distinct mhv.instance, mhv.time2, 0, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.timeread,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join mdl_message_read mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_read' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_read' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.timeread,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join (select h.id,h.useridfrom,h.useridto,h.fullmessage,h.fullmessageformat,h.timecreated,h.timeusertodeleted,h.component,h.eventtype,h.timeuserfromdeleted,h.timeread,h.subject,h.fullmessagehtml,h.smallmessage,h.notification,h.contexturl,h.contexturlname from mdl_mph_me4 h join (select id, max(time2) time2 from mdl_mph_me4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_read' 402 Query insert into mdl_mph_me4 (id,time2,deleted2,useridfrom,useridto,fullmessage,fullmessageformat,timecreated,timeusertodeleted,component,eventtype,timeuserfromdeleted,timeread,subject,fullmessagehtml,smallmessage,notification,contexturl,contexturlname) select mhv.instance, mhv.time2, 1, mt.useridfrom,mt.useridto,mt.fullmessage,mt.fullmessageformat,mt.timecreated,mt.timeusertodeleted,mt.component,mt.eventtype,mt.timeuserfromdeleted,mt.timeread,mt.subject,mt.fullmessagehtml,mt.smallmessage,mt.notification,mt.contexturl,mt.contexturlname from mdl_mph_main_view mhv join (select h.id,h.useridfrom,h.useridto,h.fullmessage,h.fullmessageformat,h.timecreated,h.timeusertodeleted,h.component,h.eventtype,h.timeuserfromdeleted,h.timeread,h.subject,h.fullmessagehtml,h.smallmessage,h.notification,h.contexturl,h.contexturlname from mdl_mph_me4 h join (select id, max(time2) time2 from mdl_mph_me4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_read' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_read' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.unreadmessageid,mt.processorid from mdl_mph_main_view mhv join mdl_message_working mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_working' 402 Query insert into mdl_mph_me5 (id,time2,deleted2,unreadmessageid,processorid) select mhv.instance, mhv.time2, 0, mt.unreadmessageid,mt.processorid from mdl_mph_main_view mhv join mdl_message_working mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='message_working' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_working' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.unreadmessageid,mt.processorid from mdl_mph_main_view mhv join mdl_message_working mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_working' 402 Query insert into mdl_mph_me5 (id,time2,deleted2,unreadmessageid,processorid) select distinct mhv.instance, mhv.time2, 0, mt.unreadmessageid,mt.processorid from mdl_mph_main_view mhv join mdl_message_working mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='message_working' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_working' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.unreadmessageid,mt.processorid from mdl_mph_main_view mhv join (select h.id,h.unreadmessageid,h.processorid from mdl_mph_me5 h join (select id, max(time2) time2 from mdl_mph_me5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_working' 402 Query insert into mdl_mph_me5 (id,time2,deleted2,unreadmessageid,processorid) select mhv.instance, mhv.time2, 1, mt.unreadmessageid,mt.processorid from mdl_mph_main_view mhv join (select h.id,h.unreadmessageid,h.processorid from mdl_mph_me5 h join (select id, max(time2) time2 from mdl_mph_me5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='message_working' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='message_working' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.component,mt.classname,mt.defaultexpiration,mt.validateaddress,mt.enabled from mdl_mph_main_view mhv join mdl_messageinbound_handlers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='messageinbound_handlers' 402 Query insert into mdl_mph_me6 (id,time2,deleted2,component,classname,defaultexpiration,validateaddress,enabled) select mhv.instance, mhv.time2, 0, mt.component,mt.classname,mt.defaultexpiration,mt.validateaddress,mt.enabled from mdl_mph_main_view mhv join mdl_messageinbound_handlers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='messageinbound_handlers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='messageinbound_handlers' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.component,mt.classname,mt.defaultexpiration,mt.validateaddress,mt.enabled from mdl_mph_main_view mhv join mdl_messageinbound_handlers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='messageinbound_handlers' 402 Query insert into mdl_mph_me6 (id,time2,deleted2,component,classname,defaultexpiration,validateaddress,enabled) select distinct mhv.instance, mhv.time2, 0, mt.component,mt.classname,mt.defaultexpiration,mt.validateaddress,mt.enabled from mdl_mph_main_view mhv join mdl_messageinbound_handlers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='messageinbound_handlers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='messageinbound_handlers' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.component,mt.classname,mt.defaultexpiration,mt.validateaddress,mt.enabled from mdl_mph_main_view mhv join (select h.id,h.component,h.classname,h.defaultexpiration,h.validateaddress,h.enabled from mdl_mph_me6 h join (select id, max(time2) time2 from mdl_mph_me6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='messageinbound_handlers' 402 Query insert into mdl_mph_me6 (id,time2,deleted2,component,classname,defaultexpiration,validateaddress,enabled) select mhv.instance, mhv.time2, 1, mt.component,mt.classname,mt.defaultexpiration,mt.validateaddress,mt.enabled from mdl_mph_main_view mhv join (select h.id,h.component,h.classname,h.defaultexpiration,h.validateaddress,h.enabled from mdl_mph_me6 h join (select id, max(time2) time2 from mdl_mph_me6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='messageinbound_handlers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='messageinbound_handlers' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.search,mt.visible from mdl_mph_main_view mhv join mdl_modules mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='modules' 402 Query insert into mdl_mph_mo (id,time2,deleted2,name,cron,lastcron,search,visible) select mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.search,mt.visible from mdl_mph_main_view mhv join mdl_modules mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='modules' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='modules' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.search,mt.visible from mdl_mph_main_view mhv join mdl_modules mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='modules' 402 Query insert into mdl_mph_mo (id,time2,deleted2,name,cron,lastcron,search,visible) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.cron,mt.lastcron,mt.search,mt.visible from mdl_mph_main_view mhv join mdl_modules mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='modules' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='modules' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.cron,mt.lastcron,mt.search,mt.visible from mdl_mph_main_view mhv join (select h.id,h.name,h.cron,h.lastcron,h.search,h.visible from mdl_mph_mo h join (select id, max(time2) time2 from mdl_mph_mo group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='modules' 402 Query insert into mdl_mph_mo (id,time2,deleted2,name,cron,lastcron,search,visible) select mhv.instance, mhv.time2, 1, mt.name,mt.cron,mt.lastcron,mt.search,mt.visible from mdl_mph_main_view mhv join (select h.id,h.name,h.cron,h.lastcron,h.search,h.visible from mdl_mph_mo h join (select id, max(time2) time2 from mdl_mph_mo group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='modules' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='modules' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.domain,mt.course,mt.coursemodule,mt.email_mask,mt.org_type,mt.org_description,mt.org_logo,mt.org_logo_crop_data,mt.org_icon,mt.org_icon_crop_data,mt.org_background,mt.org_background_crop_data,mt.org_logo_dashboard,mt.org_logo_dashboard_crop_data,mt.org_css,mt.org_button_color,mt.org_button_color_h,mt.org_text_color,mt.industry_sector,mt.industry_type,mt.edu_type,mt.storage_usage,mt.footer_html,mt.settings,mt.org_roles from mdl_mph_main_view mhv join mdl_mp mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='mp' 402 Query insert into mdl_mph_mp (id,time2,deleted2,name,domain,course,coursemodule,email_mask,org_type,org_description,org_logo,org_logo_crop_data,org_icon,org_icon_crop_data,org_background,org_background_crop_data,org_logo_dashboard,org_logo_dashboard_crop_data,org_css,org_button_color,org_button_color_h,org_text_color,industry_sector,industry_type,edu_type,storage_usage,footer_html,settings,org_roles) select mhv.instance, mhv.time2, 0, mt.name,mt.domain,mt.course,mt.coursemodule,mt.email_mask,mt.org_type,mt.org_description,mt.org_logo,mt.org_logo_crop_data,mt.org_icon,mt.org_icon_crop_data,mt.org_background,mt.org_background_crop_data,mt.org_logo_dashboard,mt.org_logo_dashboard_crop_data,mt.org_css,mt.org_button_color,mt.org_button_color_h,mt.org_text_color,mt.industry_sector,mt.industry_type,mt.edu_type,mt.storage_usage,mt.footer_html,mt.settings,mt.org_roles from mdl_mph_main_view mhv join mdl_mp mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='mp' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.domain,mt.course,mt.coursemodule,mt.email_mask,mt.org_type,mt.org_description,mt.org_logo,mt.org_logo_crop_data,mt.org_icon,mt.org_icon_crop_data,mt.org_background,mt.org_background_crop_data,mt.org_logo_dashboard,mt.org_logo_dashboard_crop_data,mt.org_css,mt.org_button_color,mt.org_button_color_h,mt.org_text_color,mt.industry_sector,mt.industry_type,mt.edu_type,mt.storage_usage,mt.footer_html,mt.settings,mt.org_roles from mdl_mph_main_view mhv join mdl_mp mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='mp' 402 Query insert into mdl_mph_mp (id,time2,deleted2,name,domain,course,coursemodule,email_mask,org_type,org_description,org_logo,org_logo_crop_data,org_icon,org_icon_crop_data,org_background,org_background_crop_data,org_logo_dashboard,org_logo_dashboard_crop_data,org_css,org_button_color,org_button_color_h,org_text_color,industry_sector,industry_type,edu_type,storage_usage,footer_html,settings,org_roles) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.domain,mt.course,mt.coursemodule,mt.email_mask,mt.org_type,mt.org_description,mt.org_logo,mt.org_logo_crop_data,mt.org_icon,mt.org_icon_crop_data,mt.org_background,mt.org_background_crop_data,mt.org_logo_dashboard,mt.org_logo_dashboard_crop_data,mt.org_css,mt.org_button_color,mt.org_button_color_h,mt.org_text_color,mt.industry_sector,mt.industry_type,mt.edu_type,mt.storage_usage,mt.footer_html,mt.settings,mt.org_roles from mdl_mph_main_view mhv join mdl_mp mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='mp' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.domain,mt.course,mt.coursemodule,mt.email_mask,mt.org_type,mt.org_description,mt.org_logo,mt.org_logo_crop_data,mt.org_icon,mt.org_icon_crop_data,mt.org_background,mt.org_background_crop_data,mt.org_logo_dashboard,mt.org_logo_dashboard_crop_data,mt.org_css,mt.org_button_color,mt.org_button_color_h,mt.org_text_color,mt.industry_sector,mt.industry_type,mt.edu_type,mt.storage_usage,mt.footer_html,mt.settings,mt.org_roles from mdl_mph_main_view mhv join (select h.id,h.name,h.domain,h.course,h.coursemodule,h.email_mask,h.org_type,h.org_description,h.org_logo,h.org_logo_crop_data,h.org_icon,h.org_icon_crop_data,h.org_background,h.org_background_crop_data,h.org_logo_dashboard,h.org_logo_dashboard_crop_data,h.org_css,h.org_button_color,h.org_button_color_h,h.org_text_color,h.industry_sector,h.industry_type,h.edu_type,h.storage_usage,h.footer_html,h.settings,h.org_roles from mdl_mph_mp h join (select id, max(time2) time2 from mdl_mph_mp group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='mp' 402 Query insert into mdl_mph_mp (id,time2,deleted2,name,domain,course,coursemodule,email_mask,org_type,org_description,org_logo,org_logo_crop_data,org_icon,org_icon_crop_data,org_background,org_background_crop_data,org_logo_dashboard,org_logo_dashboard_crop_data,org_css,org_button_color,org_button_color_h,org_text_color,industry_sector,industry_type,edu_type,storage_usage,footer_html,settings,org_roles) select mhv.instance, mhv.time2, 1, mt.name,mt.domain,mt.course,mt.coursemodule,mt.email_mask,mt.org_type,mt.org_description,mt.org_logo,mt.org_logo_crop_data,mt.org_icon,mt.org_icon_crop_data,mt.org_background,mt.org_background_crop_data,mt.org_logo_dashboard,mt.org_logo_dashboard_crop_data,mt.org_css,mt.org_button_color,mt.org_button_color_h,mt.org_text_color,mt.industry_sector,mt.industry_type,mt.edu_type,mt.storage_usage,mt.footer_html,mt.settings,mt.org_roles from mdl_mph_main_view mhv join (select h.id,h.name,h.domain,h.course,h.coursemodule,h.email_mask,h.org_type,h.org_description,h.org_logo,h.org_logo_crop_data,h.org_icon,h.org_icon_crop_data,h.org_background,h.org_background_crop_data,h.org_logo_dashboard,h.org_logo_dashboard_crop_data,h.org_css,h.org_button_color,h.org_button_color_h,h.org_text_color,h.industry_sector,h.industry_type,h.edu_type,h.storage_usage,h.footer_html,h.settings,h.org_roles from mdl_mph_mp h join (select id, max(time2) time2 from mdl_mph_mp group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='mp' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='mp' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.private,mt.sortorder from mdl_mph_main_view mhv join mdl_my_pages mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='my_pages' 402 Query insert into mdl_mph_my (id,time2,deleted2,userid,name,private,sortorder) select mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.private,mt.sortorder from mdl_mph_main_view mhv join mdl_my_pages mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='my_pages' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='my_pages' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.private,mt.sortorder from mdl_mph_main_view mhv join mdl_my_pages mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='my_pages' 402 Query insert into mdl_mph_my (id,time2,deleted2,userid,name,private,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.private,mt.sortorder from mdl_mph_main_view mhv join mdl_my_pages mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='my_pages' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='my_pages' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.name,mt.private,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.userid,h.name,h.private,h.sortorder from mdl_mph_my h join (select id, max(time2) time2 from mdl_mph_my group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='my_pages' 402 Query insert into mdl_mph_my (id,time2,deleted2,userid,name,private,sortorder) select mhv.instance, mhv.time2, 1, mt.userid,mt.name,mt.private,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.userid,h.name,h.private,h.sortorder from mdl_mph_my h join (select id, max(time2) time2 from mdl_mph_my group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='my_pages' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='my_pages' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.content,mt.contentformat,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_page mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='page' 402 Query insert into mdl_mph_pa (id,time2,deleted2,course,name,intro,introformat,content,contentformat,legacyfiles,legacyfileslast,display,displayoptions,revision,timemodified) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.content,mt.contentformat,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_page mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='page' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='page' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.content,mt.contentformat,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_page mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='page' 402 Query insert into mdl_mph_pa (id,time2,deleted2,course,name,intro,introformat,content,contentformat,legacyfiles,legacyfileslast,display,displayoptions,revision,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.content,mt.contentformat,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_page mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='page' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='page' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.content,mt.contentformat,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.revision,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.content,h.contentformat,h.legacyfiles,h.legacyfileslast,h.display,h.displayoptions,h.revision,h.timemodified from mdl_mph_pa h join (select id, max(time2) time2 from mdl_mph_pa group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='page' 402 Query insert into mdl_mph_pa (id,time2,deleted2,course,name,intro,introformat,content,contentformat,legacyfiles,legacyfileslast,display,displayoptions,revision,timemodified) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.content,mt.contentformat,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.revision,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.content,h.contentformat,h.legacyfiles,h.legacyfileslast,h.display,h.displayoptions,h.revision,h.timemodified from mdl_mph_pa h join (select id, max(time2) time2 from mdl_mph_pa group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='page' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='page' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.module,mt.userid,mt.courseid,mt.groupid,mt.moduleid,mt.coursemoduleid,mt.subject,mt.summary,mt.content,mt.uniquehash,mt.rating,mt.format,mt.summaryformat,mt.attachment,mt.publishstate,mt.lastmodified,mt.created,mt.usermodified from mdl_mph_main_view mhv join mdl_post mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='post' 402 Query insert into mdl_mph_po (id,time2,deleted2,module,userid,courseid,groupid,moduleid,coursemoduleid,subject,summary,content,uniquehash,rating,format,summaryformat,attachment,publishstate,lastmodified,created,usermodified) select mhv.instance, mhv.time2, 0, mt.module,mt.userid,mt.courseid,mt.groupid,mt.moduleid,mt.coursemoduleid,mt.subject,mt.summary,mt.content,mt.uniquehash,mt.rating,mt.format,mt.summaryformat,mt.attachment,mt.publishstate,mt.lastmodified,mt.created,mt.usermodified from mdl_mph_main_view mhv join mdl_post mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='post' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='post' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.module,mt.userid,mt.courseid,mt.groupid,mt.moduleid,mt.coursemoduleid,mt.subject,mt.summary,mt.content,mt.uniquehash,mt.rating,mt.format,mt.summaryformat,mt.attachment,mt.publishstate,mt.lastmodified,mt.created,mt.usermodified from mdl_mph_main_view mhv join mdl_post mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='post' 402 Query insert into mdl_mph_po (id,time2,deleted2,module,userid,courseid,groupid,moduleid,coursemoduleid,subject,summary,content,uniquehash,rating,format,summaryformat,attachment,publishstate,lastmodified,created,usermodified) select distinct mhv.instance, mhv.time2, 0, mt.module,mt.userid,mt.courseid,mt.groupid,mt.moduleid,mt.coursemoduleid,mt.subject,mt.summary,mt.content,mt.uniquehash,mt.rating,mt.format,mt.summaryformat,mt.attachment,mt.publishstate,mt.lastmodified,mt.created,mt.usermodified from mdl_mph_main_view mhv join mdl_post mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='post' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='post' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.module,mt.userid,mt.courseid,mt.groupid,mt.moduleid,mt.coursemoduleid,mt.subject,mt.summary,mt.content,mt.uniquehash,mt.rating,mt.format,mt.summaryformat,mt.attachment,mt.publishstate,mt.lastmodified,mt.created,mt.usermodified from mdl_mph_main_view mhv join (select h.id,h.module,h.userid,h.courseid,h.groupid,h.moduleid,h.coursemoduleid,h.subject,h.summary,h.content,h.uniquehash,h.rating,h.format,h.summaryformat,h.attachment,h.publishstate,h.lastmodified,h.created,h.usermodified from mdl_mph_po h join (select id, max(time2) time2 from mdl_mph_po group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='post' 402 Query insert into mdl_mph_po (id,time2,deleted2,module,userid,courseid,groupid,moduleid,coursemoduleid,subject,summary,content,uniquehash,rating,format,summaryformat,attachment,publishstate,lastmodified,created,usermodified) select mhv.instance, mhv.time2, 1, mt.module,mt.userid,mt.courseid,mt.groupid,mt.moduleid,mt.coursemoduleid,mt.subject,mt.summary,mt.content,mt.uniquehash,mt.rating,mt.format,mt.summaryformat,mt.attachment,mt.publishstate,mt.lastmodified,mt.created,mt.usermodified from mdl_mph_main_view mhv join (select h.id,h.module,h.userid,h.courseid,h.groupid,h.moduleid,h.coursemoduleid,h.subject,h.summary,h.content,h.uniquehash,h.rating,h.format,h.summaryformat,h.attachment,h.publishstate,h.lastmodified,h.created,h.usermodified from mdl_mph_po h join (select id, max(time2) time2 from mdl_mph_po group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='post' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='post' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.responseformat,mt.responserequired,mt.responsefieldlines,mt.attachments,mt.attachmentsrequired,mt.graderinfo,mt.graderinfoformat,mt.responsetemplate,mt.responsetemplateformat from mdl_mph_main_view mhv join mdl_qtype_essay_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_essay_options' 402 Query insert into mdl_mph_qt (id,time2,deleted2,questionid,responseformat,responserequired,responsefieldlines,attachments,attachmentsrequired,graderinfo,graderinfoformat,responsetemplate,responsetemplateformat) select mhv.instance, mhv.time2, 0, mt.questionid,mt.responseformat,mt.responserequired,mt.responsefieldlines,mt.attachments,mt.attachmentsrequired,mt.graderinfo,mt.graderinfoformat,mt.responsetemplate,mt.responsetemplateformat from mdl_mph_main_view mhv join mdl_qtype_essay_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_essay_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_essay_options' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionid,mt.responseformat,mt.responserequired,mt.responsefieldlines,mt.attachments,mt.attachmentsrequired,mt.graderinfo,mt.graderinfoformat,mt.responsetemplate,mt.responsetemplateformat from mdl_mph_main_view mhv join mdl_qtype_essay_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_essay_options' 402 Query insert into mdl_mph_qt (id,time2,deleted2,questionid,responseformat,responserequired,responsefieldlines,attachments,attachmentsrequired,graderinfo,graderinfoformat,responsetemplate,responsetemplateformat) select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.responseformat,mt.responserequired,mt.responsefieldlines,mt.attachments,mt.attachmentsrequired,mt.graderinfo,mt.graderinfoformat,mt.responsetemplate,mt.responsetemplateformat from mdl_mph_main_view mhv join mdl_qtype_essay_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_essay_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_essay_options' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionid,mt.responseformat,mt.responserequired,mt.responsefieldlines,mt.attachments,mt.attachmentsrequired,mt.graderinfo,mt.graderinfoformat,mt.responsetemplate,mt.responsetemplateformat from mdl_mph_main_view mhv join (select h.id,h.questionid,h.responseformat,h.responserequired,h.responsefieldlines,h.attachments,h.attachmentsrequired,h.graderinfo,h.graderinfoformat,h.responsetemplate,h.responsetemplateformat from mdl_mph_qt h join (select id, max(time2) time2 from mdl_mph_qt group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_essay_options' 402 Query insert into mdl_mph_qt (id,time2,deleted2,questionid,responseformat,responserequired,responsefieldlines,attachments,attachmentsrequired,graderinfo,graderinfoformat,responsetemplate,responsetemplateformat) select mhv.instance, mhv.time2, 1, mt.questionid,mt.responseformat,mt.responserequired,mt.responsefieldlines,mt.attachments,mt.attachmentsrequired,mt.graderinfo,mt.graderinfoformat,mt.responsetemplate,mt.responsetemplateformat from mdl_mph_main_view mhv join (select h.id,h.questionid,h.responseformat,h.responserequired,h.responsefieldlines,h.attachments,h.attachmentsrequired,h.graderinfo,h.graderinfoformat,h.responsetemplate,h.responsetemplateformat from mdl_mph_qt h join (select id, max(time2) time2 from mdl_mph_qt group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_essay_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_essay_options' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_match_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_match_options' 402 Query insert into mdl_mph_qt1 (id,time2,deleted2,questionid,shuffleanswers,correctfeedback,correctfeedbackformat,partiallycorrectfeedback,partiallycorrectfeedbackformat,incorrectfeedback,incorrectfeedbackformat,shownumcorrect) select mhv.instance, mhv.time2, 0, mt.questionid,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_match_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_match_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_match_options' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionid,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_match_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_match_options' 402 Query insert into mdl_mph_qt1 (id,time2,deleted2,questionid,shuffleanswers,correctfeedback,correctfeedbackformat,partiallycorrectfeedback,partiallycorrectfeedbackformat,incorrectfeedback,incorrectfeedbackformat,shownumcorrect) select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_match_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_match_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_match_options' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionid,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.shownumcorrect from mdl_mph_main_view mhv join (select h.id,h.questionid,h.shuffleanswers,h.correctfeedback,h.correctfeedbackformat,h.partiallycorrectfeedback,h.partiallycorrectfeedbackformat,h.incorrectfeedback,h.incorrectfeedbackformat,h.shownumcorrect from mdl_mph_qt1 h join (select id, max(time2) time2 from mdl_mph_qt1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_match_options' 402 Query insert into mdl_mph_qt1 (id,time2,deleted2,questionid,shuffleanswers,correctfeedback,correctfeedbackformat,partiallycorrectfeedback,partiallycorrectfeedbackformat,incorrectfeedback,incorrectfeedbackformat,shownumcorrect) select mhv.instance, mhv.time2, 1, mt.questionid,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.shownumcorrect from mdl_mph_main_view mhv join (select h.id,h.questionid,h.shuffleanswers,h.correctfeedback,h.correctfeedbackformat,h.partiallycorrectfeedback,h.partiallycorrectfeedbackformat,h.incorrectfeedback,h.incorrectfeedbackformat,h.shownumcorrect from mdl_mph_qt1 h join (select id, max(time2) time2 from mdl_mph_qt1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_match_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_match_options' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.questiontext,mt.questiontextformat,mt.answertext from mdl_mph_main_view mhv join mdl_qtype_match_subquestions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_match_subquestions' 402 Query insert into mdl_mph_qt2 (id,time2,deleted2,questionid,questiontext,questiontextformat,answertext) select mhv.instance, mhv.time2, 0, mt.questionid,mt.questiontext,mt.questiontextformat,mt.answertext from mdl_mph_main_view mhv join mdl_qtype_match_subquestions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_match_subquestions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_match_subquestions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionid,mt.questiontext,mt.questiontextformat,mt.answertext from mdl_mph_main_view mhv join mdl_qtype_match_subquestions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_match_subquestions' 402 Query insert into mdl_mph_qt2 (id,time2,deleted2,questionid,questiontext,questiontextformat,answertext) select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.questiontext,mt.questiontextformat,mt.answertext from mdl_mph_main_view mhv join mdl_qtype_match_subquestions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_match_subquestions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_match_subquestions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionid,mt.questiontext,mt.questiontextformat,mt.answertext from mdl_mph_main_view mhv join (select h.id,h.questionid,h.questiontext,h.questiontextformat,h.answertext from mdl_mph_qt2 h join (select id, max(time2) time2 from mdl_mph_qt2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_match_subquestions' 402 Query insert into mdl_mph_qt2 (id,time2,deleted2,questionid,questiontext,questiontextformat,answertext) select mhv.instance, mhv.time2, 1, mt.questionid,mt.questiontext,mt.questiontextformat,mt.answertext from mdl_mph_main_view mhv join (select h.id,h.questionid,h.questiontext,h.questiontextformat,h.answertext from mdl_mph_qt2 h join (select id, max(time2) time2 from mdl_mph_qt2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_match_subquestions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_match_subquestions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.layout,mt.single,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.answernumbering,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_multichoice_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_multichoice_options' 402 Query insert into mdl_mph_qt3 (id,time2,deleted2,questionid,layout,single,shuffleanswers,correctfeedback,correctfeedbackformat,partiallycorrectfeedback,partiallycorrectfeedbackformat,incorrectfeedback,incorrectfeedbackformat,answernumbering,shownumcorrect) select mhv.instance, mhv.time2, 0, mt.questionid,mt.layout,mt.single,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.answernumbering,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_multichoice_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_multichoice_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_multichoice_options' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionid,mt.layout,mt.single,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.answernumbering,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_multichoice_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_multichoice_options' 402 Query insert into mdl_mph_qt3 (id,time2,deleted2,questionid,layout,single,shuffleanswers,correctfeedback,correctfeedbackformat,partiallycorrectfeedback,partiallycorrectfeedbackformat,incorrectfeedback,incorrectfeedbackformat,answernumbering,shownumcorrect) select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.layout,mt.single,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.answernumbering,mt.shownumcorrect from mdl_mph_main_view mhv join mdl_qtype_multichoice_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_multichoice_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_multichoice_options' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionid,mt.layout,mt.single,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.answernumbering,mt.shownumcorrect from mdl_mph_main_view mhv join (select h.id,h.questionid,h.layout,h.single,h.shuffleanswers,h.correctfeedback,h.correctfeedbackformat,h.partiallycorrectfeedback,h.partiallycorrectfeedbackformat,h.incorrectfeedback,h.incorrectfeedbackformat,h.answernumbering,h.shownumcorrect from mdl_mph_qt3 h join (select id, max(time2) time2 from mdl_mph_qt3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_multichoice_options' 402 Query insert into mdl_mph_qt3 (id,time2,deleted2,questionid,layout,single,shuffleanswers,correctfeedback,correctfeedbackformat,partiallycorrectfeedback,partiallycorrectfeedbackformat,incorrectfeedback,incorrectfeedbackformat,answernumbering,shownumcorrect) select mhv.instance, mhv.time2, 1, mt.questionid,mt.layout,mt.single,mt.shuffleanswers,mt.correctfeedback,mt.correctfeedbackformat,mt.partiallycorrectfeedback,mt.partiallycorrectfeedbackformat,mt.incorrectfeedback,mt.incorrectfeedbackformat,mt.answernumbering,mt.shownumcorrect from mdl_mph_main_view mhv join (select h.id,h.questionid,h.layout,h.single,h.shuffleanswers,h.correctfeedback,h.correctfeedbackformat,h.partiallycorrectfeedback,h.partiallycorrectfeedbackformat,h.incorrectfeedback,h.incorrectfeedbackformat,h.answernumbering,h.shownumcorrect from mdl_mph_qt3 h join (select id, max(time2) time2 from mdl_mph_qt3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_multichoice_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_multichoice_options' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.usecase from mdl_mph_main_view mhv join mdl_qtype_shortanswer_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_shortanswer_options' 402 Query insert into mdl_mph_qt4 (id,time2,deleted2,questionid,usecase) select mhv.instance, mhv.time2, 0, mt.questionid,mt.usecase from mdl_mph_main_view mhv join mdl_qtype_shortanswer_options mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='qtype_shortanswer_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_shortanswer_options' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionid,mt.usecase from mdl_mph_main_view mhv join mdl_qtype_shortanswer_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_shortanswer_options' 402 Query insert into mdl_mph_qt4 (id,time2,deleted2,questionid,usecase) select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.usecase from mdl_mph_main_view mhv join mdl_qtype_shortanswer_options mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='qtype_shortanswer_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_shortanswer_options' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionid,mt.usecase from mdl_mph_main_view mhv join (select h.id,h.questionid,h.usecase from mdl_mph_qt4 h join (select id, max(time2) time2 from mdl_mph_qt4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_shortanswer_options' 402 Query insert into mdl_mph_qt4 (id,time2,deleted2,questionid,usecase) select mhv.instance, mhv.time2, 1, mt.questionid,mt.usecase from mdl_mph_main_view mhv join (select h.id,h.questionid,h.usecase from mdl_mph_qt4 h join (select id, max(time2) time2 from mdl_mph_qt4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='qtype_shortanswer_options' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='qtype_shortanswer_options' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.category,mt.parent,mt.name,mt.questiontext,mt.questiontextformat,mt.generalfeedback,mt.generalfeedbackformat,mt.defaultmark,mt.penalty,mt.qtype,mt.length,mt.stamp,mt.version,mt.hidden,mt.timecreated,mt.timemodified,mt.createdby,mt.modifiedby from mdl_mph_main_view mhv join mdl_question mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question' 402 Query insert into mdl_mph_qu (id,time2,deleted2,category,parent,name,questiontext,questiontextformat,generalfeedback,generalfeedbackformat,defaultmark,penalty,qtype,length,stamp,version,hidden,timecreated,timemodified,createdby,modifiedby) select mhv.instance, mhv.time2, 0, mt.category,mt.parent,mt.name,mt.questiontext,mt.questiontextformat,mt.generalfeedback,mt.generalfeedbackformat,mt.defaultmark,mt.penalty,mt.qtype,mt.length,mt.stamp,mt.version,mt.hidden,mt.timecreated,mt.timemodified,mt.createdby,mt.modifiedby from mdl_mph_main_view mhv join mdl_question mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.category,mt.parent,mt.name,mt.questiontext,mt.questiontextformat,mt.generalfeedback,mt.generalfeedbackformat,mt.defaultmark,mt.penalty,mt.qtype,mt.length,mt.stamp,mt.version,mt.hidden,mt.timecreated,mt.timemodified,mt.createdby,mt.modifiedby from mdl_mph_main_view mhv join mdl_question mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question' 402 Query insert into mdl_mph_qu (id,time2,deleted2,category,parent,name,questiontext,questiontextformat,generalfeedback,generalfeedbackformat,defaultmark,penalty,qtype,length,stamp,version,hidden,timecreated,timemodified,createdby,modifiedby) select distinct mhv.instance, mhv.time2, 0, mt.category,mt.parent,mt.name,mt.questiontext,mt.questiontextformat,mt.generalfeedback,mt.generalfeedbackformat,mt.defaultmark,mt.penalty,mt.qtype,mt.length,mt.stamp,mt.version,mt.hidden,mt.timecreated,mt.timemodified,mt.createdby,mt.modifiedby from mdl_mph_main_view mhv join mdl_question mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.category,mt.parent,mt.name,mt.questiontext,mt.questiontextformat,mt.generalfeedback,mt.generalfeedbackformat,mt.defaultmark,mt.penalty,mt.qtype,mt.length,mt.stamp,mt.version,mt.hidden,mt.timecreated,mt.timemodified,mt.createdby,mt.modifiedby from mdl_mph_main_view mhv join (select h.id,h.category,h.parent,h.name,h.questiontext,h.questiontextformat,h.generalfeedback,h.generalfeedbackformat,h.defaultmark,h.penalty,h.qtype,h.length,h.stamp,h.version,h.hidden,h.timecreated,h.timemodified,h.createdby,h.modifiedby from mdl_mph_qu h join (select id, max(time2) time2 from mdl_mph_qu group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question' 402 Query insert into mdl_mph_qu (id,time2,deleted2,category,parent,name,questiontext,questiontextformat,generalfeedback,generalfeedbackformat,defaultmark,penalty,qtype,length,stamp,version,hidden,timecreated,timemodified,createdby,modifiedby) select mhv.instance, mhv.time2, 1, mt.category,mt.parent,mt.name,mt.questiontext,mt.questiontextformat,mt.generalfeedback,mt.generalfeedbackformat,mt.defaultmark,mt.penalty,mt.qtype,mt.length,mt.stamp,mt.version,mt.hidden,mt.timecreated,mt.timemodified,mt.createdby,mt.modifiedby from mdl_mph_main_view mhv join (select h.id,h.category,h.parent,h.name,h.questiontext,h.questiontextformat,h.generalfeedback,h.generalfeedbackformat,h.defaultmark,h.penalty,h.qtype,h.length,h.stamp,h.version,h.hidden,h.timecreated,h.timemodified,h.createdby,h.modifiedby from mdl_mph_qu h join (select id, max(time2) time2 from mdl_mph_qu group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.question,mt.answer,mt.answerformat,mt.fraction,mt.feedback,mt.feedbackformat from mdl_mph_main_view mhv join mdl_question_answers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_answers' 402 Query insert into mdl_mph_qu1 (id,time2,deleted2,question,answer,answerformat,fraction,feedback,feedbackformat) select mhv.instance, mhv.time2, 0, mt.question,mt.answer,mt.answerformat,mt.fraction,mt.feedback,mt.feedbackformat from mdl_mph_main_view mhv join mdl_question_answers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_answers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_answers' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.question,mt.answer,mt.answerformat,mt.fraction,mt.feedback,mt.feedbackformat from mdl_mph_main_view mhv join mdl_question_answers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_answers' 402 Query insert into mdl_mph_qu1 (id,time2,deleted2,question,answer,answerformat,fraction,feedback,feedbackformat) select distinct mhv.instance, mhv.time2, 0, mt.question,mt.answer,mt.answerformat,mt.fraction,mt.feedback,mt.feedbackformat from mdl_mph_main_view mhv join mdl_question_answers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_answers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_answers' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.question,mt.answer,mt.answerformat,mt.fraction,mt.feedback,mt.feedbackformat from mdl_mph_main_view mhv join (select h.id,h.question,h.answer,h.answerformat,h.fraction,h.feedback,h.feedbackformat from mdl_mph_qu1 h join (select id, max(time2) time2 from mdl_mph_qu1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_answers' 402 Query insert into mdl_mph_qu1 (id,time2,deleted2,question,answer,answerformat,fraction,feedback,feedbackformat) select mhv.instance, mhv.time2, 1, mt.question,mt.answer,mt.answerformat,mt.fraction,mt.feedback,mt.feedbackformat from mdl_mph_main_view mhv join (select h.id,h.question,h.answer,h.answerformat,h.fraction,h.feedback,h.feedbackformat from mdl_mph_qu1 h join (select id, max(time2) time2 from mdl_mph_qu1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_answers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_answers' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.contextid,mt.info,mt.infoformat,mt.stamp,mt.parent,mt.sortorder from mdl_mph_main_view mhv join mdl_question_categories mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_categories' 402 Query insert into mdl_mph_qu2 (id,time2,deleted2,name,contextid,info,infoformat,stamp,parent,sortorder) select mhv.instance, mhv.time2, 0, mt.name,mt.contextid,mt.info,mt.infoformat,mt.stamp,mt.parent,mt.sortorder from mdl_mph_main_view mhv join mdl_question_categories mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_categories' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_categories' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.contextid,mt.info,mt.infoformat,mt.stamp,mt.parent,mt.sortorder from mdl_mph_main_view mhv join mdl_question_categories mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_categories' 402 Query insert into mdl_mph_qu2 (id,time2,deleted2,name,contextid,info,infoformat,stamp,parent,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.contextid,mt.info,mt.infoformat,mt.stamp,mt.parent,mt.sortorder from mdl_mph_main_view mhv join mdl_question_categories mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_categories' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_categories' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.contextid,mt.info,mt.infoformat,mt.stamp,mt.parent,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.name,h.contextid,h.info,h.infoformat,h.stamp,h.parent,h.sortorder from mdl_mph_qu2 h join (select id, max(time2) time2 from mdl_mph_qu2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_categories' 402 Query insert into mdl_mph_qu2 (id,time2,deleted2,name,contextid,info,infoformat,stamp,parent,sortorder) select mhv.instance, mhv.time2, 1, mt.name,mt.contextid,mt.info,mt.infoformat,mt.stamp,mt.parent,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.name,h.contextid,h.info,h.infoformat,h.stamp,h.parent,h.sortorder from mdl_mph_qu2 h join (select id, max(time2) time2 from mdl_mph_qu2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_categories' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_categories' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.hint,mt.hintformat,mt.shownumcorrect,mt.clearwrong,mt.options from mdl_mph_main_view mhv join mdl_question_hints mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_hints' 402 Query insert into mdl_mph_qu3 (id,time2,deleted2,questionid,hint,hintformat,shownumcorrect,clearwrong,options) select mhv.instance, mhv.time2, 0, mt.questionid,mt.hint,mt.hintformat,mt.shownumcorrect,mt.clearwrong,mt.options from mdl_mph_main_view mhv join mdl_question_hints mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_hints' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_hints' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionid,mt.hint,mt.hintformat,mt.shownumcorrect,mt.clearwrong,mt.options from mdl_mph_main_view mhv join mdl_question_hints mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_hints' 402 Query insert into mdl_mph_qu3 (id,time2,deleted2,questionid,hint,hintformat,shownumcorrect,clearwrong,options) select distinct mhv.instance, mhv.time2, 0, mt.questionid,mt.hint,mt.hintformat,mt.shownumcorrect,mt.clearwrong,mt.options from mdl_mph_main_view mhv join mdl_question_hints mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_hints' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_hints' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionid,mt.hint,mt.hintformat,mt.shownumcorrect,mt.clearwrong,mt.options from mdl_mph_main_view mhv join (select h.id,h.questionid,h.hint,h.hintformat,h.shownumcorrect,h.clearwrong,h.options from mdl_mph_qu3 h join (select id, max(time2) time2 from mdl_mph_qu3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_hints' 402 Query insert into mdl_mph_qu3 (id,time2,deleted2,questionid,hint,hintformat,shownumcorrect,clearwrong,options) select mhv.instance, mhv.time2, 1, mt.questionid,mt.hint,mt.hintformat,mt.shownumcorrect,mt.clearwrong,mt.options from mdl_mph_main_view mhv join (select h.id,h.questionid,h.hint,h.hintformat,h.shownumcorrect,h.clearwrong,h.options from mdl_mph_qu3 h join (select id, max(time2) time2 from mdl_mph_qu3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_hints' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_hints' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.question,mt.trueanswer,mt.falseanswer from mdl_mph_main_view mhv join mdl_question_truefalse mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_truefalse' 402 Query insert into mdl_mph_qu4 (id,time2,deleted2,question,trueanswer,falseanswer) select mhv.instance, mhv.time2, 0, mt.question,mt.trueanswer,mt.falseanswer from mdl_mph_main_view mhv join mdl_question_truefalse mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_truefalse' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_truefalse' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.question,mt.trueanswer,mt.falseanswer from mdl_mph_main_view mhv join mdl_question_truefalse mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_truefalse' 402 Query insert into mdl_mph_qu4 (id,time2,deleted2,question,trueanswer,falseanswer) select distinct mhv.instance, mhv.time2, 0, mt.question,mt.trueanswer,mt.falseanswer from mdl_mph_main_view mhv join mdl_question_truefalse mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_truefalse' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_truefalse' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.question,mt.trueanswer,mt.falseanswer from mdl_mph_main_view mhv join (select h.id,h.question,h.trueanswer,h.falseanswer from mdl_mph_qu4 h join (select id, max(time2) time2 from mdl_mph_qu4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_truefalse' 402 Query insert into mdl_mph_qu4 (id,time2,deleted2,question,trueanswer,falseanswer) select mhv.instance, mhv.time2, 1, mt.question,mt.trueanswer,mt.falseanswer from mdl_mph_main_view mhv join (select h.id,h.question,h.trueanswer,h.falseanswer from mdl_mph_qu4 h join (select id, max(time2) time2 from mdl_mph_qu4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_truefalse' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_truefalse' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.preferredbehaviour from mdl_mph_main_view mhv join mdl_question_usages mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_usages' 402 Query insert into mdl_mph_qu5 (id,time2,deleted2,contextid,component,preferredbehaviour) select mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.preferredbehaviour from mdl_mph_main_view mhv join mdl_question_usages mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_usages' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_usages' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.preferredbehaviour from mdl_mph_main_view mhv join mdl_question_usages mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_usages' 402 Query insert into mdl_mph_qu5 (id,time2,deleted2,contextid,component,preferredbehaviour) select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.component,mt.preferredbehaviour from mdl_mph_main_view mhv join mdl_question_usages mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_usages' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_usages' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contextid,mt.component,mt.preferredbehaviour from mdl_mph_main_view mhv join (select h.id,h.contextid,h.component,h.preferredbehaviour from mdl_mph_qu5 h join (select id, max(time2) time2 from mdl_mph_qu5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_usages' 402 Query insert into mdl_mph_qu5 (id,time2,deleted2,contextid,component,preferredbehaviour) select mhv.instance, mhv.time2, 1, mt.contextid,mt.component,mt.preferredbehaviour from mdl_mph_main_view mhv join (select h.id,h.contextid,h.component,h.preferredbehaviour from mdl_mph_qu5 h join (select id, max(time2) time2 from mdl_mph_qu5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_usages' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_usages' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.qtype,mt.respondenttype,mt.resp_eligible,mt.resp_view,mt.notifications,mt.opendate,mt.closedate,mt.resume,mt.navigate,mt.grade,mt.sid,mt.timemodified,mt.completionsubmit,mt.autonum from mdl_mph_main_view mhv join mdl_questionnaire mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire' 402 Query insert into mdl_mph_qu6 (id,time2,deleted2,course,name,intro,introformat,qtype,respondenttype,resp_eligible,resp_view,notifications,opendate,closedate,resume,navigate,grade,sid,timemodified,completionsubmit,autonum) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.qtype,mt.respondenttype,mt.resp_eligible,mt.resp_view,mt.notifications,mt.opendate,mt.closedate,mt.resume,mt.navigate,mt.grade,mt.sid,mt.timemodified,mt.completionsubmit,mt.autonum from mdl_mph_main_view mhv join mdl_questionnaire mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.qtype,mt.respondenttype,mt.resp_eligible,mt.resp_view,mt.notifications,mt.opendate,mt.closedate,mt.resume,mt.navigate,mt.grade,mt.sid,mt.timemodified,mt.completionsubmit,mt.autonum from mdl_mph_main_view mhv join mdl_questionnaire mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire' 402 Query insert into mdl_mph_qu6 (id,time2,deleted2,course,name,intro,introformat,qtype,respondenttype,resp_eligible,resp_view,notifications,opendate,closedate,resume,navigate,grade,sid,timemodified,completionsubmit,autonum) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.qtype,mt.respondenttype,mt.resp_eligible,mt.resp_view,mt.notifications,mt.opendate,mt.closedate,mt.resume,mt.navigate,mt.grade,mt.sid,mt.timemodified,mt.completionsubmit,mt.autonum from mdl_mph_main_view mhv join mdl_questionnaire mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.qtype,mt.respondenttype,mt.resp_eligible,mt.resp_view,mt.notifications,mt.opendate,mt.closedate,mt.resume,mt.navigate,mt.grade,mt.sid,mt.timemodified,mt.completionsubmit,mt.autonum from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.qtype,h.respondenttype,h.resp_eligible,h.resp_view,h.notifications,h.opendate,h.closedate,h.resume,h.navigate,h.grade,h.sid,h.timemodified,h.completionsubmit,h.autonum from mdl_mph_qu6 h join (select id, max(time2) time2 from mdl_mph_qu6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire' 402 Query insert into mdl_mph_qu6 (id,time2,deleted2,course,name,intro,introformat,qtype,respondenttype,resp_eligible,resp_view,notifications,opendate,closedate,resume,navigate,grade,sid,timemodified,completionsubmit,autonum) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.qtype,mt.respondenttype,mt.resp_eligible,mt.resp_view,mt.notifications,mt.opendate,mt.closedate,mt.resume,mt.navigate,mt.grade,mt.sid,mt.timemodified,mt.completionsubmit,mt.autonum from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.qtype,h.respondenttype,h.resp_eligible,h.resp_view,h.notifications,h.opendate,h.closedate,h.resume,h.navigate,h.grade,h.sid,h.timemodified,h.completionsubmit,h.autonum from mdl_mph_qu6 h join (select id, max(time2) time2 from mdl_mph_qu6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.qid,mt.userid,mt.rid,mt.timemodified from mdl_mph_main_view mhv join mdl_questionnaire_attempts mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_attempts' 402 Query insert into mdl_mph_qu7 (id,time2,deleted2,qid,userid,rid,timemodified) select mhv.instance, mhv.time2, 0, mt.qid,mt.userid,mt.rid,mt.timemodified from mdl_mph_main_view mhv join mdl_questionnaire_attempts mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_attempts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_attempts' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.qid,mt.userid,mt.rid,mt.timemodified from mdl_mph_main_view mhv join mdl_questionnaire_attempts mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_attempts' 402 Query insert into mdl_mph_qu7 (id,time2,deleted2,qid,userid,rid,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.qid,mt.userid,mt.rid,mt.timemodified from mdl_mph_main_view mhv join mdl_questionnaire_attempts mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_attempts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_attempts' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.qid,mt.userid,mt.rid,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.qid,h.userid,h.rid,h.timemodified from mdl_mph_qu7 h join (select id, max(time2) time2 from mdl_mph_qu7 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_attempts' 402 Query insert into mdl_mph_qu7 (id,time2,deleted2,qid,userid,rid,timemodified) select mhv.instance, mhv.time2, 1, mt.qid,mt.userid,mt.rid,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.qid,h.userid,h.rid,h.timemodified from mdl_mph_qu7 h join (select id, max(time2) time2 from mdl_mph_qu7 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_attempts' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_attempts' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.question_id,mt.content,mt.value from mdl_mph_main_view mhv join mdl_questionnaire_quest_choice mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_quest_choice' 402 Query insert into mdl_mph_qu8 (id,time2,deleted2,question_id,content,value) select mhv.instance, mhv.time2, 0, mt.question_id,mt.content,mt.value from mdl_mph_main_view mhv join mdl_questionnaire_quest_choice mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_quest_choice' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_quest_choice' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.question_id,mt.content,mt.value from mdl_mph_main_view mhv join mdl_questionnaire_quest_choice mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_quest_choice' 402 Query insert into mdl_mph_qu8 (id,time2,deleted2,question_id,content,value) select distinct mhv.instance, mhv.time2, 0, mt.question_id,mt.content,mt.value from mdl_mph_main_view mhv join mdl_questionnaire_quest_choice mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_quest_choice' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_quest_choice' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.question_id,mt.content,mt.value from mdl_mph_main_view mhv join (select h.id,h.question_id,h.content,h.value from mdl_mph_qu8 h join (select id, max(time2) time2 from mdl_mph_qu8 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_quest_choice' 402 Query insert into mdl_mph_qu8 (id,time2,deleted2,question_id,content,value) select mhv.instance, mhv.time2, 1, mt.question_id,mt.content,mt.value from mdl_mph_main_view mhv join (select h.id,h.question_id,h.content,h.value from mdl_mph_qu8 h join (select id, max(time2) time2 from mdl_mph_qu8 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_quest_choice' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_quest_choice' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.survey_id,mt.name,mt.type_id,mt.result_id,mt.length,mt.precise,mt.position,mt.content,mt.required,mt.deleted,mt.dependquestion,mt.dependchoice from mdl_mph_main_view mhv join mdl_questionnaire_question mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_question' 402 Query insert into mdl_mph_qu9 (id,time2,deleted2,survey_id,name,type_id,result_id,length,precise,position,content,required,deleted,dependquestion,dependchoice) select mhv.instance, mhv.time2, 0, mt.survey_id,mt.name,mt.type_id,mt.result_id,mt.length,mt.precise,mt.position,mt.content,mt.required,mt.deleted,mt.dependquestion,mt.dependchoice from mdl_mph_main_view mhv join mdl_questionnaire_question mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_question' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_question' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.survey_id,mt.name,mt.type_id,mt.result_id,mt.length,mt.precise,mt.position,mt.content,mt.required,mt.deleted,mt.dependquestion,mt.dependchoice from mdl_mph_main_view mhv join mdl_questionnaire_question mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_question' 402 Query insert into mdl_mph_qu9 (id,time2,deleted2,survey_id,name,type_id,result_id,length,precise,position,content,required,deleted,dependquestion,dependchoice) select distinct mhv.instance, mhv.time2, 0, mt.survey_id,mt.name,mt.type_id,mt.result_id,mt.length,mt.precise,mt.position,mt.content,mt.required,mt.deleted,mt.dependquestion,mt.dependchoice from mdl_mph_main_view mhv join mdl_questionnaire_question mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_question' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_question' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.survey_id,mt.name,mt.type_id,mt.result_id,mt.length,mt.precise,mt.position,mt.content,mt.required,mt.deleted,mt.dependquestion,mt.dependchoice from mdl_mph_main_view mhv join (select h.id,h.survey_id,h.name,h.type_id,h.result_id,h.length,h.precise,h.position,h.content,h.required,h.deleted,h.dependquestion,h.dependchoice from mdl_mph_qu9 h join (select id, max(time2) time2 from mdl_mph_qu9 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_question' 402 Query insert into mdl_mph_qu9 (id,time2,deleted2,survey_id,name,type_id,result_id,length,precise,position,content,required,deleted,dependquestion,dependchoice) select mhv.instance, mhv.time2, 1, mt.survey_id,mt.name,mt.type_id,mt.result_id,mt.length,mt.precise,mt.position,mt.content,mt.required,mt.deleted,mt.dependquestion,mt.dependchoice from mdl_mph_main_view mhv join (select h.id,h.survey_id,h.name,h.type_id,h.result_id,h.length,h.precise,h.position,h.content,h.required,h.deleted,h.dependquestion,h.dependchoice from mdl_mph_qu9 h join (select id, max(time2) time2 from mdl_mph_qu9 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_question' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_question' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.typeid,mt.type,mt.has_choices,mt.response_table from mdl_mph_main_view mhv join mdl_questionnaire_question_type mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_question_type' 402 Query insert into mdl_mph_qu10 (id,time2,deleted2,typeid,type,has_choices,response_table) select mhv.instance, mhv.time2, 0, mt.typeid,mt.type,mt.has_choices,mt.response_table from mdl_mph_main_view mhv join mdl_questionnaire_question_type mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_question_type' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_question_type' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.typeid,mt.type,mt.has_choices,mt.response_table from mdl_mph_main_view mhv join mdl_questionnaire_question_type mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_question_type' 402 Query insert into mdl_mph_qu10 (id,time2,deleted2,typeid,type,has_choices,response_table) select distinct mhv.instance, mhv.time2, 0, mt.typeid,mt.type,mt.has_choices,mt.response_table from mdl_mph_main_view mhv join mdl_questionnaire_question_type mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_question_type' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_question_type' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.typeid,mt.type,mt.has_choices,mt.response_table from mdl_mph_main_view mhv join (select h.id,h.typeid,h.type,h.has_choices,h.response_table from mdl_mph_qu10 h join (select id, max(time2) time2 from mdl_mph_qu10 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_question_type' 402 Query insert into mdl_mph_qu10 (id,time2,deleted2,typeid,type,has_choices,response_table) select mhv.instance, mhv.time2, 1, mt.typeid,mt.type,mt.has_choices,mt.response_table from mdl_mph_main_view mhv join (select h.id,h.typeid,h.type,h.has_choices,h.response_table from mdl_mph_qu10 h join (select id, max(time2) time2 from mdl_mph_qu10 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_question_type' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_question_type' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_multiple mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_resp_multiple' 402 Query insert into mdl_mph_qu11 (id,time2,deleted2,response_id,question_id,choice_id) select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_multiple mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_resp_multiple' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_resp_multiple' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_multiple mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_resp_multiple' 402 Query insert into mdl_mph_qu11 (id,time2,deleted2,response_id,question_id,choice_id) select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_multiple mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_resp_multiple' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_resp_multiple' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id from mdl_mph_qu11 h join (select id, max(time2) time2 from mdl_mph_qu11 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_resp_multiple' 402 Query insert into mdl_mph_qu11 (id,time2,deleted2,response_id,question_id,choice_id) select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id from mdl_mph_qu11 h join (select id, max(time2) time2 from mdl_mph_qu11 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_resp_multiple' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_resp_multiple' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_single mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_resp_single' 402 Query insert into mdl_mph_qu12 (id,time2,deleted2,response_id,question_id,choice_id) select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_single mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_resp_single' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_resp_single' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_single mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_resp_single' 402 Query insert into mdl_mph_qu12 (id,time2,deleted2,response_id,question_id,choice_id) select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_resp_single mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_resp_single' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_resp_single' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id from mdl_mph_qu12 h join (select id, max(time2) time2 from mdl_mph_qu12 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_resp_single' 402 Query insert into mdl_mph_qu12 (id,time2,deleted2,response_id,question_id,choice_id) select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id from mdl_mph_qu12 h join (select id, max(time2) time2 from mdl_mph_qu12 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_resp_single' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_resp_single' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.survey_id,mt.submitted,mt.complete,mt.grade,mt.userid from mdl_mph_main_view mhv join mdl_questionnaire_response mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response' 402 Query insert into mdl_mph_qu13 (id,time2,deleted2,survey_id,submitted,complete,grade,userid) select mhv.instance, mhv.time2, 0, mt.survey_id,mt.submitted,mt.complete,mt.grade,mt.userid from mdl_mph_main_view mhv join mdl_questionnaire_response mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.survey_id,mt.submitted,mt.complete,mt.grade,mt.userid from mdl_mph_main_view mhv join mdl_questionnaire_response mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response' 402 Query insert into mdl_mph_qu13 (id,time2,deleted2,survey_id,submitted,complete,grade,userid) select distinct mhv.instance, mhv.time2, 0, mt.survey_id,mt.submitted,mt.complete,mt.grade,mt.userid from mdl_mph_main_view mhv join mdl_questionnaire_response mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.survey_id,mt.submitted,mt.complete,mt.grade,mt.userid from mdl_mph_main_view mhv join (select h.id,h.survey_id,h.submitted,h.complete,h.grade,h.userid from mdl_mph_qu13 h join (select id, max(time2) time2 from mdl_mph_qu13 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response' 402 Query insert into mdl_mph_qu13 (id,time2,deleted2,survey_id,submitted,complete,grade,userid) select mhv.instance, mhv.time2, 1, mt.survey_id,mt.submitted,mt.complete,mt.grade,mt.userid from mdl_mph_main_view mhv join (select h.id,h.survey_id,h.submitted,h.complete,h.grade,h.userid from mdl_mph_qu13 h join (select id, max(time2) time2 from mdl_mph_qu13 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_response_bool mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response_bool' 402 Query insert into mdl_mph_qu14 (id,time2,deleted2,response_id,question_id,choice_id) select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_response_bool mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response_bool' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_bool' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_response_bool mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response_bool' 402 Query insert into mdl_mph_qu14 (id,time2,deleted2,response_id,question_id,choice_id) select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join mdl_questionnaire_response_bool mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response_bool' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_bool' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id from mdl_mph_qu14 h join (select id, max(time2) time2 from mdl_mph_qu14 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response_bool' 402 Query insert into mdl_mph_qu14 (id,time2,deleted2,response_id,question_id,choice_id) select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id from mdl_mph_qu14 h join (select id, max(time2) time2 from mdl_mph_qu14 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response_bool' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_bool' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id,mt.rank from mdl_mph_main_view mhv join mdl_questionnaire_response_rank mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response_rank' 402 Query insert into mdl_mph_qu15 (id,time2,deleted2,response_id,question_id,choice_id,rank) select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id,mt.rank from mdl_mph_main_view mhv join mdl_questionnaire_response_rank mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response_rank' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_rank' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id,mt.rank from mdl_mph_main_view mhv join mdl_questionnaire_response_rank mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response_rank' 402 Query insert into mdl_mph_qu15 (id,time2,deleted2,response_id,question_id,choice_id,rank) select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.choice_id,mt.rank from mdl_mph_main_view mhv join mdl_questionnaire_response_rank mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response_rank' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_rank' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id,mt.rank from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id,h.rank from mdl_mph_qu15 h join (select id, max(time2) time2 from mdl_mph_qu15 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response_rank' 402 Query insert into mdl_mph_qu15 (id,time2,deleted2,response_id,question_id,choice_id,rank) select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.choice_id,mt.rank from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.choice_id,h.rank from mdl_mph_qu15 h join (select id, max(time2) time2 from mdl_mph_qu15 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response_rank' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_rank' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.response from mdl_mph_main_view mhv join mdl_questionnaire_response_text mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response_text' 402 Query insert into mdl_mph_qu16 (id,time2,deleted2,response_id,question_id,response) select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.response from mdl_mph_main_view mhv join mdl_questionnaire_response_text mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_response_text' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_text' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.response from mdl_mph_main_view mhv join mdl_questionnaire_response_text mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response_text' 402 Query insert into mdl_mph_qu16 (id,time2,deleted2,response_id,question_id,response) select distinct mhv.instance, mhv.time2, 0, mt.response_id,mt.question_id,mt.response from mdl_mph_main_view mhv join mdl_questionnaire_response_text mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_response_text' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_text' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.response from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.response from mdl_mph_qu16 h join (select id, max(time2) time2 from mdl_mph_qu16 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response_text' 402 Query insert into mdl_mph_qu16 (id,time2,deleted2,response_id,question_id,response) select mhv.instance, mhv.time2, 1, mt.response_id,mt.question_id,mt.response from mdl_mph_main_view mhv join (select h.id,h.response_id,h.question_id,h.response from mdl_mph_qu16 h join (select id, max(time2) time2 from mdl_mph_qu16 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_response_text' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_response_text' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.courseid,mt.realm,mt.status,mt.title,mt.email,mt.subtitle,mt.info,mt.theme,mt.thanks_page,mt.thank_head,mt.thank_body,mt.feedbacksections,mt.feedbacknotes,mt.chart_type,mt.feedbackscores from mdl_mph_main_view mhv join mdl_questionnaire_survey mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_survey' 402 Query insert into mdl_mph_qu17 (id,time2,deleted2,name,courseid,realm,status,title,email,subtitle,info,theme,thanks_page,thank_head,thank_body,feedbacksections,feedbacknotes,chart_type,feedbackscores) select mhv.instance, mhv.time2, 0, mt.name,mt.courseid,mt.realm,mt.status,mt.title,mt.email,mt.subtitle,mt.info,mt.theme,mt.thanks_page,mt.thank_head,mt.thank_body,mt.feedbacksections,mt.feedbacknotes,mt.chart_type,mt.feedbackscores from mdl_mph_main_view mhv join mdl_questionnaire_survey mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='questionnaire_survey' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_survey' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.courseid,mt.realm,mt.status,mt.title,mt.email,mt.subtitle,mt.info,mt.theme,mt.thanks_page,mt.thank_head,mt.thank_body,mt.feedbacksections,mt.feedbacknotes,mt.chart_type,mt.feedbackscores from mdl_mph_main_view mhv join mdl_questionnaire_survey mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_survey' 402 Query insert into mdl_mph_qu17 (id,time2,deleted2,name,courseid,realm,status,title,email,subtitle,info,theme,thanks_page,thank_head,thank_body,feedbacksections,feedbacknotes,chart_type,feedbackscores) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.courseid,mt.realm,mt.status,mt.title,mt.email,mt.subtitle,mt.info,mt.theme,mt.thanks_page,mt.thank_head,mt.thank_body,mt.feedbacksections,mt.feedbacknotes,mt.chart_type,mt.feedbackscores from mdl_mph_main_view mhv join mdl_questionnaire_survey mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='questionnaire_survey' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_survey' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.courseid,mt.realm,mt.status,mt.title,mt.email,mt.subtitle,mt.info,mt.theme,mt.thanks_page,mt.thank_head,mt.thank_body,mt.feedbacksections,mt.feedbacknotes,mt.chart_type,mt.feedbackscores from mdl_mph_main_view mhv join (select h.id,h.name,h.courseid,h.realm,h.status,h.title,h.email,h.subtitle,h.info,h.theme,h.thanks_page,h.thank_head,h.thank_body,h.feedbacksections,h.feedbacknotes,h.chart_type,h.feedbackscores from mdl_mph_qu17 h join (select id, max(time2) time2 from mdl_mph_qu17 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_survey' 402 Query insert into mdl_mph_qu17 (id,time2,deleted2,name,courseid,realm,status,title,email,subtitle,info,theme,thanks_page,thank_head,thank_body,feedbacksections,feedbacknotes,chart_type,feedbackscores) select mhv.instance, mhv.time2, 1, mt.name,mt.courseid,mt.realm,mt.status,mt.title,mt.email,mt.subtitle,mt.info,mt.theme,mt.thanks_page,mt.thank_head,mt.thank_body,mt.feedbacksections,mt.feedbacknotes,mt.chart_type,mt.feedbackscores from mdl_mph_main_view mhv join (select h.id,h.name,h.courseid,h.realm,h.status,h.title,h.email,h.subtitle,h.info,h.theme,h.thanks_page,h.thank_head,h.thank_body,h.feedbacksections,h.feedbacknotes,h.chart_type,h.feedbackscores from mdl_mph_qu17 h join (select id, max(time2) time2 from mdl_mph_qu17 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='questionnaire_survey' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='questionnaire_survey' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timeopen,mt.timeclose,mt.preferredbehaviour,mt.canredoquestions,mt.attempts,mt.attemptonlast,mt.grademethod,mt.decimalpoints,mt.questiondecimalpoints,mt.reviewattempt,mt.reviewcorrectness,mt.reviewmarks,mt.reviewspecificfeedback,mt.reviewgeneralfeedback,mt.reviewrightanswer,mt.reviewoverallfeedback,mt.questionsperpage,mt.shuffleanswers,mt.sumgrades,mt.grade,mt.timecreated,mt.timemodified,mt.timelimit,mt.overduehandling,mt.graceperiod,mt.password,mt.subnet,mt.browsersecurity,mt.delay1,mt.delay2,mt.showuserpicture,mt.showblocks,mt.completionattemptsexhausted,mt.completionpass,mt.allowofflineattempts,mt.navmethod from mdl_mph_main_view mhv join mdl_quiz mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz' 402 Query insert into mdl_mph_qu18 (id,time2,deleted2,course,name,intro,introformat,timeopen,timeclose,preferredbehaviour,canredoquestions,attempts,attemptonlast,grademethod,decimalpoints,questiondecimalpoints,reviewattempt,reviewcorrectness,reviewmarks,reviewspecificfeedback,reviewgeneralfeedback,reviewrightanswer,reviewoverallfeedback,questionsperpage,shuffleanswers,sumgrades,grade,timecreated,timemodified,timelimit,overduehandling,graceperiod,password,subnet,browsersecurity,delay1,delay2,showuserpicture,showblocks,completionattemptsexhausted,completionpass,allowofflineattempts,navmethod) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timeopen,mt.timeclose,mt.preferredbehaviour,mt.canredoquestions,mt.attempts,mt.attemptonlast,mt.grademethod,mt.decimalpoints,mt.questiondecimalpoints,mt.reviewattempt,mt.reviewcorrectness,mt.reviewmarks,mt.reviewspecificfeedback,mt.reviewgeneralfeedback,mt.reviewrightanswer,mt.reviewoverallfeedback,mt.questionsperpage,mt.shuffleanswers,mt.sumgrades,mt.grade,mt.timecreated,mt.timemodified,mt.timelimit,mt.overduehandling,mt.graceperiod,mt.password,mt.subnet,mt.browsersecurity,mt.delay1,mt.delay2,mt.showuserpicture,mt.showblocks,mt.completionattemptsexhausted,mt.completionpass,mt.allowofflineattempts,mt.navmethod from mdl_mph_main_view mhv join mdl_quiz mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timeopen,mt.timeclose,mt.preferredbehaviour,mt.canredoquestions,mt.attempts,mt.attemptonlast,mt.grademethod,mt.decimalpoints,mt.questiondecimalpoints,mt.reviewattempt,mt.reviewcorrectness,mt.reviewmarks,mt.reviewspecificfeedback,mt.reviewgeneralfeedback,mt.reviewrightanswer,mt.reviewoverallfeedback,mt.questionsperpage,mt.shuffleanswers,mt.sumgrades,mt.grade,mt.timecreated,mt.timemodified,mt.timelimit,mt.overduehandling,mt.graceperiod,mt.password,mt.subnet,mt.browsersecurity,mt.delay1,mt.delay2,mt.showuserpicture,mt.showblocks,mt.completionattemptsexhausted,mt.completionpass,mt.allowofflineattempts,mt.navmethod from mdl_mph_main_view mhv join mdl_quiz mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz' 402 Query insert into mdl_mph_qu18 (id,time2,deleted2,course,name,intro,introformat,timeopen,timeclose,preferredbehaviour,canredoquestions,attempts,attemptonlast,grademethod,decimalpoints,questiondecimalpoints,reviewattempt,reviewcorrectness,reviewmarks,reviewspecificfeedback,reviewgeneralfeedback,reviewrightanswer,reviewoverallfeedback,questionsperpage,shuffleanswers,sumgrades,grade,timecreated,timemodified,timelimit,overduehandling,graceperiod,password,subnet,browsersecurity,delay1,delay2,showuserpicture,showblocks,completionattemptsexhausted,completionpass,allowofflineattempts,navmethod) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.timeopen,mt.timeclose,mt.preferredbehaviour,mt.canredoquestions,mt.attempts,mt.attemptonlast,mt.grademethod,mt.decimalpoints,mt.questiondecimalpoints,mt.reviewattempt,mt.reviewcorrectness,mt.reviewmarks,mt.reviewspecificfeedback,mt.reviewgeneralfeedback,mt.reviewrightanswer,mt.reviewoverallfeedback,mt.questionsperpage,mt.shuffleanswers,mt.sumgrades,mt.grade,mt.timecreated,mt.timemodified,mt.timelimit,mt.overduehandling,mt.graceperiod,mt.password,mt.subnet,mt.browsersecurity,mt.delay1,mt.delay2,mt.showuserpicture,mt.showblocks,mt.completionattemptsexhausted,mt.completionpass,mt.allowofflineattempts,mt.navmethod from mdl_mph_main_view mhv join mdl_quiz mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.timeopen,mt.timeclose,mt.preferredbehaviour,mt.canredoquestions,mt.attempts,mt.attemptonlast,mt.grademethod,mt.decimalpoints,mt.questiondecimalpoints,mt.reviewattempt,mt.reviewcorrectness,mt.reviewmarks,mt.reviewspecificfeedback,mt.reviewgeneralfeedback,mt.reviewrightanswer,mt.reviewoverallfeedback,mt.questionsperpage,mt.shuffleanswers,mt.sumgrades,mt.grade,mt.timecreated,mt.timemodified,mt.timelimit,mt.overduehandling,mt.graceperiod,mt.password,mt.subnet,mt.browsersecurity,mt.delay1,mt.delay2,mt.showuserpicture,mt.showblocks,mt.completionattemptsexhausted,mt.completionpass,mt.allowofflineattempts,mt.navmethod from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.timeopen,h.timeclose,h.preferredbehaviour,h.canredoquestions,h.attempts,h.attemptonlast,h.grademethod,h.decimalpoints,h.questiondecimalpoints,h.reviewattempt,h.reviewcorrectness,h.reviewmarks,h.reviewspecificfeedback,h.reviewgeneralfeedback,h.reviewrightanswer,h.reviewoverallfeedback,h.questionsperpage,h.shuffleanswers,h.sumgrades,h.grade,h.timecreated,h.timemodified,h.timelimit,h.overduehandling,h.graceperiod,h.password,h.subnet,h.browsersecurity,h.delay1,h.delay2,h.showuserpicture,h.showblocks,h.completionattemptsexhausted,h.completionpass,h.allowofflineattempts,h.navmethod from mdl_mph_qu18 h join (select id, max(time2) time2 from mdl_mph_qu18 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz' 402 Query insert into mdl_mph_qu18 (id,time2,deleted2,course,name,intro,introformat,timeopen,timeclose,preferredbehaviour,canredoquestions,attempts,attemptonlast,grademethod,decimalpoints,questiondecimalpoints,reviewattempt,reviewcorrectness,reviewmarks,reviewspecificfeedback,reviewgeneralfeedback,reviewrightanswer,reviewoverallfeedback,questionsperpage,shuffleanswers,sumgrades,grade,timecreated,timemodified,timelimit,overduehandling,graceperiod,password,subnet,browsersecurity,delay1,delay2,showuserpicture,showblocks,completionattemptsexhausted,completionpass,allowofflineattempts,navmethod) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.timeopen,mt.timeclose,mt.preferredbehaviour,mt.canredoquestions,mt.attempts,mt.attemptonlast,mt.grademethod,mt.decimalpoints,mt.questiondecimalpoints,mt.reviewattempt,mt.reviewcorrectness,mt.reviewmarks,mt.reviewspecificfeedback,mt.reviewgeneralfeedback,mt.reviewrightanswer,mt.reviewoverallfeedback,mt.questionsperpage,mt.shuffleanswers,mt.sumgrades,mt.grade,mt.timecreated,mt.timemodified,mt.timelimit,mt.overduehandling,mt.graceperiod,mt.password,mt.subnet,mt.browsersecurity,mt.delay1,mt.delay2,mt.showuserpicture,mt.showblocks,mt.completionattemptsexhausted,mt.completionpass,mt.allowofflineattempts,mt.navmethod from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.timeopen,h.timeclose,h.preferredbehaviour,h.canredoquestions,h.attempts,h.attemptonlast,h.grademethod,h.decimalpoints,h.questiondecimalpoints,h.reviewattempt,h.reviewcorrectness,h.reviewmarks,h.reviewspecificfeedback,h.reviewgeneralfeedback,h.reviewrightanswer,h.reviewoverallfeedback,h.questionsperpage,h.shuffleanswers,h.sumgrades,h.grade,h.timecreated,h.timemodified,h.timelimit,h.overduehandling,h.graceperiod,h.password,h.subnet,h.browsersecurity,h.delay1,h.delay2,h.showuserpicture,h.showblocks,h.completionattemptsexhausted,h.completionpass,h.allowofflineattempts,h.navmethod from mdl_mph_qu18 h join (select id, max(time2) time2 from mdl_mph_qu18 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.quizid,mt.feedbacktext,mt.feedbacktextformat,mt.mingrade,mt.maxgrade from mdl_mph_main_view mhv join mdl_quiz_feedback mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_feedback' 402 Query insert into mdl_mph_qu19 (id,time2,deleted2,quizid,feedbacktext,feedbacktextformat,mingrade,maxgrade) select mhv.instance, mhv.time2, 0, mt.quizid,mt.feedbacktext,mt.feedbacktextformat,mt.mingrade,mt.maxgrade from mdl_mph_main_view mhv join mdl_quiz_feedback mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_feedback' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_feedback' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.quizid,mt.feedbacktext,mt.feedbacktextformat,mt.mingrade,mt.maxgrade from mdl_mph_main_view mhv join mdl_quiz_feedback mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_feedback' 402 Query insert into mdl_mph_qu19 (id,time2,deleted2,quizid,feedbacktext,feedbacktextformat,mingrade,maxgrade) select distinct mhv.instance, mhv.time2, 0, mt.quizid,mt.feedbacktext,mt.feedbacktextformat,mt.mingrade,mt.maxgrade from mdl_mph_main_view mhv join mdl_quiz_feedback mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_feedback' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_feedback' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.quizid,mt.feedbacktext,mt.feedbacktextformat,mt.mingrade,mt.maxgrade from mdl_mph_main_view mhv join (select h.id,h.quizid,h.feedbacktext,h.feedbacktextformat,h.mingrade,h.maxgrade from mdl_mph_qu19 h join (select id, max(time2) time2 from mdl_mph_qu19 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_feedback' 402 Query insert into mdl_mph_qu19 (id,time2,deleted2,quizid,feedbacktext,feedbacktextformat,mingrade,maxgrade) select mhv.instance, mhv.time2, 1, mt.quizid,mt.feedbacktext,mt.feedbacktextformat,mt.mingrade,mt.maxgrade from mdl_mph_main_view mhv join (select h.id,h.quizid,h.feedbacktext,h.feedbacktextformat,h.mingrade,h.maxgrade from mdl_mph_qu19 h join (select id, max(time2) time2 from mdl_mph_qu19 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_feedback' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_feedback' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.quiz,mt.userid,mt.grade,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_grades mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_grades' 402 Query insert into mdl_mph_qu20 (id,time2,deleted2,quiz,userid,grade,timemodified) select mhv.instance, mhv.time2, 0, mt.quiz,mt.userid,mt.grade,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_grades mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_grades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_grades' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.quiz,mt.userid,mt.grade,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_grades mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_grades' 402 Query insert into mdl_mph_qu20 (id,time2,deleted2,quiz,userid,grade,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.quiz,mt.userid,mt.grade,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_grades mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_grades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_grades' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.quiz,mt.userid,mt.grade,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.quiz,h.userid,h.grade,h.timemodified from mdl_mph_qu20 h join (select id, max(time2) time2 from mdl_mph_qu20 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_grades' 402 Query insert into mdl_mph_qu20 (id,time2,deleted2,quiz,userid,grade,timemodified) select mhv.instance, mhv.time2, 1, mt.quiz,mt.userid,mt.grade,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.quiz,h.userid,h.grade,h.timemodified from mdl_mph_qu20 h join (select id, max(time2) time2 from mdl_mph_qu20 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_grades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_grades' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.questionusageid,mt.slot,mt.newfraction,mt.oldfraction,mt.regraded,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_overview_regrades mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_overview_regrades' 402 Query insert into mdl_mph_qu21 (id,time2,deleted2,questionusageid,slot,newfraction,oldfraction,regraded,timemodified) select mhv.instance, mhv.time2, 0, mt.questionusageid,mt.slot,mt.newfraction,mt.oldfraction,mt.regraded,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_overview_regrades mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_overview_regrades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_overview_regrades' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.questionusageid,mt.slot,mt.newfraction,mt.oldfraction,mt.regraded,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_overview_regrades mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_overview_regrades' 402 Query insert into mdl_mph_qu21 (id,time2,deleted2,questionusageid,slot,newfraction,oldfraction,regraded,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.questionusageid,mt.slot,mt.newfraction,mt.oldfraction,mt.regraded,mt.timemodified from mdl_mph_main_view mhv join mdl_quiz_overview_regrades mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_overview_regrades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_overview_regrades' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.questionusageid,mt.slot,mt.newfraction,mt.oldfraction,mt.regraded,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.questionusageid,h.slot,h.newfraction,h.oldfraction,h.regraded,h.timemodified from mdl_mph_qu21 h join (select id, max(time2) time2 from mdl_mph_qu21 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_overview_regrades' 402 Query insert into mdl_mph_qu21 (id,time2,deleted2,questionusageid,slot,newfraction,oldfraction,regraded,timemodified) select mhv.instance, mhv.time2, 1, mt.questionusageid,mt.slot,mt.newfraction,mt.oldfraction,mt.regraded,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.questionusageid,h.slot,h.newfraction,h.oldfraction,h.regraded,h.timemodified from mdl_mph_qu21 h join (select id, max(time2) time2 from mdl_mph_qu21 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_overview_regrades' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_overview_regrades' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.displayorder,mt.capability from mdl_mph_main_view mhv join mdl_quiz_reports mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_reports' 402 Query insert into mdl_mph_qu22 (id,time2,deleted2,name,displayorder,capability) select mhv.instance, mhv.time2, 0, mt.name,mt.displayorder,mt.capability from mdl_mph_main_view mhv join mdl_quiz_reports mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_reports' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_reports' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.displayorder,mt.capability from mdl_mph_main_view mhv join mdl_quiz_reports mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_reports' 402 Query insert into mdl_mph_qu22 (id,time2,deleted2,name,displayorder,capability) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.displayorder,mt.capability from mdl_mph_main_view mhv join mdl_quiz_reports mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_reports' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_reports' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.displayorder,mt.capability from mdl_mph_main_view mhv join (select h.id,h.name,h.displayorder,h.capability from mdl_mph_qu22 h join (select id, max(time2) time2 from mdl_mph_qu22 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_reports' 402 Query insert into mdl_mph_qu22 (id,time2,deleted2,name,displayorder,capability) select mhv.instance, mhv.time2, 1, mt.name,mt.displayorder,mt.capability from mdl_mph_main_view mhv join (select h.id,h.name,h.displayorder,h.capability from mdl_mph_qu22 h join (select id, max(time2) time2 from mdl_mph_qu22 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_reports' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_reports' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.quizid,mt.firstslot,mt.heading,mt.shufflequestions from mdl_mph_main_view mhv join mdl_quiz_sections mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_sections' 402 Query insert into mdl_mph_qu23 (id,time2,deleted2,quizid,firstslot,heading,shufflequestions) select mhv.instance, mhv.time2, 0, mt.quizid,mt.firstslot,mt.heading,mt.shufflequestions from mdl_mph_main_view mhv join mdl_quiz_sections mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_sections' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_sections' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.quizid,mt.firstslot,mt.heading,mt.shufflequestions from mdl_mph_main_view mhv join mdl_quiz_sections mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_sections' 402 Query insert into mdl_mph_qu23 (id,time2,deleted2,quizid,firstslot,heading,shufflequestions) select distinct mhv.instance, mhv.time2, 0, mt.quizid,mt.firstslot,mt.heading,mt.shufflequestions from mdl_mph_main_view mhv join mdl_quiz_sections mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_sections' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_sections' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.quizid,mt.firstslot,mt.heading,mt.shufflequestions from mdl_mph_main_view mhv join (select h.id,h.quizid,h.firstslot,h.heading,h.shufflequestions from mdl_mph_qu23 h join (select id, max(time2) time2 from mdl_mph_qu23 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_sections' 402 Query insert into mdl_mph_qu23 (id,time2,deleted2,quizid,firstslot,heading,shufflequestions) select mhv.instance, mhv.time2, 1, mt.quizid,mt.firstslot,mt.heading,mt.shufflequestions from mdl_mph_main_view mhv join (select h.id,h.quizid,h.firstslot,h.heading,h.shufflequestions from mdl_mph_qu23 h join (select id, max(time2) time2 from mdl_mph_qu23 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_sections' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_sections' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.slot,mt.quizid,mt.page,mt.requireprevious,mt.questionid,mt.maxmark from mdl_mph_main_view mhv join mdl_quiz_slots mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_slots' 402 Query insert into mdl_mph_qu24 (id,time2,deleted2,slot,quizid,page,requireprevious,questionid,maxmark) select mhv.instance, mhv.time2, 0, mt.slot,mt.quizid,mt.page,mt.requireprevious,mt.questionid,mt.maxmark from mdl_mph_main_view mhv join mdl_quiz_slots mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_slots' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_slots' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.slot,mt.quizid,mt.page,mt.requireprevious,mt.questionid,mt.maxmark from mdl_mph_main_view mhv join mdl_quiz_slots mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_slots' 402 Query insert into mdl_mph_qu24 (id,time2,deleted2,slot,quizid,page,requireprevious,questionid,maxmark) select distinct mhv.instance, mhv.time2, 0, mt.slot,mt.quizid,mt.page,mt.requireprevious,mt.questionid,mt.maxmark from mdl_mph_main_view mhv join mdl_quiz_slots mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_slots' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_slots' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.slot,mt.quizid,mt.page,mt.requireprevious,mt.questionid,mt.maxmark from mdl_mph_main_view mhv join (select h.id,h.slot,h.quizid,h.page,h.requireprevious,h.questionid,h.maxmark from mdl_mph_qu24 h join (select id, max(time2) time2 from mdl_mph_qu24 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_slots' 402 Query insert into mdl_mph_qu24 (id,time2,deleted2,slot,quizid,page,requireprevious,questionid,maxmark) select mhv.instance, mhv.time2, 1, mt.slot,mt.quizid,mt.page,mt.requireprevious,mt.questionid,mt.maxmark from mdl_mph_main_view mhv join (select h.id,h.slot,h.quizid,h.page,h.requireprevious,h.questionid,h.maxmark from mdl_mph_qu24 h join (select id, max(time2) time2 from mdl_mph_qu24 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_slots' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_slots' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.type,mt.visible,mt.sortorder from mdl_mph_main_view mhv join mdl_repository mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='repository' 402 Query insert into mdl_mph_re (id,time2,deleted2,type,visible,sortorder) select mhv.instance, mhv.time2, 0, mt.type,mt.visible,mt.sortorder from mdl_mph_main_view mhv join mdl_repository mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='repository' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='repository' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.type,mt.visible,mt.sortorder from mdl_mph_main_view mhv join mdl_repository mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='repository' 402 Query insert into mdl_mph_re (id,time2,deleted2,type,visible,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.type,mt.visible,mt.sortorder from mdl_mph_main_view mhv join mdl_repository mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='repository' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='repository' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.type,mt.visible,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.type,h.visible,h.sortorder from mdl_mph_re h join (select id, max(time2) time2 from mdl_mph_re group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='repository' 402 Query insert into mdl_mph_re (id,time2,deleted2,type,visible,sortorder) select mhv.instance, mhv.time2, 1, mt.type,mt.visible,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.type,h.visible,h.sortorder from mdl_mph_re h join (select id, max(time2) time2 from mdl_mph_re group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='repository' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='repository' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.typeid,mt.userid,mt.contextid,mt.username,mt.password,mt.timecreated,mt.timemodified,mt.readonly from mdl_mph_main_view mhv join mdl_repository_instances mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='repository_instances' 402 Query insert into mdl_mph_re1 (id,time2,deleted2,name,typeid,userid,contextid,username,password,timecreated,timemodified,readonly) select mhv.instance, mhv.time2, 0, mt.name,mt.typeid,mt.userid,mt.contextid,mt.username,mt.password,mt.timecreated,mt.timemodified,mt.readonly from mdl_mph_main_view mhv join mdl_repository_instances mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='repository_instances' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='repository_instances' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.typeid,mt.userid,mt.contextid,mt.username,mt.password,mt.timecreated,mt.timemodified,mt.readonly from mdl_mph_main_view mhv join mdl_repository_instances mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='repository_instances' 402 Query insert into mdl_mph_re1 (id,time2,deleted2,name,typeid,userid,contextid,username,password,timecreated,timemodified,readonly) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.typeid,mt.userid,mt.contextid,mt.username,mt.password,mt.timecreated,mt.timemodified,mt.readonly from mdl_mph_main_view mhv join mdl_repository_instances mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='repository_instances' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='repository_instances' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.typeid,mt.userid,mt.contextid,mt.username,mt.password,mt.timecreated,mt.timemodified,mt.readonly from mdl_mph_main_view mhv join (select h.id,h.name,h.typeid,h.userid,h.contextid,h.username,h.password,h.timecreated,h.timemodified,h.readonly from mdl_mph_re1 h join (select id, max(time2) time2 from mdl_mph_re1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='repository_instances' 402 Query insert into mdl_mph_re1 (id,time2,deleted2,name,typeid,userid,contextid,username,password,timecreated,timemodified,readonly) select mhv.instance, mhv.time2, 1, mt.name,mt.typeid,mt.userid,mt.contextid,mt.username,mt.password,mt.timecreated,mt.timemodified,mt.readonly from mdl_mph_main_view mhv join (select h.id,h.name,h.typeid,h.userid,h.contextid,h.username,h.password,h.timecreated,h.timemodified,h.readonly from mdl_mph_re1 h join (select id, max(time2) time2 from mdl_mph_re1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='repository_instances' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='repository_instances' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.tobemigrated,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.filterfiles,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_resource mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='resource' 402 Query insert into mdl_mph_re2 (id,time2,deleted2,course,name,intro,introformat,tobemigrated,legacyfiles,legacyfileslast,display,displayoptions,filterfiles,revision,timemodified) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.tobemigrated,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.filterfiles,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_resource mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='resource' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='resource' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.tobemigrated,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.filterfiles,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_resource mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='resource' 402 Query insert into mdl_mph_re2 (id,time2,deleted2,course,name,intro,introformat,tobemigrated,legacyfiles,legacyfileslast,display,displayoptions,filterfiles,revision,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.tobemigrated,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.filterfiles,mt.revision,mt.timemodified from mdl_mph_main_view mhv join mdl_resource mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='resource' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='resource' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.tobemigrated,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.filterfiles,mt.revision,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.tobemigrated,h.legacyfiles,h.legacyfileslast,h.display,h.displayoptions,h.filterfiles,h.revision,h.timemodified from mdl_mph_re2 h join (select id, max(time2) time2 from mdl_mph_re2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='resource' 402 Query insert into mdl_mph_re2 (id,time2,deleted2,course,name,intro,introformat,tobemigrated,legacyfiles,legacyfileslast,display,displayoptions,filterfiles,revision,timemodified) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.tobemigrated,mt.legacyfiles,mt.legacyfileslast,mt.display,mt.displayoptions,mt.filterfiles,mt.revision,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.tobemigrated,h.legacyfiles,h.legacyfileslast,h.display,h.displayoptions,h.filterfiles,h.revision,h.timemodified from mdl_mph_re2 h join (select id, max(time2) time2 from mdl_mph_re2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='resource' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='resource' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.type,mt.reference,mt.intro,mt.introformat,mt.alltext,mt.popup,mt.options,mt.timemodified,mt.oldid,mt.cmid,mt.newmodule,mt.newid,mt.migrated from mdl_mph_main_view mhv join mdl_resource_old mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='resource_old' 402 Query insert into mdl_mph_re3 (id,time2,deleted2,course,name,type,reference,intro,introformat,alltext,popup,options,timemodified,oldid,cmid,newmodule,newid,migrated) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.type,mt.reference,mt.intro,mt.introformat,mt.alltext,mt.popup,mt.options,mt.timemodified,mt.oldid,mt.cmid,mt.newmodule,mt.newid,mt.migrated from mdl_mph_main_view mhv join mdl_resource_old mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='resource_old' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='resource_old' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.type,mt.reference,mt.intro,mt.introformat,mt.alltext,mt.popup,mt.options,mt.timemodified,mt.oldid,mt.cmid,mt.newmodule,mt.newid,mt.migrated from mdl_mph_main_view mhv join mdl_resource_old mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='resource_old' 402 Query insert into mdl_mph_re3 (id,time2,deleted2,course,name,type,reference,intro,introformat,alltext,popup,options,timemodified,oldid,cmid,newmodule,newid,migrated) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.type,mt.reference,mt.intro,mt.introformat,mt.alltext,mt.popup,mt.options,mt.timemodified,mt.oldid,mt.cmid,mt.newmodule,mt.newid,mt.migrated from mdl_mph_main_view mhv join mdl_resource_old mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='resource_old' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='resource_old' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.type,mt.reference,mt.intro,mt.introformat,mt.alltext,mt.popup,mt.options,mt.timemodified,mt.oldid,mt.cmid,mt.newmodule,mt.newid,mt.migrated from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.type,h.reference,h.intro,h.introformat,h.alltext,h.popup,h.options,h.timemodified,h.oldid,h.cmid,h.newmodule,h.newid,h.migrated from mdl_mph_re3 h join (select id, max(time2) time2 from mdl_mph_re3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='resource_old' 402 Query insert into mdl_mph_re3 (id,time2,deleted2,course,name,type,reference,intro,introformat,alltext,popup,options,timemodified,oldid,cmid,newmodule,newid,migrated) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.type,mt.reference,mt.intro,mt.introformat,mt.alltext,mt.popup,mt.options,mt.timemodified,mt.oldid,mt.cmid,mt.newmodule,mt.newid,mt.migrated from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.type,h.reference,h.intro,h.introformat,h.alltext,h.popup,h.options,h.timemodified,h.oldid,h.cmid,h.newmodule,h.newid,h.migrated from mdl_mph_re3 h join (select id, max(time2) time2 from mdl_mph_re3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='resource_old' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='resource_old' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.shortname,mt.description,mt.sortorder,mt.archetype from mdl_mph_main_view mhv join mdl_role mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role' 402 Query insert into mdl_mph_ro (id,time2,deleted2,name,shortname,description,sortorder,archetype) select mhv.instance, mhv.time2, 0, mt.name,mt.shortname,mt.description,mt.sortorder,mt.archetype from mdl_mph_main_view mhv join mdl_role mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.shortname,mt.description,mt.sortorder,mt.archetype from mdl_mph_main_view mhv join mdl_role mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role' 402 Query insert into mdl_mph_ro (id,time2,deleted2,name,shortname,description,sortorder,archetype) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.shortname,mt.description,mt.sortorder,mt.archetype from mdl_mph_main_view mhv join mdl_role mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.shortname,mt.description,mt.sortorder,mt.archetype from mdl_mph_main_view mhv join (select h.id,h.name,h.shortname,h.description,h.sortorder,h.archetype from mdl_mph_ro h join (select id, max(time2) time2 from mdl_mph_ro group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role' 402 Query insert into mdl_mph_ro (id,time2,deleted2,name,shortname,description,sortorder,archetype) select mhv.instance, mhv.time2, 1, mt.name,mt.shortname,mt.description,mt.sortorder,mt.archetype from mdl_mph_main_view mhv join (select h.id,h.name,h.shortname,h.description,h.sortorder,h.archetype from mdl_mph_ro h join (select id, max(time2) time2 from mdl_mph_ro group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.allowassign from mdl_mph_main_view mhv join mdl_role_allow_assign mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_allow_assign' 402 Query insert into mdl_mph_ro1 (id,time2,deleted2,roleid,allowassign) select mhv.instance, mhv.time2, 0, mt.roleid,mt.allowassign from mdl_mph_main_view mhv join mdl_role_allow_assign mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_allow_assign' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_assign' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.roleid,mt.allowassign from mdl_mph_main_view mhv join mdl_role_allow_assign mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_allow_assign' 402 Query insert into mdl_mph_ro1 (id,time2,deleted2,roleid,allowassign) select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.allowassign from mdl_mph_main_view mhv join mdl_role_allow_assign mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_allow_assign' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_assign' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.roleid,mt.allowassign from mdl_mph_main_view mhv join (select h.id,h.roleid,h.allowassign from mdl_mph_ro1 h join (select id, max(time2) time2 from mdl_mph_ro1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_allow_assign' 402 Query insert into mdl_mph_ro1 (id,time2,deleted2,roleid,allowassign) select mhv.instance, mhv.time2, 1, mt.roleid,mt.allowassign from mdl_mph_main_view mhv join (select h.id,h.roleid,h.allowassign from mdl_mph_ro1 h join (select id, max(time2) time2 from mdl_mph_ro1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_allow_assign' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_assign' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.allowoverride from mdl_mph_main_view mhv join mdl_role_allow_override mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_allow_override' 402 Query insert into mdl_mph_ro2 (id,time2,deleted2,roleid,allowoverride) select mhv.instance, mhv.time2, 0, mt.roleid,mt.allowoverride from mdl_mph_main_view mhv join mdl_role_allow_override mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_allow_override' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_override' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.roleid,mt.allowoverride from mdl_mph_main_view mhv join mdl_role_allow_override mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_allow_override' 402 Query insert into mdl_mph_ro2 (id,time2,deleted2,roleid,allowoverride) select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.allowoverride from mdl_mph_main_view mhv join mdl_role_allow_override mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_allow_override' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_override' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.roleid,mt.allowoverride from mdl_mph_main_view mhv join (select h.id,h.roleid,h.allowoverride from mdl_mph_ro2 h join (select id, max(time2) time2 from mdl_mph_ro2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_allow_override' 402 Query insert into mdl_mph_ro2 (id,time2,deleted2,roleid,allowoverride) select mhv.instance, mhv.time2, 1, mt.roleid,mt.allowoverride from mdl_mph_main_view mhv join (select h.id,h.roleid,h.allowoverride from mdl_mph_ro2 h join (select id, max(time2) time2 from mdl_mph_ro2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_allow_override' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_override' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.allowswitch from mdl_mph_main_view mhv join mdl_role_allow_switch mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_allow_switch' 402 Query insert into mdl_mph_ro3 (id,time2,deleted2,roleid,allowswitch) select mhv.instance, mhv.time2, 0, mt.roleid,mt.allowswitch from mdl_mph_main_view mhv join mdl_role_allow_switch mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_allow_switch' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_switch' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.roleid,mt.allowswitch from mdl_mph_main_view mhv join mdl_role_allow_switch mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_allow_switch' 402 Query insert into mdl_mph_ro3 (id,time2,deleted2,roleid,allowswitch) select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.allowswitch from mdl_mph_main_view mhv join mdl_role_allow_switch mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_allow_switch' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_switch' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.roleid,mt.allowswitch from mdl_mph_main_view mhv join (select h.id,h.roleid,h.allowswitch from mdl_mph_ro3 h join (select id, max(time2) time2 from mdl_mph_ro3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_allow_switch' 402 Query insert into mdl_mph_ro3 (id,time2,deleted2,roleid,allowswitch) select mhv.instance, mhv.time2, 1, mt.roleid,mt.allowswitch from mdl_mph_main_view mhv join (select h.id,h.roleid,h.allowswitch from mdl_mph_ro3 h join (select id, max(time2) time2 from mdl_mph_ro3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_allow_switch' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_allow_switch' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.roleid,mt.capability,mt.permission,mt.timemodified,mt.modifierid from mdl_mph_main_view mhv join mdl_role_capabilities mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_capabilities' 402 Query insert into mdl_mph_ro4 (id,time2,deleted2,contextid,roleid,capability,permission,timemodified,modifierid) select mhv.instance, mhv.time2, 0, mt.contextid,mt.roleid,mt.capability,mt.permission,mt.timemodified,mt.modifierid from mdl_mph_main_view mhv join mdl_role_capabilities mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_capabilities' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_capabilities' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.contextid,mt.roleid,mt.capability,mt.permission,mt.timemodified,mt.modifierid from mdl_mph_main_view mhv join mdl_role_capabilities mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_capabilities' 402 Query insert into mdl_mph_ro4 (id,time2,deleted2,contextid,roleid,capability,permission,timemodified,modifierid) select distinct mhv.instance, mhv.time2, 0, mt.contextid,mt.roleid,mt.capability,mt.permission,mt.timemodified,mt.modifierid from mdl_mph_main_view mhv join mdl_role_capabilities mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_capabilities' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_capabilities' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.contextid,mt.roleid,mt.capability,mt.permission,mt.timemodified,mt.modifierid from mdl_mph_main_view mhv join (select h.id,h.contextid,h.roleid,h.capability,h.permission,h.timemodified,h.modifierid from mdl_mph_ro4 h join (select id, max(time2) time2 from mdl_mph_ro4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_capabilities' 402 Query insert into mdl_mph_ro4 (id,time2,deleted2,contextid,roleid,capability,permission,timemodified,modifierid) select mhv.instance, mhv.time2, 1, mt.contextid,mt.roleid,mt.capability,mt.permission,mt.timemodified,mt.modifierid from mdl_mph_main_view mhv join (select h.id,h.contextid,h.roleid,h.capability,h.permission,h.timemodified,h.modifierid from mdl_mph_ro4 h join (select id, max(time2) time2 from mdl_mph_ro4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_capabilities' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_capabilities' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.contextlevel from mdl_mph_main_view mhv join mdl_role_context_levels mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_context_levels' 402 Query insert into mdl_mph_ro5 (id,time2,deleted2,roleid,contextlevel) select mhv.instance, mhv.time2, 0, mt.roleid,mt.contextlevel from mdl_mph_main_view mhv join mdl_role_context_levels mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='role_context_levels' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_context_levels' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.roleid,mt.contextlevel from mdl_mph_main_view mhv join mdl_role_context_levels mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_context_levels' 402 Query insert into mdl_mph_ro5 (id,time2,deleted2,roleid,contextlevel) select distinct mhv.instance, mhv.time2, 0, mt.roleid,mt.contextlevel from mdl_mph_main_view mhv join mdl_role_context_levels mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='role_context_levels' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_context_levels' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.roleid,mt.contextlevel from mdl_mph_main_view mhv join (select h.id,h.roleid,h.contextlevel from mdl_mph_ro5 h join (select id, max(time2) time2 from mdl_mph_ro5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_context_levels' 402 Query insert into mdl_mph_ro5 (id,time2,deleted2,roleid,contextlevel) select mhv.instance, mhv.time2, 1, mt.roleid,mt.contextlevel from mdl_mph_main_view mhv join (select h.id,h.roleid,h.contextlevel from mdl_mph_ro5 h join (select id, max(time2) time2 from mdl_mph_ro5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='role_context_levels' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='role_context_levels' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.scormtype,mt.reference,mt.intro,mt.introformat,mt.version,mt.maxgrade,mt.grademethod,mt.whatgrade,mt.maxattempt,mt.forcecompleted,mt.forcenewattempt,mt.lastattemptlock,mt.masteryoverride,mt.displayattemptstatus,mt.displaycoursestructure,mt.updatefreq,mt.sha1hash,mt.md5hash,mt.revision,mt.launch,mt.skipview,mt.hidebrowse,mt.hidetoc,mt.nav,mt.navpositionleft,mt.navpositiontop,mt.auto,mt.popup,mt.options,mt.width,mt.height,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionstatusrequired,mt.completionscorerequired,mt.completionstatusallscos,mt.displayactivityname,mt.autocommit from mdl_mph_main_view mhv join mdl_scorm mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm' 402 Query insert into mdl_mph_sc (id,time2,deleted2,course,name,scormtype,reference,intro,introformat,version,maxgrade,grademethod,whatgrade,maxattempt,forcecompleted,forcenewattempt,lastattemptlock,masteryoverride,displayattemptstatus,displaycoursestructure,updatefreq,sha1hash,md5hash,revision,launch,skipview,hidebrowse,hidetoc,nav,navpositionleft,navpositiontop,auto,popup,options,width,height,timeopen,timeclose,timemodified,completionstatusrequired,completionscorerequired,completionstatusallscos,displayactivityname,autocommit) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.scormtype,mt.reference,mt.intro,mt.introformat,mt.version,mt.maxgrade,mt.grademethod,mt.whatgrade,mt.maxattempt,mt.forcecompleted,mt.forcenewattempt,mt.lastattemptlock,mt.masteryoverride,mt.displayattemptstatus,mt.displaycoursestructure,mt.updatefreq,mt.sha1hash,mt.md5hash,mt.revision,mt.launch,mt.skipview,mt.hidebrowse,mt.hidetoc,mt.nav,mt.navpositionleft,mt.navpositiontop,mt.auto,mt.popup,mt.options,mt.width,mt.height,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionstatusrequired,mt.completionscorerequired,mt.completionstatusallscos,mt.displayactivityname,mt.autocommit from mdl_mph_main_view mhv join mdl_scorm mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.scormtype,mt.reference,mt.intro,mt.introformat,mt.version,mt.maxgrade,mt.grademethod,mt.whatgrade,mt.maxattempt,mt.forcecompleted,mt.forcenewattempt,mt.lastattemptlock,mt.masteryoverride,mt.displayattemptstatus,mt.displaycoursestructure,mt.updatefreq,mt.sha1hash,mt.md5hash,mt.revision,mt.launch,mt.skipview,mt.hidebrowse,mt.hidetoc,mt.nav,mt.navpositionleft,mt.navpositiontop,mt.auto,mt.popup,mt.options,mt.width,mt.height,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionstatusrequired,mt.completionscorerequired,mt.completionstatusallscos,mt.displayactivityname,mt.autocommit from mdl_mph_main_view mhv join mdl_scorm mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm' 402 Query insert into mdl_mph_sc (id,time2,deleted2,course,name,scormtype,reference,intro,introformat,version,maxgrade,grademethod,whatgrade,maxattempt,forcecompleted,forcenewattempt,lastattemptlock,masteryoverride,displayattemptstatus,displaycoursestructure,updatefreq,sha1hash,md5hash,revision,launch,skipview,hidebrowse,hidetoc,nav,navpositionleft,navpositiontop,auto,popup,options,width,height,timeopen,timeclose,timemodified,completionstatusrequired,completionscorerequired,completionstatusallscos,displayactivityname,autocommit) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.scormtype,mt.reference,mt.intro,mt.introformat,mt.version,mt.maxgrade,mt.grademethod,mt.whatgrade,mt.maxattempt,mt.forcecompleted,mt.forcenewattempt,mt.lastattemptlock,mt.masteryoverride,mt.displayattemptstatus,mt.displaycoursestructure,mt.updatefreq,mt.sha1hash,mt.md5hash,mt.revision,mt.launch,mt.skipview,mt.hidebrowse,mt.hidetoc,mt.nav,mt.navpositionleft,mt.navpositiontop,mt.auto,mt.popup,mt.options,mt.width,mt.height,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionstatusrequired,mt.completionscorerequired,mt.completionstatusallscos,mt.displayactivityname,mt.autocommit from mdl_mph_main_view mhv join mdl_scorm mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.scormtype,mt.reference,mt.intro,mt.introformat,mt.version,mt.maxgrade,mt.grademethod,mt.whatgrade,mt.maxattempt,mt.forcecompleted,mt.forcenewattempt,mt.lastattemptlock,mt.masteryoverride,mt.displayattemptstatus,mt.displaycoursestructure,mt.updatefreq,mt.sha1hash,mt.md5hash,mt.revision,mt.launch,mt.skipview,mt.hidebrowse,mt.hidetoc,mt.nav,mt.navpositionleft,mt.navpositiontop,mt.auto,mt.popup,mt.options,mt.width,mt.height,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionstatusrequired,mt.completionscorerequired,mt.completionstatusallscos,mt.displayactivityname,mt.autocommit from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.scormtype,h.reference,h.intro,h.introformat,h.version,h.maxgrade,h.grademethod,h.whatgrade,h.maxattempt,h.forcecompleted,h.forcenewattempt,h.lastattemptlock,h.masteryoverride,h.displayattemptstatus,h.displaycoursestructure,h.updatefreq,h.sha1hash,h.md5hash,h.revision,h.launch,h.skipview,h.hidebrowse,h.hidetoc,h.nav,h.navpositionleft,h.navpositiontop,h.auto,h.popup,h.options,h.width,h.height,h.timeopen,h.timeclose,h.timemodified,h.completionstatusrequired,h.completionscorerequired,h.completionstatusallscos,h.displayactivityname,h.autocommit from mdl_mph_sc h join (select id, max(time2) time2 from mdl_mph_sc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm' 402 Query insert into mdl_mph_sc (id,time2,deleted2,course,name,scormtype,reference,intro,introformat,version,maxgrade,grademethod,whatgrade,maxattempt,forcecompleted,forcenewattempt,lastattemptlock,masteryoverride,displayattemptstatus,displaycoursestructure,updatefreq,sha1hash,md5hash,revision,launch,skipview,hidebrowse,hidetoc,nav,navpositionleft,navpositiontop,auto,popup,options,width,height,timeopen,timeclose,timemodified,completionstatusrequired,completionscorerequired,completionstatusallscos,displayactivityname,autocommit) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.scormtype,mt.reference,mt.intro,mt.introformat,mt.version,mt.maxgrade,mt.grademethod,mt.whatgrade,mt.maxattempt,mt.forcecompleted,mt.forcenewattempt,mt.lastattemptlock,mt.masteryoverride,mt.displayattemptstatus,mt.displaycoursestructure,mt.updatefreq,mt.sha1hash,mt.md5hash,mt.revision,mt.launch,mt.skipview,mt.hidebrowse,mt.hidetoc,mt.nav,mt.navpositionleft,mt.navpositiontop,mt.auto,mt.popup,mt.options,mt.width,mt.height,mt.timeopen,mt.timeclose,mt.timemodified,mt.completionstatusrequired,mt.completionscorerequired,mt.completionstatusallscos,mt.displayactivityname,mt.autocommit from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.scormtype,h.reference,h.intro,h.introformat,h.version,h.maxgrade,h.grademethod,h.whatgrade,h.maxattempt,h.forcecompleted,h.forcenewattempt,h.lastattemptlock,h.masteryoverride,h.displayattemptstatus,h.displaycoursestructure,h.updatefreq,h.sha1hash,h.md5hash,h.revision,h.launch,h.skipview,h.hidebrowse,h.hidetoc,h.nav,h.navpositionleft,h.navpositiontop,h.auto,h.popup,h.options,h.width,h.height,h.timeopen,h.timeclose,h.timemodified,h.completionstatusrequired,h.completionscorerequired,h.completionstatusallscos,h.displayactivityname,h.autocommit from mdl_mph_sc h join (select id, max(time2) time2 from mdl_mph_sc group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.scorm,mt.manifest,mt.organization,mt.parent,mt.identifier,mt.launch,mt.scormtype,mt.title,mt.sortorder from mdl_mph_main_view mhv join mdl_scorm_scoes mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_scoes' 402 Query insert into mdl_mph_sc1 (id,time2,deleted2,scorm,manifest,organization,parent,identifier,launch,scormtype,title,sortorder) select mhv.instance, mhv.time2, 0, mt.scorm,mt.manifest,mt.organization,mt.parent,mt.identifier,mt.launch,mt.scormtype,mt.title,mt.sortorder from mdl_mph_main_view mhv join mdl_scorm_scoes mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_scoes' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.scorm,mt.manifest,mt.organization,mt.parent,mt.identifier,mt.launch,mt.scormtype,mt.title,mt.sortorder from mdl_mph_main_view mhv join mdl_scorm_scoes mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_scoes' 402 Query insert into mdl_mph_sc1 (id,time2,deleted2,scorm,manifest,organization,parent,identifier,launch,scormtype,title,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.scorm,mt.manifest,mt.organization,mt.parent,mt.identifier,mt.launch,mt.scormtype,mt.title,mt.sortorder from mdl_mph_main_view mhv join mdl_scorm_scoes mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_scoes' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.scorm,mt.manifest,mt.organization,mt.parent,mt.identifier,mt.launch,mt.scormtype,mt.title,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.scorm,h.manifest,h.organization,h.parent,h.identifier,h.launch,h.scormtype,h.title,h.sortorder from mdl_mph_sc1 h join (select id, max(time2) time2 from mdl_mph_sc1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_scoes' 402 Query insert into mdl_mph_sc1 (id,time2,deleted2,scorm,manifest,organization,parent,identifier,launch,scormtype,title,sortorder) select mhv.instance, mhv.time2, 1, mt.scorm,mt.manifest,mt.organization,mt.parent,mt.identifier,mt.launch,mt.scormtype,mt.title,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.scorm,h.manifest,h.organization,h.parent,h.identifier,h.launch,h.scormtype,h.title,h.sortorder from mdl_mph_sc1 h join (select id, max(time2) time2 from mdl_mph_sc1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_scoes' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.scoid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_scorm_scoes_data mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_scoes_data' 402 Query insert into mdl_mph_sc2 (id,time2,deleted2,scoid,name,value) select mhv.instance, mhv.time2, 0, mt.scoid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_scorm_scoes_data mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_scoes_data' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes_data' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.scoid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_scorm_scoes_data mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_scoes_data' 402 Query insert into mdl_mph_sc2 (id,time2,deleted2,scoid,name,value) select distinct mhv.instance, mhv.time2, 0, mt.scoid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_scorm_scoes_data mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_scoes_data' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes_data' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.scoid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.scoid,h.name,h.value from mdl_mph_sc2 h join (select id, max(time2) time2 from mdl_mph_sc2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_scoes_data' 402 Query insert into mdl_mph_sc2 (id,time2,deleted2,scoid,name,value) select mhv.instance, mhv.time2, 1, mt.scoid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.scoid,h.name,h.value from mdl_mph_sc2 h join (select id, max(time2) time2 from mdl_mph_sc2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_scoes_data' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes_data' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.scormid,mt.scoid,mt.attempt,mt.element,mt.value,mt.timemodified from mdl_mph_main_view mhv join mdl_scorm_scoes_track mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_scoes_track' 402 Query insert into mdl_mph_sc3 (id,time2,deleted2,userid,scormid,scoid,attempt,element,value,timemodified) select mhv.instance, mhv.time2, 0, mt.userid,mt.scormid,mt.scoid,mt.attempt,mt.element,mt.value,mt.timemodified from mdl_mph_main_view mhv join mdl_scorm_scoes_track mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_scoes_track' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes_track' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.scormid,mt.scoid,mt.attempt,mt.element,mt.value,mt.timemodified from mdl_mph_main_view mhv join mdl_scorm_scoes_track mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_scoes_track' 402 Query insert into mdl_mph_sc3 (id,time2,deleted2,userid,scormid,scoid,attempt,element,value,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.scormid,mt.scoid,mt.attempt,mt.element,mt.value,mt.timemodified from mdl_mph_main_view mhv join mdl_scorm_scoes_track mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_scoes_track' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes_track' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.scormid,mt.scoid,mt.attempt,mt.element,mt.value,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.userid,h.scormid,h.scoid,h.attempt,h.element,h.value,h.timemodified from mdl_mph_sc3 h join (select id, max(time2) time2 from mdl_mph_sc3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_scoes_track' 402 Query insert into mdl_mph_sc3 (id,time2,deleted2,userid,scormid,scoid,attempt,element,value,timemodified) select mhv.instance, mhv.time2, 1, mt.userid,mt.scormid,mt.scoid,mt.attempt,mt.element,mt.value,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.userid,h.scormid,h.scoid,h.attempt,h.element,h.value,h.timemodified from mdl_mph_sc3 h join (select id, max(time2) time2 from mdl_mph_sc3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_scoes_track' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_scoes_track' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.scoid,mt.primaryobj,mt.objectiveid,mt.satisfiedbymeasure,mt.minnormalizedmeasure from mdl_mph_main_view mhv join mdl_scorm_seq_objective mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_seq_objective' 402 Query insert into mdl_mph_sc4 (id,time2,deleted2,scoid,primaryobj,objectiveid,satisfiedbymeasure,minnormalizedmeasure) select mhv.instance, mhv.time2, 0, mt.scoid,mt.primaryobj,mt.objectiveid,mt.satisfiedbymeasure,mt.minnormalizedmeasure from mdl_mph_main_view mhv join mdl_scorm_seq_objective mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_seq_objective' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_seq_objective' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.scoid,mt.primaryobj,mt.objectiveid,mt.satisfiedbymeasure,mt.minnormalizedmeasure from mdl_mph_main_view mhv join mdl_scorm_seq_objective mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_seq_objective' 402 Query insert into mdl_mph_sc4 (id,time2,deleted2,scoid,primaryobj,objectiveid,satisfiedbymeasure,minnormalizedmeasure) select distinct mhv.instance, mhv.time2, 0, mt.scoid,mt.primaryobj,mt.objectiveid,mt.satisfiedbymeasure,mt.minnormalizedmeasure from mdl_mph_main_view mhv join mdl_scorm_seq_objective mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_seq_objective' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_seq_objective' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.scoid,mt.primaryobj,mt.objectiveid,mt.satisfiedbymeasure,mt.minnormalizedmeasure from mdl_mph_main_view mhv join (select h.id,h.scoid,h.primaryobj,h.objectiveid,h.satisfiedbymeasure,h.minnormalizedmeasure from mdl_mph_sc4 h join (select id, max(time2) time2 from mdl_mph_sc4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_seq_objective' 402 Query insert into mdl_mph_sc4 (id,time2,deleted2,scoid,primaryobj,objectiveid,satisfiedbymeasure,minnormalizedmeasure) select mhv.instance, mhv.time2, 1, mt.scoid,mt.primaryobj,mt.objectiveid,mt.satisfiedbymeasure,mt.minnormalizedmeasure from mdl_mph_main_view mhv join (select h.id,h.scoid,h.primaryobj,h.objectiveid,h.satisfiedbymeasure,h.minnormalizedmeasure from mdl_mph_sc4 h join (select id, max(time2) time2 from mdl_mph_sc4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_seq_objective' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_seq_objective' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.scoid,mt.childactivityset,mt.minimumcount,mt.minimumpercent,mt.conditioncombination,mt.action from mdl_mph_main_view mhv join mdl_scorm_seq_rolluprule mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_seq_rolluprule' 402 Query insert into mdl_mph_sc5 (id,time2,deleted2,scoid,childactivityset,minimumcount,minimumpercent,conditioncombination,action) select mhv.instance, mhv.time2, 0, mt.scoid,mt.childactivityset,mt.minimumcount,mt.minimumpercent,mt.conditioncombination,mt.action from mdl_mph_main_view mhv join mdl_scorm_seq_rolluprule mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scorm_seq_rolluprule' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_seq_rolluprule' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.scoid,mt.childactivityset,mt.minimumcount,mt.minimumpercent,mt.conditioncombination,mt.action from mdl_mph_main_view mhv join mdl_scorm_seq_rolluprule mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_seq_rolluprule' 402 Query insert into mdl_mph_sc5 (id,time2,deleted2,scoid,childactivityset,minimumcount,minimumpercent,conditioncombination,action) select distinct mhv.instance, mhv.time2, 0, mt.scoid,mt.childactivityset,mt.minimumcount,mt.minimumpercent,mt.conditioncombination,mt.action from mdl_mph_main_view mhv join mdl_scorm_seq_rolluprule mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scorm_seq_rolluprule' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_seq_rolluprule' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.scoid,mt.childactivityset,mt.minimumcount,mt.minimumpercent,mt.conditioncombination,mt.action from mdl_mph_main_view mhv join (select h.id,h.scoid,h.childactivityset,h.minimumcount,h.minimumpercent,h.conditioncombination,h.action from mdl_mph_sc5 h join (select id, max(time2) time2 from mdl_mph_sc5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_seq_rolluprule' 402 Query insert into mdl_mph_sc5 (id,time2,deleted2,scoid,childactivityset,minimumcount,minimumpercent,conditioncombination,action) select mhv.instance, mhv.time2, 1, mt.scoid,mt.childactivityset,mt.minimumcount,mt.minimumpercent,mt.conditioncombination,mt.action from mdl_mph_main_view mhv join (select h.id,h.scoid,h.childactivityset,h.minimumcount,h.minimumpercent,h.conditioncombination,h.action from mdl_mph_sc5 h join (select id, max(time2) time2 from mdl_mph_sc5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scorm_seq_rolluprule' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scorm_seq_rolluprule' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.template,mt.days,mt.timecreated,mt.timemodified,mt.name,mt.intro,mt.introformat,mt.questions,mt.completionsubmit from mdl_mph_main_view mhv join mdl_survey mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='survey' 402 Query insert into mdl_mph_su (id,time2,deleted2,course,template,days,timecreated,timemodified,name,intro,introformat,questions,completionsubmit) select mhv.instance, mhv.time2, 0, mt.course,mt.template,mt.days,mt.timecreated,mt.timemodified,mt.name,mt.intro,mt.introformat,mt.questions,mt.completionsubmit from mdl_mph_main_view mhv join mdl_survey mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='survey' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.template,mt.days,mt.timecreated,mt.timemodified,mt.name,mt.intro,mt.introformat,mt.questions,mt.completionsubmit from mdl_mph_main_view mhv join mdl_survey mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='survey' 402 Query insert into mdl_mph_su (id,time2,deleted2,course,template,days,timecreated,timemodified,name,intro,introformat,questions,completionsubmit) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.template,mt.days,mt.timecreated,mt.timemodified,mt.name,mt.intro,mt.introformat,mt.questions,mt.completionsubmit from mdl_mph_main_view mhv join mdl_survey mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='survey' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.template,mt.days,mt.timecreated,mt.timemodified,mt.name,mt.intro,mt.introformat,mt.questions,mt.completionsubmit from mdl_mph_main_view mhv join (select h.id,h.course,h.template,h.days,h.timecreated,h.timemodified,h.name,h.intro,h.introformat,h.questions,h.completionsubmit from mdl_mph_su h join (select id, max(time2) time2 from mdl_mph_su group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='survey' 402 Query insert into mdl_mph_su (id,time2,deleted2,course,template,days,timecreated,timemodified,name,intro,introformat,questions,completionsubmit) select mhv.instance, mhv.time2, 1, mt.course,mt.template,mt.days,mt.timecreated,mt.timemodified,mt.name,mt.intro,mt.introformat,mt.questions,mt.completionsubmit from mdl_mph_main_view mhv join (select h.id,h.course,h.template,h.days,h.timecreated,h.timemodified,h.name,h.intro,h.introformat,h.questions,h.completionsubmit from mdl_mph_su h join (select id, max(time2) time2 from mdl_mph_su group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='survey' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.survey,mt.question,mt.time,mt.answer1,mt.answer2 from mdl_mph_main_view mhv join mdl_survey_answers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='survey_answers' 402 Query insert into mdl_mph_su1 (id,time2,deleted2,userid,survey,question,time,answer1,answer2) select mhv.instance, mhv.time2, 0, mt.userid,mt.survey,mt.question,mt.time,mt.answer1,mt.answer2 from mdl_mph_main_view mhv join mdl_survey_answers mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='survey_answers' 201021 17:22:23 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey_answers' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.survey,mt.question,mt.time,mt.answer1,mt.answer2 from mdl_mph_main_view mhv join mdl_survey_answers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='survey_answers' 402 Query insert into mdl_mph_su1 (id,time2,deleted2,userid,survey,question,time,answer1,answer2) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.survey,mt.question,mt.time,mt.answer1,mt.answer2 from mdl_mph_main_view mhv join mdl_survey_answers mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='survey_answers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey_answers' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.survey,mt.question,mt.time,mt.answer1,mt.answer2 from mdl_mph_main_view mhv join (select h.id,h.userid,h.survey,h.question,h.time,h.answer1,h.answer2 from mdl_mph_su1 h join (select id, max(time2) time2 from mdl_mph_su1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='survey_answers' 402 Query insert into mdl_mph_su1 (id,time2,deleted2,userid,survey,question,time,answer1,answer2) select mhv.instance, mhv.time2, 1, mt.userid,mt.survey,mt.question,mt.time,mt.answer1,mt.answer2 from mdl_mph_main_view mhv join (select h.id,h.userid,h.survey,h.question,h.time,h.answer1,h.answer2 from mdl_mph_su1 h join (select id, max(time2) time2 from mdl_mph_su1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='survey_answers' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey_answers' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.text,mt.shorttext,mt.multi,mt.intro,mt.type,mt.options from mdl_mph_main_view mhv join mdl_survey_questions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='survey_questions' 402 Query insert into mdl_mph_su2 (id,time2,deleted2,text,shorttext,multi,intro,type,options) select mhv.instance, mhv.time2, 0, mt.text,mt.shorttext,mt.multi,mt.intro,mt.type,mt.options from mdl_mph_main_view mhv join mdl_survey_questions mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='survey_questions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey_questions' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.text,mt.shorttext,mt.multi,mt.intro,mt.type,mt.options from mdl_mph_main_view mhv join mdl_survey_questions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='survey_questions' 402 Query insert into mdl_mph_su2 (id,time2,deleted2,text,shorttext,multi,intro,type,options) select distinct mhv.instance, mhv.time2, 0, mt.text,mt.shorttext,mt.multi,mt.intro,mt.type,mt.options from mdl_mph_main_view mhv join mdl_survey_questions mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='survey_questions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey_questions' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.text,mt.shorttext,mt.multi,mt.intro,mt.type,mt.options from mdl_mph_main_view mhv join (select h.id,h.text,h.shorttext,h.multi,h.intro,h.type,h.options from mdl_mph_su2 h join (select id, max(time2) time2 from mdl_mph_su2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='survey_questions' 402 Query insert into mdl_mph_su2 (id,time2,deleted2,text,shorttext,multi,intro,type,options) select mhv.instance, mhv.time2, 1, mt.text,mt.shorttext,mt.multi,mt.intro,mt.type,mt.options from mdl_mph_main_view mhv join (select h.id,h.text,h.shorttext,h.multi,h.intro,h.type,h.options from mdl_mph_su2 h join (select id, max(time2) time2 from mdl_mph_su2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='survey_questions' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='survey_questions' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.tagcollid,mt.name,mt.rawname,mt.isstandard,mt.description,mt.descriptionformat,mt.flag,mt.timemodified from mdl_mph_main_view mhv join mdl_tag mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tag' 402 Query insert into mdl_mph_ta (id,time2,deleted2,userid,tagcollid,name,rawname,isstandard,description,descriptionformat,flag,timemodified) select mhv.instance, mhv.time2, 0, mt.userid,mt.tagcollid,mt.name,mt.rawname,mt.isstandard,mt.description,mt.descriptionformat,mt.flag,mt.timemodified from mdl_mph_main_view mhv join mdl_tag mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tag' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.tagcollid,mt.name,mt.rawname,mt.isstandard,mt.description,mt.descriptionformat,mt.flag,mt.timemodified from mdl_mph_main_view mhv join mdl_tag mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tag' 402 Query insert into mdl_mph_ta (id,time2,deleted2,userid,tagcollid,name,rawname,isstandard,description,descriptionformat,flag,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.tagcollid,mt.name,mt.rawname,mt.isstandard,mt.description,mt.descriptionformat,mt.flag,mt.timemodified from mdl_mph_main_view mhv join mdl_tag mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tag' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.tagcollid,mt.name,mt.rawname,mt.isstandard,mt.description,mt.descriptionformat,mt.flag,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.userid,h.tagcollid,h.name,h.rawname,h.isstandard,h.description,h.descriptionformat,h.flag,h.timemodified from mdl_mph_ta h join (select id, max(time2) time2 from mdl_mph_ta group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tag' 402 Query insert into mdl_mph_ta (id,time2,deleted2,userid,tagcollid,name,rawname,isstandard,description,descriptionformat,flag,timemodified) select mhv.instance, mhv.time2, 1, mt.userid,mt.tagcollid,mt.name,mt.rawname,mt.isstandard,mt.description,mt.descriptionformat,mt.flag,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.userid,h.tagcollid,h.name,h.rawname,h.isstandard,h.description,h.descriptionformat,h.flag,h.timemodified from mdl_mph_ta h join (select id, max(time2) time2 from mdl_mph_ta group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tag' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.component,mt.itemtype,mt.enabled,mt.tagcollid,mt.callback,mt.callbackfile,mt.showstandard from mdl_mph_main_view mhv join mdl_tag_area mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tag_area' 402 Query insert into mdl_mph_ta1 (id,time2,deleted2,component,itemtype,enabled,tagcollid,callback,callbackfile,showstandard) select mhv.instance, mhv.time2, 0, mt.component,mt.itemtype,mt.enabled,mt.tagcollid,mt.callback,mt.callbackfile,mt.showstandard from mdl_mph_main_view mhv join mdl_tag_area mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tag_area' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag_area' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.component,mt.itemtype,mt.enabled,mt.tagcollid,mt.callback,mt.callbackfile,mt.showstandard from mdl_mph_main_view mhv join mdl_tag_area mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tag_area' 402 Query insert into mdl_mph_ta1 (id,time2,deleted2,component,itemtype,enabled,tagcollid,callback,callbackfile,showstandard) select distinct mhv.instance, mhv.time2, 0, mt.component,mt.itemtype,mt.enabled,mt.tagcollid,mt.callback,mt.callbackfile,mt.showstandard from mdl_mph_main_view mhv join mdl_tag_area mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tag_area' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag_area' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.component,mt.itemtype,mt.enabled,mt.tagcollid,mt.callback,mt.callbackfile,mt.showstandard from mdl_mph_main_view mhv join (select h.id,h.component,h.itemtype,h.enabled,h.tagcollid,h.callback,h.callbackfile,h.showstandard from mdl_mph_ta1 h join (select id, max(time2) time2 from mdl_mph_ta1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tag_area' 402 Query insert into mdl_mph_ta1 (id,time2,deleted2,component,itemtype,enabled,tagcollid,callback,callbackfile,showstandard) select mhv.instance, mhv.time2, 1, mt.component,mt.itemtype,mt.enabled,mt.tagcollid,mt.callback,mt.callbackfile,mt.showstandard from mdl_mph_main_view mhv join (select h.id,h.component,h.itemtype,h.enabled,h.tagcollid,h.callback,h.callbackfile,h.showstandard from mdl_mph_ta1 h join (select id, max(time2) time2 from mdl_mph_ta1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tag_area' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag_area' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.tagid,mt.component,mt.itemtype,mt.itemid,mt.contextid,mt.tiuserid,mt.ordering,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_tag_instance mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tag_instance' 402 Query insert into mdl_mph_ta2 (id,time2,deleted2,tagid,component,itemtype,itemid,contextid,tiuserid,ordering,timecreated,timemodified) select mhv.instance, mhv.time2, 0, mt.tagid,mt.component,mt.itemtype,mt.itemid,mt.contextid,mt.tiuserid,mt.ordering,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_tag_instance mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tag_instance' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag_instance' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.tagid,mt.component,mt.itemtype,mt.itemid,mt.contextid,mt.tiuserid,mt.ordering,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_tag_instance mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tag_instance' 402 Query insert into mdl_mph_ta2 (id,time2,deleted2,tagid,component,itemtype,itemid,contextid,tiuserid,ordering,timecreated,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.tagid,mt.component,mt.itemtype,mt.itemid,mt.contextid,mt.tiuserid,mt.ordering,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join mdl_tag_instance mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tag_instance' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag_instance' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.tagid,mt.component,mt.itemtype,mt.itemid,mt.contextid,mt.tiuserid,mt.ordering,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.tagid,h.component,h.itemtype,h.itemid,h.contextid,h.tiuserid,h.ordering,h.timecreated,h.timemodified from mdl_mph_ta2 h join (select id, max(time2) time2 from mdl_mph_ta2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tag_instance' 402 Query insert into mdl_mph_ta2 (id,time2,deleted2,tagid,component,itemtype,itemid,contextid,tiuserid,ordering,timecreated,timemodified) select mhv.instance, mhv.time2, 1, mt.tagid,mt.component,mt.itemtype,mt.itemid,mt.contextid,mt.tiuserid,mt.ordering,mt.timecreated,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.tagid,h.component,h.itemtype,h.itemid,h.contextid,h.tiuserid,h.ordering,h.timecreated,h.timemodified from mdl_mph_ta2 h join (select id, max(time2) time2 from mdl_mph_ta2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tag_instance' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tag_instance' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.type,mt.props,mt.locked from mdl_mph_main_view mhv join mdl_task_obj_lock mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='task_obj_lock' 402 Query insert into mdl_mph_ta3 (id,time2,deleted2,type,props,locked) select mhv.instance, mhv.time2, 0, mt.type,mt.props,mt.locked from mdl_mph_main_view mhv join mdl_task_obj_lock mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='task_obj_lock' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='task_obj_lock' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.type,mt.props,mt.locked from mdl_mph_main_view mhv join mdl_task_obj_lock mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='task_obj_lock' 402 Query insert into mdl_mph_ta3 (id,time2,deleted2,type,props,locked) select distinct mhv.instance, mhv.time2, 0, mt.type,mt.props,mt.locked from mdl_mph_main_view mhv join mdl_task_obj_lock mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='task_obj_lock' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='task_obj_lock' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.type,mt.props,mt.locked from mdl_mph_main_view mhv join (select h.id,h.type,h.props,h.locked from mdl_mph_ta3 h join (select id, max(time2) time2 from mdl_mph_ta3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='task_obj_lock' 402 Query insert into mdl_mph_ta3 (id,time2,deleted2,type,props,locked) select mhv.instance, mhv.time2, 1, mt.type,mt.props,mt.locked from mdl_mph_main_view mhv join (select h.id,h.type,h.props,h.locked from mdl_mph_ta3 h join (select id, max(time2) time2 from mdl_mph_ta3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='task_obj_lock' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='task_obj_lock' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.version from mdl_mph_main_view mhv join mdl_tool_customlang_components mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_customlang_components' 402 Query insert into mdl_mph_to1 (id,time2,deleted2,name,version) select mhv.instance, mhv.time2, 0, mt.name,mt.version from mdl_mph_main_view mhv join mdl_tool_customlang_components mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_customlang_components' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_customlang_components' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.version from mdl_mph_main_view mhv join mdl_tool_customlang_components mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_customlang_components' 402 Query insert into mdl_mph_to1 (id,time2,deleted2,name,version) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.version from mdl_mph_main_view mhv join mdl_tool_customlang_components mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_customlang_components' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_customlang_components' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.version from mdl_mph_main_view mhv join (select h.id,h.name,h.version from mdl_mph_to1 h join (select id, max(time2) time2 from mdl_mph_to1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_customlang_components' 402 Query insert into mdl_mph_to1 (id,time2,deleted2,name,version) select mhv.instance, mhv.time2, 1, mt.name,mt.version from mdl_mph_main_view mhv join (select h.id,h.name,h.version from mdl_mph_to1 h join (select id, max(time2) time2 from mdl_mph_to1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_customlang_components' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_customlang_components' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.categoryid,mt.shortname,mt.fullname,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_category mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_recyclebin_category' 402 Query insert into mdl_mph_to2 (id,time2,deleted2,categoryid,shortname,fullname,timecreated) select mhv.instance, mhv.time2, 0, mt.categoryid,mt.shortname,mt.fullname,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_category mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_recyclebin_category' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_recyclebin_category' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.categoryid,mt.shortname,mt.fullname,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_category mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_recyclebin_category' 402 Query insert into mdl_mph_to2 (id,time2,deleted2,categoryid,shortname,fullname,timecreated) select distinct mhv.instance, mhv.time2, 0, mt.categoryid,mt.shortname,mt.fullname,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_category mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_recyclebin_category' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_recyclebin_category' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.categoryid,mt.shortname,mt.fullname,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.categoryid,h.shortname,h.fullname,h.timecreated from mdl_mph_to2 h join (select id, max(time2) time2 from mdl_mph_to2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_recyclebin_category' 402 Query insert into mdl_mph_to2 (id,time2,deleted2,categoryid,shortname,fullname,timecreated) select mhv.instance, mhv.time2, 1, mt.categoryid,mt.shortname,mt.fullname,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.categoryid,h.shortname,h.fullname,h.timecreated from mdl_mph_to2 h join (select id, max(time2) time2 from mdl_mph_to2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_recyclebin_category' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_recyclebin_category' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.tourid,mt.title,mt.content,mt.targettype,mt.targetvalue,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_steps mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_usertours_steps' 402 Query insert into mdl_mph_to3 (id,time2,deleted2,tourid,title,content,targettype,targetvalue,sortorder,configdata) select mhv.instance, mhv.time2, 0, mt.tourid,mt.title,mt.content,mt.targettype,mt.targetvalue,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_steps mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_usertours_steps' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_usertours_steps' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.tourid,mt.title,mt.content,mt.targettype,mt.targetvalue,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_steps mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_usertours_steps' 402 Query insert into mdl_mph_to3 (id,time2,deleted2,tourid,title,content,targettype,targetvalue,sortorder,configdata) select distinct mhv.instance, mhv.time2, 0, mt.tourid,mt.title,mt.content,mt.targettype,mt.targetvalue,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_steps mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_usertours_steps' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_usertours_steps' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.tourid,mt.title,mt.content,mt.targettype,mt.targetvalue,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join (select h.id,h.tourid,h.title,h.content,h.targettype,h.targetvalue,h.sortorder,h.configdata from mdl_mph_to3 h join (select id, max(time2) time2 from mdl_mph_to3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_usertours_steps' 402 Query insert into mdl_mph_to3 (id,time2,deleted2,tourid,title,content,targettype,targetvalue,sortorder,configdata) select mhv.instance, mhv.time2, 1, mt.tourid,mt.title,mt.content,mt.targettype,mt.targetvalue,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join (select h.id,h.tourid,h.title,h.content,h.targettype,h.targetvalue,h.sortorder,h.configdata from mdl_mph_to3 h join (select id, max(time2) time2 from mdl_mph_to3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_usertours_steps' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_usertours_steps' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.pathmatch,mt.enabled,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_tours mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_usertours_tours' 402 Query insert into mdl_mph_to4 (id,time2,deleted2,name,description,pathmatch,enabled,sortorder,configdata) select mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.pathmatch,mt.enabled,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_tours mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_usertours_tours' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_usertours_tours' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.pathmatch,mt.enabled,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_tours mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_usertours_tours' 402 Query insert into mdl_mph_to4 (id,time2,deleted2,name,description,pathmatch,enabled,sortorder,configdata) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.description,mt.pathmatch,mt.enabled,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join mdl_tool_usertours_tours mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_usertours_tours' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_usertours_tours' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.description,mt.pathmatch,mt.enabled,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join (select h.id,h.name,h.description,h.pathmatch,h.enabled,h.sortorder,h.configdata from mdl_mph_to4 h join (select id, max(time2) time2 from mdl_mph_to4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_usertours_tours' 402 Query insert into mdl_mph_to4 (id,time2,deleted2,name,description,pathmatch,enabled,sortorder,configdata) select mhv.instance, mhv.time2, 1, mt.name,mt.description,mt.pathmatch,mt.enabled,mt.sortorder,mt.configdata from mdl_mph_main_view mhv join (select h.id,h.name,h.description,h.pathmatch,h.enabled,h.sortorder,h.configdata from mdl_mph_to4 h join (select id, max(time2) time2 from mdl_mph_to4 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_usertours_tours' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_usertours_tours' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.externalurl,mt.display,mt.displayoptions,mt.parameters,mt.timemodified from mdl_mph_main_view mhv join mdl_url mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='url' 402 Query insert into mdl_mph_ur (id,time2,deleted2,course,name,intro,introformat,externalurl,display,displayoptions,parameters,timemodified) select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.externalurl,mt.display,mt.displayoptions,mt.parameters,mt.timemodified from mdl_mph_main_view mhv join mdl_url mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='url' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='url' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.externalurl,mt.display,mt.displayoptions,mt.parameters,mt.timemodified from mdl_mph_main_view mhv join mdl_url mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='url' 402 Query insert into mdl_mph_ur (id,time2,deleted2,course,name,intro,introformat,externalurl,display,displayoptions,parameters,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.course,mt.name,mt.intro,mt.introformat,mt.externalurl,mt.display,mt.displayoptions,mt.parameters,mt.timemodified from mdl_mph_main_view mhv join mdl_url mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='url' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='url' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.externalurl,mt.display,mt.displayoptions,mt.parameters,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.externalurl,h.display,h.displayoptions,h.parameters,h.timemodified from mdl_mph_ur h join (select id, max(time2) time2 from mdl_mph_ur group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='url' 402 Query insert into mdl_mph_ur (id,time2,deleted2,course,name,intro,introformat,externalurl,display,displayoptions,parameters,timemodified) select mhv.instance, mhv.time2, 1, mt.course,mt.name,mt.intro,mt.introformat,mt.externalurl,mt.display,mt.displayoptions,mt.parameters,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.course,h.name,h.intro,h.introformat,h.externalurl,h.display,h.displayoptions,h.parameters,h.timemodified from mdl_mph_ur h join (select id, max(time2) time2 from mdl_mph_ur group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='url' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='url' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.fieldid,mt.data,mt.dataformat from mdl_mph_main_view mhv join mdl_user_info_data mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_info_data' 402 Query insert into mdl_mph_us (id,time2,deleted2,userid,fieldid,data,dataformat) select mhv.instance, mhv.time2, 0, mt.userid,mt.fieldid,mt.data,mt.dataformat from mdl_mph_main_view mhv join mdl_user_info_data mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_info_data' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_data' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.fieldid,mt.data,mt.dataformat from mdl_mph_main_view mhv join mdl_user_info_data mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_info_data' 402 Query insert into mdl_mph_us (id,time2,deleted2,userid,fieldid,data,dataformat) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.fieldid,mt.data,mt.dataformat from mdl_mph_main_view mhv join mdl_user_info_data mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_info_data' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_data' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.fieldid,mt.data,mt.dataformat from mdl_mph_main_view mhv join (select h.id,h.userid,h.fieldid,h.data,h.dataformat from mdl_mph_us h join (select id, max(time2) time2 from mdl_mph_us group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_info_data' 402 Query insert into mdl_mph_us (id,time2,deleted2,userid,fieldid,data,dataformat) select mhv.instance, mhv.time2, 1, mt.userid,mt.fieldid,mt.data,mt.dataformat from mdl_mph_main_view mhv join (select h.id,h.userid,h.fieldid,h.data,h.dataformat from mdl_mph_us h join (select id, max(time2) time2 from mdl_mph_us group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_info_data' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_data' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.shortname,mt.name,mt.datatype,mt.description,mt.descriptionformat,mt.categoryid,mt.sortorder,mt.required,mt.locked,mt.visible,mt.forceunique,mt.signup,mt.defaultdata,mt.defaultdataformat,mt.param1,mt.param2,mt.param3,mt.param4,mt.param5 from mdl_mph_main_view mhv join mdl_user_info_field mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_info_field' 402 Query insert into mdl_mph_us1 (id,time2,deleted2,shortname,name,datatype,description,descriptionformat,categoryid,sortorder,required,locked,visible,forceunique,signup,defaultdata,defaultdataformat,param1,param2,param3,param4,param5) select mhv.instance, mhv.time2, 0, mt.shortname,mt.name,mt.datatype,mt.description,mt.descriptionformat,mt.categoryid,mt.sortorder,mt.required,mt.locked,mt.visible,mt.forceunique,mt.signup,mt.defaultdata,mt.defaultdataformat,mt.param1,mt.param2,mt.param3,mt.param4,mt.param5 from mdl_mph_main_view mhv join mdl_user_info_field mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_info_field' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_field' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.shortname,mt.name,mt.datatype,mt.description,mt.descriptionformat,mt.categoryid,mt.sortorder,mt.required,mt.locked,mt.visible,mt.forceunique,mt.signup,mt.defaultdata,mt.defaultdataformat,mt.param1,mt.param2,mt.param3,mt.param4,mt.param5 from mdl_mph_main_view mhv join mdl_user_info_field mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_info_field' 402 Query insert into mdl_mph_us1 (id,time2,deleted2,shortname,name,datatype,description,descriptionformat,categoryid,sortorder,required,locked,visible,forceunique,signup,defaultdata,defaultdataformat,param1,param2,param3,param4,param5) select distinct mhv.instance, mhv.time2, 0, mt.shortname,mt.name,mt.datatype,mt.description,mt.descriptionformat,mt.categoryid,mt.sortorder,mt.required,mt.locked,mt.visible,mt.forceunique,mt.signup,mt.defaultdata,mt.defaultdataformat,mt.param1,mt.param2,mt.param3,mt.param4,mt.param5 from mdl_mph_main_view mhv join mdl_user_info_field mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_info_field' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_field' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.shortname,mt.name,mt.datatype,mt.description,mt.descriptionformat,mt.categoryid,mt.sortorder,mt.required,mt.locked,mt.visible,mt.forceunique,mt.signup,mt.defaultdata,mt.defaultdataformat,mt.param1,mt.param2,mt.param3,mt.param4,mt.param5 from mdl_mph_main_view mhv join (select h.id,h.shortname,h.name,h.datatype,h.description,h.descriptionformat,h.categoryid,h.sortorder,h.required,h.locked,h.visible,h.forceunique,h.signup,h.defaultdata,h.defaultdataformat,h.param1,h.param2,h.param3,h.param4,h.param5 from mdl_mph_us1 h join (select id, max(time2) time2 from mdl_mph_us1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_info_field' 402 Query insert into mdl_mph_us1 (id,time2,deleted2,shortname,name,datatype,description,descriptionformat,categoryid,sortorder,required,locked,visible,forceunique,signup,defaultdata,defaultdataformat,param1,param2,param3,param4,param5) select mhv.instance, mhv.time2, 1, mt.shortname,mt.name,mt.datatype,mt.description,mt.descriptionformat,mt.categoryid,mt.sortorder,mt.required,mt.locked,mt.visible,mt.forceunique,mt.signup,mt.defaultdata,mt.defaultdataformat,mt.param1,mt.param2,mt.param3,mt.param4,mt.param5 from mdl_mph_main_view mhv join (select h.id,h.shortname,h.name,h.datatype,h.description,h.descriptionformat,h.categoryid,h.sortorder,h.required,h.locked,h.visible,h.forceunique,h.signup,h.defaultdata,h.defaultdataformat,h.param1,h.param2,h.param3,h.param4,h.param5 from mdl_mph_us1 h join (select id, max(time2) time2 from mdl_mph_us1 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_info_field' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_field' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_user_preferences mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_preferences' 402 Query insert into mdl_mph_us2 (id,time2,deleted2,userid,name,value) select mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_user_preferences mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_preferences' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_preferences' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_user_preferences mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_preferences' 402 Query insert into mdl_mph_us2 (id,time2,deleted2,userid,name,value) select distinct mhv.instance, mhv.time2, 0, mt.userid,mt.name,mt.value from mdl_mph_main_view mhv join mdl_user_preferences mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_preferences' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_preferences' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.userid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.userid,h.name,h.value from mdl_mph_us2 h join (select id, max(time2) time2 from mdl_mph_us2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_preferences' 402 Query insert into mdl_mph_us2 (id,time2,deleted2,userid,name,value) select mhv.instance, mhv.time2, 1, mt.userid,mt.name,mt.value from mdl_mph_main_view mhv join (select h.id,h.userid,h.name,h.value from mdl_mph_us2 h join (select id, max(time2) time2 from mdl_mph_us2 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_preferences' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_preferences' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.cmid,mt.timecreated,mt.userid,mt.action,mt.modname from mdl_mph_main_view mhv join mdl_block_recent_activity mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_recent_activity' 402 Query insert into mdl_mph_bl3 (id,time2,deleted2,courseid,cmid,timecreated,userid,action,modname) select mhv.instance, mhv.time2, 0, mt.courseid,mt.cmid,mt.timecreated,mt.userid,mt.action,mt.modname from mdl_mph_main_view mhv join mdl_block_recent_activity mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='block_recent_activity' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_recent_activity' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.cmid,mt.timecreated,mt.userid,mt.action,mt.modname from mdl_mph_main_view mhv join mdl_block_recent_activity mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_recent_activity' 402 Query insert into mdl_mph_bl3 (id,time2,deleted2,courseid,cmid,timecreated,userid,action,modname) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.cmid,mt.timecreated,mt.userid,mt.action,mt.modname from mdl_mph_main_view mhv join mdl_block_recent_activity mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='block_recent_activity' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_recent_activity' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.cmid,mt.timecreated,mt.userid,mt.action,mt.modname from mdl_mph_main_view mhv join (select h.id,h.courseid,h.cmid,h.timecreated,h.userid,h.action,h.modname from mdl_mph_bl3 h join (select id, max(time2) time2 from mdl_mph_bl3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_recent_activity' 402 Query insert into mdl_mph_bl3 (id,time2,deleted2,courseid,cmid,timecreated,userid,action,modname) select mhv.instance, mhv.time2, 1, mt.courseid,mt.cmid,mt.timecreated,mt.userid,mt.action,mt.modname from mdl_mph_main_view mhv join (select h.id,h.courseid,h.cmid,h.timecreated,h.userid,h.action,h.modname from mdl_mph_bl3 h join (select id, max(time2) time2 from mdl_mph_bl3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='block_recent_activity' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='block_recent_activity' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichtries,mt.timemodified,mt.questionid,mt.variant,mt.subqid,mt.aid,mt.response,mt.credit from mdl_mph_main_view mhv join mdl_question_response_analysis mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_response_analysis' 402 Query insert into mdl_mph_qu29 (id,time2,deleted2,hashcode,whichtries,timemodified,questionid,variant,subqid,aid,response,credit) select mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichtries,mt.timemodified,mt.questionid,mt.variant,mt.subqid,mt.aid,mt.response,mt.credit from mdl_mph_main_view mhv join mdl_question_response_analysis mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_response_analysis' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_response_analysis' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichtries,mt.timemodified,mt.questionid,mt.variant,mt.subqid,mt.aid,mt.response,mt.credit from mdl_mph_main_view mhv join mdl_question_response_analysis mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_response_analysis' 402 Query insert into mdl_mph_qu29 (id,time2,deleted2,hashcode,whichtries,timemodified,questionid,variant,subqid,aid,response,credit) select distinct mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichtries,mt.timemodified,mt.questionid,mt.variant,mt.subqid,mt.aid,mt.response,mt.credit from mdl_mph_main_view mhv join mdl_question_response_analysis mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_response_analysis' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_response_analysis' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.hashcode,mt.whichtries,mt.timemodified,mt.questionid,mt.variant,mt.subqid,mt.aid,mt.response,mt.credit from mdl_mph_main_view mhv join (select h.id,h.hashcode,h.whichtries,h.timemodified,h.questionid,h.variant,h.subqid,h.aid,h.response,h.credit from mdl_mph_qu29 h join (select id, max(time2) time2 from mdl_mph_qu29 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_response_analysis' 402 Query insert into mdl_mph_qu29 (id,time2,deleted2,hashcode,whichtries,timemodified,questionid,variant,subqid,aid,response,credit) select mhv.instance, mhv.time2, 1, mt.hashcode,mt.whichtries,mt.timemodified,mt.questionid,mt.variant,mt.subqid,mt.aid,mt.response,mt.credit from mdl_mph_main_view mhv join (select h.id,h.hashcode,h.whichtries,h.timemodified,h.questionid,h.variant,h.subqid,h.aid,h.response,h.credit from mdl_mph_qu29 h join (select id, max(time2) time2 from mdl_mph_qu29 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_response_analysis' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_response_analysis' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.analysisid,mt.try,mt.rcount from mdl_mph_main_view mhv join mdl_question_response_count mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_response_count' 402 Query insert into mdl_mph_qu30 (id,time2,deleted2,analysisid,try,rcount) select mhv.instance, mhv.time2, 0, mt.analysisid,mt.try,mt.rcount from mdl_mph_main_view mhv join mdl_question_response_count mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_response_count' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_response_count' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.analysisid,mt.try,mt.rcount from mdl_mph_main_view mhv join mdl_question_response_count mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_response_count' 402 Query insert into mdl_mph_qu30 (id,time2,deleted2,analysisid,try,rcount) select distinct mhv.instance, mhv.time2, 0, mt.analysisid,mt.try,mt.rcount from mdl_mph_main_view mhv join mdl_question_response_count mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_response_count' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_response_count' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.analysisid,mt.try,mt.rcount from mdl_mph_main_view mhv join (select h.id,h.analysisid,h.try,h.rcount from mdl_mph_qu30 h join (select id, max(time2) time2 from mdl_mph_qu30 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_response_count' 402 Query insert into mdl_mph_qu30 (id,time2,deleted2,analysisid,try,rcount) select mhv.instance, mhv.time2, 1, mt.analysisid,mt.try,mt.rcount from mdl_mph_main_view mhv join (select h.id,h.analysisid,h.try,h.rcount from mdl_mph_qu30 h join (select id, max(time2) time2 from mdl_mph_qu30 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_response_count' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_response_count' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.hashcode,mt.timemodified,mt.questionid,mt.slot,mt.subquestion,mt.variant,mt.s,mt.effectiveweight,mt.negcovar,mt.discriminationindex,mt.discriminativeefficiency,mt.sd,mt.facility,mt.subquestions,mt.maxmark,mt.positions,mt.randomguessscore from mdl_mph_main_view mhv join mdl_question_statistics mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_statistics' 402 Query insert into mdl_mph_qu31 (id,time2,deleted2,hashcode,timemodified,questionid,slot,subquestion,variant,s,effectiveweight,negcovar,discriminationindex,discriminativeefficiency,sd,facility,subquestions,maxmark,positions,randomguessscore) select mhv.instance, mhv.time2, 0, mt.hashcode,mt.timemodified,mt.questionid,mt.slot,mt.subquestion,mt.variant,mt.s,mt.effectiveweight,mt.negcovar,mt.discriminationindex,mt.discriminativeefficiency,mt.sd,mt.facility,mt.subquestions,mt.maxmark,mt.positions,mt.randomguessscore from mdl_mph_main_view mhv join mdl_question_statistics mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='question_statistics' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_statistics' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.hashcode,mt.timemodified,mt.questionid,mt.slot,mt.subquestion,mt.variant,mt.s,mt.effectiveweight,mt.negcovar,mt.discriminationindex,mt.discriminativeefficiency,mt.sd,mt.facility,mt.subquestions,mt.maxmark,mt.positions,mt.randomguessscore from mdl_mph_main_view mhv join mdl_question_statistics mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_statistics' 402 Query insert into mdl_mph_qu31 (id,time2,deleted2,hashcode,timemodified,questionid,slot,subquestion,variant,s,effectiveweight,negcovar,discriminationindex,discriminativeefficiency,sd,facility,subquestions,maxmark,positions,randomguessscore) select distinct mhv.instance, mhv.time2, 0, mt.hashcode,mt.timemodified,mt.questionid,mt.slot,mt.subquestion,mt.variant,mt.s,mt.effectiveweight,mt.negcovar,mt.discriminationindex,mt.discriminativeefficiency,mt.sd,mt.facility,mt.subquestions,mt.maxmark,mt.positions,mt.randomguessscore from mdl_mph_main_view mhv join mdl_question_statistics mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='question_statistics' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_statistics' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.hashcode,mt.timemodified,mt.questionid,mt.slot,mt.subquestion,mt.variant,mt.s,mt.effectiveweight,mt.negcovar,mt.discriminationindex,mt.discriminativeefficiency,mt.sd,mt.facility,mt.subquestions,mt.maxmark,mt.positions,mt.randomguessscore from mdl_mph_main_view mhv join (select h.id,h.hashcode,h.timemodified,h.questionid,h.slot,h.subquestion,h.variant,h.s,h.effectiveweight,h.negcovar,h.discriminationindex,h.discriminativeefficiency,h.sd,h.facility,h.subquestions,h.maxmark,h.positions,h.randomguessscore from mdl_mph_qu31 h join (select id, max(time2) time2 from mdl_mph_qu31 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_statistics' 402 Query insert into mdl_mph_qu31 (id,time2,deleted2,hashcode,timemodified,questionid,slot,subquestion,variant,s,effectiveweight,negcovar,discriminationindex,discriminativeefficiency,sd,facility,subquestions,maxmark,positions,randomguessscore) select mhv.instance, mhv.time2, 1, mt.hashcode,mt.timemodified,mt.questionid,mt.slot,mt.subquestion,mt.variant,mt.s,mt.effectiveweight,mt.negcovar,mt.discriminationindex,mt.discriminativeefficiency,mt.sd,mt.facility,mt.subquestions,mt.maxmark,mt.positions,mt.randomguessscore from mdl_mph_main_view mhv join (select h.id,h.hashcode,h.timemodified,h.questionid,h.slot,h.subquestion,h.variant,h.s,h.effectiveweight,h.negcovar,h.discriminationindex,h.discriminativeefficiency,h.sd,h.facility,h.subquestions,h.maxmark,h.positions,h.randomguessscore from mdl_mph_qu31 h join (select id, max(time2) time2 from mdl_mph_qu31 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='question_statistics' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='question_statistics' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichattempts,mt.timemodified,mt.firstattemptscount,mt.highestattemptscount,mt.lastattemptscount,mt.allattemptscount,mt.firstattemptsavg,mt.highestattemptsavg,mt.lastattemptsavg,mt.allattemptsavg,mt.median,mt.standarddeviation,mt.skewness,mt.kurtosis,mt.cic,mt.errorratio,mt.standarderror from mdl_mph_main_view mhv join mdl_quiz_statistics mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_statistics' 402 Query insert into mdl_mph_qu32 (id,time2,deleted2,hashcode,whichattempts,timemodified,firstattemptscount,highestattemptscount,lastattemptscount,allattemptscount,firstattemptsavg,highestattemptsavg,lastattemptsavg,allattemptsavg,median,standarddeviation,skewness,kurtosis,cic,errorratio,standarderror) select mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichattempts,mt.timemodified,mt.firstattemptscount,mt.highestattemptscount,mt.lastattemptscount,mt.allattemptscount,mt.firstattemptsavg,mt.highestattemptsavg,mt.lastattemptsavg,mt.allattemptsavg,mt.median,mt.standarddeviation,mt.skewness,mt.kurtosis,mt.cic,mt.errorratio,mt.standarderror from mdl_mph_main_view mhv join mdl_quiz_statistics mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='quiz_statistics' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_statistics' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichattempts,mt.timemodified,mt.firstattemptscount,mt.highestattemptscount,mt.lastattemptscount,mt.allattemptscount,mt.firstattemptsavg,mt.highestattemptsavg,mt.lastattemptsavg,mt.allattemptsavg,mt.median,mt.standarddeviation,mt.skewness,mt.kurtosis,mt.cic,mt.errorratio,mt.standarderror from mdl_mph_main_view mhv join mdl_quiz_statistics mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_statistics' 402 Query insert into mdl_mph_qu32 (id,time2,deleted2,hashcode,whichattempts,timemodified,firstattemptscount,highestattemptscount,lastattemptscount,allattemptscount,firstattemptsavg,highestattemptsavg,lastattemptsavg,allattemptsavg,median,standarddeviation,skewness,kurtosis,cic,errorratio,standarderror) select distinct mhv.instance, mhv.time2, 0, mt.hashcode,mt.whichattempts,mt.timemodified,mt.firstattemptscount,mt.highestattemptscount,mt.lastattemptscount,mt.allattemptscount,mt.firstattemptsavg,mt.highestattemptsavg,mt.lastattemptsavg,mt.allattemptsavg,mt.median,mt.standarddeviation,mt.skewness,mt.kurtosis,mt.cic,mt.errorratio,mt.standarderror from mdl_mph_main_view mhv join mdl_quiz_statistics mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='quiz_statistics' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_statistics' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.hashcode,mt.whichattempts,mt.timemodified,mt.firstattemptscount,mt.highestattemptscount,mt.lastattemptscount,mt.allattemptscount,mt.firstattemptsavg,mt.highestattemptsavg,mt.lastattemptsavg,mt.allattemptsavg,mt.median,mt.standarddeviation,mt.skewness,mt.kurtosis,mt.cic,mt.errorratio,mt.standarderror from mdl_mph_main_view mhv join (select h.id,h.hashcode,h.whichattempts,h.timemodified,h.firstattemptscount,h.highestattemptscount,h.lastattemptscount,h.allattemptscount,h.firstattemptsavg,h.highestattemptsavg,h.lastattemptsavg,h.allattemptsavg,h.median,h.standarddeviation,h.skewness,h.kurtosis,h.cic,h.errorratio,h.standarderror from mdl_mph_qu32 h join (select id, max(time2) time2 from mdl_mph_qu32 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_statistics' 402 Query insert into mdl_mph_qu32 (id,time2,deleted2,hashcode,whichattempts,timemodified,firstattemptscount,highestattemptscount,lastattemptscount,allattemptscount,firstattemptsavg,highestattemptsavg,lastattemptsavg,allattemptsavg,median,standarddeviation,skewness,kurtosis,cic,errorratio,standarderror) select mhv.instance, mhv.time2, 1, mt.hashcode,mt.whichattempts,mt.timemodified,mt.firstattemptscount,mt.highestattemptscount,mt.lastattemptscount,mt.allattemptscount,mt.firstattemptsavg,mt.highestattemptsavg,mt.lastattemptsavg,mt.allattemptsavg,mt.median,mt.standarddeviation,mt.skewness,mt.kurtosis,mt.cic,mt.errorratio,mt.standarderror from mdl_mph_main_view mhv join (select h.id,h.hashcode,h.whichattempts,h.timemodified,h.firstattemptscount,h.highestattemptscount,h.lastattemptscount,h.allattemptscount,h.firstattemptsavg,h.highestattemptsavg,h.lastattemptsavg,h.allattemptsavg,h.median,h.standarddeviation,h.skewness,h.kurtosis,h.cic,h.errorratio,h.standarderror from mdl_mph_qu32 h join (select id, max(time2) time2 from mdl_mph_qu32 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='quiz_statistics' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='quiz_statistics' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.userid,mt.name,mt.scale,mt.description,mt.descriptionformat,mt.timemodified from mdl_mph_main_view mhv join mdl_scale mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scale' 402 Query insert into mdl_mph_sc6 (id,time2,deleted2,courseid,userid,name,scale,description,descriptionformat,timemodified) select mhv.instance, mhv.time2, 0, mt.courseid,mt.userid,mt.name,mt.scale,mt.description,mt.descriptionformat,mt.timemodified from mdl_mph_main_view mhv join mdl_scale mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='scale' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scale' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.userid,mt.name,mt.scale,mt.description,mt.descriptionformat,mt.timemodified from mdl_mph_main_view mhv join mdl_scale mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scale' 402 Query insert into mdl_mph_sc6 (id,time2,deleted2,courseid,userid,name,scale,description,descriptionformat,timemodified) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.userid,mt.name,mt.scale,mt.description,mt.descriptionformat,mt.timemodified from mdl_mph_main_view mhv join mdl_scale mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='scale' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scale' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.userid,mt.name,mt.scale,mt.description,mt.descriptionformat,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.courseid,h.userid,h.name,h.scale,h.description,h.descriptionformat,h.timemodified from mdl_mph_sc6 h join (select id, max(time2) time2 from mdl_mph_sc6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scale' 402 Query insert into mdl_mph_sc6 (id,time2,deleted2,courseid,userid,name,scale,description,descriptionformat,timemodified) select mhv.instance, mhv.time2, 1, mt.courseid,mt.userid,mt.name,mt.scale,mt.description,mt.descriptionformat,mt.timemodified from mdl_mph_main_view mhv join (select h.id,h.courseid,h.userid,h.name,h.scale,h.description,h.descriptionformat,h.timemodified from mdl_mph_sc6 h join (select id, max(time2) time2 from mdl_mph_sc6 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='scale' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='scale' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.section,mt.module,mt.name,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_course mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_recyclebin_course' 402 Query insert into mdl_mph_to5 (id,time2,deleted2,courseid,section,module,name,timecreated) select mhv.instance, mhv.time2, 0, mt.courseid,mt.section,mt.module,mt.name,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_course mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='tool_recyclebin_course' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_recyclebin_course' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.courseid,mt.section,mt.module,mt.name,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_course mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_recyclebin_course' 402 Query insert into mdl_mph_to5 (id,time2,deleted2,courseid,section,module,name,timecreated) select distinct mhv.instance, mhv.time2, 0, mt.courseid,mt.section,mt.module,mt.name,mt.timecreated from mdl_mph_main_view mhv join mdl_tool_recyclebin_course mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='tool_recyclebin_course' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_recyclebin_course' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.courseid,mt.section,mt.module,mt.name,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.courseid,h.section,h.module,h.name,h.timecreated from mdl_mph_to5 h join (select id, max(time2) time2 from mdl_mph_to5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_recyclebin_course' 402 Query insert into mdl_mph_to5 (id,time2,deleted2,courseid,section,module,name,timecreated) select mhv.instance, mhv.time2, 1, mt.courseid,mt.section,mt.module,mt.name,mt.timecreated from mdl_mph_main_view mhv join (select h.id,h.courseid,h.section,h.module,h.name,h.timecreated from mdl_mph_to5 h join (select id, max(time2) time2 from mdl_mph_to5 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='tool_recyclebin_course' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='tool_recyclebin_course' and `operation` in ('delete') 402 Query COMMIT 402 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED 402 Query START TRANSACTION 402 Query SELECT column_name, data_type, character_maximum_length, numeric_precision, 402 Query select distinct mhv.instance, mhv.time2, 0, mt.name,mt.sortorder from mdl_mph_main_view mhv join mdl_user_info_category mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_info_category' 402 Query insert into mdl_mph_us3 (id,time2,deleted2,name,sortorder) select mhv.instance, mhv.time2, 0, mt.name,mt.sortorder from mdl_mph_main_view mhv join mdl_user_info_category mt on mhv.instance=mt.id and mhv.operation='insert' and mhv.history='user_info_category' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_category' and `operation` in ('insert') 402 Query select mhv.instance, mhv.time2, 0, mt.name,mt.sortorder from mdl_mph_main_view mhv join mdl_user_info_category mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_info_category' 402 Query insert into mdl_mph_us3 (id,time2,deleted2,name,sortorder) select distinct mhv.instance, mhv.time2, 0, mt.name,mt.sortorder from mdl_mph_main_view mhv join mdl_user_info_category mt on mhv.instance=mt.id and mhv.operation='update' and mhv.history='user_info_category' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_category' and `operation` in ('update') 402 Query select mhv.instance, mhv.time2, 1, mt.name,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.name,h.sortorder from mdl_mph_us3 h join (select id, max(time2) time2 from mdl_mph_us3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_info_category' 402 Query insert into mdl_mph_us3 (id,time2,deleted2,name,sortorder) select mhv.instance, mhv.time2, 1, mt.name,mt.sortorder from mdl_mph_main_view mhv join (select h.id,h.name,h.sortorder from mdl_mph_us3 h join (select id, max(time2) time2 from mdl_mph_us3 group by id) maxh ON h.id=maxh.id and h.time2=maxh.time2 where h.deleted2=0) mt on mhv.instance=mt.id and mhv.operation='delete' and mhv.history='user_info_category' 402 Query delete from mdl_mph_main where time2<=@htime and `history`='user_info_category' and `operation` in ('delete') 402 Query COMMIT 402 Query select history, count(*) from mdl_mph_main where time2<=@htime group by history 402 Query INSERT INTO mdl_mph_snapshots (dbtime,fsid) VALUES('1592825856','/vol2/aultmanhospital/aultman_test2/moodledata/fd_snapshots/1592825856') 402 Quit