how to contribute code to mysql?

27
THAVA ALAGU Staff Engineer, Database Group, Sun Microsystems, Bangalore [email protected] http://blogs.sun.com/thava/ July 2008 HOW TO CONTRIBUTE CODE TO MYSQL ?

Upload: thavamuni

Post on 18-Dec-2014

2.801 views

Category:

Technology


5 download

DESCRIPTION

Describes steps involved about how to contribute code to MySQL and getting started. -thava http://blogs.sun.com/thava

TRANSCRIPT

Page 1: How to Contribute Code to MySQL?

THAVA ALAGU

Staff Engineer, Database Group,

Sun Microsystems, Bangalore

[email protected]

http://blogs.sun.com/thava/

July 2008

HOW TO CONTRIBUTE CODE TO MYSQL ?

Page 2: How to Contribute Code to MySQL?

Welcome !Welcome !

2

Page 3: How to Contribute Code to MySQL?

AGENDA : CONTRIBUTING

Why ? Why ? How ?How ? Getting StartedGetting Started ResourcesResources

3

Page 4: How to Contribute Code to MySQL?

WHY CONTRIBUTE ?

Learn ! Get Famous! Land the job you want! Get Rich! Feel Good! Have Fun!

4

Page 5: How to Contribute Code to MySQL?

ARCHITECTURE OVERVIEW

5

Page 6: How to Contribute Code to MySQL?

HOW TO CONTRIBUTE ?

Community Contribution Program http://forge.mysql.com/wiki/Community_Contributions

Quality Contribution Program http://dev.mysql.com/programs/qualitycontribution.html

6

Page 7: How to Contribute Code to MySQL?

COMMUNITY CONTRIBUTION PROGRAM

Pickup Open Worklogs http://forge.mysql.com/wiki/ComContribution_Worklog

Pickup Open Bugs http://forge.mysql.com/wiki/ComContribution_Bugs

Send e-mail to [email protected]

Get MySQL Mentor assigned for the task Subscribe to [email protected] Subscribe to [email protected]

7

Page 8: How to Contribute Code to MySQL?

COMMUNITY CONTRIBUTION PROGRAM… (CONTD)

Sign Contributor License Agreement online Submit patch to [email protected] Included in next community preview Regression Bugs => Assigned Free for you! Everything is good … Included in server version

8

Page 9: How to Contribute Code to MySQL?

QUALITY CONTRIBUTION PROGRAM

Bug Reports, Test Cases, Code Patches 50 Points - Basic Contributors. Enterprise

Basic 200 Points - Enterprise Silver 500 Points - Enterprise Gold 1000 Points - Enterprise Platinum

What is Enterprise Edition ?http://www.mysql.com/products/which-edition.html

9

Page 10: How to Contribute Code to MySQL?

FOR STUDENTS: GOOGLE SUMMER OF CODE

http://forge.mysql.com/wiki/SummerOfCode2008Ideas

10

Page 11: How to Contribute Code to MySQL?

CODING GUIDELINES :

http://forge.mysql.com/wiki/MySQL_Internals_Coding_Guidelines

No Tabs No Carriage Returns Use 2 spaces for indentation Etc.

11

Page 12: How to Contribute Code to MySQL?

12

Page 13: How to Contribute Code to MySQL?

ARCHITECTURE OVERVIEW

13

Page 14: How to Contribute Code to MySQL?

REFERENCE MANUAL …

Excellent Online Reference Manual : http://dev.mysql.com/doc/refman/6.0/en/index.html Annotated with User Comments !

14

Page 15: How to Contribute Code to MySQL?

GETTING STARTED …

Bazaar – Version Control System http://bazaar-vcs.org/

Why Bazaar ? cvs, svn, hg, git, bazaar !

15

Page 16: How to Contribute Code to MySQL?

BAZAAR …

Distributed Version Control System Backed by Canonical Ltd, the Ubuntu Linux

Company MySQL hosted at :

https://launchpad.net/mysql-server Getting Started with Bazaar for MySQL :

