dbTalk Databases Forums  

Re: bk commit - 5.1 tree (mikael:1.2388) BUG#19062

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss Re: bk commit - 5.1 tree (mikael:1.2388) BUG#19062 in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Re: bk commit - 5.1 tree (mikael:1.2388) BUG#19062 - 05-11-2006 , 08:57 AM






Mikael Ronström wrote:
Quote:
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2006/05/04 13:18:55-04:00
mikael (AT) c-870ae253 (DOT) 1238-1-...andsbolaget.se
# BUG 19062: CREATE TABLE ... PARTITION BY ... AS SELECT don't
create partitioned table
#
# sql/sql_parse.cc
# 2006/05/04 13:18:50-04:00
mikael (AT) c-870ae253 (DOT) 1238-1-...andsbolaget.se +11 -9
# Moved code to clone the partition info object such that also
# CREATE TABLE ... AS SELECT benefits from it
#

diff -Nru a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc 2006-05-04 13:23:56 -04:00
+++ b/sql/sql_parse.cc 2006-05-04 13:23:56 -04:00
@@ -2855,6 +2855,17 @@
res= 1;
goto end_with_restore_list;
}
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ {
+ partition_info *part_info= thd->lex->part_info;
+ if (part_info && !(part_info= thd->lex->part_info->get_clone()))
+ {
+ res= -1;
+ goto end_with_restore_list;
+ }
+ thd->work_part_info= part_info;
+ }
+#endif
if (select_lex->item_list.elements) // With select
{
select_result *result;
@@ -2924,15 +2935,6 @@
lex->like_name);
else
{
-#ifdef WITH_PARTITION_STORAGE_ENGINE
- partition_info *part_info= thd->lex->part_info;
- if (part_info && !(part_info= thd->lex->part_info->get_clone()))
- {
- res= -1;
- goto end_with_restore_list;
- }
- thd->work_part_info= part_info;
-#endif
res= mysql_create_table(thd, create_table->db,
create_table->table_name, &lex->create_info,
lex->create_list,

This change "feels" ok but it would really help me if I had more to read
about what the problem was and how your fix "fixes" it. This would help
others too when they later go back and see the change. We should not
write cset comments as if the reader understands the base code. Write a
paragraph if that is necessary. Why does the code break? What
specifically does your fix do that fixes that?

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.