PATH: //proc/thread-self/root/proc/self/root/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_sequence.h
/* Copyright (c) 2017, MariaDB corporation 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-1301 USA */ #ifndef SQL_SEQUENCE_INCLUDED #define SQL_SEQUENCE_INCLUDED #define seq_field_used_min_value 1 #define seq_field_used_max_value 2 #define seq_field_used_start 4 #define seq_field_used_increment 8 #define seq_field_used_cache 16 #define seq_field_used_cycle 32 #define seq_field_used_restart 64 #define seq_field_used_restart_value 128 /* Field position in sequence table for some fields we refer to directly */ #define NEXT_FIELD_NO 0 #define MIN_VALUE_FIELD_NO 1 #define ROUND_FIELD_NO 7 /** sequence_definition is used when defining a sequence as part of create */ class sequence_definition :public Sql_alloc { public: sequence_definition(): min_value(1), max_value(LONGLONG_MAX-1), start(1), increment(1), cache(1000), round(0), restart(0), cycle(0), used_fields(0) {} longlong reserved_until; longlong min_value; longlong max_value; longlong start; longlong increment; longlong cache; ulonglong round; longlong restart; // alter sequence restart value bool cycle; uint used_fields; // Which fields where used in CREATE bool check_and_adjust(bool set_reserved_until); void store_fields(TABLE *table); void read_fields(TABLE *table); int write_initial_sequence(TABLE *table); int write(TABLE *table, bool all_fields); /* This must be called after sequence data has been updated */ void adjust_values(longlong next_value); inline void print_dbug() { DBUG_PRINT("sequence", ("reserved: %lld start: %lld increment: %lld min_value: %lld max_value: %lld cache: %lld round: %lld", reserved_until, start, increment, min_value, max_value, cache, round)); } protected: /* The following values are the values from sequence_definition merged with global auto_increment_offset and auto_increment_increment */ longlong real_increment; longlong next_free_value; }; /** SEQUENCE is in charge of managing the sequence values. It's also responsible to generate new values and updating the sequence table (engine=SQL_SEQUENCE) trough it's specialized handler interface. If increment is 0 then the sequence will be be using auto_increment_increment and auto_increment_offset variables, just like AUTO_INCREMENT is using. */ class SEQUENCE :public sequence_definition { public: enum seq_init { SEQ_UNINTIALIZED, SEQ_IN_PREPARE, SEQ_IN_ALTER, SEQ_READY_TO_USE }; SEQUENCE(); ~SEQUENCE(); int read_initial_values(TABLE *table); int read_stored_values(TABLE *table); void write_lock(TABLE *table); void write_unlock(TABLE *table); void read_lock(TABLE *table); void read_unlock(TABLE *table); void copy(sequence_definition *seq) { sequence_definition::operator= (*seq); adjust_values(reserved_until); all_values_used= 0; } longlong next_value(TABLE *table, bool second_round, int *error); int set_value(TABLE *table, longlong next_value, ulonglong round_arg, bool is_used); longlong increment_value(longlong value) { if (real_increment > 0) { if (value > max_value - real_increment || value + real_increment > max_value) value= max_value + 1; else value+= real_increment; } else { if (value + real_increment < min_value || value < min_value - real_increment) value= min_value - 1; else value+= real_increment; } return value; } bool all_values_used; seq_init initialized; private: mysql_rwlock_t mutex; }; /** Class to cache last value of NEXT VALUE from the sequence */ class SEQUENCE_LAST_VALUE { public: SEQUENCE_LAST_VALUE(uchar *key_arg, uint length_arg) :key(key_arg), length(length_arg) {} ~SEQUENCE_LAST_VALUE() { my_free((void*) key); } /* Returns 1 if table hasn't been dropped or re-created */ bool check_version(TABLE *table); void set_version(TABLE *table); const uchar *key; uint length; bool null_value; longlong value; uchar table_version[MY_UUID_SIZE]; }; class Create_field; extern bool prepare_sequence_fields(THD *thd, List<Create_field> *fields); extern bool check_sequence_fields(LEX *lex, List<Create_field> *fields, const LEX_CSTRING db, const LEX_CSTRING table_name); extern bool sequence_insert(THD *thd, LEX *lex, TABLE_LIST *table_list); #endif /* SQL_SEQUENCE_INCLUDED */
SIMPAN PERUBAHAN