Jump to content

What is a MySQL database patch?


paddy_fields

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/289098-what-is-a-mysql-database-patch/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.