쉐도잉 연습: MySQL took 21 years to fix this bug - YouTube로 영어 말하기 배우기

C1
In my 16 years as a software developer,
⏸ 일시 정지
190 문장
문장이 너무 짧거나 길면 Edit를 눌러 조정하세요.
1
In my 16 years as a software developer,
2
nothing made me happier than avoiding an annoying bug long enough for someone else to accidentally fix it,
3
or for the entire feature to be removed before I ever had to touch that code.
4
In fact, after years of hard work and dedication,
5
I can proudly say that I have polished this skill to perfection.
6
As some of the more experienced among you already know,
7
avoiding a ticket without looking like you are avoiding a ticket is an art form.
8
You cannot just ignore it,
9
because that is amateur work.
10
A seasoned senior software developer who earns their keep will occasionally comment something vague,
11
like, I'll have to circle back to it when my priorities allow it,
12
or this is a tough one,
13
but I believe I'm finally close to a solution.
14
Then, they let a little more time pass and hope for the best.
15
And, hope, as you eventually learn,
16
is basically at the core of software development.
17
So when I tell you
18
that the MySQL team avoided a single bug ticket for 21 years and somehow made it look almost professional,
19
understand that I say this with deep, deep respect.
20
When a bug is first reported in 2005,
21
and you get to fix it in 2026,
22
we should all sit down,
23
take notes and learn a thing or two about surviving this industry.
24
The bug in question is MySQL bug number 11472,
25
filed on June 21st, 2005.
26
To give you a sense of how long ago that was,
27
the iPhone did not exist,
28
the most popular browser on Earth was Internet Explorer 6
29
and Sam Altman was busy creating a social network instead of convincing the world
30
that AI tokens are as important as access to electricity or water.
31
We see a future where intelligence is a utility,
32
like electricity or water, and people buy it from us.
33
Anyway, the reported bug was apparently pretty straightforward.
34
Triggers were not firing when a foreign key cascade modified a row.
35
For those unfamiliar with relational databases,
36
a foreign key is basically a rule that says that this piece of data,
37
like some orders, depends on some other piece of data, like a customer.
38
Cascades, on the other hand,
39
are what happen when the database automatically propagates a change through that relationship.
40
So when you delete a customer,
41
the database can be told to automatically delete that customer's orders for you.
42
Now, there is a whole separate discussion about whether physically deleting records from a database is a bad practice,
43
but that is not the topic of this video.
44
Just keep in mind that in many cases,
45
you are better off keeping the records in the database and using a soft delete instead,
46
which simply means marking a row as deleted with a boolean flag.
47
Back to the bug, when one of these automated cascade deletes happens,
48
my SQL goes and removes the affected child rows for you,
49
but it does it quietly.
50
So quietly that the triggers attached to those rows have no idea anything happened.
51
Triggers, if you have not run into them before,
52
are little bits of code that you tell the database to run automatically whenever a specific event happens on a specific table.
53
Again, there is an entire discussion on the topic of best practices
54
when it comes to triggers and there is an ongoing fight about them in the industry.
55
The modern application crowd will tell you triggers are invisible,
56
untestable and a debugging nightmare
57
and honestly they are not wrong a trigger does not show up in your git dev
58
or in code review and a new developer joining your team might be surprised to find out
59
that half the logic of your application is happening inside the database fired off by little scripts
60
that nobody has looked at for the past 15 years also triggers do not translate
61
when you migrate from one database to another because every database has its own slightly different trigger syntax.
62
On the other hand, the database crowd,
63
mostly old-school DBAs, will tell you
64
that triggers are the only thing in your entire stack that catches every change to your data,
65
no matter where it came from.
66
If you have three different services,
67
a cron job, and some random script all writing to the same database,
68
only a trigger sees all the changes reliably.
69
But enough with the boring theory,
70
let's get back to the actual bug report.
71
A few days after the initial report,
72
the MySQL team says the plan is to fix it in their upcoming 5.1 release.
73
Again, take notes, because this is the kind of confidence you guys need to succeed in this career.
74
Then, a few days, sorry,
75
a few years pass, and in 2007,
76
a new comment from the team states that MySQL's own foreign key implementation will eventually fix this,
77
but it will still take some time.
78
Then, two years later, the confirmation that this bug will not be fixed in 5.1 is posted.
79
In 2013, 8 years in,
80
a user asks for an update.
81
The official reply this time,
82
and I want you to appreciate the craftsmanship here,
83
says Note that there is major development work needed to fix this issue,
84
it will not be a mere bug fix.
85
At this point, the bug is starting to become somewhat of a meme because a user replies in the thread,
86
the guys over at Oracle probably aren't getting any of these messages because their triggers aren't firing.
87
This joke was funny for 13 years straight.
88
It's important to note that during this time MySQL changed owners multiple times.
89
It started as an open source database built by a small Swedish company.
90
It was bought by Sun Microsystems in 2008 for $1 billion,
91
which at the time felt like a lot of money.
92
Then, in 2010, Oracle bought Sun and inherited MySQL together with the second best programming language in the world.
93
And since we are talking about billions of dollars,
94
please let me tell you a few words about today's sponsor.
95
PostHog is a platform built to help developers and product managers build their dream projects by helping debug their product,
96
understand their customers, analyze usage and ship more successful features faster.
97
They make things really easy for you by putting all the tools and data you need in one place.
98
This means product analytics, web analytics,
99
session replay, error tracking, experimentation,
100
feature flags, LLM analytics, surveys and many more.
101
Then, they give you an actually useful AI agent to make sense of it all.
102
PostHog's data infrastructure is tailored for data engineers who need to build a robust
103
and flexible data stack to house all their business data.
104
And since all data lives on the same platform,
105
you can watch what users actually did,
106
see where they got stuck,
107
roll out a fix behind the feature flag,
108
test whether it worked, and then use the same data to decide what to build next.
109
The setup is as simple as installing one of the available SDKs or pasting a snippet into your site header,
110
which will then auto-capture data like page views, button clicks and sessions.
111
So, if you are building a product and want analytics,
112
replay, flags, experiments, errors, surveys and AI-powered insights without stitching together 5 different tools,
113
please check out PostHog using the link below.
114
Back to the video, by 2015,
115
the comment section enters its second phase when users start showing up on the bug's birthday to leave congratulatory messages like,
116
Happy Anniversary, it's 10 years already,
117
this defect is going to be attending middle school in the fall and happy 13th birthday they grow up so fast.
118
By 2020, we hit a third phase.
119
A user writes, this bug is older than me.
120
The original reporter, who filed a bug in 2005,
121
gets pinged by someone asking if he's still alive
122
and he shows up the next day to confirm he is still using MySQL.
123
Now, jokes aside, the reason this bug took 21 years to fix is actually pretty interesting
124
and it traces its roots in an architectural decision made in the late 90s
125
that turned out to be very hard to walk back.
126
To explain what happened, I need to tell you a little about how MySQL is built,
127
because once you understand the structure,
128
the whole bug starts to make sense.
129
MySQL is built into layers.
130
On top, you have what is called the SQL layer,
131
sometimes also called the server layer.
132
This is the part of MySQL that takes your queries,
133
parses them, plans how to execute them,
134
and then asks for the data.
135
It is also the part that handles things like triggers,
136
views, stored procedures and user permissions.
137
Anything that thinks in terms of SQL statements lives here.
138
Underneath, you have the storage engine.
139
The storage engine is the part that actually reads and writes the bytes on disk.
140
This component deals with pages, indexes, logs and transactions.
141
My SQL is unusual because its storage engine is pluggable,
142
which means you can swap it out,
143
but for the past 15 years,
144
everyone has been using InnoDB.
145
Now, in most databases, foreign keys live in the SQL layer.
146
This layer knows about the foreign key,
147
this layer enforces it, and when a cascade fires,
148
this is the layer that generates the cascade operation as if it were a normal SQL statement.
149
As a result, triggers fire normally,
150
because triggers are also a SQL layer concept.
151
MySQL on the other hand implemented foreign keys inside the InnoDB storage engine.
152
The reason is historical and this is also your awesome trivia for the day.
153
Early versions of MySQL did not support foreign keys at all.
154
The MySQL team famously did not really believe in them
155
and you can actually find a page in their version 3 manual titled Reasons not to use foreign keys.
156
Their arguments age like milk.
157
The first reason they mentioned in the manual is
158
that foreign keys make life very complicated because the foreign key definitions must be stored in a database.
159
The second reason was that foreign keys are slow and unnecessary and you,
160
the developer, will simply remember to insert records in the right order.
161
So when they finally added foreign key support,
162
they bolted it onto InnoDB,
163
because InnoDB was the only engine at the time that supported transactions.
164
The SQL layer was never involved,
165
so foreign keys became strictly an InnoDB feature.
166
So when you run a query such as this one,
167
here is what actually happens step by step.
168
The SQL layer parses your query,
169
it fires the before delete trigger if it exists,
170
then it hands the actual delete operation to InnoDB.
171
InnoDB then notices, on its own,
172
that there is a foreign key with onDelete cascade pointing at the orders table.
173
So it walks the orders table,
174
finds all the orders that belong to that customer and deletes them itself right there in the storage engine.
175
But then, the engine never bubbles back up to the SQL layer to notify it about the additional deletions.
176
So the SQL layer, sitting up there with all the triggers,
177
is perfectly willing to fire them,
178
waiting for someone to tell it that rows on the orders table have changed.
179
This was the issue, and as you can see,
180
this is what the MySQL team meant in 2013,
181
when they wrote that this was not a mere bug fix,
182
but major development work.
183
The two systems that need to talk to each other are architecturally separated.
184
And to finally fix the problem,
185
the team did the thing they had been putting off for 21 years.
186
They moved foreign keys out of InnoDB and up into the SQL layer.
187
If you liked this video,
188
you should consider joining our community where I'm posting more dedicated weekly content.
189
Please don't forget to smash all the buttons and until next time,
190
thank you for watching.

