Re: [Maria-developers] Adding a storage engine - compilation
Hi Amith, here is what I did: please look at the file storage/engine/CMakeLists.txt copy this file to storage/customEngine/ and then edit the text. An example for the new content: --- SET(DUMMY_PLUGIN_DYNAMIC ha_dummy) SET(DUMMY_SOURCES ha_dummy.cc ha_dummy.h) MYSQL_ADD_PLUGIN(dummy ${DUMMY_SOURCES} STORAGE_ENGINE MODULE_ONLY) replace the name 'ha_dummy' with the name of your file. Now, on a command-line execute the command: cmake -DCMAKE_BUILD_TYPE=Debug you may add more options here if required. Now recompile the sources. Everything worked here on my PC. A tip: add an error to your sources so that the compiler will complain about this, e.g. a syntax error. If this error-message appears you will know that your source-code will be compiled. hth AugustQ On Di, 2014-03-25 at 20:17 +0530, Amith Nagarajappa wrote: Hi, When i am creating a folder in storage/customEngine. I have placed the makefile from example folder and in the customEngine folder and have made required changes. However, makefile is not generated in the storage/customEngine folder. What change I have to make in configure or configure.in file? Right now, my custom engine code is similar to example code. I would like to build it first and then make the changes accordingly. But makefile is not generated. Appreciate your help. Thanks and Regards, Amith ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp signature.asc Description: This is a digitally signed message part ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] [Commits] Rev 3991: MDEV-5138 Numerous test failures in mtr --ps --embedded
Hi, Sergei. Why does Protocol::net_store_data() have to be virtual? Well it doen't have to be virtual, but it's the nicest solution i came up with. All the related code is in the sql/protocol.cc In fact only reason is the Protocol::store_string_aux() function that calls the ::net_store_data() internally. Both Protocol_text::store() and Protocol_binary::store() in turn call the Protocol::store_string_aux(). As the ::net_store_data() has to work differently for Protocol_binary and Protocol_text, I saw options either to create two absolutely same Protocol_text::store_string_aux() and Protocol_binary::store_string_aux() or make the net_store_data() virtual. Best regards. HF 18.03.2014 20:24, Sergei Golubchik wrote: Hi, Holyfoot! On Nov 30, holyf...@askmonty.org wrote: At file:///home/hf/wmar/mdev-5138/ revno: 3991 revision-id: holyf...@askmonty.org-20131130132432-etlmes8qhhqhr1iu parent: ele...@wheezy-64.home-20131128160251-vn857wx5qlon6j1p committer: Alexey Botchkov holyf...@askmonty.org branch nick: mdev-5138 timestamp: Sat 2013-11-30 17:24:32 +0400 message: MDEV-5138 Numerous test failures in mtr --ps --embedded. The function Protocol::net_store_data(a, b, CHARSET_A, CHARSET_B) should be adapted to be working in the embedded server as it's done with the Protocol::net_store_data(a, b). That new function renamed as net_store_data_cs, so we can make it virtual. Why does Protocol::net_store_data() have to be virtual? (if it doesn't, Protocol::net_store_data_cs doesn't have to be virtual either and doesn't have to be renamed) Regards, Sergei ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Engine independent statistics - naming issues?
Hello, I was looking at whether column names used by EIS feature are consistent with themselves and with ther parts of the server. == Database / table / column names == There are a few naming conventions arready in use: 1. Old school: mysql.columns_priv, tables_priv Db Table_name Column_name 2. SQL STANDARD ALL CAPS HELLO FROM 1970S: information_schema.* (tables, columns, indexes, index_statistics, etc) TABLE_CATALOG (always 'def') TABLE_SCHEMA TABLE_NAME COLUMN_NAME INDEX_NAME 3. InnoDB has its own convention: mysql.innodb_table_stats, innodb_index_stats database_name table_name index_name 4. EITS feature will add: mysql.column_stats, index_stats, table_stats db_name table_name column_name index_name == Other == There are variables @@histogram_size, @@histogram_type. mysql.column_stats has columns named hist_size, hist_type. What's your opinion, should we make some renames to make things more consistent? BR Sergei -- Sergei Petrunia, Software Developer MariaDB | Skype: sergefp | Blog: http://s.petrunia.net/blog ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] [Commits] Rev 3995: MDEV-5138 Numerous test failures in mtr --ps --embedded
Hi, Sergei. Why does embedded fail while a normal client-server protocol is ok with that? The difference is that the client check the server status twice during executeion - after the metadata reading and after the actual data. That SERVER_STATUS_CURSOR_EXISTS is returned on the 'reading data' stage and the usual client just skips it. But for the embedded server that status is same in both cases. And the 'reading metadata' part crashes when it sees that server status. It's in the prepare_to_fetch_result() called from mysql_stmt_execute(). I see no reason to store both statuses for the embedded server just to imitate the usual client's behaviour. It's better not to return the misleading status in this case. Best regards HF 18.03.2014 20:21, Sergei Golubchik wrote: Hi, Holyfoot! On Dec 09, holyf...@askmonty.org wrote: At file:///home/hf/wmar/mdev-5138/ revno: 3995 revision-id: holyf...@askmonty.org-20131209020845-9o3l30ao90vzf600 parent: holyf...@askmonty.org-20131208143921-3veatgg9wngyzb47 committer: Alexey Botchkov holyf...@askmonty.org branch nick: mdev-5138 timestamp: Mon 2013-12-09 06:08:45 +0400 message: MDEV-5138 Numerous test failures in mtr --ps --embedded. If a prepared statement calls an stored procedure, the thd-server_status out of the SP goes up to the PS and then to the client. So that the client gets the SERVER_STATUS_CURSOR_EXISTS status if the SP uses a cursor. Which makes the embedded server fail. Why does embedded fail while a normal client-server protocol is ok with that? Fixed by saving/restoring the upper-level server_status in sp_head::execute(). Regards, Sergei ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp