paddy_fields Posted June 10, 2014 Share Posted June 10, 2014 (edited) I know this is a very simple and probably stupid question - but what is a patch? i've tried searching online for an explanation but I just find articles on the 'best practice' and it doesn't break it down into what it actually is! I've just been looking into new hosting and they offer a managed service, which includes database patching. Could someone please enlighten me? Edited June 10, 2014 by paddyfields Quote Link to comment Share on other sites More sharing options...
trq Posted June 10, 2014 Share Posted June 10, 2014 Put simply a patch is just a file of changes that can be applied over the top of an existing file. An example: Given a file named foo.txt containing... Hello World And a patch file named foo.patch containing... diff --git a/foo.txt b/foo.txt index 557db03..3ef92e9 100644 --- a/foo.txt +++ b/foo.txt @@ -1 +1 @@ -Hello World +Hello World, my name is trq. Applying this patch using... patch -p1 < foo.patch Would result in foo.txt containing.... Hello World, my name is trq. Patches are often used to apply changes to source code. What I assume your host is talking about is that they will patch your database with the latest security fixes. Quote Link to comment Share on other sites More sharing options...
paddy_fields Posted June 11, 2014 Author Share Posted June 11, 2014 Thank you for the explanation, I'll look into the diff method of patches it seems quite interesting! I think you may be right about what the hosting company was referring to - I'll call them to clarify. Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.