앱 다운로드

당신이 말하는 모든 문장을 AI가 채점

TRENDING

인기 동영상

이번 수업에 대한 설명

이번 수업에서는 소프트웨어 개발과 MySQL 버그에 대해 다루며, 관련된 영어 표현을 배우고 연습할 것입니다. 코드 및 데이터베이스와 관련된 전문 용어를 익히고, 실제 개발자들이 사용하는 뉘앙스를 이해하는 데 중점을 두겠습니다. 이러한 내용을 통해 여러분의 영어 말하기 능력과 쉐도잉 기술을 한층 더 향상시킬 수 있습니다.

주요 어휘 및 표현

  • 버그(bug): 소프트웨어의 오류나 결함을 의미합니다.
  • 외래 키(foreign key): 데이터 베이스에서 서로 연결된 데이터 조각들 사이의 관계를 정의하는 규칙입니다.
  • 자동 삭제(cascade delete): 데이터베이스에서 연관된 데이터가 삭제될 때 자동으로 관련된 데이터를 삭제하는 기능입니다.
  • 소프트 삭제(soft delete): 데이터를 실제로 삭제하는 대신 삭제된 것으로 표시하는 방법입니다.
  • 트리거(trigger): 데이터베이스에서 특정 이벤트가 발생할 때 자동으로 실행되는 프로시저입니다.
  • 우선순위(priorities): 해야 할 일의 중요도를 나타내는 개념입니다.
  • 기대(hope): 결과가 좋기를 바라는 마음 또는 믿음을 의미합니다.
  • 관계형 데이터베이스(relational database): 데이터가 서로 관계를 갖고 있는 형태로 저장되는 데이터베이스입니다.

