DROP DATABASE TESTBUG; CREATE DATABASE TESTBUG; USE TESTBUG; CREATE TABLE GV1_BO (oid varchar(32) NOT NULL, created_at DATE, created_by varchar(255), last_modified_at DATE, last_modified_by varchar(255), boclass varchar(255), boshortname varchar(255), bokey varchar(255), bodbtable varchar(255), locked_by varchar(255), PRIMARY KEY(oid)); CREATE TABLE GV1_User (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, password varchar(16), fullname varchar(255), administrator BOOL, email varchar(255), isFormsMaster BOOL, languageCode varchar(32), phone varchar(255), mobile varchar(255), fax varchar(255), myOrganization_id varchar(255), myUserRole_name varchar(255), PRIMARY KEY(id)); CREATE TABLE GV1_UserRole (oid varchar(32) NOT NULL, name varchar(255) NOT NULL, PRIMARY KEY(name)); CREATE TABLE GV1_Organization (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, name varchar(255), unit varchar(255), address text, countrycode varchar(32), state varchar(255), city varchar(255), web varchar(255), status varchar(255), mainContact_id varchar(255), PRIMARY KEY(id)); CREATE TABLE GV1_Selection_catalog (oid varchar(32) NOT NULL, name varchar(255) NOT NULL, language varchar(255), description text, catalogtype ENUM ('isEnumeration', 'isList', 'isDynamicList'), PRIMARY KEY(name)); CREATE TABLE GV1_CatalogEntry (oid varchar(32) NOT NULL, dbkey varchar(255) NOT NULL, identifier varchar(255) NOT NULL, entry varchar(255), description text, code numeric NOT NULL, usagecount numeric, myCatalog_name varchar(255), PRIMARY KEY(dbkey)); CREATE TABLE GV1_FormSet (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, name varchar(255), issueDate DATE, shortDescription varchar(255), description text, displayer varchar(255), path varchar(255), PRIMARY KEY(id)); CREATE TABLE GV1_Form (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, name varchar(255) NOT NULL, title varchar(255), description text, detailType varchar(255), helptext text, icon varchar(255), inheritsFrom varchar(255), boot_storage_type varchar(255), nextForm varchar(255), myFormSet_id varchar(255), PRIMARY KEY(id)); CREATE TABLE GV1_Tab (oid varchar(32) NOT NULL, title varchar(255), tabid varchar(255) NOT NULL, icon varchar(255), PRIMARY KEY(tabid)); CREATE TABLE GV1_Page (oid varchar(32) NOT NULL, title varchar(255), tabid varchar(255) NOT NULL, icon varchar(255), myForm_id varchar(255), PRIMARY KEY(tabid)); CREATE TABLE GV1_Field (oid varchar(32) NOT NULL, fieldname varchar(255), Unit varchar(255), data_type varchar(255), descriptionblock text, iskey BOOL, showInGrid BOOL, readOnly BOOL, mandatory BOOL, calculated varchar(255), dependency varchar(255), triggerClause varchar(255), field_type varchar(255), defaultValue varchar(255), examples varchar(255), value_range varchar(255), validity_check varchar(255), persistent BOOL, sortPos numeric, isReference BOOL, referenceCardinality varchar(255), referenceColumn varchar(255), fieldid varchar(255) NOT NULL, hidden BOOL, allowUnknown BOOL, size numeric, maxlength numeric, myCatalog_name varchar(255), myPage_tabid varchar(255), myForm_id varchar(255), PRIMARY KEY(fieldid)); CREATE TABLE GV1_Fielddescription (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, field_label varchar(255), comment_description text, language varchar(32), htmldescription text, myField_fieldid varchar(255), PRIMARY KEY(id)); CREATE TABLE GV1_Menu (oid varchar(32) NOT NULL, name varchar(255), id varchar(255) NOT NULL, icon varchar(255), PRIMARY KEY(id)); CREATE TABLE GV1_MenuItem (oid varchar(32) NOT NULL, name varchar(255), functionid varchar(255) NOT NULL, icon varchar(255), myMenu_id varchar(255), myFunctionCall_functionid varchar(255), PRIMARY KEY(functionid)); CREATE TABLE GV1_MenuAccess (oid varchar(32) NOT NULL, myAllowedUserRoles_name varchar(255), myAllowedMenuItems_functionid varchar(255)); CREATE TABLE GV1_FunctionCall (oid varchar(32) NOT NULL, functionid varchar(255) NOT NULL, callClass varchar(255), callMethod varchar(255), callObject varchar(255), callParam varchar(255), form varchar(255), bokey varchar(255), PRIMARY KEY(functionid)); CREATE TABLE GV1_User (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, password varchar(16), fullname varchar(255), administrator BOOL, email varchar(255), isFormsMaster BOOL, languageCode varchar(32), phone varchar(255), mobile varchar(255), fax varchar(255), myOrganization_id varchar(255), myUserRole_name varchar(255), PRIMARY KEY(id)); CREATE VIEW GV1_UserView AS SELECT GV1_User.*, GV1_Organization.id AS "GV1_Organization.id", GV1_Organization.name AS "GV1_Organization.name", GV1_Organization.status AS "GV1_Organization.status", GV1_UserRole.name AS "GV1_UserRole.name" FROM GV1_User, GV1_Organization, GV1_UserRole WHERE GV1_User.myOrganization_id=GV1_Organization.id AND GV1_User.myUserRole_name=GV1_UserRole.name; CREATE TABLE GV1_Organization (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, name varchar(255), unit varchar(255), address text, countrycode varchar(32), state varchar(255), city varchar(255), web varchar(255), status varchar(255), mainContact_id varchar(255), PRIMARY KEY(id)); CREATE VIEW GV1_OrganizationView AS SELECT GV1_Organization.* FROM GV1_Organization; CREATE TABLE GC1_GPIC (oid varchar(32) NOT NULL, code varchar(18) NOT NULL, isUsed BOOL, myCenter_id varchar(255), PRIMARY KEY(code)); CREATE VIEW GC1_GPICView AS SELECT GC1_GPIC.*, GC1_Center.id AS "GC1_Center.id", GC1_Center.name AS "GC1_Center.name", GC1_Center.status AS "GC1_Center.status" FROM GC1_GPIC, GC1_Center WHERE GC1_GPIC.myCenter_id=GC1_Center.id; CREATE TABLE GC1_PatientTumourTherapy (oid varchar(32) NOT NULL, GPIC varchar(18) NOT NULL, ageatstart numeric NOT NULL, gender ENUM ('f', 'm') NOT NULL, informed_consent ENUM ('ic_no', 'ic_yes', 'ic_limited') NOT NULL, date_ic DATE, myCenter_id varchar(255), myTumourSite_id varchar(255), therapy_protocol_id varchar(255), therapy_start DATE, fu_time numeric, activeFollowup BOOL, nextFollowup DATE, late_morbidity_G2 BOOL, late_morbidity_G3 BOOL, quality_dosimetry BOOL, quality_clinical_data BOOL, PRIMARY KEY(GPIC)); CREATE VIEW GC1_PatientTumourTherapyView AS SELECT GC1_PatientTumourTherapy.*, GC1_Center.id AS "GC1_Center.id", GC1_Center.name AS "GC1_Center.name", GC1_Center.status AS "GC1_Center.status" FROM GC1_PatientTumourTherapy, GC1_Center WHERE GC1_PatientTumourTherapy.myCenter_id=GC1_Center.id; CREATE TABLE GC1_TumourSite (oid varchar(32) NOT NULL, id varchar(40) NOT NULL, name varchar(255), PRIMARY KEY(id)); CREATE VIEW GC1_TumourSiteView AS SELECT GC1_TumourSite.* FROM GC1_TumourSite; CREATE TABLE GC1_Treatment (oid varchar(32) NOT NULL, id varchar(40) NOT NULL, ther_protarm varchar(255), shortDescription varchar(255), quality_dosimetry BOOL, quality_clinical_data BOOL, followup_Pattern varchar(255), protocol_id varchar(255), myTumourSite_id varchar(255), PRIMARY KEY(id)); CREATE VIEW GC1_TreatmentView AS SELECT GC1_Treatment.* FROM GC1_Treatment; CREATE TABLE GC1_TreatmentsPerCenter (oid varchar(32) NOT NULL, myCenters_id varchar(255), myTreatments_id varchar(255)); CREATE VIEW GC1_TreatmentsPerCenterView AS SELECT GC1_TreatmentsPerCenter.*, GC1_Center.id AS "GC1_Center.id", GC1_Center.name AS "GC1_Center.name", GC1_Center.status AS "GC1_Center.status" FROM GC1_TreatmentsPerCenter, GC1_Center WHERE GC1_TreatmentsPerCenter.myCenters_id=GC1_Center.id; CREATE TABLE GC1_FollowupSideeffect (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, followup_date DATE NOT NULL, sideeff_G4andG5 BOOL, late_morbidity_G3 BOOL, late_morbidity_G2 BOOL, sideeff_RT_related ENUM ('unrelated', 'unlikely', 'possible', 'probable', 'definitely', 'unclear'), myPatient_GPIC varchar(255), PRIMARY KEY(id)); CREATE VIEW GC1_FollowupSideeffectView AS SELECT GC1_FollowupSideeffect.* FROM GC1_FollowupSideeffect; CREATE TABLE GC1_Material (oid varchar(32) NOT NULL, id varchar(255) NOT NULL, material_type varchar(32), cell_line BOOL, collection_date DATE, last_shipping_date DATE, qa_procedure BOOL, number_of_samples numeric, loc_sample_id varchar(255), myPatient_GPIC varchar(255), PRIMARY KEY(id)); CREATE VIEW GC1_MaterialView AS SELECT GC1_Material.*, GC1_Center.id AS "GC1_Center.id", GC1_Center.name AS "GC1_Center.name", GC1_Center.status AS "GC1_Center.status" FROM GC1_Material, GC1_Center WHERE GC1_Material.loc_sample_id=GC1_Center.id; CREATE TABLE genepiv1_offstudyform (oid varchar(32) NOT NULL, myPatient_GPIC varchar(255) NOT NULL, offstudy_date DATE NOT NULL, why_offstudy varchar(32) NOT NULL, cause_of_death varchar(32), PRIMARY KEY(myPatient_GPIC)); CREATE VIEW genepiv1_offstudyformView AS SELECT genepiv1_offstudyform.* FROM genepiv1_offstudyform; #mysqldump --quick --add-locks --no-create-db --lock-tables --no-create-info --complete-insert --extended-insert=false --host=localhost --user=root --password testbug #backup failed with return-code: -1073741819