- Timestamp:
- 07/31/18 20:43:59 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/root2sql.cc
r19108 r19110 64 64 ("first", var<int64_t>(int64_t(0)), "First event to start with (default: 0), mainly for test purpose") 65 65 ("max", var<int64_t>(int64_t(0)), "Maximum number of events to process (0: all), mainly for test purpose") 66 ("engine", var<string>("InnoDB"), "Database engine to be used when a new table is created") 66 ("engine", var<string>(""), "Database engine to be used when a new table is created") 67 ("row-format", var<string>(""), "Defines the ROW_FORMAT keyword for table creation") 67 68 ("duplicate", var<string>(""), "Specifies an assignment_list for an 'ON DUPLICATE KEY UPDATE' expression") 68 69 ("ignore-errors", po_switch(), "Adds the IGNORE keyword to the INSERT query (turns errors into warnings, ignores rows with errors)") … … 149 150 "once. Note that the combination of these columns must be unique.\n" 150 151 "\n" 151 "All columns are created as NOT NULL as default and the table is created as"152 " InnoDB (default).\n"152 "All columns are created as NOT NULL as default. To force a database engine " 153 "and/or a storage format, use --engine and --rot-format.\n" 153 154 "\n" 154 155 "Usually, the INSERT query would fail if the PRIMARY key exists already. " … … 308 309 309 310 const string engine = conf.Get<string>("engine"); 311 const string row_format = conf.Get<string>("row-format"); 310 312 const string duplicate = conf.Get<string>("duplicate"); 311 313 … … 486 488 query += 487 489 ")\n" 488 "DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci\n" 489 "ENGINE="+engine+"\n" 490 "COMMENT='created by "+conf.GetName()+"'\n"; 490 "DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci\n"; 491 if (!engine.empty()) 492 query += "ENGINE="+engine+"\n"; 493 if (!row_format.empty()) 494 query += "ROW_FORMAT="+row_format+"\n"; 495 query += "COMMENT='created by "+conf.GetName()+"'\n"; 491 496 492 497 // FIXME: Can we omit the catching to be able to print the
Note:
See TracChangeset
for help on using the changeset viewer.