@@ -139,29 +139,15 @@ static bool insert_pat_inited = false, debug_info_flag = false,
139139static ulong opt_max_allowed_packet, opt_net_buffer_length;
140140static MYSQL mysql_connection, *mysql = nullptr ;
141141static DYNAMIC_STRING insert_pat;
142- <<<<<<< HEAD
143- static char *opt_password = 0 , *current_user = 0 , *current_host = 0 , *path = 0 ,
144- *fields_terminated = 0 , *lines_terminated = 0 , *enclosed = 0 ,
145- *opt_enclosed = 0 , *escaped = 0 , *where = 0 ,
146- *opt_compatible_mode_str = 0 , *opt_ignore_error = 0 ,
147- *log_error_file = NULL ;
148- #ifndef DBUG_OFF
149- static char *start_sql_file = nullptr , *finish_sql_file = nullptr ;
150- #endif
151- ||||||| ea7d2e2d16a
152- static char *opt_password = 0 , *current_user = 0 , *current_host = 0 , *path = 0 ,
153- *fields_terminated = 0 , *lines_terminated = 0 , *enclosed = 0 ,
154- *opt_enclosed = 0 , *escaped = 0 , *where = 0 ,
155- *opt_compatible_mode_str = 0 , *opt_ignore_error = 0 ,
156- *log_error_file = NULL ;
157- =======
158142static char *opt_password = nullptr , *current_user = nullptr ,
159143 *current_host = nullptr , *path = nullptr ,
160144 *fields_terminated = nullptr , *lines_terminated = nullptr ,
161145 *enclosed = nullptr , *opt_enclosed = nullptr , *escaped = nullptr ,
162146 *where = nullptr , *opt_compatible_mode_str = nullptr ,
163147 *opt_ignore_error = nullptr , *log_error_file = nullptr ;
164- >>>>>>> mysql-8.0.20
148+ #ifndef DBUG_OFF
149+ static char *start_sql_file = nullptr , *finish_sql_file = nullptr ;
150+ #endif
165151static MEM_ROOT argv_alloc{PSI_NOT_INSTRUMENTED, 512 };
166152static bool ansi_mode = false ; // /< Force the "ANSI" SQL_MODE.
167153/* Server supports character_set_results session variable? */
@@ -256,18 +242,12 @@ static struct my_option my_long_options[] = {
256242 {" all-tablespaces" , ' Y' , " Dump all the tablespaces." , &opt_alltspcs,
257243 &opt_alltspcs, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 , nullptr },
258244 {" no-tablespaces" , ' y' , " Do not dump any tablespace information." ,
259- <<<<<<< HEAD
260- &opt_notspcs, &opt_notspcs, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
245+ &opt_notspcs, &opt_notspcs, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
246+ nullptr },
261247 {" add-drop-compression-dictionary" , OPT_DROP_COMPRESSION_DICTIONARY,
262248 " Add a DROP COMPRESSION_DICTIONARY before each create." ,
263249 &opt_drop_compression_dictionary, &opt_drop_compression_dictionary, 0 ,
264- GET_BOOL, NO_ARG, 1 , 0 , 0 , 0 , 0 , 0 },
265- ||||||| ea7d2e2d16a
266- &opt_notspcs, &opt_notspcs, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
267- =======
268- &opt_notspcs, &opt_notspcs, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
269- nullptr },
270- >>>>>>> mysql-8.0.20
250+ GET_BOOL, NO_ARG, 1 , 0 , 0 , nullptr , 0 , nullptr },
271251 {" add-drop-database" , OPT_DROP_DATABASE,
272252 " Add a DROP DATABASE before each create." , &opt_drop_database,
273253 &opt_drop_database, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
@@ -375,31 +355,20 @@ static struct my_option my_long_options[] = {
375355 " - don't forget to read about --single-transaction below). In all cases "
376356 " any action on logs will happen at the exact moment of the dump."
377357 " Option automatically turns --lock-tables off." ,
378- <<<<<<< HEAD
379- &opt_slave_data, &opt_slave_data, 0 , GET_UINT, OPT_ARG, 0 , 0 ,
380- MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL, 0 , 0 , 0 },
358+ &opt_slave_data, &opt_slave_data, nullptr , GET_UINT, OPT_ARG, 0 , 0 ,
359+ MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL, nullptr , 0 , nullptr },
381360 {" enable-compressed-columns" , OPT_ENABLE_COMPRESSED_COLUMNS,
382361 " Enable compressed columns extensions." , &opt_compressed_columns,
383- &opt_compressed_columns, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
362+ &opt_compressed_columns, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
363+ nullptr },
384364 {" enable-compressed-columns-with-dictionaries" ,
385365 OPT_ENABLE_COMPRESSED_COLUMNS_WITH_DICTIONARIES,
386366 " Enable dictionaries for compressed columns extensions." ,
387367 &opt_compressed_columns_with_dictionaries,
388- &opt_compressed_columns_with_dictionaries, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 ,
389- 0 , 0 },
390- {" events" , ' E' , " Dump events." , &opt_events, &opt_events, 0 , GET_BOOL,
391- NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
392- ||||||| ea7d2e2d16a
393- &opt_slave_data, &opt_slave_data, 0 , GET_UINT, OPT_ARG, 0 , 0 ,
394- MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL, 0 , 0 , 0 },
395- {" events" , ' E' , " Dump events." , &opt_events, &opt_events, 0 , GET_BOOL,
396- NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
397- =======
398- &opt_slave_data, &opt_slave_data, nullptr , GET_UINT, OPT_ARG, 0 , 0 ,
399- MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL, nullptr , 0 , nullptr },
368+ &opt_compressed_columns_with_dictionaries, nullptr , GET_BOOL, NO_ARG, 0 , 0 ,
369+ 0 , nullptr , 0 , nullptr },
400370 {" events" , ' E' , " Dump events." , &opt_events, &opt_events, nullptr , GET_BOOL,
401371 NO_ARG, 0 , 0 , 0 , nullptr , 0 , nullptr },
402- >>>>>>> mysql-8.0.20
403372 {" extended-insert" , ' e' ,
404373 " Use multiple-row INSERT syntax that include several VALUES lists." ,
405374 &extended_insert, &extended_insert, nullptr , GET_BOOL, NO_ARG, 1 , 0 , 0 ,
@@ -466,21 +435,13 @@ static struct my_option my_long_options[] = {
466435 {" include-master-host-port" , OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
467436 " Adds 'MASTER_HOST=<host>, MASTER_PORT=<port>' to 'CHANGE MASTER TO..' "
468437 " in dump produced with --dump-slave." ,
469- <<<<<<< HEAD
470- &opt_include_master_host_port, &opt_include_master_host_port, 0 , GET_BOOL,
471- NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
438+ &opt_include_master_host_port, &opt_include_master_host_port, nullptr ,
439+ GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 , nullptr },
472440 {" innodb-optimize-keys" , OPT_INNODB_OPTIMIZE_KEYS,
473441 " Use InnoDB fast index creation by creating secondary indexes after "
474442 " dumping the data." ,
475- &opt_innodb_optimize_keys, &opt_innodb_optimize_keys, 0 , GET_BOOL, NO_ARG,
476- 0 , 0 , 0 , 0 , 0 , 0 },
477- ||||||| ea7d2e2d16a
478- &opt_include_master_host_port, &opt_include_master_host_port, 0 , GET_BOOL,
479- NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
480- =======
481- &opt_include_master_host_port, &opt_include_master_host_port, nullptr ,
482- GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 , nullptr },
483- >>>>>>> mysql-8.0.20
443+ &opt_innodb_optimize_keys, &opt_innodb_optimize_keys, nullptr , GET_BOOL,
444+ NO_ARG, 0 , 0 , 0 , nullptr , 0 , nullptr },
484445 {" insert-ignore" , OPT_INSERT_IGNORE, " Insert rows with INSERT IGNORE." ,
485446 &opt_ignore, &opt_ignore, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
486447 nullptr },
@@ -492,23 +453,15 @@ static struct my_option my_long_options[] = {
492453 " Locks all tables across all databases. This "
493454 " is achieved by taking a global read lock for the duration of the whole "
494455 " dump. Automatically turns --single-transaction and --lock-tables off." ,
495- <<<<<<< HEAD
496- &opt_lock_all_tables, &opt_lock_all_tables, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 ,
497- 0 , 0 , 0 },
456+ &opt_lock_all_tables, &opt_lock_all_tables, nullptr , GET_BOOL, NO_ARG, 0 ,
457+ 0 , 0 , nullptr , 0 , nullptr },
498458 {" lock-for-backup" , OPT_LOCK_FOR_BACKUP,
499459 " Use lightweight metadata locks "
500460 " to block updates to non-transactional tables and DDL to all tables. "
501461 " This works only with --single-transaction, otherwise this option is "
502462 " automatically converted to --lock-all-tables." ,
503- &opt_lock_for_backup, &opt_lock_for_backup, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 ,
504- 0 , 0 , 0 },
505- ||||||| ea7d2e2d16a
506- &opt_lock_all_tables, &opt_lock_all_tables, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 ,
507- 0 , 0 , 0 },
508- =======
509- &opt_lock_all_tables, &opt_lock_all_tables, nullptr , GET_BOOL, NO_ARG, 0 ,
463+ &opt_lock_for_backup, &opt_lock_for_backup, nullptr , GET_BOOL, NO_ARG, 0 ,
510464 0 , 0 , nullptr , 0 , nullptr },
511- >>>>>>> mysql-8.0.20
512465 {" lock-tables" , ' l' , " Lock all tables for read." , &lock_tables,
513466 &lock_tables, nullptr , GET_BOOL, NO_ARG, 1 , 0 , 0 , nullptr , 0 , nullptr },
514467 {" log-error" , OPT_ERROR_LOG_FILE,
@@ -565,19 +518,12 @@ static struct my_option my_long_options[] = {
565518 " Sorts each table's rows by primary key, or first unique key, if such a "
566519 " key exists. Useful when dumping a MyISAM table to be loaded into an "
567520 " InnoDB table, but will make the dump itself take considerably longer." ,
568- <<<<<<< HEAD
569- &opt_order_by_primary, &opt_order_by_primary, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 ,
570- 0 , 0 , 0 },
571- {" order-by-primary-desc" , OPT_ORDER_BY_PRIMARY_DESC,
572- " Taking backup ORDER BY primary key DESC." , &opt_order_by_primary_desc,
573- &opt_order_by_primary_desc, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
574- ||||||| ea7d2e2d16a
575- &opt_order_by_primary, &opt_order_by_primary, 0 , GET_BOOL, NO_ARG, 0 , 0 , 0 ,
576- 0 , 0 , 0 },
577- =======
578521 &opt_order_by_primary, &opt_order_by_primary, nullptr , GET_BOOL, NO_ARG, 0 ,
579522 0 , 0 , nullptr , 0 , nullptr },
580- >>>>>>> mysql-8.0.20
523+ {" order-by-primary-desc" , OPT_ORDER_BY_PRIMARY_DESC,
524+ " Taking backup ORDER BY primary key DESC." , &opt_order_by_primary_desc,
525+ &opt_order_by_primary_desc, nullptr , GET_BOOL, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
526+ nullptr },
581527 {" password" , ' p' ,
582528 " Password to use when connecting to server. If password is not given it's "
583529 " solicited on the tty." ,
@@ -658,30 +604,22 @@ static struct my_option my_long_options[] = {
658604 nullptr , nullptr , nullptr , GET_NO_ARG, NO_ARG, 0 , 0 , 0 , nullptr , 0 ,
659605 nullptr },
660606 {" socket" , ' S' , " The socket file to use for connection." ,
661- <<<<<<< HEAD
662- &opt_mysql_unix_port, &opt_mysql_unix_port, 0 , GET_STR, REQUIRED_ARG, 0 , 0 ,
663- 0 , 0 , 0 , 0 },
607+ &opt_mysql_unix_port, &opt_mysql_unix_port, nullptr , GET_STR, REQUIRED_ARG,
608+ 0 , 0 , 0 , nullptr , 0 , nullptr },
664609#ifndef DBUG_OFF
665610 {" start-sql-file" , OPT_START_SQL_FILE,
666611 " Execute SQL statements from the file at the mysqldump start. "
667612 " Each line has to contain one statement terminated with a semicolon. "
668613 " Line length limit is 1023 characters." ,
669- &start_sql_file, &start_sql_file, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 , 0 ,
670- 0 },
614+ &start_sql_file, &start_sql_file, nullptr , GET_STR, REQUIRED_ARG, 0 , 0 , 0 ,
615+ nullptr , 0 , nullptr },
671616 {" finish-sql-file" , OPT_FINISH_SQL_FILE,
672617 " Execute SQL statements from the file at the mysqldump finish. "
673618 " Each line has to contain one statement terminated with a semicolon. "
674619 " Line length limit is 1023 characters." ,
675- &finish_sql_file, &finish_sql_file, 0 , GET_STR, REQUIRED_ARG, 0 , 0 , 0 , 0 ,
676- 0 , 0 },
620+ &finish_sql_file, &finish_sql_file, nullptr , GET_STR, REQUIRED_ARG, 0 , 0 ,
621+ 0 , nullptr , 0 , nullptr },
677622#endif // DEBUF_OFF
678- ||||||| ea7d2e2d16a
679- &opt_mysql_unix_port, &opt_mysql_unix_port, 0 , GET_STR, REQUIRED_ARG, 0 , 0 ,
680- 0 , 0 , 0 , 0 },
681- =======
682- &opt_mysql_unix_port, &opt_mysql_unix_port, nullptr , GET_STR, REQUIRED_ARG,
683- 0 , 0 , 0 , nullptr , 0 , nullptr },
684- >>>>>>> mysql-8.0.20
685623#include " caching_sha2_passwordopt-longopts.h"
686624#include " sslopt-longopts.h"
687625
@@ -3398,18 +3336,12 @@ static uint get_table_structure(const char *table, char *db, char *table_type,
33983336 result_table = quote_name (table, table_buff, true );
33993337 opt_quoted_table = quote_name (table, table_buff2, false );
34003338
3401- <<<<<<< HEAD
34023339 const bool has_pk =
34033340 (opt_innodb_optimize_keys && !strcmp (table_type, " InnoDB" ))
34043341 ? has_primary_key (table)
34053342 : false ;
34063343
3407- if (!opt_xml && !mysql_query_with_error_report (mysql, 0 , query_buff)) {
3408- ||||||| ea7d2e2d16a
3409- if (!opt_xml && !mysql_query_with_error_report (mysql, 0 , query_buff)) {
3410- =======
34113344 if (!opt_xml && !mysql_query_with_error_report (mysql, nullptr , query_buff)) {
3412- >>>>>>> mysql-8.0.20
34133345 /* using SHOW CREATE statement */
34143346 if (!opt_no_create_info && !skip_ddl) {
34153347 /* Make an sql-file, if path was given iow. option -T was given */
@@ -3451,17 +3383,7 @@ static uint get_table_structure(const char *table, char *db, char *table_type,
34513383 */
34523384 print_optional_drop_table (sql_file, db, table, opt_quoted_table);
34533385
3454- <<<<<<< HEAD
3455- char *scv_buff = NULL ;
3456- ||||||| ea7d2e2d16a
3457- field = mysql_fetch_field_direct (result, 0 );
3458- if (strcmp (field->name , " View" ) == 0 ) {
3459- char *scv_buff = NULL ;
3460- =======
3461- field = mysql_fetch_field_direct (result, 0 );
3462- if (strcmp (field->name , " View" ) == 0 ) {
34633386 char *scv_buff = nullptr ;
3464- >>>>>>> mysql-8.0.20
34653387 uint64_t n_cols;
34663388
34673389 verbose_msg (" -- It's a view, create dummy view\n " );
@@ -6055,16 +5977,8 @@ bool is_infoschema_db(const char *db) {
60555977 the table unsorted, rather than exit without dumping the data.
60565978*/
60575979
6058- <<<<<<< HEAD
60595980static char *primary_key_fields (const char *table_name, const bool desc) {
6060- MYSQL_RES *res = NULL ;
6061- ||||||| ea7d2e2d16a
6062- static char *primary_key_fields (const char *table_name) {
6063- MYSQL_RES *res = NULL ;
6064- =======
6065- static char *primary_key_fields (const char *table_name) {
60665981 MYSQL_RES *res = nullptr ;
6067- >>>>>>> mysql-8.0.20
60685982 MYSQL_ROW row;
60695983 /* SHOW KEYS FROM + table name * 2 (escaped) + 2 quotes + \0 */
60705984 char show_keys_buff[15 + NAME_LEN * 2 + 3 ];
0 commit comments