Date post: | 18-Dec-2014 |
Category: |
Technology |
Upload: | thavamuni |
View: | 2,795 times |
Download: | 5 times |
THAVA ALAGU
Staff Engineer, Database Group,
Sun Microsystems, Bangalore
http://blogs.sun.com/thava/
July 2008
HOW TO CONTRIBUTE CODE TO MYSQL ?
Welcome !Welcome !
2
AGENDA : CONTRIBUTING
Why ? Why ? How ?How ? Getting StartedGetting Started ResourcesResources
3
WHY CONTRIBUTE ?
Learn ! Get Famous! Land the job you want! Get Rich! Feel Good! Have Fun!
4
ARCHITECTURE OVERVIEW
5
HOW TO CONTRIBUTE ?
Community Contribution Program http://forge.mysql.com/wiki/Community_Contributions
Quality Contribution Program http://dev.mysql.com/programs/qualitycontribution.html
6
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
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
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
FOR STUDENTS: GOOGLE SUMMER OF CODE
http://forge.mysql.com/wiki/SummerOfCode2008Ideas
10
CODING GUIDELINES :
http://forge.mysql.com/wiki/MySQL_Internals_Coding_Guidelines
No Tabs No Carriage Returns Use 2 spaces for indentation Etc.
11
12
ARCHITECTURE OVERVIEW
13
REFERENCE MANUAL …
Excellent Online Reference Manual : http://dev.mysql.com/doc/refman/6.0/en/index.html Annotated with User Comments !
14
GETTING STARTED …
Bazaar – Version Control System http://bazaar-vcs.org/
Why Bazaar ? cvs, svn, hg, git, bazaar !
15
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
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
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
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
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
MYSQL INTERNALS
Checkout this link at forge.mysql.com :
http://forge.mysql.com/wiki/MySQL_Internals
MySQL Internals – Book By Sasha Pachev
21
SOURCE CODE CROSS REFERENCE
Cscope Doxygen Opengrok Lxr
22
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
MYSQL WITH NETBEANS
Import Source Code Assistant :
Specify Include Directories, CFLAGS Complete IDE – Integrated Editing,
Debugging Uses Gdb or Dbx
24
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
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