Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 214831 Details for
Bug 317091
mysqlimport does not have option to break foreign keys
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to add the feature
mysqlimport.c.patch (text/plain), 1.49 KB, created by
Hasan Ceylan
on 2007-10-03 17:00:21 UTC
(
hide
)
Description:
patch to add the feature
Filename:
MIME Type:
Creator:
Hasan Ceylan
Created:
2007-10-03 17:00:21 UTC
Size:
1.49 KB
patch
obsolete
>diff -Nur mysql-5.0.27/client/mysqlimport.c mysql-5.0.27.fixed/client/mysqlimport.c >--- mysql-5.0.27/client/mysqlimport.c 2006-10-21 03:22:52.000000000 +0300 >+++ mysql-5.0.27.fixed/client/mysqlimport.c 2006-10-21 03:22:52.000000000 +0300 >@@ -36,7 +36,7 @@ > static char *add_load_option(char *ptr,const char *object, > const char *statement); > >-static my_bool verbose=0,lock_tables=0,ignore_errors=0,opt_delete=0, >+static my_bool verbose=0,lock_tables=0,ignore_errors=0,opt_delete=0, ignore_foreign_keys=0, > replace=0,silent=0,ignore=0,opt_compress=0, > opt_low_priority= 0, tty_password= 0; > static uint opt_local_file=0; >@@ -100,6 +100,10 @@ > (gptr*) ¤t_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, > {"ignore", 'i', "If duplicate unique key was found, keep old row.", > (gptr*) &ignore, (gptr*) &ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, >+ {"ignore-foreign-keys", 'k', >+ "Ignore foreign key checks while importing data.", >+ (gptr*) &ignore_foreign_keys, (gptr*) &ignore_foreign_keys, 0, GET_BOOL, NO_ARG, >+ 0, 0, 0, 0, 0, 0}, > {"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.", > (gptr*) &opt_ignore_lines, (gptr*) &opt_ignore_lines, 0, GET_LL, > REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, >@@ -408,6 +412,9 @@ > ignore_errors=0; > db_error(&mysql_connection); > } >+ if (ignore_foreign_keys){ >+ mysql_query(sock, "SET FOREIGN_KEY_CHECKS = 0;"); >+ } > return sock; > } > >@@ -542,3 +549,4 @@ > my_end(0); > return(exitcode); > } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 317091
: 214831