PATH: //usr/include/mysql/server/private
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 aligned.h
↓
X
📄 aria_backup.h
↓
X
📄 assume_aligned.h
↓
X
📁 atomic/
X
📄 authors.h
↓
X
📄 backup.h
↓
X
📄 bounded_queue.h
↓
X
📄 client_settings.h
↓
X
📄 compat56.h
↓
X
📄 config.h
↓
X
📄 contributors.h
↓
X
📄 create_options.h
↓
X
📄 create_tmp_table.h
↓
X
📄 cset_narrowing.h
↓
X
📄 custom_conf.h
↓
X
📄 datadict.h
↓
X
📄 ddl_log.h
↓
X
📄 debug.h
↓
X
📄 debug_sync.h
↓
X
📄 derived_handler.h
↓
X
📄 derror.h
↓
X
📄 des_key_file.h
↓
X
📄 discover.h
↓
X
📄 dur_prop.h
↓
X
📄 embedded_priv.h
↓
X
📄 event_data_objects.h
↓
X
📄 event_db_repository.h
↓
X
📄 event_parse_data.h
↓
X
📄 event_queue.h
↓
X
📄 event_scheduler.h
↓
X
📄 events.h
↓
X
📄 field.h
↓
X
📄 field_comp.h
↓
X
📄 filesort.h
↓
X
📄 filesort_utils.h
↓
X
📄 ft_global.h
↓
X
📄 gcalc_slicescan.h
↓
X
📄 gcalc_tools.h
↓
X
📄 grant.h
↓
X
📄 group_by_handler.h
↓
X
📄 gstream.h
↓
X
📄 ha_handler_stats.h
↓
X
📄 ha_partition.h
↓
X
📄 ha_sequence.h
↓
X
📄 handle_connections_win.h
↓
X
📄 handler.h
↓
X
📄 hash.h
↓
X
📄 hash_filo.h
↓
X
📄 heap.h
↓
X
📄 hostname.h
↓
X
📄 ilist.h
↓
X
📄 init.h
↓
X
📄 innodb_priv.h
↓
X
📄 item.h
↓
X
📄 item_cmpfunc.h
↓
X
📄 item_create.h
↓
X
📄 item_func.h
↓
X
📄 item_geofunc.h
↓
X
📄 item_jsonfunc.h
↓
X
📄 item_row.h
↓
X
📄 item_strfunc.h
↓
X
📄 item_subselect.h
↓
X
📄 item_sum.h
↓
X
📄 item_timefunc.h
↓
X
📄 item_vers.h
↓
X
📄 item_windowfunc.h
↓
X
📄 item_xmlfunc.h
↓
X
📄 json_table.h
↓
X
📄 key.h
↓
X
📄 keycaches.h
↓
X
📄 lex.h
↓
X
📄 lex_string.h
↓
X
📄 lex_symbol.h
↓
X
📄 lf.h
↓
X
📄 lock.h
↓
X
📄 log.h
↓
X
📄 log_event.h
↓
X
📄 log_event_data_type.h
↓
X
📄 log_event_old.h
↓
X
📄 log_slow.h
↓
X
📄 maria.h
↓
X
📄 mariadb.h
↓
X
📄 mdl.h
↓
X
📄 mem_root_array.h
↓
X
📄 message.h
↓
X
📄 multi_range_read.h
↓
X
📄 my_alarm.h
↓
X
📄 my_apc.h
↓
X
📄 my_atomic.h
↓
X
📄 my_atomic_wrapper.h
↓
X
📄 my_base.h
↓
X
📄 my_bit.h
↓
X
📄 my_bitmap.h
↓
X
📄 my_check_opt.h
↓
X
📄 my_compare.h
↓
X
📄 my_counter.h
↓
X
📄 my_cpu.h
↓
X
📄 my_crypt.h
↓
X
📄 my_decimal.h
↓
X
📄 my_default.h
↓
X
📄 my_handler_errors.h
↓
X
📄 my_json_writer.h
↓
X
📄 my_libwrap.h
↓
X
📄 my_md5.h
↓
X
📄 my_minidump.h
↓
X
📄 my_nosys.h
↓
X
📄 my_rdtsc.h
↓
X
📄 my_rnd.h
↓
X
📄 my_service_manager.h
↓
X
📄 my_stack_alloc.h
↓
X
📄 my_stacktrace.h
↓
X
📄 my_time.h
↓
X
📄 my_tree.h
↓
X
📄 my_uctype.h
↓
X
📄 my_user.h
↓
X
📄 myisam.h
↓
X
📄 myisamchk.h
↓
X
📄 myisammrg.h
↓
X
📄 myisampack.h
↓
X
📄 mysqld.h
↓
X
📄 mysqld_default_groups.h
↓
X
📄 mysqld_suffix.h
↓
X
📄 mysys_err.h
↓
X
📄 opt_range.h
↓
X
📄 opt_subselect.h
↓
X
📄 opt_trace.h
↓
X
📄 opt_trace_context.h
↓
X
📄 parse_file.h
↓
X
📄 partition_element.h
↓
X
📄 partition_info.h
↓
X
📄 password.h
↓
X
📄 pfs_file_provider.h
↓
X
📄 pfs_idle_provider.h
↓
X
📄 pfs_memory_provider.h
↓
X
📄 pfs_metadata_provider.h
↓
X
📄 pfs_socket_provider.h
↓
X
📄 pfs_stage_provider.h
↓
X
📄 pfs_statement_provider.h
↓
X
📄 pfs_table_provider.h
↓
X
📄 pfs_thread_provider.h
↓
X
📄 pfs_transaction_provider.h
↓
X
📄 privilege.h
↓
X
📄 probes_mysql.h
↓
X
📄 probes_mysql_dtrace.h
↓
X
📄 probes_mysql_nodtrace.h
↓
X
📄 procedure.h
↓
X
📄 protocol.h
↓
X
📄 proxy_protocol.h
↓
X
📄 queues.h
↓
X
📄 records.h
↓
X
📄 repl_failsafe.h
↓
X
📄 replication.h
↓
X
📄 rijndael.h
↓
X
📄 rowid_filter.h
↓
X
📄 rpl_constants.h
↓
X
📄 rpl_filter.h
↓
X
📄 rpl_gtid.h
↓
X
📄 rpl_injector.h
↓
X
📄 rpl_mi.h
↓
X
📄 rpl_parallel.h
↓
X
📄 rpl_record.h
↓
X
📄 rpl_record_old.h
↓
X
📄 rpl_reporting.h
↓
X
📄 rpl_rli.h
↓
X
📄 rpl_tblmap.h
↓
X
📄 rpl_utility.h
↓
X
📄 scheduler.h
↓
X
📄 scope.h
↓
X
📄 select_handler.h
↓
X
📄 semisync.h
↓
X
📄 semisync_master.h
↓
X
📄 semisync_master_ack_receiver.h
↓
X
📄 semisync_slave.h
↓
X
📄 service_versions.h
↓
X
📄 session_tracker.h
↓
X
📄 set_var.h
↓
X
📄 slave.h
↓
X
📄 socketpair.h
↓
X
📄 source_revision.h
↓
X
📄 sp.h
↓
X
📄 sp_cache.h
↓
X
📄 sp_head.h
↓
X
📄 sp_pcontext.h
↓
X
📄 sp_rcontext.h
↓
X
📄 span.h
↓
X
📄 spatial.h
↓
X
📄 sql_acl.h
↓
X
📄 sql_admin.h
↓
X
📄 sql_alloc.h
↓
X
📄 sql_alter.h
↓
X
📄 sql_analyse.h
↓
X
📄 sql_analyze_stmt.h
↓
X
📄 sql_array.h
↓
X
📄 sql_audit.h
↓
X
📄 sql_base.h
↓
X
📄 sql_basic_types.h
↓
X
📄 sql_binlog.h
↓
X
📄 sql_bitmap.h
↓
X
📄 sql_bootstrap.h
↓
X
📄 sql_cache.h
↓
X
📄 sql_callback.h
↓
X
📄 sql_class.h
↓
X
📄 sql_cmd.h
↓
X
📄 sql_connect.h
↓
X
📄 sql_const.h
↓
X
📄 sql_crypt.h
↓
X
📄 sql_cte.h
↓
X
📄 sql_cursor.h
↓
X
📄 sql_db.h
↓
X
📄 sql_debug.h
↓
X
📄 sql_delete.h
↓
X
📄 sql_derived.h
↓
X
📄 sql_digest.h
↓
X
📄 sql_digest_stream.h
↓
X
📄 sql_do.h
↓
X
📄 sql_error.h
↓
X
📄 sql_explain.h
↓
X
📄 sql_expression_cache.h
↓
X
📄 sql_get_diagnostics.h
↓
X
📄 sql_handler.h
↓
X
📄 sql_help.h
↓
X
📄 sql_hset.h
↓
X
📄 sql_i_s.h
↓
X
📄 sql_insert.h
↓
X
📄 sql_join_cache.h
↓
X
📄 sql_lex.h
↓
X
📄 sql_lifo_buffer.h
↓
X
📄 sql_limit.h
↓
X
📄 sql_list.h
↓
X
📄 sql_load.h
↓
X
📄 sql_locale.h
↓
X
📄 sql_manager.h
↓
X
📄 sql_mode.h
↓
X
📄 sql_parse.h
↓
X
📄 sql_partition.h
↓
X
📄 sql_partition_admin.h
↓
X
📄 sql_plist.h
↓
X
📄 sql_plugin.h
↓
X
📄 sql_plugin_compat.h
↓
X
📄 sql_prepare.h
↓
X
📄 sql_priv.h
↓
X
📄 sql_profile.h
↓
X
📄 sql_reload.h
↓
X
📄 sql_rename.h
↓
X
📄 sql_repl.h
↓
X
📄 sql_schema.h
↓
X
📄 sql_select.h
↓
X
📄 sql_sequence.h
↓
X
📄 sql_servers.h
↓
X
📄 sql_show.h
↓
X
📄 sql_signal.h
↓
X
📄 sql_sort.h
↓
X
📄 sql_statistics.h
↓
X
📄 sql_string.h
↓
X
📄 sql_table.h
↓
X
📄 sql_tablespace.h
↓
X
📄 sql_test.h
↓
X
📄 sql_time.h
↓
X
📄 sql_trigger.h
↓
X
📄 sql_truncate.h
↓
X
📄 sql_tvc.h
↓
X
📄 sql_type.h
↓
X
📄 sql_type_fixedbin.h
↓
X
📄 sql_type_fixedbin_storage.h
↓
X
📄 sql_type_geom.h
↓
X
📄 sql_type_int.h
↓
X
📄 sql_type_json.h
↓
X
📄 sql_type_real.h
↓
X
📄 sql_type_string.h
↓
X
📄 sql_udf.h
↓
X
📄 sql_union.h
↓
X
📄 sql_update.h
↓
X
📄 sql_view.h
↓
X
📄 sql_window.h
↓
X
📄 ssl_compat.h
↓
X
📄 strfunc.h
↓
X
📄 structs.h
↓
X
📄 sys_vars_shared.h
↓
X
📄 t_ctype.h
↓
X
📄 table.h
↓
X
📄 table_cache.h
↓
X
📄 thr_alarm.h
↓
X
📄 thr_lock.h
↓
X
📄 thr_malloc.h
↓
X
📄 thr_timer.h
↓
X
📄 thread_cache.h
↓
X
📄 threadpool.h
↓
X
📄 threadpool_generic.h
↓
X
📄 threadpool_winsockets.h
↓
X
📄 transaction.h
↓
X
📄 tzfile.h
↓
X
📄 tztime.h
↓
X
📄 uniques.h
↓
X
📄 unireg.h
↓
X
📄 vers_string.h
↓
X
📄 violite.h
↓
X
📄 waiting_threads.h
↓
X
📄 welcome_copyright_notice.h
↓
X
📄 win_tzname_data.h
↓
X
📄 winservice.h
↓
X
📄 wqueue.h
↓
X
📄 wsrep.h
↓
X
📄 wsrep_applier.h
↓
X
📄 wsrep_binlog.h
↓
X
📄 wsrep_client_service.h
↓
X
📄 wsrep_client_state.h
↓
X
📄 wsrep_condition_variable.h
↓
X
📄 wsrep_high_priority_service.h
↓
X
📄 wsrep_mutex.h
↓
X
📄 wsrep_mysqld.h
↓
X
📄 wsrep_mysqld_c.h
↓
X
📄 wsrep_on.h
↓
X
📄 wsrep_priv.h
↓
X
📄 wsrep_schema.h
↓
X
📄 wsrep_server_service.h
↓
X
📄 wsrep_server_state.h
↓
X
📄 wsrep_sst.h
↓
X
📄 wsrep_storage_service.h
↓
X
📄 wsrep_thd.h
↓
X
📄 wsrep_trans_observer.h
↓
X
📄 wsrep_types.h
↓
X
📄 wsrep_utils.h
↓
X
📄 wsrep_var.h
↓
X
📄 wsrep_xid.h
↓
X
📄 xa.h
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: sql_bitmap.h
/* Copyright (c) 2003, 2013, Oracle and/or its affiliates Copyright (c) 2009, 2013, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */ /* Implementation of a bitmap type. The idea with this is to be able to handle any constant number of bits but also be able to use 32 or 64 bits bitmaps very efficiently */ #ifndef SQL_BITMAP_INCLUDED #define SQL_BITMAP_INCLUDED #include <my_sys.h> #include <my_bitmap.h> #include <my_bit.h> /* An iterator to quickly walk over bits in ulonglong bitmap. */ class Table_map_iterator { ulonglong bmp; public: Table_map_iterator(ulonglong t): bmp(t){} uint next_bit() { if (!bmp) return BITMAP_END; uint bit= my_find_first_bit(bmp); bmp &= ~(1ULL << bit); return bit; } int operator++(int) { return next_bit(); } enum { BITMAP_END= 64 }; }; template <uint width> class Bitmap { /* Workaround GCC optimizer bug (generating SSE instuctions on unaligned data) */ #if defined (__GNUC__) && defined(__x86_64__) && (__GNUC__ < 6) && !defined(__clang__) #define NEED_GCC_NO_SSE_WORKAROUND #endif #ifdef NEED_GCC_NO_SSE_WORKAROUND #pragma GCC push_options #pragma GCC target ("no-sse") #endif private: static const int BITS_PER_ELEMENT= sizeof(ulonglong) * 8; static const int ARRAY_ELEMENTS= (width + BITS_PER_ELEMENT - 1) / BITS_PER_ELEMENT; static const ulonglong ALL_BITS_SET= ULLONG_MAX; ulonglong buffer[ARRAY_ELEMENTS]; uint bit_index(uint n) const { DBUG_ASSERT(n < width); return ARRAY_ELEMENTS == 1 ? 0 : n / BITS_PER_ELEMENT; } ulonglong bit_mask(uint n) const { DBUG_ASSERT(n < width); return ARRAY_ELEMENTS == 1 ? 1ULL << n : 1ULL << (n % BITS_PER_ELEMENT); } ulonglong last_element_mask(int n) const { DBUG_ASSERT(n % BITS_PER_ELEMENT != 0); return bit_mask(n) - 1; } public: /* The default constructor does nothing. The caller is supposed to either zero the memory or to call set_all()/clear_all()/set_prefix() to initialize bitmap. */ Bitmap() = default; explicit Bitmap(uint prefix) { set_prefix(prefix); } void init(uint prefix) { set_prefix(prefix); } uint length() const { return width; } void set_bit(uint n) { buffer[bit_index(n)] |= bit_mask(n); } void clear_bit(uint n) { buffer[bit_index(n)] &= ~bit_mask(n); } bool is_set(uint n) const { return buffer[bit_index(n)] & bit_mask(n); } void set_prefix(uint prefix_size) { set_if_smaller(prefix_size, width); size_t idx= prefix_size / BITS_PER_ELEMENT; for (size_t i= 0; i < idx; i++) buffer[i]= ALL_BITS_SET; if (prefix_size % BITS_PER_ELEMENT) buffer[idx++]= last_element_mask(prefix_size); for (size_t i= idx; i < ARRAY_ELEMENTS; i++) buffer[i]= 0; } bool is_prefix(uint prefix_size) const { DBUG_ASSERT(prefix_size <= width); size_t idx= prefix_size / BITS_PER_ELEMENT; for (size_t i= 0; i < idx; i++) if (buffer[i] != ALL_BITS_SET) return false; if (prefix_size % BITS_PER_ELEMENT) if (buffer[idx++] != last_element_mask(prefix_size)) return false; for (size_t i= idx; i < ARRAY_ELEMENTS; i++) if (buffer[i] != 0) return false; return true; } void set_all() { if (width % BITS_PER_ELEMENT) set_prefix(width); else if (ARRAY_ELEMENTS > 1) memset(buffer, 0xff, sizeof(buffer)); else buffer[0] = ALL_BITS_SET; } void clear_all() { if (ARRAY_ELEMENTS > 1) memset(buffer, 0, sizeof(buffer)); else buffer[0]= 0; } void intersect(const Bitmap& map2) { for (size_t i= 0; i < ARRAY_ELEMENTS; i++) buffer[i] &= map2.buffer[i]; } private: /* Intersect with a bitmap represented as as longlong. In addition, pad the rest of the bitmap with 0 or 1 bits depending on pad_with_ones parameter. */ void intersect_and_pad(ulonglong map2buff, bool pad_with_ones) { buffer[0] &= map2buff; for (size_t i= 1; i < ARRAY_ELEMENTS; i++) buffer[i]= pad_with_ones ? ALL_BITS_SET : 0; if (ARRAY_ELEMENTS > 1 && (width % BITS_PER_ELEMENT) && pad_with_ones) buffer[ARRAY_ELEMENTS - 1]= last_element_mask(width); } public: void intersect(ulonglong map2buff) { intersect_and_pad(map2buff, 0); } /* Use highest bit for all bits above first element. */ void intersect_extended(ulonglong map2buff) { intersect_and_pad(map2buff, (map2buff & (1ULL << 63))); } void subtract(const Bitmap& map2) { for (size_t i= 0; i < ARRAY_ELEMENTS; i++) buffer[i] &= ~(map2.buffer[i]); } void merge(const Bitmap& map2) { for (size_t i= 0; i < ARRAY_ELEMENTS; i++) buffer[i] |= map2.buffer[i]; } bool is_clear_all() const { for (size_t i= 0; i < ARRAY_ELEMENTS; i++) if (buffer[i]) return false; return true; } bool is_subset(const Bitmap& map2) const { for (size_t i= 0; i < ARRAY_ELEMENTS; i++) if (buffer[i] & ~(map2.buffer[i])) return false; return true; } bool is_overlapping(const Bitmap& map2) const { for (size_t i= 0; i < ARRAY_ELEMENTS; i++) if (buffer[i] & map2.buffer[i]) return true; return false; } bool operator==(const Bitmap& map2) const { if (ARRAY_ELEMENTS > 1) return !memcmp(buffer,map2.buffer,sizeof(buffer)); return buffer[0] == map2.buffer[0]; } bool operator!=(const Bitmap& map2) const { return !(*this == map2); } /* Print hexadecimal representation of bitmap. Truncate trailing zeros. */ char *print(char *buf) const { size_t last; /*index of the last non-zero element, or 0. */ for (last= ARRAY_ELEMENTS - 1; last && !buffer[last]; last--){} const int HEX_DIGITS_PER_ELEMENT= BITS_PER_ELEMENT / 4; for (size_t i= 0; i < last; i++) { ulonglong num = buffer[i]; uint shift = BITS_PER_ELEMENT - 4; size_t pos= i * HEX_DIGITS_PER_ELEMENT; for (size_t j= 0; j < HEX_DIGITS_PER_ELEMENT; j++) { buf[pos + j]= _dig_vec_upper[(num >> shift) & 0xf]; shift += 4; } } longlong2str(buffer[last], buf, 16); return buf; } ulonglong to_ulonglong() const { return buffer[0]; } uint bits_set() { uint res= 0; for (size_t i= 0; i < ARRAY_ELEMENTS; i++) res += my_count_bits(buffer[i]); return res; } class Iterator { const Bitmap& map; uint offset; Table_map_iterator tmi; public: Iterator(const Bitmap<width>& map2) : map(map2), offset(0), tmi(map2.buffer[0]) {} int operator++(int) { for (;;) { int nextbit= tmi++; if (nextbit != Table_map_iterator::BITMAP_END) return offset + nextbit; if (offset + BITS_PER_ELEMENT >= map.length()) return BITMAP_END; offset += BITS_PER_ELEMENT; tmi= Table_map_iterator(map.buffer[offset / BITS_PER_ELEMENT]); } } enum { BITMAP_END = width }; }; #ifdef NEED_GCC_NO_SSE_WORKAROUND #pragma GCC pop_options #undef NEED_GCC_NO_SSE_WORKAROUND #endif }; typedef Bitmap<MAX_INDEXES> key_map; /* Used for finding keys */ #endif /* SQL_BITMAP_INCLUDED */
SIMPAN PERUBAHAN