| 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. |
| 2 | |
| 3 | This program is free software; you can redistribute it and/or modify |
| 4 | it under the terms of the GNU General Public License as published by |
| 5 | the Free Software Foundation; version 2 of the License. |
| 6 | |
| 7 | This program is distributed in the hope that it will be useful, |
| 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | GNU General Public License for more details. |
| 11 | |
| 12 | You should have received a copy of the GNU General Public License |
| 13 | along with this program; if not, write to the Free Software |
| 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ |
| 15 | |
| 16 | /* |
| 17 | Rename a table |
| 18 | */ |
| 19 | |
| 20 | #include "heapdef.h"cxx . . $ `<file>/storage/heap/heapdef.h`/ |
| 21 | |
| 22 | int heap_renamecxx . . $ heap_rename(5ae29d726ae57f88).(const char *old_name, const char *new_name) |
| 23 | { |
| 24 | reg1cxx . . $ `include/my_global.h:993:9`! HP_SHAREcxx . . $ HP_SHARE# *info; |
| 25 | char *name_buff; |
| 26 | DBUG_ENTERcxx . . $ `include/my_dbug.h:165:9`!("heap_rename"); |
| 27 | |
| 28 | mysql_mutex_lockcxx . . $ `include/mysql/psi/mysql_thread.h:360:11`!(&THR_LOCK_heap); |
| 29 | if ((info = hp_find_named_heapcxx . . $ hp_find_named_heap(658ed19d59b49786).(old_name))) |
| 30 | { |
| 31 | if (!(name_buff=(char*) my_strdupcxx . . $ my_strdup(cc2b37bbca408934).(hp_key_memory_HP_SHAREcxx . . $ hp_key_memory_HP_SHARE., |
| 32 | new_name, MYFcxx . . $ `include/my_global.h:986:9`!(MY_WMEcxx . . $ `include/my_sys.h:57:9`!)))) |
| 33 | { |
| 34 | mysql_mutex_unlockcxx . . $ `include/mysql/psi/mysql_thread.h:391:11`!(&THR_LOCK_heap); |
| 35 | DBUG_RETURNcxx . . $ `include/my_dbug.h:168:9`!(my_errnocxx . . $ `include/my_pthread.h:720:9`!); |
| 36 | } |
| 37 | my_freecxx . . $ my_free(5d22bdacc48458e8).(info->namecxx . . $ st_heap_share#name.); |
| 38 | info->namecxx . . $ st_heap_share#name.=name_buff; |
| 39 | } |
| 40 | mysql_mutex_unlockcxx . . $ `include/mysql/psi/mysql_thread.h:391:11`!(&THR_LOCK_heap); |
| 41 | DBUG_RETURNcxx . . $ `include/my_dbug.h:168:9`!(0); |
| 42 | } |