Hi Stewart, I think I have solved the low hanging fruit ( Bug # 626893 - https://bugs.launchpad.net/drizzle/+bug/626893 ). The changes were made in file create_table.cc ( line # 198 ) . The part of the code that was sending the error to the client is given below
if (unique_table(create_table_list, select_tables)) { *my_error(ER_UPDATE_TABLE_USED, MYF(0), create_table_list->alias);* /* put tables back for PS rexecuting */ lex().link_first_table_back(create_table_list, link_to_local); res= true; break; } After looking at how warnings and errors are set in drizzle, I have changed the following line of code *my_error(ER_UPDATE_TABLE_USED, MYF(0), create_table_list->alias);* to *push_warning_printf(&session(), DRIZZLE_ERROR::WARN_LEVEL_NOTE, ER_TABLE_EXISTS_ERROR, ER( ER_TABLE_EXISTS_ERROR),create_table_list->alias ) * Now the desired behavior ( i.e warning instead of error ) is acquired I am just going to commit this solution so you can review it. I also sent you a private email regarding some questions about project proposal and replication code. Please answer my queries. Regards, Kinaan Khan Sherwani On Mon, Mar 26, 2012 at 5:55 PM, Stewart Smith <stew...@flamingspork.com> wrote: > Hi! > > On Mon, 26 Mar 2012 15:50:27 +0500, Kinaan Khan Sherwani < mr.sherw...@gmail.com> wrote: >> Hello, >> >> I'm an undergraduate student currently in the 3rd year of my Computer >> Science degree at *FAST-National University of Computer and Emerging >> Sciences, Lahore, Pakistan.* I am interested in* "table definition files >> in an innodb table" *idea under 'Stewart Smith' as a mentor. > > Great to meet you! > >> For the past few days , I have been studying the mysql innodb storage >> engine. I studied in mysql reference manual that MySQL server keeps data >> dictionary information in .frm files which it stores in the database >> directories, whereas InnoDB also stores the information into its own data >> dictionary inside the table space files. According to my knowledge , in >> case of drizzle, the problems occur when the innodb internal data >> dictionary goes out-of-sync with the table definition files ( same as in >> mysql ). > > correct. > >> The GSoC idea is >> " To make DDL truly crash safe, we should instead store them inside a >> InnoDB table as part of the data dictionary transaction ". >> My question is that what is the basic purpose to store the information >> inside the data dictionary when it is already present there? Why don't we >> just remove the mechanism of using table definition ( .frm / .dfe ) files >> so that drizzle just checks the information in data dictionary. > > There is more information in the table definition protobuf message than > just what ends up in the InnoDB data dictionary. This includes: table > and column comments, default values and even the exact data types of > each column (many user visible types can map to the one internal innodb > type). > >> I have built the source of Drizzle in Linux. I am curious to know which >> debugging tool you guys would recommend to use on Linux to debug and study >> the source base of Drizzle. > > GDB when needed, but if you want to track what storage engine calls > happen, check out the storage_engine_api_tester plugin test/result files > to see the traces of some simple queries. > >> I intend to solve a bug and I am on it. After starting work on MySQL i was >> always interested to work on innodb engine and planned to do it in summers >> as I will be totally free. This GSoC project will give me chance to work on >> innodb which will also help me in learning MySQL/Drizzle and develop them >> further. >> >> PS. I didn't look into the innodb source so it's just an educated guess >> based on my learning in previous days. I need an expert opinion on it. > > You can have a look at how the replication code writes the replication > messages to an innodb table, and that will form a template for how to > write the table protobuf message. > > For seeing an engine that implements storing the table definition in a > table, you can check out the 7.0 source (elliot) and the HailDB engine. > > -- > Stewart Smith
_______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : drizzle-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp