Use mysql’s `replace into` safely!

Introduction MySQL’s popular replace into destination_database.destination_table (fields) select fields from source_database.source_table; query can be very dangerous if not used properly. Illustration Say, you have schema’s like: create table source_table ( field1 bigint not null, field2 int not null, field3 varchar(50) default '0' not null, primary key (field1, field2) ); create table destination_table ( field1 bigint not null, field2 int not null, field3 varchar(50) default '0' not null, primary key (field1, field2) ); Now, if you want to replace some data from source table to the destination table, you can do something like:...

September 20, 2018 · 2 min · Sourav Badami

The Hacker Manifesto

Credits: +++The Mentor+++, Written January 8, 1986. Another one got caught today, it’s all over the papers. “Teenager Arrested in Computer Crime Scandal”, Hacker, Arrested after Bank Tampering”… Damn kids. They’re all alike. But did you, in your three-piece psychology and 1950’s technobrain, ever take a look behind the eyes of the hacker,? Did you ever wonder what made him tick, what forces shaped him, what may have molded him?...

April 22, 2018 · 3 min · Sourav Badami