http://dev.mysql.com/tech-resources/articles/getting-started-with-bazaar-for-mysql.html

Submitting Patch: bzr diff > mybug.patch [ changes not yet

committed ] Send to: [email protected]

16

Page 17: How to Contribute Code to MySQL?

BUILDING MYSQL SOURCE …

Checkout Source : bzr branch lp:mysql-server/6.0

Follow Instructions in Reference Manual:

http://dev.mysql.com/doc/refman/5.1/en/installing-source.html ./BUILD/compile-pentium-debug

--prefix=~/mysql6/install make install make test

17

Page 18: How to Contribute Code to MySQL?

MAILING LISTS …

http://lists.mysql.com internals - For dev questions announce – Low traffic, announcements only mysql bugs gui-tools – Administrator and Query browser java – JDBC Drivers, MySQL Connector/J benchmarks cluster myodbc, dotnet, perl, plusplus, win32,

packagers

18

Page 19: How to Contribute Code to MySQL?

MYSQL UNIVERSITY

http://forge.mysql.com/wiki/MySQL_University Every Thursday at 15:00 CET, 7:30 PM IST,

1 hr session Recorded Sessions Available Online Web – MySQL_University#Upcoming_Sessions IRC – server: irc.freenode.net, channel: #mysql-university Voice stream –

http://your_nickname:[email protected] Semester Break now – Classes to Resume from Sep 4th

19

Page 20: How to Contribute Code to MySQL?

IRC – INTERNET RELAY CHAT

http://forge.mysql.com/wiki/IRC

IRC – server: irc.freenode.net, channels #mysql , #mysql-dev, #workbench

Xchat - popular IRC Client Web access for IRC using Public Free Servers:

E.g. http://mibbit.com

20

Page 21: How to Contribute Code to MySQL?

MYSQL INTERNALS

Checkout this link at forge.mysql.com :

http://forge.mysql.com/wiki/MySQL_Internals

MySQL Internals – Book By Sasha Pachev

21

Page 22: How to Contribute Code to MySQL?

SOURCE CODE CROSS REFERENCE

Cscope Doxygen Opengrok Lxr

22

Page 23: How to Contribute Code to MySQL?

CSCOPE

C symbol: mysql_insert File Function Line 0 sql_insert.cc <global> 552 bool mysql_insert(THD

*thd,

Find this C symbol: Find this global definition: mysql_insertFind functions called by this function:Find functions calling this function:Find this text string: Change this text string: Find this egrep pattern:Find this file:Find files #including this file:Find all function definitions:Find all symbol assignments:

23

cscope -buq -I. -Iinclude -Isql -Imysys ... -i ./cscope.files cscope -d

Page 24: How to Contribute Code to MySQL?

MYSQL WITH NETBEANS

Import Source Code Assistant :

Specify Include Directories, CFLAGS Complete IDE – Integrated Editing,

Debugging Uses Gdb or Dbx

24

Page 25: How to Contribute Code to MySQL?

RUNNING DEBUGGER WITH MYSQL…

Command Line gdb/dbx for best control

How to Run MySQL With Debugger : http://forge.mysql.com/wiki/How_to_Run_MySQL_With_a_Debugger

Are you Solaris truss fan ? On linux, use : strace -e trace=file progname # Trace

syscalls ltrace -e funcname -l libname progname #

Trace lib

25

Page 26: How to Contribute Code to MySQL?

MORE RESOURCES …

MySQL Forge: Resources for community : http://forge.mysql.com

MySQL Forums: http://forums.mysql.com Lots of groups including various topics like

migration, all connectors, workbench, individual storage engines, etc.

Lot more forums than mailing lists Planet MySQL – Blog aggregator

http://planetmysql.org Developer Zone: Developer Articles, etc.

http://dev.mysql.com

26

Page 27: How to Contribute Code to MySQL?

THAVA ALAGU

Blog: http://blogs.sun.com/thava/[email protected]: thavamuniJuly 2008

Q & A