연습 팁

비디오의 속도와 어조에 맞춰 영어 쉐도잉을 연습하는 것이 중요합니다. 특히, 이 비디오는 다소 느린 속도로 진행되므로 여러분이 따라하기에도 적합합니다. shadow speech를 활용하여 각 표현을 반복하는 방식으로 연습해주세요. 처음에는 전체 문장을 쉐도잉하지 않아도 괜찮습니다. 문장 단위로 나누어 짧게 따라하며 발음을 익히는 것이 좋습니다.

예를 들어, "이 버그는 2005년에 보고되었으며 2026년에 수정될 것입니다."와 같은 문장을 반복하는 과정에서 발음과 억양에 집중하세요. 각 문장을 듣고 즉각적으로 따라 해보며, shadow speak의 감각을 익히는 것이 효과적입니다. 문장을 완벽하게 따라할 필요는 없지만, 자연스럽고 유창하게 발음하는 데 주목이 필요합니다. 이와 같은 방식으로 영어 측면에서 자신의 어휘력과 발음 훈련을 지속할 수 있습니다.

마지막으로, shadowspeak을 활용하여 자신의 발음 녹음을 해 보는 것도 추천합니다. 녹음한 내용을 듣고 피드백을 주어 자신의 발음을 개선해 나가는 것이 중요합니다. 이러한 연습을 통해 영어 말하기 능력을 한층 더 발전시킬 수 있습니다.

쉐도잉이란? 영어 실력을 빠르게 키우는 과학적 방법

쉐도잉(Shadowing)은 원래 전문 통역사 훈련을 위해 개발된 언어 학습 기법으로, 다언어 학자인 Dr. Alexander Arguelles에 의해 대중화된 방법입니다. 핵심 원리는 간단하지만 매우 강력합니다: 원어민의 영어를 들으면서 1~2초의 짧은 지연으로 즉시 소리 내어 따라 말하는 것——마치 '그림자(shadow)'처럼 화자를 따라가는 것입니다. 문법 공부나 수동적인 청취와 달리, 쉐도잉은 뇌와 입 근육이 동시에 실시간으로 영어를 처리하고 재현하도록 훈련합니다. 연구에 따르면 이 방법은 발음 정확도, 억양, 리듬, 연음, 청취력, 말하기 유창성을 크게 향상시킵니다. IELTS 스피킹 준비와 자연스러운 영어 소통을 원하는 분들에게 특히 효과적입니다.

커피 한 잔 사주기